/* Minification failed. Returning unminified contents.
(7,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(8,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(9,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(10,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(12,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(13,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(14,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(16,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(17,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(18,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(20,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(21,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(22,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(29,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(30,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(31,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(32,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(34,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(35,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(36,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(38,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(39,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(40,3): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(61,21): run-time error CSS1039: Token not allowed after unary operator: '-font-sans'
(64,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(65,20): run-time error CSS1039: Token not allowed after unary operator: '-bg'
(67,17): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(68,23): run-time error CSS1039: Token not allowed after unary operator: '-accent-strong'
(78,20): run-time error CSS1039: Token not allowed after unary operator: '-nav-bg'
(79,33): run-time error CSS1039: Token not allowed after unary operator: '-border'
(80,34): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(102,21): run-time error CSS1039: Token not allowed after unary operator: '-font-en'
(106,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(121,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(124,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(129,20): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(131,21): run-time error CSS1039: Token not allowed after unary operator: '-font-sans'
(141,20): run-time error CSS1039: Token not allowed after unary operator: '-accent-strong'
(151,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(180,21): run-time error CSS1039: Token not allowed after unary operator: '-font-serif'
(184,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(189,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(202,20): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(203,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(213,21): run-time error CSS1039: Token not allowed after unary operator: '-font-serif'
(217,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(221,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(226,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(244,21): run-time error CSS1039: Token not allowed after unary operator: '-font-serif'
(247,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(250,33): run-time error CSS1039: Token not allowed after unary operator: '-border'
(269,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(276,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(281,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(290,15): run-time error CSS1039: Token not allowed after unary operator: '-accent-strong'
(303,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(308,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(315,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(325,33): run-time error CSS1039: Token not allowed after unary operator: '-border'
(329,21): run-time error CSS1039: Token not allowed after unary operator: '-font-serif'
(335,33): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(336,39): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(339,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(343,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(347,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(351,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(370,33): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(371,49): run-time error CSS1039: Token not allowed after unary operator: '-accent-strong'
(380,30): run-time error CSS1039: Token not allowed after unary operator: '-border'
(384,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(388,33): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(393,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(413,36): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(414,42): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(423,42): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(424,58): run-time error CSS1039: Token not allowed after unary operator: '-accent-strong'
(428,37): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(463,30): run-time error CSS1039: Token not allowed after unary operator: '-border'
(464,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(468,25): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(469,31): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(482,21): run-time error CSS1039: Token not allowed after unary operator: '-font-sans'
(485,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(487,20): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(488,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(493,22): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(508,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(510,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(511,20): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(516,20): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(518,22): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(521,28): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(527,20): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(528,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(533,49): run-time error CSS1039: Token not allowed after unary operator: '-border'
(535,21): run-time error CSS1039: Token not allowed after unary operator: '-font-serif'
(538,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(542,29): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(543,31): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(545,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(549,31): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(553,64): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(557,31): run-time error CSS1039: Token not allowed after unary operator: '-border'
(561,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(576,61): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(581,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(605,22): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(606,17): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(607,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(616,35): run-time error CSS1039: Token not allowed after unary operator: '-border'
(618,32): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(620,22): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(622,24): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(632,22): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(633,17): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(634,32): run-time error CSS1039: Token not allowed after unary operator: '-border'
(646,22): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(647,17): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(648,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(659,22): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(661,24): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(674,33): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(675,34): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(686,28): run-time error CSS1039: Token not allowed after unary operator: '-border'
(743,29): run-time error CSS1039: Token not allowed after unary operator: '-border'
(745,17): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(749,43): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(793,83): run-time error CSS1039: Token not allowed after unary operator: '-border'
(801,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(806,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(830,20): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(831,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(845,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(847,20): run-time error CSS1039: Token not allowed after unary operator: '-bg'
(850,21): run-time error CSS1039: Token not allowed after unary operator: '-font-serif'
(853,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(857,55): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(867,33): run-time error CSS1039: Token not allowed after unary operator: '-border'
(872,21): run-time error CSS1039: Token not allowed after unary operator: '-font-serif'
(875,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(876,20): run-time error CSS1039: Token not allowed after unary operator: '-bg'
(883,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(885,20): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(886,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(891,22): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(892,15): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(904,34): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(904,68): run-time error CSS1039: Token not allowed after unary operator: '-border'
(907,64): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(911,21): run-time error CSS1039: Token not allowed after unary operator: '-font-sans'
(914,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(916,20): run-time error CSS1039: Token not allowed after unary operator: '-surface'
(917,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(920,40): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(942,26): run-time error CSS1039: Token not allowed after unary operator: '-border'
(945,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(951,22): run-time error CSS1039: Token not allowed after unary operator: '-accent'
(957,15): run-time error CSS1039: Token not allowed after unary operator: '-ink'
(958,22): run-time error CSS1039: Token not allowed after unary operator: '-border'
(961,15): run-time error CSS1039: Token not allowed after unary operator: '-muted'
(977,15): run-time error CSS1039: Token not allowed after unary operator: '-ink-soft'
(982,27): run-time error CSS1039: Token not allowed after unary operator: '-accent'
 */
/* ----------------------------------------------------------------
   神州宣教 (Shenzhou.Web) — design system
   Locked topnav: Option B1 (warm sand + terracotta accent)
   ---------------------------------------------------------------- */

:root {
  --bg:        #faf7ee;
  --surface:   #ffffff;
  --nav-bg:    #fdfbf5;
  --border:    #e8e0c8;

  --ink:       #2b2a25;
  --ink-soft:  #5a4929;
  --muted:     #9b8a5e;

  --accent:        #b8541a;
  --accent-soft:   #d6804a;
  --accent-strong: #8a3c10;

  --font-sans:  "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-en:    "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Dark mode — activated by data-theme="dark" on <html>.
   Keeps the warm earthy character of the light theme (sand → dark walnut,
   terracotta accent slightly brightened for contrast against dark backgrounds). */
[data-theme="dark"] {
  --bg:        #1f1c17;
  --surface:   #2a2520;
  --nav-bg:    #1a1714;
  --border:    #3d362b;

  --ink:       #ebe5d3;
  --ink-soft:  #c5b896;
  --muted:     #8a7d5c;

  --accent:        #e89665;
  --accent-soft:   #f0ad85;
  --accent-strong: #d6804a;
}
[data-theme="dark"] img { opacity: 0.92; }
/* The wordmark PNG is dark calligraphy on transparent — invisible on dark nav.
   brightness(0) flattens any color to black (alpha preserved); invert(1) flips
   to white. Net effect: clean white silhouette of the calligraphy. */
[data-theme="dark"] .topnav__wordmark {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
[data-theme="dark"] .admin-flash {
  background: #173f2a;
  border-color: #265a3d;
  color: #a7f3d0;
}

/* reset / base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ----------------------------------------------------------------
   Topnav (sticky)
   ---------------------------------------------------------------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 3px 0 var(--accent);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.topnav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.topnav__brand:hover { text-decoration: none; }

.topnav__wordmark {
  height: 42px;
  width: auto;
  display: block;
}

.topnav__subtitle {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.topnav__menu {
  display: flex;
  gap: 1.875rem;
  margin-left: auto;
  margin-right: 1.5rem;
  align-items: center;
}
.topnav__menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.topnav__menu a:hover {
  color: var(--accent);
  text-decoration: none;
}

.topnav__login {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
}
.topnav__login:hover {
  background: var(--accent-strong);
  color: #fff;
  text-decoration: none;
}

.topnav__hamburger {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 8px;
  margin-right: 0.75rem;
}

/* mobile */
@media (max-width: 767px) {
  .topnav { padding: 0 1rem; }
  .topnav__subtitle { display: none; }
  .topnav__menu { display: none; }
  .topnav__wordmark { height: 32px; }
  .topnav__hamburger { display: inline-block; }
}

/* ----------------------------------------------------------------
   Page container, hero, sections
   ---------------------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--ink);
  letter-spacing: 2px;
}
.hero .lead {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(50, 40, 20, 0.06);
}
.card h2 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.card p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.card .meta {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ----------------------------------------------------------------
   Home page 3-column grid
   ---------------------------------------------------------------- */
.home-grid {
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  gap: 2rem;
  margin: 2rem 0;
}
.home-grid__sidebar {
  /* nothing extra; section spacing controlled by .sidebar-title + ul */
}
.home-grid__main { min-width: 0; }     /* let the grid track shrink */

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px;
}

/* pill list (used by author + board sidebars) */
.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.625rem;
  border-radius: 4px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background 0.12s ease, color 0.12s ease;
}
.pill:hover {
  background: rgba(184, 84, 26, 0.07);
  color: var(--accent);
  text-decoration: none;
}
.pill__count {
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  padding: 1px 8px;
  border-radius: 10px;
  min-width: 28px;
  text-align: center;
}
.pill:hover .pill__count {
  background: rgba(184, 84, 26, 0.12);
  color: var(--accent-strong);
}

.article-section { margin-bottom: 2.5rem; }
.article-section:last-child { margin-bottom: 0; }

/* Section heading is a link to the full list — no underline by default
   so it reads as a heading, hover hint shows it's clickable. */
.section-title-link {
  color: inherit;
  text-decoration: none;
}
.section-title-link:hover {
  color: var(--accent);
  text-decoration: none;
}
.section-title-link::after {
  content: " →";
  color: var(--muted);
  font-size: 0.75em;
  opacity: 0;
  transition: opacity 0.15s;
}
.section-title-link:hover::after {
  opacity: 1;
  color: var(--accent);
}

/* article list (main column) */
.article-list {
  display: flex;
  flex-direction: column;
}
.article {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.article:last-child { border-bottom: 0; }
.article__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.375rem;
  line-height: 1.4;
}
.article__title a { color: var(--ink); }
.article__title a:hover { color: var(--accent); text-decoration: none; }
.article__meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}
.article__writer {
  color: var(--ink-soft);
  text-decoration: none;
}
.article__writer:hover {
  color: var(--accent);
  text-decoration: underline;
}
.article__board {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}
.article__board:hover {
  text-decoration: underline;
}

/* badges */
.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 3px;
  margin-right: 0.375rem;
  vertical-align: middle;
  letter-spacing: 1px;
}
.badge--top  { background: var(--accent); color: #fff; }
.badge--good { background: #f5d9b9; color: var(--accent-strong); }
.badge--lock { background: #fde68a; color: #92400e; }
.badge--hide { background: #e2e8f0; color: #475569; }
.badge--del  { background: #fecaca; color: #991b1b; }

/* Online-users sidebar (home page right column) */
.online-sidebar {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.online-summary {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin: 0.5rem 0 0.25rem;
  line-height: 1.5;
}
.online-summary b { color: var(--accent); font-weight: 600; }
.online-details { margin-top: 0.25rem; }
.online-details > summary {
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--accent);
  list-style: none;
  padding: 0.25rem 0;
}
.online-details > summary::-webkit-details-marker { display: none; }
.online-details > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.25rem;
  transition: transform 0.15s;
}
.online-details[open] > summary::before { transform: rotate(90deg); }
.online-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.online-list__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
  font-size: 0.875rem;
}
.online-list__item a { color: var(--ink); text-decoration: none; }
.online-list__item a:hover { color: var(--accent); }
.online-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.online-badge--admin  { background: var(--accent); color: #fff; }
.online-badge--editor { background: #f5d9b9; color: var(--accent-strong); }
.online-badge--vip    { background: #fde68a; color: #92400e; }
.online-badge--member { background: #e2e8f0; color: #475569; }
.online-badge--guest  { background: #f5f5f4; color: #78716c; border: 1px solid #e7e5e4; }
.online-list__guest   { color: var(--muted); }

/* Admin flash + filter */
.admin-flash {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  padding: 0.625rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}
.admin-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

/* responsive: collapse the right sidebar first, then the left */
@media (max-width: 1023px) {
  .home-grid { grid-template-columns: 200px 1fr; gap: 1.5rem; }
  .home-grid__sidebar--right { display: none; }
}
@media (max-width: 767px) {
  .home-grid { grid-template-columns: 1fr; gap: 1rem; }
  .home-grid__sidebar--left { order: 2; }     /* push authors below main on mobile */
  .home-grid__main          { order: 1; }
}

/* footer */
.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--accent); }

/* ----------------------------------------------------------------
   Search form + pager
   ---------------------------------------------------------------- */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 560px;
  margin: 1.5rem auto 0;
}
.search-form__input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 0.55rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 84, 26, 0.12);
}
.search-form__submit { padding: 0.55rem 1.25rem; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}
.pager__btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink-soft);
  background: var(--surface);
  text-decoration: none;
  font-size: 0.9375rem;
}
.pager__btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}
.pager__info { color: var(--muted); font-size: 0.875rem; }

/* ----------------------------------------------------------------
   Thread / article body styling
   ---------------------------------------------------------------- */
.thread {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem 2.25rem;
  margin: 2rem 0;
}
.thread__header { border-bottom: 1px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.thread__title {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.thread__meta { color: var(--muted); font-size: 0.875rem; margin: 0; }
.thread__source { color: var(--muted); font-size: 0.8125rem; margin: 0.5rem 0 0; font-style: italic; }
.thread__summary {
  color: var(--ink-soft);
  font-style: italic;
  padding: 0.75rem 1rem;
  background: rgba(184, 84, 26, 0.04);
  border-left: 3px solid var(--accent);
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
}
.thread__body { font-size: 1rem; line-height: 1.7; color: var(--ink); }
.thread__body p { margin: 0 0 1rem; }
.thread__body img { border-radius: 4px; margin: 0.5rem 0; }
.thread__body blockquote {
  border-left: 4px solid var(--border);
  background: rgba(0,0,0,0.025);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  color: var(--ink-soft);
  font-style: italic;
}
.thread__body pre {
  background: #2b2a25;
  color: #f4ecd6;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}
.thread__body pre code { background: transparent; padding: 0; color: inherit; }
.thread__body code { background: rgba(0,0,0,0.05); padding: 1px 5px; border-radius: 3px; font-size: 0.875em; }
.thread__body figure { margin: 1rem 0; text-align: center; }
.thread__body figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 0.375rem; }
.thread__body .mp3-player {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(0,0,0,0.025);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}
[data-theme="dark"] .thread__body .mp3-player { background: rgba(255,255,255,0.04); }
.thread__body .mp3-player audio { width: 100%; max-width: 100%; }
.thread__body .mp3-player figcaption { margin-top: 0; }

.mp3-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}
.mp3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0 0.75rem;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
    font-size: 0.8125rem;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.mp3-btn:hover { background: var(--border); text-decoration: none; }
.mp3-btn:active { transform: scale(0.97); }
.mp3-speed-label { color: var(--muted); font-size: 0.8125rem; margin: 0 0.25rem 0 0.5rem; }
.mp3-speed-btn.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}
.mp3-download { margin-left: auto; }

.mp3-sticky {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    transform: translateY(120%);
    transition: transform 0.25s ease;
    background: var(--surface);
    color: var(--ink);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.10);
    padding: 0.5rem max(0.5rem, env(safe-area-inset-right))
             max(0.5rem, env(safe-area-inset-bottom))
             max(0.5rem, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    gap: 0.375rem;
    z-index: 1000;
}
.mp3-sticky.is-visible { transform: translateY(0); }
.mp3-sticky button {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--border);
    border-radius: 4px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.5rem;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
}
.mp3-sticky__playpause {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}
.mp3-sticky__title {
    flex: 1;
    text-align: left !important;
    background: transparent !important;
    border: none !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.875rem !important;
    min-width: 0;
}
.mp3-sticky__time { color: var(--muted); font-size: 0.75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mp3-sticky__close { color: var(--muted); }

@media (max-width: 520px) {
    .mp3-sticky__back, .mp3-sticky__fwd, .mp3-sticky__time { display: none; }
}

/* Video player — same shell as the audio player, just wraps a <video> instead. */
.thread__body .mp4-player {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(0,0,0,0.025);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}
[data-theme="dark"] .thread__body .mp4-player { background: rgba(255,255,255,0.04); }
.thread__body .mp4-player video {
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 4px;
    aspect-ratio: 16 / 9;
}
.thread__body .mp4-player figcaption { margin-top: 0; }

/* Subtitle (<track>) styling via the standard ::cue pseudo-element.
   Browsers default to ~5% of video height which is invisible on a phone-
   sized video. Bump to ~8% with a stronger background so the text is
   legible against any frame content. Safari honors font-size + background;
   font-family is ignored there so we omit it (system default suffices). */
.thread__body .mp4-player video::cue {
    font-size: 1.4em;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    line-height: 1.35;
}

/* Mobile: the article body sits inside a max-width column with side padding.
   For video that hurts — the player ends up tiny relative to the phone
   screen. Break the player out to the viewport edge on narrow screens so
   it's actually watchable. Subtitle gets a touch larger too. */
@media (max-width: 720px) {
    .thread__body .mp4-player {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
        max-width: 100vw;
        padding: 0.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .thread__body .mp4-player video {
        border-radius: 0;
    }
    .thread__body .mp4-player video::cue {
        font-size: 1.15em;   /* relative to user agent default; ~18-19 px on most phones */
    }
}

/* Flash placeholder — Flash is dead; show a visible note where the embed used to be. */
.thread__body .flash-stub {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.04);
    border: 1px dashed var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.875rem;
}
[data-theme="dark"] .thread__body .flash-stub { background: rgba(255,255,255,0.04); }
.thread__body .flash-stub a { color: var(--accent); text-decoration: underline; }

/* YouTube click-to-load placeholder — we don't load the YT iframe until the user
   clicks (privacy + perf). The thumbnail comes from i.ytimg.com (the only network
   request we make before opt-in). */
.thread__body .yt-embed {
    margin: 1rem 0;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    position: relative;
}
.yt-embed__poster {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}
.yt-embed__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.yt-embed__play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    border-radius: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.yt-embed__poster:hover .yt-embed__play { background: #cc0000; }
.thread__footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Dark mode: legacy articles often carry inline color attributes (e.g. <font color="black">
   or style="color:#333") meant for a light background. These render as invisible-dark-on-dark
   on our dark theme. Force theme ink color on any inline-colored element inside the body,
   but preserve anchor color so links stay terracotta. */
[data-theme="dark"] .thread__body [style*="color"],
[data-theme="dark"] .thread__body font[color] {
  color: var(--ink) !important;
}
[data-theme="dark"] .thread__body a,
[data-theme="dark"] .thread__body a[style*="color"],
[data-theme="dark"] .thread__body a font[color] {
  color: var(--accent) !important;
}

/* Legacy editors often emit tiny inline font-size (e.g. <font size="1"> = ~10px or
   style="font-size:9px") for footnotes/citations. Override these to the body's
   readable default. Applies in BOTH themes — tiny text wasn't intentional, just
   the legacy WebForms editor's default attribute output. */
.thread__body [style*="font-size"],
.thread__body font[size] {
  font-size: 1rem !important;
  line-height: 1.7 !important;
}

/* ----------------------------------------------------------------
   Admin area
   ---------------------------------------------------------------- */
.admin-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
.admin-sidebar { /* same .sidebar-title + .pill-list as home sidebars */ }
.admin-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  min-width: 0;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-stat {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}
.admin-stat__num {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.admin-stat__label { font-size: 0.875rem; color: var(--ink-soft); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.admin-table th,
.admin-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
}
.admin-table tr:hover td { background: rgba(184,84,26,0.03); }
.admin-actions { display: flex; gap: 0.5rem; }
.admin-actions a, .admin-actions button {
  font-size: 0.8125rem;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  text-decoration: none;
}
.admin-actions a:hover, .admin-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.admin-actions .danger:hover { border-color: #b91c1c; color: #b91c1c; }

@media (max-width: 767px) {
  .admin-shell { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------
   Account forms (login, register, reset)
   ---------------------------------------------------------------- */
.account-form { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem 1.75rem; }
.form-row { margin-bottom: 1rem; }
.form-row--check { display: flex; align-items: center; gap: 0.5rem; }
.form-label { display: block; font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 0.375rem; }
.form-input {
  display: block;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184,84,26,0.12); }
.form-error { color: #b91c1c; font-size: 0.8125rem; display: block; margin-top: 0.25rem; }
.account-form .form-error[data-valmsg-summary="true"] ul { margin: 0; padding-left: 1rem; }

/* Honeypot — visually hidden but in the DOM so spam bots auto-fill it.
   Real users can't see/tab to it; submissions with this populated are dropped. */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* Compact search box embedded in the topnav (desktop only) */
.topnav__search {
  margin-right: 1rem;
  display: flex;
  align-items: center;
}
.topnav__search input {
  width: 180px;
  font-size: 13px;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  outline: none;
  transition: width 0.18s ease, border-color 0.15s ease;
}
.topnav__search input:focus {
  width: 240px;
  border-color: var(--accent);
}
/* Dark mode — the default rgba(255,255,255,0.7) background washes out light --ink text.
   Use a translucent dark surface so the cream text reads clearly. */
[data-theme="dark"] .topnav__search input {
  background: rgba(0,0,0,0.35);
  color: var(--ink);
  border-color: var(--border);
}
[data-theme="dark"] .topnav__search input::placeholder {
  color: var(--muted);
}
@media (max-width: 767px) {
  .topnav__search { display: none; }
}

/* Dark / light theme toggle button — sits between search and login partial */
.theme-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 8px;
  margin: 0 0.25rem;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: 4px;
  color: var(--ink-soft);
  transition: background 0.15s;
}
.theme-toggle:hover { background: rgba(184, 84, 26, 0.10); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

