/* Market Pulse India — site design system. Plain CSS, light theme.
   Tokens follow the reviewed mockup ("Vedic Wealth Modernist"): emerald brand,
   deep-slate ink, slate hairlines, white cards on a subtle canvas, Inter/system type. */
:root {
  --c-brand: #00b386; --c-brand-strong: #006c4f; --c-brand-accent: #00d09c; --c-brand-soft: #e6f7f3;
  --c-ink: #0f141e; --c-ink-2: #44475b; --c-ink-3: #6b6e7c;
  --c-canvas: #f8fafc; --c-surface: #ffffff; --c-muted: #f1f5f9;
  --c-line: #e2e8f0; --c-line-strong: #cbd5e1;
  --c-up: #00875f; --c-up-soft: #e6f7f3; --c-down: #d03b3b; --c-down-soft: #fdeeee;
  --c-warn: #b45309; --c-warn-soft: #fff5e1;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --r-sm: 4px; --r: 8px; --r-lg: 12px; --r-pill: 999px;
  --shadow: 0 1px 2px rgb(15 20 30 / .04); --shadow-pop: 0 8px 30px rgb(15 20 30 / .08);
  --max: 1280px; --gutter: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-canvas); color: var(--c-ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--c-brand-strong); }
:focus-visible { outline: 2px solid var(--c-brand-accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0 0 .5rem; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0 0 .75rem; }
.num, .tnum, table { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: var(--r); box-shadow: var(--shadow-pop); }
.skip:focus { left: 8px; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 1024px) { .container { padding: 0 32px; } }
.muted { color: var(--c-ink-3); } .small { font-size: 12px; } .xs { font-size: 11px; }
.up { color: var(--c-up); } .down { color: var(--c-down); }

/* ---------- compliance strip + ticker */
.strip { background: var(--c-muted); border-bottom: 1px solid var(--c-line); font-size: 12px; color: var(--c-ink-2); }
.strip .container { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding-block: 6px; flex-wrap: wrap; }
.ticker { background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.ticker .container { display: flex; align-items: center; gap: 20px; overflow-x: auto; scrollbar-width: none; padding-block: 7px; }
.ticker .container::-webkit-scrollbar { display: none; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-2); white-space: nowrap; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c-warn); }
.tick { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 13px; }
.tick b { font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.tick .v { font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: var(--r-pill); font: 600 12px/1.6 var(--font); white-space: nowrap; }
.pill.up { background: var(--c-up-soft); } .pill.down { background: var(--c-down-soft); }
.pill.neutral { background: var(--c-muted); color: var(--c-ink-2); }

/* ---------- header / nav */
.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-line); position: sticky; top: 0; z-index: 30; }
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--c-ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--c-brand); display: grid; place-items: center; color: #fff; }
.brand small { display: block; font: 600 10px/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--c-ink-3); }
.search { flex: 1; max-width: 360px; position: relative; }
.search input { width: 100%; height: 40px; border: 1px solid var(--c-line); background: var(--c-canvas); border-radius: var(--r-pill); padding: 0 14px 0 38px; font: inherit; font-size: 14px; color: var(--c-ink); }
.search input:focus { outline: none; border-color: var(--c-brand); background: #fff; box-shadow: 0 0 0 3px var(--c-brand-soft); }
.search svg { position: absolute; left: 13px; top: 11px; color: var(--c-ink-3); }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { padding: 8px 12px; border-radius: var(--r); font-weight: 600; font-size: 14px; color: var(--c-ink-2); position: relative; }
.mainnav a:hover { background: var(--c-muted); color: var(--c-ink); }
.mainnav a[aria-current=page] { color: var(--c-brand-strong); }
.mainnav a[aria-current=page]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--c-brand); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.menu-toggle { display: none; }
@media (max-width: 1024px) {
  .mainnav { display: none; }
  .site-header .container { flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .site-header:has(#nav-open:checked) .mainnav { display: flex; flex-direction: column; flex-basis: 100%; order: 9; margin: 0 0 12px; }
  .site-header:has(#nav-open:checked) .mainnav a[aria-current=page]::after { display: none; }
  .search { order: 8; flex-basis: 100%; max-width: none; margin-bottom: 10px; }
}

/* ---------- buttons, chips, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--c-line); background: #fff; color: var(--c-ink); font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--c-canvas); border-color: var(--c-line-strong); color: var(--c-ink); }
.btn-primary { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }
.btn-primary:hover { background: var(--c-brand-strong); border-color: var(--c-brand-strong); color: #fff; }
.btn-dark { background: var(--c-brand-strong); border-color: var(--c-brand-strong); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-danger { color: var(--c-down); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-canvas); font: 600 12px/1.6 var(--font); color: var(--c-ink-2); white-space: nowrap; }
.chip.brand { background: var(--c-brand-soft); border-color: transparent; color: var(--c-brand-strong); }
.chip.warn { background: var(--c-warn-soft); border-color: transparent; color: var(--c-warn); }
.chip.dark { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.kicker { display: inline-block; font: 700 11px/1.4 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--c-brand-strong); }
.field label, label.lbl { display: block; font: 600 13px/1.3 var(--font); margin: 14px 0 6px; color: var(--c-ink); }
.input, .field input:not([type=radio]):not([type=checkbox]):not([type=hidden]):not([type=file]), .field textarea, .field select {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--c-line); border-radius: var(--r); background: #fff; font: inherit; font-size: 14px; color: var(--c-ink); }
.field textarea { min-height: 110px; resize: vertical; }
.input:focus, .field :is(input, textarea, select):focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-brand-soft); }
.help { font-size: 12px; color: var(--c-ink-3); margin-top: 4px; }

/* ---------- cards & layout */
.page { padding: 24px 0 56px; }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 20px 24px; }
@media (max-width: 640px) { .card-pad { padding: 16px; } }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--c-line); }
.card-head h2, .card-head h3 { font-size: 15px; margin: 0; }
.card-head .more { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--c-brand-strong); }
.card + .card, .stack > * + * { margin-top: 16px; }
.layout-3 { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .layout-3 { grid-template-columns: 240px minmax(0, 1fr) 320px; } }
.layout-2 { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .layout-2 { grid-template-columns: minmax(0, 1fr) 340px; } .rail-sticky { position: sticky; top: 88px; } }
@media (max-width: 1023px) { .hide-mobile { display: none !important; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--c-ink-3); margin-bottom: 14px; }
.crumbs a:hover { color: var(--c-brand-strong); }
.crumbs span[aria-hidden] { color: var(--c-line-strong); }
.page-hero h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.025em; }
.page-hero p { color: var(--c-ink-2); max-width: 720px; font-size: 16px; }
.trust { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--c-ink-2); margin-top: 8px; }
.trust b { color: var(--c-ink); }

/* list rows */
.rows > * { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--c-line); }
.rows > *:first-child { border-top: 0; }
.rows > a:hover, .rows > .row-link:hover { background: var(--c-canvas); }
.sym { font-weight: 700; font-size: 14px; } .sym small { display: block; font: 500 11px/1.3 var(--font); color: var(--c-ink-3); letter-spacing: .02em; }
.right { margin-left: auto; text-align: right; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c-brand-soft); color: var(--c-brand-strong); font-weight: 700; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; } .avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.slate { background: var(--c-muted); color: var(--c-ink-2); }

/* ---------- home */
.lead { display: grid; gap: 24px; }
@media (min-width: 900px) { .lead { grid-template-columns: 1.35fr 1fr; align-items: center; } }
.lead-art { aspect-ratio: 16/10; border-radius: var(--r-lg); background: linear-gradient(160deg, #0f141e 0%, #13243a 60%, #0f3b33 100%); position: relative; overflow: hidden; }
.lead-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lead-art .tag { position: absolute; left: 14px; bottom: 14px; }
.lead h1 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.lead .dek { font-size: 16px; color: var(--c-ink-2); }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--c-ink-3); flex-wrap: wrap; }
.byline b { color: var(--c-ink); font-weight: 600; }
.index-cards { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .index-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.index-card { padding: 14px 16px; }
.index-card .name { font: 600 12px/1.2 var(--font); color: var(--c-ink-2); letter-spacing: .02em; }
.index-card .val { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0; }
.index-card svg { width: 100%; height: 34px; margin-top: 6px; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 32px 0 14px; }
.section-title h2 { font-size: 20px; font-weight: 800; margin: 0; }
.section-title a { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--c-brand-strong); }
.story-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .story-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.story { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.story h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin: 0; }
.story p { color: var(--c-ink-2); font-size: 14px; margin: 0; }
.story .byline { margin-top: auto; }
.heat { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); padding: 16px 20px; }
.heat a { border-radius: var(--r); padding: 10px 12px; font-size: 13px; font-weight: 600; min-height: 64px; display: flex; flex-direction: column; justify-content: space-between; }
.heat .h-up-3 { background: #00875f; color: #fff; } .heat .h-up-2 { background: #43b48d; color: #04261c; } .heat .h-up-1 { background: #c9eee2; color: #04261c; }
.heat .h-dn-1 { background: #fbd9d9; color: #3d0b0b; } .heat .h-dn-2 { background: #ec8f8f; color: #3d0b0b; } .heat .h-dn-3 { background: #c23434; color: #fff; }
.breadth { height: 8px; border-radius: 8px; background: var(--c-down); overflow: hidden; display: flex; }
.breadth span { background: var(--c-up); }
.tabs-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--c-muted); border-radius: var(--r-pill); }
.tabs-seg a { padding: 5px 12px; border-radius: var(--r-pill); font: 600 13px/1.3 var(--font); color: var(--c-ink-2); }
.tabs-seg a[aria-current=page] { background: #fff; color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); }
.notice { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--c-warn-soft); color: #7a3e06; font-size: 13px; }

/* ---------- forum (package views restyled) */
.forum-hero { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); font-weight: 600; font-size: 14px; color: var(--c-ink-2); }
.side-nav a:hover { background: var(--c-muted); color: var(--c-ink); }
.side-nav a[aria-current=page] { background: var(--c-brand-soft); color: var(--c-brand-strong); }
.side-nav .count { margin-left: auto; font-size: 12px; color: var(--c-ink-3); }
.side-label { font: 700 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); padding: 16px 12px 8px; }
.thread-row { display: flex; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--c-line); }
.thread-row:first-child { border-top: 0; }
.thread-row:hover { background: #fcfdfe; }
.vote-box { flex: none; width: 52px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vote-box form { margin: 0; }
.vote-box button { width: 32px; height: 26px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 6px; color: var(--c-ink-3); cursor: pointer; }
.vote-box button:hover { background: var(--c-muted); color: var(--c-ink); }
.vote-box form:first-child button[aria-pressed=true] { color: var(--c-up); background: var(--c-up-soft); }
.vote-box form:last-child button[aria-pressed=true] { color: var(--c-down); background: var(--c-down-soft); }
.vote-box .score { font-weight: 700; font-size: 15px; }
.vote-box .lbl { font-size: 11px; color: var(--c-ink-3); }
.thread-main { min-width: 0; flex: 1; }
.thread-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; font-size: 12px; color: var(--c-ink-3); }
.thread-title { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0 0 6px; }
.thread-title a:hover { color: var(--c-brand-strong); }
.thread-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--c-ink-3); align-items: center; }
.thread-meta .who { display: inline-flex; align-items: center; gap: 6px; color: var(--c-ink-2); font-weight: 600; }
.sort-tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--c-line); overflow-x: auto; }
.sort-tabs a { padding: 13px 0; font-weight: 600; font-size: 14px; color: var(--c-ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.sort-tabs a[aria-current=page] { color: var(--c-brand-strong); border-bottom-color: var(--c-brand); }
.cat-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cat-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.cat-card:hover { border-color: var(--c-line-strong); }
.cat-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--c-brand-soft); color: var(--c-brand-strong); display: grid; place-items: center; }
.cat-card h3 { font-size: 16px; margin: 4px 0 0; }
.cat-latest { margin-top: auto; padding: 8px 12px; border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-canvas); font-size: 12px; color: var(--c-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* post / thread page */
.post-card { padding: 22px 24px; }
.author-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.author-line .name { font-weight: 700; } .author-line .sub { font-size: 12px; color: var(--c-ink-3); }
.prose { font-size: 15.5px; line-height: 1.7; color: #1d2230; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1em; } .prose h2, .prose h3 { margin: 1.2em 0 .5em; }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 3px solid var(--c-brand); background: var(--c-canvas); border-radius: 0 var(--r) var(--r) 0; color: var(--c-ink-2); }
.prose code { background: var(--c-muted); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.prose pre { background: #0f141e; color: #e2e8f0; padding: 14px; border-radius: var(--r); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 1em 0; }
.prose th, .prose td { border-bottom: 1px solid var(--c-line); padding: 8px 10px; text-align: left; }
.prose a { color: var(--c-brand-strong); text-decoration: underline; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; margin-top: 16px; border-top: 1px solid var(--c-line); }
.post-actions form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.vote-inline { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; }
.vote-inline form { margin: 0; }
.vote-inline button { height: 34px; min-width: 38px; border: 0; background: #fff; cursor: pointer; color: var(--c-ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 13px var(--font); padding: 0 10px; }
.vote-inline button:hover { background: var(--c-canvas); }
.vote-inline form:first-child button[aria-pressed=true] { color: var(--c-up); background: var(--c-up-soft); }
.vote-inline form:last-child button[aria-pressed=true] { color: var(--c-down); background: var(--c-down-soft); }
.vote-inline .score { padding: 0 10px; font-weight: 700; border-left: 1px solid var(--c-line); border-right: 1px solid var(--c-line); height: 34px; display: inline-flex; align-items: center; }
details.inline-panel > summary { list-style: none; } details.inline-panel > summary::-webkit-details-marker { display: none; }
details.inline-panel[open] { flex-basis: 100%; }
details.inline-panel[open] > div, details.inline-panel[open] > form { margin-top: 10px; padding: 14px; border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-canvas); }
.poll-opt { position: relative; display: flex; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--c-line); border-radius: var(--r); margin-bottom: 8px; overflow: hidden; font-size: 14px; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: var(--c-brand-soft); }
.poll-opt span { position: relative; }

/* comments */
.comments-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comment { position: relative; }
.comment-card { padding: 16px 20px; }
.comment .comment { margin-left: 18px; padding-left: 16px; border-left: 2px solid var(--c-line); margin-top: 12px; }
.comment .comment:hover { border-left-color: var(--c-brand); }
.comment > details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--c-ink-3); }
.comment > details > summary::-webkit-details-marker { display: none; }
.comment .tw { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--c-line); display: inline-grid; place-items: center; font-size: 11px; color: var(--c-ink-3); }
.comment > details[open] > summary .tw::before { content: "−"; } .comment > details:not([open]) > summary .tw::before { content: "+"; }
.comment .who { font-weight: 700; color: var(--c-ink); }
.comment-body { margin: 8px 0 6px; font-size: 14.5px; }
.comment-body > :last-child { margin-bottom: 0; }
.comment-actions { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.comment-actions form { margin: 0; }
.comment-actions .btn { height: 28px; padding: 0 10px; font-size: 12px; border-color: transparent; background: transparent; color: var(--c-ink-3); }
.comment-actions .btn:hover { background: var(--c-muted); color: var(--c-ink); }
.comment-actions .btn[aria-pressed=true] { color: var(--c-brand-strong); background: var(--c-brand-soft); }
.stat-trio { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--c-line); border-radius: var(--r); text-align: center; }
.stat-trio div { padding: 10px 6px; } .stat-trio div + div { border-left: 1px solid var(--c-line); }
.stat-trio b { display: block; font-size: 17px; } .stat-trio span { font-size: 11px; color: var(--c-ink-3); }
.kv { display: flex; justify-content: space-between; padding: 9px 20px; border-top: 1px solid var(--c-line); font-size: 14px; }
.kv:first-child { border-top: 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--c-ink-3); }
.alert { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; }
.alert-ok { background: var(--c-up-soft); color: var(--c-brand-strong); } .alert-err { background: var(--c-down-soft); color: #8f1d1d; }
.alert ul { margin: 0; padding-left: 18px; }
.pager { display: flex; justify-content: center; gap: 8px; align-items: center; padding: 16px; }

/* ---------- footer */
.site-footer { background: var(--c-surface); border-top: 1px solid var(--c-line); padding: 32px 0 24px; font-size: 13px; color: var(--c-ink-2); }
.footer-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--c-ink-3); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.disclaimer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--c-line); font-size: 12px; color: var(--c-ink-3); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* checkpoint fixes */
@media (min-width: 961px) { .site-header .menu-toggle { display: none !important; } }
.side-card .pill, .snapshot .pill { white-space: nowrap; overflow: visible; max-width: none; }
.side-card .right { text-align: right; min-width: 9rem; }

/* Wordmark */
.logo { display: inline-flex; align-items: center; gap: 10px; color: #0F141E; text-decoration: none; }
.logo-mark { flex: none; display: block; }
.logo-word { display: flex; flex-direction: column; line-height: 1; }
.logo-name { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.logo-name b { font-weight: 800; color: #006c4f; }
.logo-country { margin-top: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.32em; color: #00B386; }
@media (max-width: 480px) { .logo-name { font-size: 17px; } .logo-mark { width: 30px; height: 30px; } }

/* =====================================================================
   Design-research layer (see docs/BIITE-STUDY.md, docs/DESIGN-RESEARCH.md)
   Cues adapted from biite.nl + FT/Bloomberg/Reddit patterns, rebuilt in our
   own emerald/ink identity. No third-party assets, fonts or copy.
   ===================================================================== */
:root {
  --c-canvas: #f9faf7;            /* warmer "paper" canvas (biite uses bone #fffef7; we stay closer to neutral for data legibility) */
  --c-raised: #f0f2ee;            /* soft filled panels, replaces some bordered boxes */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-expo: cubic-bezier(.19, 1, .22, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --r-xl: 16px;
  --measure: 68ch;                /* FT-style max line length for long reading */
}
body { background: var(--c-canvas); }

/* Display headline: tight tracking + emerald full stop (signature cue) */
.display { font-weight: 800; letter-spacing: -.04em; line-height: .98; color: var(--c-ink); }
.display .dot, .dot { display: inline-block; width: .17em; height: .17em; margin-left: .06em; border-radius: 50%; background: var(--c-brand); vertical-align: baseline; }
.page-hero h1.display { font-size: clamp(32px, 4.6vw, 56px); margin-bottom: 12px; }
.eyebrow { display: inline-block; font-size: 13px; font-style: italic; color: var(--c-ink-3); margin-bottom: 14px; }
.eyebrow::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--c-brand); vertical-align: middle; margin-right: 8px; }

/* Text link: 1.5px underline at 40% that firms up on hover */
.textlink { font-size: 15px; font-weight: 500; padding-block: 6px; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: rgb(15 20 30 / .35); transition: text-decoration-color .3s var(--ease-out); }
.textlink:hover, .textlink:focus-visible { color: var(--c-ink); text-decoration-color: var(--c-brand); }

/* Flow button: pill that eases to a squarer radius, ink fill grows from the centre, arrow nudges */
.btn-flow { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-pill); padding-inline: 20px;
  transition: border-radius .6s var(--ease-out), color .6s var(--ease-out), border-color .6s var(--ease-out), transform .18s; }
.btn-flow::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 1rem; aspect-ratio: 1; border-radius: 50%; background: var(--c-ink); opacity: 0; translate: -50% -50%;
  transition: width .8s var(--ease-expo), opacity .8s var(--ease-expo); }
.btn-flow:hover, .btn-flow:focus-visible { border-radius: 12px; border-color: var(--c-ink); background: var(--c-brand); color: #fff; }
.btn-flow:hover::before, .btn-flow:focus-visible::before { opacity: 1; width: calc(100% + 5rem); }
.btn-flow svg { transition: translate .5s var(--ease-expo); }
.btn-flow:hover svg:last-child { translate: 3px 0; }
.btn-flow:active { transform: scale(.96); }
.btn-lg { height: 48px; padding-inline: 26px; font-size: 15px; }

/* Round menu button (mobile) */
.round-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--c-surface); border: 1px solid rgb(15 20 30 / .12); cursor: pointer; transition: background .2s; }
.round-btn:hover { background: var(--c-raised); }

/* Header: lighter, airier */
.site-header { background: rgb(255 255 255 / .9); backdrop-filter: saturate(1.4) blur(10px); }
.mainnav a { transition: color .15s; }
.mainnav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--c-brand); text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Home hero */
.pulse-hero { position: relative; display: grid; gap: 28px; align-items: center; padding: 40px 0 48px; margin-bottom: 8px; }
@media (min-width: 960px) { .pulse-hero { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); padding: 64px 0 72px; } }
.pulse-hero .display { font-size: clamp(38px, 6.2vw, 76px); margin: 0 0 18px; }
.hero-lead { font-size: 17px; line-height: 1.6; color: var(--c-ink-2); max-width: 54ch; margin-bottom: 26px; }
.hero-acts { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.pulse-hero__copy, .meter-card { position: relative; z-index: 1; }
.pulse-wire { position: absolute; inset: auto 0 0 0; width: 100%; height: 220px; z-index: 0; pointer-events: none; }
.pulse-wire path { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pulse-wire__base { stroke: color-mix(in srgb, var(--c-ink) 12%, transparent); stroke-width: 1; }
.pulse-wire__beat { stroke: var(--c-brand); stroke-width: 2; stroke-dasharray: .16 1; stroke-dashoffset: 1.16; animation: beat 4.5s linear infinite; opacity: .85; }
@keyframes beat { to { stroke-dashoffset: 0; } }

/* "Live" data card: hairline + hard offset ink shadow */
.meter-card { background: var(--c-surface); border: 1px solid var(--c-ink); border-radius: var(--r-xl); padding: 14px 16px 12px; box-shadow: 0 4px 0 var(--c-ink), 0 24px 48px -28px rgb(15 20 30 / .45); max-width: 380px; justify-self: end; width: 100%; }
@media (max-width: 959px) { .meter-card { justify-self: stretch; max-width: none; } }
.meter-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.meter-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 14px; }
.meter-row + .meter-row { border-top: 1px solid var(--c-line); }
.meter-row.is-on { background: var(--c-brand-soft); border-top-color: transparent; }
.meter-row.is-on + .meter-row { border-top-color: transparent; }
.meter-row__name { font-weight: 600; } .meter-row__val { font-weight: 700; letter-spacing: -.01em; }
.meter-card__chart { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--c-line-strong); }
.meter-card__chart svg { width: 100%; height: 56px; }

/* Soft raised cards + generous rhythm (8px base, 24/32 section steps) */
.card { border-radius: var(--r-xl); box-shadow: none; }
.section-title { margin-top: 40px; }
.lead .lead-title { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }

/* Bloomberg-style numerics: right aligned, slightly tighter */
.num { letter-spacing: -.01em; }

/* Forum feed */
.forum-hero { align-items: flex-end; margin-bottom: 28px; padding-top: 12px; }
.forum-hero .header-actions { gap: 20px; align-items: center; }
.thread-row { transition: background .2s var(--ease-out); position: relative; }
.thread-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-brand); scale: 1 0; transition: scale .35s var(--ease-expo); }
.thread-row:hover { background: #fbfcfa; }
.thread-row:hover::before, .thread-row:focus-within::before { scale: 1 1; }
.thread-title { font-size: 17px; letter-spacing: -.01em; }

/* Thread page */
.thread-h1 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 6px 0 14px; }
.prose { max-width: var(--measure); font-size: 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3); border-bottom: 1px solid var(--c-ink); padding: 8px; }
.prose td { border-bottom: 1px solid var(--c-line); padding: 8px; }
.prose td:not(:first-child), .prose th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.comment .comment { border-left-width: 2px; transition: border-color .2s; }

/* Reveal on scroll: visible by default; animated only when JS + motion allowed */
.js-reveal .reveal { opacity: 0; translate: 0 14px; transition: opacity .6s var(--ease-out), translate .7s var(--ease-expo); }
.js-reveal .reveal.is-in { opacity: 1; translate: 0 0; }
.js-reveal .reveal--1 { transition-delay: .08s; } .js-reveal .reveal--2 { transition-delay: .18s; } .js-reveal .reveal--3 { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .pulse-wire__beat { animation: none; stroke-dasharray: none; }
  .btn-flow, .btn-flow::before, .btn-flow svg, .thread-row::before { transition-duration: 1ms; }
}
@media (max-width: 640px) {
  .pulse-hero { padding: 24px 0 36px; }
  .pulse-hero .display { font-size: clamp(34px, 10vw, 44px); }
  .hero-lead { font-size: 16px; }
}
.ticker .container, .tick { position: relative; } .sr-only { margin: -1px; padding: 0; border: 0; }

/* ---------- Thread UX: clickable thread lines, "N replies hidden", limited mobile nesting */
.comment { position: relative; padding-left: 26px; }
.comment-card > .comment { padding-left: 26px; }
.comment .comment { margin: 12px 0 0; padding-left: 26px; border-left: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--c-ink-3); min-height: 28px; }
.comment-head .who { color: var(--c-ink); font-weight: 600; }
.thread-line { position: absolute; left: 0; top: 0; bottom: 0; width: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; justify-content: center; }
.thread-line > span { display: block; width: 2px; margin-top: 30px; border-radius: 2px; background: var(--c-line-strong); transition: background .2s, width .2s; }
.thread-line:hover > span, .thread-line:focus-visible > span { background: var(--c-brand); width: 3px; }
.thread-line::before { content: ""; position: absolute; top: 8px; left: 5px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--c-line-strong); background: var(--c-surface); }
.thread-line:hover::before { border-color: var(--c-brand); }
.comment-toggle { margin-left: auto; border: 0; background: none; font: 500 12px/1 var(--font); color: var(--c-ink-3); cursor: pointer; padding: 6px 4px; border-radius: 6px; }
.comment-toggle:hover { color: var(--c-brand-strong); background: var(--c-brand-soft); }
.comment .when-closed, .comment.is-collapsed > .comment-head .when-open { display: none; }
.comment.is-collapsed > .comment-head .when-closed { display: inline; }
.comment .comment-head .when-open { display: inline; }
.comment.is-collapsed > .comment-inner { display: none; }
.comment.is-collapsed > .thread-line > span { display: none; }
.comment.is-collapsed > .thread-line::before { content: "+"; display: grid; place-items: center; font-size: 11px; line-height: 1; color: var(--c-ink-3); }
.collapsed-note { display: none; margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--c-brand-strong); }
.comment.is-collapsed > .collapsed-note { display: block; }
.comment-body { margin-top: 6px; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.comment-actions .btn { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-pill); }
.comment-actions .btn[aria-pressed="true"] { background: var(--c-brand-soft); border-color: var(--c-brand); color: var(--c-brand-strong); }
.comment:target > .comment-head, .comment.is-focus > .comment-head { background: var(--c-brand-soft); border-radius: 8px; padding: 0 6px; }
@media (max-width: 640px) {
  .comment, .comment-card > .comment { padding-left: 20px; }
  .comment .comment { padding-left: 16px; }
  /* Beyond level 3, stop indenting on small screens; show who is being answered instead */
  .comment[data-depth="3"] .comment, .comment[data-depth="3"] .comment .comment { padding-left: 0; }
  .comment[data-depth="3"] .comment > .thread-line { display: none; }
  .comment .reply-to { display: inline; }
}
.reply-to { display: none; font-size: 12px; color: var(--c-ink-3); }

/* ---------- Forum pages (communities, community, create, profile, search, moderation, auth) */
.narrow { max-width: 760px; margin: 0 auto; }
.community-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 24px; }
.cat-icon.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; font-weight: 800; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; border-radius: 50%; }
.form-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.help { font-size: 12px; color: var(--c-ink-3); margin: 6px 0 0; }
.type-tabs { border: 0; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.type-tabs legend { margin: 0 0 8px; padding: 0; }
.type-tab { position: relative; }
.type-tab input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.type-tab span { display: inline-block; padding: 8px 16px; border: 1px solid var(--c-line); border-radius: var(--r-pill); font: 600 13px/1 var(--font); background: var(--c-surface); }
.type-tab input:checked + span { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.type-tab input:focus-visible + span { outline: 2px solid var(--c-brand); outline-offset: 2px; }
fieldset.pf { border: 0; padding: 0; margin: 14px 0 0; }
/* Show only the fields for the chosen type (falls back to showing all without :has support) */
@supports selector(:has(*)) {
  .post-form .pf { display: none; }
  .post-form:has([name=type][value=text]:checked) .pf-text,
  .post-form:has([name=type][value=link]:checked) .pf-link,
  .post-form:has([name=type][value=image]:checked) .pf-image,
  .post-form:has([name=type][value=video]:checked) .pf-video,
  .post-form:has([name=type][value=poll]:checked) .pf-poll { display: block; }
}
.auth-wrap { display: grid; place-items: center; padding: 32px 0 56px; }
.auth-card { width: min(460px, 100%); padding: 28px; border: 1px solid var(--c-ink); box-shadow: 0 4px 0 var(--c-ink); }
.otp-input { font: 700 26px/1 var(--font) !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.search.search-lg { max-width: 640px; height: 52px; }
.search.search-lg input { font-size: 16px; }
.mod-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--c-line); }
.rows > .mod-row:first-child { border-top: 0; }
.down-chip { background: var(--c-down-soft); color: var(--c-down); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.data-table th { text-align: left; font: 700 11px/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); padding: 10px 14px; border-bottom: 1px solid var(--c-ink); white-space: nowrap; background: var(--c-surface); position: sticky; top: 0; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.data-table td.r, .data-table th.r { text-align: right; }
.data-table tbody tr:hover { background: #fbfcfa; }
.data-table a { font-weight: 600; }
.rules { margin: 10px 0 0; padding-left: 18px; font-size: 14px; } .rules li + li { margin-top: 8px; }

/* ---------- News, markets, learn, search */
.chip-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding-bottom: 2px; }
.chip-nav a { flex: none; padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-surface); font: 600 13px/1 var(--font); color: var(--c-ink-2); }
.chip-nav a[aria-current="page"] { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.article-h1 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; max-width: 22ch; margin: 0 0 14px; }
.article-dek { font-size: 19px; line-height: 1.5; color: var(--c-ink-2); max-width: var(--measure); margin: 0 0 20px; }
.article-meta { padding: 14px 0; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); margin-bottom: 24px; max-width: var(--measure); }
.article-body { font-size: 17px; line-height: 1.75; }
.article-body h2 { font-size: 22px; letter-spacing: -.02em; }
.quote-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.quote-price > .num { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; }
.quote-price .pill { font-size: 14px; padding: 3px 10px; }
.chart svg { width: 100%; height: 220px; display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat-grid > div { padding: 12px 20px; border-top: 1px solid var(--c-line); }
.stat-grid dt { font-size: 12px; color: var(--c-ink-3); } .stat-grid dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; }
.stat-grid .span-2 { grid-column: 1 / -1; }
.range { position: relative; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--c-down-soft), var(--c-line), var(--c-up-soft)); margin-top: 10px; }
.range span { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--c-ink); border: 2px solid #fff; translate: -50% -50%; box-shadow: 0 0 0 1px var(--c-ink); }
.heat-legend { display: flex; align-items: center; gap: 4px; padding: 0 20px 16px; font-size: 11px; color: var(--c-ink-3); }
.heat-legend i { flex: 1; height: 6px; border-radius: 3px; max-width: 36px; }
.heat-legend .h-up-3 { background: #00875f; } .heat-legend .h-up-2 { background: #43b48d; } .heat-legend .h-up-1 { background: #c9eee2; }
.heat-legend .h-dn-1 { background: #fbd9d9; } .heat-legend .h-dn-2 { background: #ec8f8f; } .heat-legend .h-dn-3 { background: #c23434; }
.sort-link { color: inherit; } .sort-link:hover { color: var(--c-brand-strong); }
.module-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.module { display: flex; gap: 18px; padding: 18px 20px; align-items: flex-start; }
.module-num { font-size: 28px; font-weight: 800; letter-spacing: -.04em; color: var(--c-brand); line-height: 1; min-width: 42px; }
.module h3 { font-size: 17px; margin: 0 0 4px; }
.glossary { margin: 0; padding: 4px 20px 16px; } .glossary dt { font-weight: 700; font-size: 14px; margin-top: 12px; } .glossary dd { margin: 2px 0 0; font-size: 13px; color: var(--c-ink-2); line-height: 1.5; }
.discuss-card { border: 1px solid var(--c-ink); box-shadow: 0 4px 0 var(--c-ink); }

/* ---------- Scrolling index ticker (pauses on hover/focus; static when reduced motion is preferred) */
.ticker .container { overflow: hidden; }
.ticker-track { display: flex; min-width: 0; flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker-run { display: flex; gap: 22px; padding-right: 22px; flex: none; animation: tick-scroll 40s linear infinite; }
.ticker-track:hover .ticker-run, .ticker-track:focus-within .ticker-run { animation-play-state: paused; }
@keyframes tick-scroll { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-run { animation: none; } .ticker-run[aria-hidden] { display: none; }
  .ticker-track { overflow-x: auto; mask-image: none; }
}
.lead .lead-title { font-size: clamp(26px, 3.2vw, 40px); }

/* ===================================================================== Accounts, members & admin */
.xs { font-size: 12px; } .sm { font-size: 13px; }
.avatar-img { object-fit: cover; padding: 0; }
.avatar.xl { width: 112px; height: 112px; font-size: 38px; border: 4px solid #fff; box-shadow: var(--shadow-pop); }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; gap: 8px; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: 6px; box-shadow: var(--shadow-pop); }
.user-menu-pop a, .user-menu-pop button { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: var(--r); font: 500 14px/1.3 var(--font); color: var(--c-ink-2); background: none; border: 0; cursor: pointer; }
.user-menu-pop a:hover, .user-menu-pop button:hover { background: var(--c-muted); color: var(--c-ink); }
.um-head { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--c-line); margin-bottom: 4px; }
.imp-bar { background: var(--c-warn-soft); color: var(--c-warn); border-bottom: 1px solid #f3d9a4; font-size: 14px; }
.imp-bar .container { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-block: 8px; flex-wrap: wrap; }

/* Auth */
.auth-shell { display: grid; gap: 28px; align-items: center; min-height: calc(100vh - 340px); padding-block: 24px 48px; }
@media (min-width: 960px) { .auth-shell { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.auth-aside h1 { font-size: clamp(34px, 4.4vw, 54px); margin: 10px 0 14px; }
.auth-aside p { color: var(--c-ink-2); font-size: 17px; max-width: 46ch; }
.auth-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--c-ink-2); }
.auth-points li svg { flex: none; color: var(--c-brand); margin-top: 2px; }
.auth-panel { padding: 28px; border-radius: var(--r-xl); }
@media (max-width: 640px) { .auth-panel { padding: 20px; } .auth-aside { display: none; } }
.auth-panel h2 { font-size: 26px; margin: 6px 0 6px; letter-spacing: -.02em; }
.seg-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--c-muted); border-radius: var(--r-pill); margin-bottom: 18px; }
.seg-switch a { text-align: center; padding: 8px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--c-ink-2); }
.seg-switch a[aria-current=page] { background: #fff; color: var(--c-ink); box-shadow: 0 0 0 1px var(--c-line); }
.code-input { font: 700 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace !important; letter-spacing: .5em; text-align: center; height: 60px !important; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--c-ink-2); }
.check-row input { width: 18px; height: 18px; accent-color: var(--c-brand); }
.steps { display: flex; gap: 6px; margin-bottom: 14px; } .steps span { height: 4px; flex: 1; border-radius: 4px; background: var(--c-line); } .steps span.on { background: var(--c-brand); }
.inline-form { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--c-brand-strong); font: 600 14px/1.4 var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn[disabled] { color: var(--c-ink-3); cursor: default; text-decoration: none; }
.fine { font-size: 12.5px; color: var(--c-ink-3); margin-top: 14px; }

/* Member directory */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .input, .toolbar select { height: 40px; }
.toolbar .grow { flex: 1 1 240px; }
.member-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.member-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.member-card .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.member-card .who > div { min-width: 0; } .member-card .who a { font-weight: 700; }
.member-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.member-card .stats { display: flex; gap: 14px; font-size: 13px; color: var(--c-ink-3); margin-top: auto; padding-top: 6px; border-top: 1px solid var(--c-line); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Profile */
.profile-cover { height: 180px; border-radius: var(--r-xl); background: linear-gradient(120deg, #0f3d33, #00b386 55%, #a7f3d0); background-size: cover; background-position: center; }
@media (max-width: 640px) { .profile-cover { height: 120px; } }
.profile-head { display: flex; gap: 20px; align-items: flex-end; margin: -56px 0 0; padding: 0 24px; flex-wrap: wrap; }
@media (max-width: 640px) { .profile-head { padding: 0 8px; gap: 12px; } .avatar.xl { width: 84px; height: 84px; font-size: 28px; } }
.profile-head .id { flex: 1; min-width: 200px; padding-top: 60px; }
.profile-head h1 { font-size: clamp(24px, 3vw, 32px); margin: 0; letter-spacing: -.02em; }
.profile-head .acts { display: flex; gap: 8px; padding-bottom: 4px; }
.profile-stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 24px 0; font-size: 14px; color: var(--c-ink-2); }
.profile-stats b { color: var(--c-ink); }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin: 22px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabbar a { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--c-ink-3); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabbar a[aria-current=page] { color: var(--c-ink); border-color: var(--c-brand); }
.tabbar .n { font-weight: 500; color: var(--c-ink-3); margin-left: 4px; font-size: 12px; }
.feed-item { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--c-line); }
.feed-item:first-child { border-top: 0; }
.feed-item .what { font-size: 14.5px; color: var(--c-ink-2); min-width: 0; overflow-wrap: anywhere; } .feed-item .what a.who { color: var(--c-ink); font-weight: 700; }
.feed-item time { display: block; font-size: 12px; color: var(--c-ink-3); margin-top: 2px; }
.feed-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c-brand-soft); color: var(--c-brand-strong); }
.about-grid dt { font-size: 12px; font-weight: 600; color: var(--c-ink-3); text-transform: uppercase; letter-spacing: .04em; }
.about-grid dd { margin: 2px 0 14px; font-size: 15px; overflow-wrap: anywhere; }
.list-row { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--c-line); }
.list-row:first-child { border-top: 0; } .list-row .grow { flex: 1; min-width: 0; }
.empty-state { padding: 36px 24px; text-align: center; color: var(--c-ink-3); }
.empty-state h3 { color: var(--c-ink); margin: 6px 0; font-size: 17px; }

/* Account shell (dashboard + settings): side nav + content */
.acct { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .acct { grid-template-columns: 240px minmax(0, 1fr); } .acct.with-rail { grid-template-columns: 240px minmax(0, 1fr) 300px; } }
@media (max-width: 999px) { .acct .side-nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; } .acct .side-nav a { white-space: nowrap; } .acct .side-label, .acct .me-card { display: none; } .acct-rail { display: none; } }
.me-card { display: flex; gap: 10px; align-items: center; padding: 14px; margin-bottom: 10px; }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); margin: 14px 12px 6px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--c-brand); color: #fff; font-size: 11px; font-weight: 700; margin-left: auto; }
.settings-card h2 { font-size: 18px; margin: 0 0 4px; } .settings-card > p.muted { margin-top: 0; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field .help { font-size: 12.5px; color: var(--c-ink-3); margin-top: 4px; }
.vis-select { height: 32px !important; font-size: 12.5px !important; padding: 0 8px !important; width: auto !important; }
.field-row { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 700px) { .field-row { grid-template-columns: minmax(0, 1fr) 170px; } }
.toggle-row { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--c-line); }
.toggle-row:first-of-type { border-top: 0; }
.toggle-row b { display: block; font-size: 14.5px; } .toggle-row span { font-size: 13px; color: var(--c-ink-3); }
.switch { position: relative; flex: none; width: 44px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 13px; background: var(--c-line-strong); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); transition: translate .2s var(--ease-out); }
.switch input:checked + i { background: var(--c-brand); } .switch input:checked + i::after { translate: 18px 0; }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--c-brand-soft); }
.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin-top: 6px; }
.radio-cards label { display: flex !important; gap: 8px; align-items: flex-start; padding: 12px; border: 1px solid var(--c-line); border-radius: var(--r); margin: 0 !important; cursor: pointer; font-weight: 500 !important; font-size: 13.5px !important; }
.radio-cards label:has(input:checked) { border-color: var(--c-brand); background: var(--c-brand-soft); }
.radio-cards input { accent-color: var(--c-brand); margin-top: 2px; }
.media-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cover-preview { width: 220px; max-width: 100%; height: 72px; border-radius: var(--r); background: linear-gradient(120deg, #0f3d33, #00b386 55%, #a7f3d0); background-size: cover; background-position: center; }
.danger-zone { border-color: #f3c4c4; } .danger-zone h2 { color: var(--c-down); }
.notif { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--c-line); }
.notif:first-child { border-top: 0; } .notif.unread { background: #f3fbf8; } .notif.unread .t::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c-brand); margin-right: 8px; vertical-align: middle; }
.notif .t { font-weight: 600; font-size: 14.5px; } .notif .m { font-size: 14px; color: var(--c-ink-2); }

/* Admin */
.admin-shell { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .admin-shell { grid-template-columns: 232px minmax(0, 1fr); } }
.admin-nav { background: var(--c-ink); color: #cbd5e1; border-radius: var(--r-xl); padding: 14px 10px; align-self: start; }
@media (min-width: 1000px) { .admin-nav { position: sticky; top: 88px; } }
.admin-nav .an-title { color: #fff; font-weight: 800; padding: 6px 12px 12px; display: flex; gap: 8px; align-items: center; letter-spacing: -.01em; }
.admin-nav a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r); color: #cbd5e1; font-weight: 500; font-size: 14px; }
.admin-nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.admin-nav a[aria-current=page] { background: var(--c-brand); color: #fff; }
.admin-nav .an-label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #64748b; padding: 12px 12px 4px; font-weight: 700; }
.admin-nav .an-count { margin-left: auto; background: #ef4444; color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; font-weight: 700; }
@media (max-width: 999px) { .admin-nav { display: flex; overflow-x: auto; gap: 2px; padding: 8px; scrollbar-width: none; } .admin-nav .an-label, .admin-nav .an-title { display: none; } .admin-nav a { white-space: nowrap; } }
.admin-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.admin-head h1 { font-size: 26px; margin: 0; letter-spacing: -.02em; }
.admin-stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 20px; }
@media (max-width: 640px) { .admin-stat { padding: 12px 14px; } .admin-stat .v { font-size: 22px; } }
.admin-stat { padding: 16px 18px; } .admin-stat .k { font-size: 12.5px; color: var(--c-ink-3); font-weight: 600; } .admin-stat .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; } .admin-stat .s { font-size: 12.5px; color: var(--c-ink-3); }
.subsubsub { display: flex; gap: 4px 12px; flex-wrap: wrap; font-size: 13.5px; margin-bottom: 12px; color: var(--c-ink-3); }
.subsubsub a { color: var(--c-ink-2); font-weight: 500; } .subsubsub a[aria-current=page] { color: var(--c-ink); font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 12px; color: var(--c-ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--c-line); background: var(--c-canvas); white-space: nowrap; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: #fbfcfa; }
.admin-table .row-actions { font-size: 12.5px; color: var(--c-ink-3); margin-top: 3px; } .admin-table .row-actions a { color: var(--c-brand-strong); }
.status-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--c-muted); color: var(--c-ink-2); }
.status-pill.active, .status-pill.published { background: var(--c-up-soft); color: var(--c-up); }
.status-pill.suspended, .status-pill.scheduled, .status-pill.restricted { background: var(--c-warn-soft); color: var(--c-warn); }
.status-pill.banned, .status-pill.deleted, .status-pill.private { background: var(--c-down-soft); color: var(--c-down); }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--c-line); }
.bulkbar select, .bulkbar .input { height: 34px; width: auto; font-size: 13px; }
.cap-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.cap-grid fieldset { border: 1px solid var(--c-line); border-radius: var(--r); padding: 10px 14px 12px; margin: 0; }
.cap-grid legend { font-weight: 700; font-size: 13px; text-transform: capitalize; padding: 0 6px; }
.cap-grid label { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 4px 0; }
.cap-grid input { accent-color: var(--c-brand); margin-top: 3px; } .cap-grid code { font-size: 11.5px; color: var(--c-ink-3); }
.role-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: 20px; }
.role-cards .card { padding: 16px; } .role-cards .card[aria-current=true] { border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-brand-soft); }
.code-block { font: 12.5px/1.5 ui-monospace, Menlo, monospace; background: var(--c-muted); border-radius: var(--r-sm); padding: 2px 6px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.pager{display:flex;align-items:center;justify-content:center;gap:12px;margin:20px 0;font-size:14px}
.pager-btn{padding:6px 14px;border:1px solid var(--line,#e2e8f0);border-radius:8px;text-decoration:none;color:inherit;background:#fff}
.pager-btn.is-disabled{opacity:.45}
.pager-info{color:#64748b}

/* ---- Admin → Plugins ---------------------------------------------------------------------- */
.plugin-list { display: grid; gap: 12px; }
.plugin-card { display: grid; gap: 14px; padding: 18px 20px; border-left: 4px solid var(--c-line); }
.plugin-card.is-active { border-left-color: var(--c-up); }
.plugin-card.has-error { border-left-color: var(--c-down); }
.plugin-title { display: flex; gap: 12px; align-items: flex-start; }
.plugin-title h2 { font-size: 16px; margin: 0; line-height: 1.3; }
.plugin-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--c-muted); color: var(--c-ink-2); }
.plugin-card.is-active .plugin-icon { background: var(--c-up-soft); color: var(--c-up); }
.plugin-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--c-ink-3); margin-top: 3px; }
.plugin-status { margin-left: auto; flex: none; }
.status-pill.required { background: var(--c-ink); color: #fff; }
.plugin-desc { margin: 0; font-size: 14px; color: var(--c-ink-2); max-width: 72ch; }
.plugin-req { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--c-ink-3); }
.plugin-error { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--c-down-soft, #fdecec); color: var(--c-down); font-size: 13.5px; }
.plugin-error .sm { color: var(--c-ink-2); word-break: break-word; }
.plugin-warn { margin: 8px 0 0; color: var(--c-down); }
.plugin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plugin-actions form { margin: 0; }
.danger-text { color: var(--c-down); }
@media (min-width: 760px) { .plugin-card { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } .plugin-actions { justify-content: flex-end; max-width: 260px; } }

/* related-stories plugin: strip under forum discussions */
.related-strip { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-line); }
.related-strip .kicker { margin: 0 0 10px; color: var(--c-ink-3); }
.related-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.related-item { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--c-line); border-radius: 12px; color: inherit; text-decoration: none; }
.related-item:hover { border-color: var(--c-ink-3); }
.related-item b { font-size: 14px; line-height: 1.35; }
.related-item .chip { align-self: flex-start; }
