/* Seiko Club Singapore Museum — retro board chrome (phpBB-era layout, original styling) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:wght@600;700&display=swap");

:root {
  --ink: #1c2430;
  --muted: #5a6573;
  --paper: #e8edf2;
  --panel: #f4f7fa;
  --line: #b8c4d0;
  --header: #243447;
  --header-ink: #f0f4f8;
  --accent: #0b5ea8;
  --accent-dim: #0a4d8c;
  --row-alt: #dfe7ef;
  --ok: #2f6b3a;
  --warn: #8a5a12;
  --post-bg: #ffffff;
  --max: 960px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 15px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #d5dde6 0%, var(--paper) 180px);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-dim); }

t { display: contents; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 0.75rem 2.5rem;
}

/* Header */
.site-header {
  background: var(--header);
  color: var(--header-ink);
  border-bottom: 3px solid var(--accent);
}

.site-header .wrap {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
}

.brand {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  letter-spacing: -0.01em;
  color: var(--header-ink);
  text-decoration: none;
}
.brand:hover { color: #fff; text-decoration: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.9rem;
}
.nav a { color: #c5d4e4; }
.nav a:hover { color: #fff; }

.honesty {
  margin: 0.85rem auto 0;
  max-width: var(--max);
  padding: 0.55rem 0.75rem;
  background: #fff8e8;
  border: 1px solid #e0c98a;
  border-left: 4px solid var(--warn);
  color: #4a3a18;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Breadcrumbs */
.crumbs {
  margin: 0.9rem 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.crumbs a { font-weight: 500; }
.crumbs .sep { margin: 0 0.35rem; color: #8a96a4; }

/* Panel / tables (forum index, topic list) */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.panel-head {
  background: var(--header);
  color: var(--header-ink);
  padding: 0.45rem 0.65rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.panel-head a { color: #d6e6f7; }

table.forumlist,
table.topiclist {
  width: 100%;
  border-collapse: collapse;
  background: var(--post-bg);
}

table.forumlist th,
table.topiclist th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--line);
  background: #eef2f6;
}

table.forumlist td,
table.topiclist td {
  padding: 0.55rem;
  border-bottom: 1px solid #d5dde6;
  vertical-align: top;
}

table.forumlist tr:nth-child(even) td,
table.topiclist tr:nth-child(even) td {
  background: var(--row-alt);
}

.forum-name {
  font-weight: 600;
  font-size: 1rem;
}
.forum-desc {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.num {
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  width: 4.5rem;
}

.lastpost {
  font-size: 0.85rem;
  color: var(--muted);
  width: 11rem;
}
.lastpost strong { color: var(--ink); font-weight: 500; }

.cat-row td {
  background: #cfd8e3 !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.55rem !important;
  border-bottom: 1px solid var(--line);
}

.icon-cell {
  width: 2.2rem;
  text-align: center;
  color: var(--accent);
  font-size: 1.1rem;
}

/* Posts */
.topic-title {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.post {
  display: grid;
  grid-template-columns: 9rem 1fr;
  border: 1px solid var(--line);
  background: var(--post-bg);
  margin-bottom: 0.65rem;
}

.post-meta {
  background: #eef2f6;
  border-right: 1px solid var(--line);
  padding: 0.65rem;
  font-size: 0.85rem;
}

.post-author {
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.post-time {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.post-body {
  padding: 0.75rem 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.post-body img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  margin: 0.35rem 0;
  border: 1px solid var(--line);
  background: #eee;
}

.post-body img.broken {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8rem;
  min-height: 4rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  object-fit: none;
  border-style: dashed;
}

.post-subject {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

/* Pagination */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}
.pager a,
.pager span {
  display: inline-block;
  min-width: 1.75rem;
  text-align: center;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line);
  background: #fff;
}
.pager .current {
  background: var(--header);
  color: #fff;
  border-color: var(--header);
}

/* Search / insights */
.page-title {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0.25rem 0 0.75rem;
}

.lede {
  color: var(--muted);
  line-height: 1.5;
  max-width: 42rem;
  margin: 0 0 1rem;
}

.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.search-box input[type="search"],
.search-box select {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  background: #fff;
}
.search-box input[type="search"] { flex: 1 1 14rem; min-width: 10rem; }
.search-box button {
  font: inherit;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--accent-dim);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.search-box button:hover { background: var(--accent-dim); }

.results li { margin-bottom: 0.75rem; }
.results .meta { font-size: 0.85rem; color: var(--muted); }
.results .excerpt { font-size: 0.9rem; margin-top: 0.2rem; color: #333; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
}
.stat .n {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--header);
}
.stat .l { font-size: 0.8rem; color: var(--muted); }

.site-footer {
  margin-top: 2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .post { grid-template-columns: 1fr; }
  .post-meta {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
  }
  .post-time { margin-top: 0; }
  .num, .lastpost { display: none; }
  table.forumlist th:nth-child(n+3),
  table.topiclist th:nth-child(n+3) { display: none; }
}
