/* DesiSquare Phase-1 — design tokens are law (handoff README §7).
   Default = "Warm Paper". Four alternate skins (Theme Options 1a–1d) are a pure token swap
   applied via [data-theme] on <html> — the A/B Lab flips them live, per account. */
:root {
  --paper: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #1D1D1F;
  --body: #3C3C40;
  --dim: #575C65;
  --faint: #656C79;
  --hairline: #E4E2DB;
  --wash: #F1EFE9;
  --teal: #0F766E;
  --teal-hover: #0B5F58;
  --teal-tint: #E8F1EF;
  --saffron: #C05621;
  --saffron-tint: #F9EDE3;
  --good: #2F7D4F;
  --good-tint: #E7F2EA;
  --bad: #B3452E;
  --bad-tint: #F8E9E4;
  --amber: #8A6D1F;
  --amber-tint: #F7EFDD;
  --radius-card: 12px;
  --radius-ctl: 8px;
  --shadow-pop: 0 8px 28px rgba(29, 29, 31, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Semantic tokens themes can retune independently of the primary brand colour. */
  --maven-bg: var(--teal-tint);
  --maven-fg: var(--teal-hover);
  --font-display: var(--font);
}

/* 1a · Midnight Bazaar — dark-first, marigold on charcoal, Georgia display. */
/* 1b · Sandalwood & Ink — heritage ledger, terracotta + peacock, serif voice, radius 10. */
/* 1c · Porcelain Slate — cool fintech-crisp, peacock-blue, densest, radius 6. */
:root[data-theme="porcelain"] {
  /* Secondary-text greys darkened to clear WCAG 1.4.3 AA (4.5:1). Measured on the live
     build, --faint ran at 2.43:1 and --dim at 4.11:1 against --wash — 146 failing text
     nodes across feed/maven/communities. Hue and saturation are unchanged; only lightness
     moves, and the three-step hierarchy (faint -> dim -> ink) is preserved rather than
     collapsed, which is why --dim moves further than the 4.5 floor strictly requires.
     Surfaces, hairlines and the peacock accent are untouched — this is a legibility fix,
     not a re-palette. Old: --dim #6E7480, --faint #9AA0AB. */
  --paper: #F5F6F8; --surface: #FFFFFF; --ink: #16181D; --body: #4A4F58; --dim: #575C65;
  --faint: #656C79; --hairline: #E3E6EB; --wash: #EEF0F3;
  --teal: #0C637C; --teal-hover: #094F63; --teal-tint: #E3F0F4;
  --saffron: #0C637C; --saffron-tint: #E3F0F4;
  --good: #2D784C; --good-tint: #E3F0EA; --bad: #B3452E; --bad-tint: #F6E4DF;
  --amber: #8A6D1F; --amber-tint: #F3EDDB;
  --maven-bg: #E3F0F4; --maven-fg: #0C637C;
  --radius-card: 6px; --radius-ctl: 5px;
}

/* 1d · Haldi & Rani — festival warmth, rani pink + haldi, soft radius 16. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-hover); }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--faint); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---------- primitives ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 16px 18px;
}
.btn {
  border-radius: var(--radius-ctl);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-hover); }
.btn-ghost { background: var(--surface); border-color: var(--hairline); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-quiet { background: var(--surface); border-color: var(--hairline); color: var(--dim); }
.btn-quiet:hover { border-color: var(--teal); color: var(--teal); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); }
.input {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-ctl);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  background: var(--surface);
  transition: border-color .12s ease;
}
.input:focus { border-color: var(--teal); }
.section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
}
.avatar {
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
  user-select: none;
}
.badge {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 5px;
  padding: 1.5px 7px;
  white-space: nowrap;
}
.badge-maven { background: var(--maven-bg); color: var(--maven-fg); }
.badge-seeker { background: var(--wash); color: var(--dim); font-weight: 600; }
.badge-wa { background: var(--wash); color: var(--dim); font-weight: 600; }
.badge-mod { background: var(--saffron-tint); color: var(--saffron); }
.badge-verified { background: var(--good-tint); color: var(--good); }
.badge-common { background: var(--teal-tint); color: var(--teal-hover); font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 8px; }
.badge-public { background: var(--wash); color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 8px; }
.badge-private { background: var(--saffron-tint); color: var(--saffron); font-size: 10px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 8px; }
.chip {
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--dim);
  white-space: nowrap;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.hairline-v { height: 1px; background: var(--wash); margin: 4px 6px; }

.logo-mark { width: 10px; height: 10px; background: var(--saffron); transform: rotate(45deg); display: inline-block; flex: none; }
.logo-word { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- landing ---------- */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing-top { display: flex; align-items: center; gap: 8px; padding: 16px 28px; }
.landing-hero { max-width: 880px; margin: 0 auto; padding: 52px 28px 60px; text-align: center; }
.landing-hero h1 {
  font-size: 44px; line-height: 1.15; letter-spacing: -0.03em; margin: 0; text-wrap: balance; font-weight: 700;
  font-family: var(--font-display);
}
.landing-hero h1 em { color: var(--teal); font-style: normal; }
.landing-stats { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 22px; font-size: 13px; color: var(--dim); align-items: center; }
.landing-stats b { color: var(--ink); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); vertical-align: middle; margin-right: 5px; }
.landing-foot { font-size: 11.5px; color: var(--faint); margin-top: 26px; }
.landing-signin-panel { max-width: 420px; margin: 12px auto 0; text-align: left; padding: 16px 18px; }
.demo-accounts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.demo-account {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-ctl);
  border: 1px solid var(--hairline); background: var(--surface); text-align: left; font-size: 13px; width: 100%;
}
.demo-account:hover { border-color: var(--teal); }
.demo-account .who { flex: 1; min-width: 0; text-align: left; }
.demo-account .who b { display: block; font-size: 13px; }
.demo-account .who span { font-size: 11.5px; color: var(--dim); line-height: 1.45; display: block; }
/* Story 29.32: the control-plane tiers, listed but password-gated. Set apart from the one-click
   personas above by a rule and a lock rather than by colour — the point is not that they are
   special, it is that picking one is a different action with a different next step. */
.demo-staff { margin-top: 12px; border-top: 1px solid var(--hairline); padding-top: 11px; }
.demo-staff-head { font-size: 12.5px; font-weight: 700; }
.demo-staff-sub { font-size: 11.5px; color: var(--dim); margin: 2px 0 8px; line-height: 1.5; }
.demo-staff .demo-account + .demo-account { margin-top: 6px; }
.demo-staff-lock { font-size: 13px; opacity: 0.75; }

/* ---------- app chrome ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 20px;
}
.topbar .brand { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
/* On a phone the bar's fixed-width children (brand 113 + bell 42 + lab 98 + corridor 56 +
   avatar 32, plus six 10px gaps) came to 401px inside 350px of usable width, and with
   `flex-wrap: nowrap` the avatar simply hung 22px past the right edge — so every member route
   scrolled sideways. Tighten the gutters and drop the A/B Lab pill, which is the one item here
   that is a lab tool rather than a member affordance; it stays available on wider screens. */
@media (max-width: 720px) {
  .topbar-inner { gap: 8px; padding: 0 12px; }
  .topbar-inner [data-action="toggle-lab"] { display: none; }
}
.search {
  flex: 1; max-width: 380px; background: var(--wash); border: 1px solid transparent;
  border-radius: 999px; padding: 8px 16px; font-size: 13px; outline: none;
}
.search:focus { border-color: var(--teal); background: var(--surface); }
.topbar-spring { flex: 1; }
.pill-btn {
  display: flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 6px 12px;
  font-size: 13px; font-weight: 600; color: var(--ink); flex: none;
}
.pill-btn:hover { border-color: var(--teal); }
.pill-btn .caret { color: var(--dim); font-size: 10px; }
.avatar-btn { width: 32px; height: 32px; font-size: 12px; border: none; padding: 0; }
.avatar-btn:hover { box-shadow: 0 0 0 2px var(--teal-tint); }
.scope-strip { border-top: 1px solid var(--wash); background: var(--paper); }
.scope-strip-inner { max-width: 1280px; margin: 0 auto; padding: 5px 20px; font-size: 11.5px; color: var(--dim); }
.scope-strip-inner b { color: var(--teal); }

.menu {
  position: absolute; right: 0; top: 40px; z-index: 70; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--radius-card);
  box-shadow: var(--shadow-pop); padding: 6px; width: 230px;
}
.menu-head { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-ctl); cursor: pointer; }
.menu-head:hover { background: var(--wash); }
.menu-item { padding: 8px 10px; border-radius: var(--radius-ctl); font-size: 13px; cursor: pointer; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.menu-item:hover { background: var(--wash); }
.menu-item.danger { color: var(--bad); }
.menu-item.danger:hover { background: var(--bad-tint); }
.menu-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-ctl); font-size: 13px; cursor: pointer; }
.menu-row:hover { background: var(--wash); }
.menu-row.on { background: var(--teal-tint); font-weight: 700; color: var(--teal-hover); }
.menu-row .count { margin-left: auto; font-size: 11.5px; color: var(--dim); }

/* ---------- layout ---------- */
.shell {
  max-width: 1280px; margin: 0 auto; display: grid;
  grid-template-columns: 216px minmax(0, 1fr); gap: 24px;
  padding: 20px 20px 80px; align-items: start;
}
.sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
/* Was an inline style on <nav>, which outranks every stylesheet rule — so the responsive
   `.sidebar nav` rule in the 900px block below had never once applied, and the nav stacked five
   deep on phones regardless. Declared here so media queries can actually reach it. */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9px;
  font-size: 13.5px; cursor: pointer; color: var(--body); font-weight: 550; border: 1px solid transparent;
}
.nav-item:hover { background: var(--wash); }
.nav-item.on { font-weight: 700; background: var(--surface); border-color: var(--hairline); color: var(--ink); }
.nav-item .count-pill { margin-left: auto; background: var(--saffron-tint); color: var(--saffron); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
/* The sidebar's stacked lists — spaces, and (Epic 28, dormant) other communities. Declared here
   rather than inline so the 900px/720px blocks can still reach them; an inline style beats every
   media query, which is the bug DS-243 was written about. */
.side-list { display: flex; flex-direction: column; gap: 1px; }
.space-item {
  display: flex; align-items: center; gap: 8px; padding: 6.5px 12px; border-radius: var(--radius-ctl);
  font-size: 13px; cursor: pointer; color: var(--body);
}
.space-item:hover { background: var(--wash); }
.space-item.on { font-weight: 700; background: var(--wash); color: var(--ink); }
.space-item .n { margin-left: auto; font-size: 11px; color: var(--faint); }
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.main-grid.no-rail { grid-template-columns: minmax(0, 1fr); }
.main-grid.no-rail .rail { display: none; }
.rail { display: flex; flex-direction: column; gap: 14px; }
.rail .card { padding: 16px 18px; }

/* ---------- feed ---------- */
.feed-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.composer { padding: 14px 16px; }
.composer-closed { display: flex; align-items: center; gap: 10px; }
.composer-hint {
  flex: 1; background: var(--wash); border-radius: 999px; padding: 9px 16px;
  font-size: 13.5px; color: var(--dim); cursor: text; border: none; text-align: left;
}
.composer-hint:hover { background: var(--wash); }
.composer-open { display: flex; flex-direction: column; gap: 10px; }
.composer-title {
  border: none; outline: none; font-size: 16px; font-weight: 650; padding: 2px 0; background: transparent;
}
.composer-body {
  border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 12px; font-size: 13.5px;
  min-height: 74px; resize: vertical; outline: none;
}
.composer-body:focus { border-color: var(--teal); }
.composer-spaces { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.composer-spaces .lbl { font-size: 11.5px; color: var(--dim); margin-right: 2px; }
.composer-actions { display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--wash); padding-top: 10px; }
.feed-head { display: flex; align-items: baseline; gap: 10px; padding: 2px 4px; }
.feed-head .t { font-size: 14px; font-weight: 700; }
.feed-head .s { font-size: 12px; color: var(--dim); }
.disclaimer { font-size: 11px; color: var(--faint); text-align: center; padding: 8px 4px 0; }

.post-card { padding: 14px 18px 10px; }
.post-head { display: flex; align-items: center; gap: 9px; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who .line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.post-head .who .name { font-size: 13px; font-weight: 700; cursor: pointer; }
.post-head .who .meta { font-size: 11.5px; color: var(--dim); }
.post-body { cursor: pointer; padding: 9px 0 2px; }
.post-title { font-size: 15.5px; font-weight: 650; line-height: 1.35; text-wrap: pretty; font-family: var(--font-display); }
.post-excerpt { font-size: 13.5px; color: var(--body); line-height: 1.55; margin-top: 5px; }
.post-flagged-note { font-size: 11.5px; color: var(--bad); padding: 4px 0; }
.post-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--wash); margin-top: 8px; padding: 8px 0 6px; }
.post-foot .comments-link { margin-left: auto; font-size: 12px; color: var(--dim); cursor: pointer; background: none; border: none; padding: 2px 4px; }
.post-foot .comments-link:hover { color: var(--teal); }

.rx-pill {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border-radius: 999px;
  padding: 3.5px 11px; font-size: 12px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--dim); font-weight: 600;
  transition: transform .06s ease;
}
.rx-pill:active { transform: scale(0.95); }
.rx-pill.on { background: var(--teal-tint); border-color: var(--teal); color: var(--teal-hover); font-weight: 700; }
.rx-pill.compact { padding: 3.5px 9px; }

.flag-btn { background: none; border: none; color: var(--faint); font-size: 16px; padding: 2px 6px; line-height: 1; }
.flag-btn:hover { color: var(--dim); }
/* Omkara-6 FR-08 — the red flag the client asked for. The button looks the same whether or not
   anybody has flagged the post: a state here would be a public flag indicator (#3). */
.flag-btn { gap: 4px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--bad); border-radius: 999px; }
.flag-btn .flag-ico { font-size: 13px; line-height: 1; }
.flag-btn:hover { color: var(--bad); background: var(--wash); }
.flag-menu {
  position: absolute; right: 0; top: 26px; z-index: 40; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 10px; box-shadow: var(--shadow-pop);
  padding: 6px; width: 210px;
}
.flag-menu .head { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--dim); text-transform: uppercase; padding: 6px 9px 3px; }
.flag-option { display: flex; gap: 8px; align-items: center; padding: 6px 9px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.flag-option:hover { background: var(--bad-tint); }
.flag-menu .foot { font-size: 10.5px; color: var(--faint); padding: 6px 9px; border-top: 1px solid var(--wash); margin-top: 3px; }

/* compact density (A/B experiment B) */
.feed-col.compact { gap: 6px; }
.feed-col.compact .post-card { padding: 9px 14px 7px; }
.feed-col.compact .post-title { font-size: 14px; }
.feed-col.compact .post-excerpt { display: none; }
.feed-col.compact .post-body { padding: 5px 0 1px; }
.feed-col.compact .post-foot { margin-top: 4px; padding: 5px 0 3px; border-top: none; }
.feed-col.compact .avatar { width: 26px !important; height: 26px !important; font-size: 10px !important; }

/* ---------- rail ---------- */
.rail .comm-title { font-size: 14.5px; font-weight: 700; }
.rail .comm-desc { font-size: 12.5px; color: var(--dim); line-height: 1.5; margin-top: 4px; }
.rail .comm-stats { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; }
.rail .maven-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--wash); }
.rail .maven-row:last-of-type { border-bottom: none; }
.rail .maven-row .who { flex: 1; min-width: 0; }
.rail .maven-row .who .n { font-size: 13px; font-weight: 700; cursor: pointer; }
.rail .maven-row .who .c { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .foot-note { font-size: 11px; color: var(--faint); padding-top: 9px; }

/* ---------- labels ---------- */
.label-card { margin-bottom: 14px; padding: 16px 18px; }
.label-head { display: flex; align-items: center; gap: 8px; }
.label-count { font-size: 11px; font-weight: 700; color: var(--dim); background: var(--wash); border-radius: 999px; padding: 1px 9px; }
.label-note { font-size: 12px; color: var(--dim); margin-top: 5px; }
.label-note b { color: var(--teal); font-weight: 700; }
.label-empty { font-size: 12.5px; color: var(--dim); padding: 14px 2px 4px; }
.label-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; margin-top: 12px; }
.label-tile { position: relative; text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 13px; cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.label-tile:hover { border-color: var(--teal); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07); transform: translateY(-1px); }
.label-tile:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.lt-name { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; padding-right: 28px; overflow-wrap: anywhere; }
.label-tile.ticker .lt-name { color: var(--teal); }
.lt-meta { font-size: 11.5px; color: var(--dim); margin-top: 6px; }
.lt-archive { position: absolute; top: 7px; right: 7px; border: 0; background: transparent; font-size: 12.5px; line-height: 1; color: var(--faint); cursor: pointer; opacity: .5; padding: 4px; border-radius: 6px; transition: opacity .12s ease, color .12s ease, background .12s ease; }
.label-tile:hover .lt-archive, .lt-archive:focus-visible { opacity: 1; }
.lt-archive:hover { color: var(--saffron); background: var(--saffron-tint); }
.label-add { display: flex; gap: 8px; margin-top: 12px; }
.label-add .input { flex: 1; }

/* ---------- communities ---------- */
.page-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.page-sub { font-size: 13px; color: var(--dim); margin-top: 3px; }
.comm-list { display: flex; flex-direction: column; gap: 10px; }
.comm-card { padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; }
.comm-avatar { width: 44px; height: 44px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none; }
.comm-card .mid { flex: 1; min-width: 0; }
.comm-card .name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comm-card .name-row .n { font-size: 15px; font-weight: 700; }
.comm-card .desc { font-size: 13px; color: var(--body); line-height: 1.5; margin-top: 4px; }
.comm-card .stats { font-size: 12px; color: var(--dim); margin-top: 6px; }

/* ---------- post detail ---------- */
.detail { max-width: 760px; }
.back-link { font-size: 12.5px; color: var(--teal); font-weight: 600; cursor: pointer; padding: 0 0 12px; background: none; border: none; display: inline-block; }
.detail-card { padding: 20px 22px; }
.detail-title { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 14px 0 8px; letter-spacing: -0.01em; text-wrap: pretty; }
.detail-body { font-size: 14px; color: var(--body); line-height: 1.65; white-space: pre-wrap; }
.detail-rx { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--wash); margin-top: 14px; padding-top: 12px; }
.comments-head { font-size: 13px; font-weight: 700; padding: 16px 4px 8px; }
.comment-card { padding: 14px 16px; }
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-head .n { font-size: 12.5px; font-weight: 700; }
.comment-head .t { font-size: 11px; color: var(--faint); }
.comment-text { font-size: 13.5px; color: var(--body); line-height: 1.6; margin-top: 7px; white-space: pre-wrap; }
.reply-bar { padding: 12px 14px; margin-top: 12px; display: flex; gap: 10px; align-items: center; }
.reply-input { flex: 1; border: none; outline: none; font-size: 13.5px; background: transparent; }

/* ---------- profile ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; max-width: 1100px; }
.profile-grid.no-rail { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.profile-head { padding: 20px 22px; display: flex; gap: 14px; align-items: center; }
.profile-head .who { flex: 1; min-width: 0; }
.profile-head .name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-head .name-row .n { font-size: 17px; font-weight: 700; }
.profile-head .sub { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.profile-head .stat { text-align: right; }
.profile-head .stat .v { font-size: 20px; font-weight: 700; }
.profile-head .stat .l { font-size: 11px; color: var(--dim); }

/* ---- Epic 29 · the follow graph on a profile (29.5, 29.6, 29.9, 29.10, 29.11) ----
   `align-items: flex-start` on the header because it now carries a count strip and a button, and
   vertical-centring a two-element column against a 52px avatar leaves the name floating. */
.profile-head { align-items: flex-start; }
.pf-head-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex: 0 0 auto; }

/* The four counts the client named. A row of labelled numbers, not a sentence — all four are read
   comparatively and a sentence turns that into a parsing task. */
.count-strip { display: flex; gap: 18px; margin-top: 9px; flex-wrap: wrap; }
.cs-cell { display: flex; align-items: baseline; gap: 4px; }
.cs-v { font-size: 14px; font-weight: 700; color: var(--ink); }
.cs-l { font-size: 11.5px; color: var(--dim); }
.cs-link { cursor: pointer; }
.cs-link:hover .cs-v, .cs-link:hover .cs-l { color: var(--teal-hover); }
.follow-btn { white-space: nowrap; }

/* 29.9: About — who this person is, before what they said. */
.pf-about .pf-bio { font-size: 14px; color: var(--body); line-height: 1.65; margin-top: 8px; }
.pf-facts { margin-top: 12px; border-top: 1px solid var(--wash); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.pf-facts > div { display: flex; gap: 10px; font-size: 12.5px; }
.pf-facts .k { color: var(--faint); min-width: 130px; }
.pf-facts .v { color: var(--body); }

/* 29.10: the share prompt. Own profile only — nobody else ever sees this, and it never flips a
   default. It is an explanation of what sharing would reveal, next to the figures it would reveal. */
.pf-share-prompt { margin-top: 10px; background: var(--teal-tint); border-color: var(--teal-tint); }
.pf-share-prompt .t { font-size: 14px; font-weight: 700; }
.pf-share-prompt .d { font-size: 12.5px; color: var(--body); line-height: 1.6; margin: 5px 0 11px; }

/* 29.11: Similar investors. Deliberately no figure column — the reference ranks by return and this
   ranks by overlap, so there is nothing numeric to show and nothing to mistake for a ranking. */
.si-card .si-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; line-height: 1.5; }
.si-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.si-row { display: flex; align-items: center; gap: 9px; }
.si-who { flex: 1; min-width: 0; }
.si-n { font-size: 13px; font-weight: 700; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-n:hover { color: var(--teal-hover); }
.si-k { font-size: 11px; color: var(--dim); }

/* 31.3: the track-record leaderboard on the FEED's right rail — dark by default behind
   `railTrackRecord`. Deliberately narrower than Discover's grid: three rows, a percent and the
   window it was measured over, then a pointer to the rest. The figure column is the only place in
   this rail where a number orders people, and it is a percent (#8) belonging to opt-in mavens
   (#9's single named carve-out, story 29.13) — every other rail card ranks on attention. */
.trr-card .trr-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; line-height: 1.5; }
.trr-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 6px; }
.trr-row { display: flex; align-items: center; gap: 8px; }
.trr-rank { font-size: 11px; font-weight: 700; color: var(--faint); min-width: 9px; text-align: right; }
.trr-who { flex: 1; min-width: 0; }
.trr-n { font-size: 13px; font-weight: 700; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trr-n:hover { color: var(--teal-hover); }
.trr-c { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trr-perf { flex: 0 0 auto; text-align: right; }
.trr-v { display: block; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.trr-perf.up .trr-v { color: var(--good); }
.trr-perf.down .trr-v { color: var(--bad); }
.trr-l { font-size: 10px; color: var(--faint); white-space: nowrap; }

/* 31.14: the member's own moderation standing — their screen only. Amber rather than red: rung 1
   is a reduction, not a punishment, and a card that shouts makes a first-time member read a ban
   into a reach penalty. The paused variant earns the stronger colour. */
.mod-standing { border-left: 3px solid var(--amber); background: var(--surface); }
.mod-standing.paused { border-left-color: var(--bad); }
.mod-standing-t { font-size: 14px; font-weight: 750; }
.mod-standing-d { font-size: 12.5px; color: var(--body); line-height: 1.6; margin-top: 3px; }
.mod-standing-l { margin: 9px 0 4px; padding-left: 18px; font-size: 12.5px; color: var(--body); line-height: 1.7; }

/* 31.9: the Role chip — who somebody is, beside the tier it is derived from. Quieter than the
   tier chip on purpose: the tier is earned and the role is just a reading of it, so it must not
   compete with the badge that took work. */
.role-chip { font-size: 10.5px; font-weight: 650; color: var(--dim); background: var(--wash);
  border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.role-maven { color: var(--teal-hover); background: var(--teal-tint); }

/* 31.10: the ⭐ Community Pick ribbon. ABOVE the byline, because its job is routing attention to
   the writing — beside the author's name it would read as a fact about the person. Saffron rather
   than teal: this is the one editorial mark on a post and it should not read as a system chip. */
.pick-ribbon { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline); padding-bottom: 8px; margin-bottom: 10px; }
.pick-star { font-size: 13px; }
.pick-label { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--saffron); }
.pick-note { font-size: 12.5px; color: var(--body); font-style: italic; flex: 1; min-width: 0; }
.pick-by { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.pick-btn { background: none; border: none; cursor: pointer; font-size: 14px; opacity: .35;
  padding: 0 4px; line-height: 1; }
.pick-btn:hover { opacity: 1; }
.pick-btn.on { opacity: 1; }

/* 29.5: the following list — mine only. */
.pf-following { max-width: 760px; }
.fl-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.fl-row { display: flex; align-items: center; gap: 11px; }
.fl-who { flex: 1; min-width: 0; }
.fl-n { font-size: 14px; font-weight: 700; cursor: pointer; }
.fl-n:hover { color: var(--teal-hover); }
.fl-c { font-size: 11.5px; color: var(--dim); margin-top: 1px; }

/* The maven header's own follow affordance, beside the counts. */
.mv-head-act { margin-top: 9px; }
.profile-tabs { display: flex; gap: 6px; padding: 14px 4px 10px; }
.activity-row { padding: 13px 16px; }
.activity-row .top { display: flex; align-items: center; gap: 8px; }
.activity-row .tag { border: 1px solid var(--hairline); background: var(--paper); color: var(--dim); font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 2px 7px; }
.activity-row .when { font-size: 11.5px; color: var(--faint); }
.activity-row .text { font-size: 13.5px; line-height: 1.5; margin-top: 6px; font-weight: 550; cursor: pointer; }
.activity-row .text:hover { color: var(--teal-hover); }
.activity-row .sub { font-size: 12px; color: var(--dim); margin-top: 3px; }

.portfolio-card .row-top { display: flex; align-items: center; gap: 8px; }
.portfolio-value { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-top: 10px; }
.portfolio-ytd { font-size: 12.5px; font-weight: 700; }
.portfolio-ytd.up { color: var(--good); }
.portfolio-ytd.down { color: var(--bad); }
.portfolio-ytd .note { color: var(--dim); font-weight: 400; }
.pf-day { font-size: 12px; font-weight: 600; margin-top: 2px; min-height: 15px; }
.pf-day.up { color: var(--good); }
.pf-day.down { color: var(--bad); }
.holding-row .chg { margin-left: 8px; font-size: 11px; font-weight: 700; min-width: 48px; text-align: right; }
.holding-row .chg.up { color: var(--good); }
.holding-row .chg.down { color: var(--bad); }
.edu-banner { font-size: 12px; color: var(--dim); background: var(--amber-tint); border: 1px solid var(--wash); border-radius: 8px; padding: 7px 12px; margin-bottom: 10px; }
.bell-badge { position: absolute; top: -4px; right: -4px; background: var(--saffron); color: #fff; font-size: 9.5px; font-weight: 800; border-radius: 999px; padding: 1px 4.5px; line-height: 1.3; }
.ack-row { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--dim); line-height: 1.4; }
.ack-row input { margin-top: 2px; }
.picks-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-chip { font-size: 11.5px; border: 1px solid var(--wash); background: #fff; border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--dim); }
.pick-chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
/* Owner-only portfolio dashboard (#/me) — inline SVG charts. */
.pf-dash { margin-top: 12px; border-top: 1px solid var(--wash); padding-top: 10px; }
.pf-dash svg { width: 100%; height: auto; display: block; }
.pf-dash-cap { font-size: 11px; color: var(--dim); margin: 6px 0 2px; }
.pf-dash-val { font-size: 10px; font-weight: 700; fill: var(--good); }
.pf-dash-months { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--dim); padding: 0 8px; }
/* Landing "What members say" — member voices strip below the teaser columns. */
.teaser-voices { margin-top: 18px; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.voice-card { text-align: left; cursor: pointer; padding: 12px 14px; }
.voice-card .voice-top { display: flex; align-items: center; gap: 8px; }
.voice-card .voice-by { font-weight: 700; font-size: 12.5px; flex: 1; }
.voice-card .voice-likes { font-size: 11.5px; color: var(--dim); font-weight: 700; }
.voice-card .voice-quote { font-size: 13px; line-height: 1.5; margin: 7px 0 6px; font-style: italic; }
.voice-card .voice-thread { font-size: 11px; color: var(--faint); }
.holding-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--wash); font-size: 12.5px; }
.holding-row .t { font-weight: 700; width: 62px; }
.holding-row .bar { flex: 1; height: 5px; background: var(--wash); border-radius: 99px; overflow: hidden; }
.holding-row .bar > div { height: 5px; border-radius: 99px; background: var(--teal); }
.holding-row .pc { color: var(--dim); width: 38px; text-align: right; }
.portfolio-note { font-size: 11px; color: var(--faint); margin-top: 9px; line-height: 1.5; }
.toggle {
  border-radius: 999px; padding: 5px 13px; font-size: 12px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--dim); font-weight: 600; flex: none;
}
.toggle.on { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 700; }

/* ---------- settings ---------- */
.settings { max-width: 680px; }
.settings .card { padding: 18px 20px; margin-top: 12px; }
.settings .card:first-of-type { margin-top: 0; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--wash); margin-top: 12px; padding-top: 12px; }
.setting-row .t { font-size: 13px; font-weight: 650; }
.setting-row .d { font-size: 12px; color: var(--dim); margin-top: 1px; }
.check-row { display: flex; gap: 9px; align-items: center; font-size: 13px; padding: 4px 0; }
.check-row .ok { color: var(--good); font-weight: 700; }

/* ---------- review queue ---------- */
.review { max-width: 760px; }

/* ---------- A/B lab ---------- */
.lab-overlay { position: fixed; inset: 0; background: rgba(29, 29, 31, 0.35); z-index: 90; display: grid; place-items: center; padding: 20px; }
.lab { width: 520px; max-width: 100%; max-height: 86vh; overflow: auto; padding: 22px 24px; }
.lab h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.lab .sub { font-size: 13px; color: var(--dim); margin-top: 3px; }
.lab-exp { border-top: 1px solid var(--wash); margin-top: 16px; padding-top: 14px; }
.lab-exp .q { font-size: 13.5px; font-weight: 700; }
.lab-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.lab-choice {
  text-align: left; border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 14px;
  background: var(--surface); transition: border-color .12s ease;
}
.lab-choice:hover { border-color: var(--teal); }
.lab-choice.on { border: 1.5px solid var(--teal); background: var(--teal-tint); }
.lab-choice .variant { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--faint); }
.lab-choice.on .variant { color: var(--teal-hover); }
.lab-choice .n { font-size: 13px; font-weight: 700; margin-top: 2px; }
.lab-choice .b { font-size: 11.5px; color: var(--dim); line-height: 1.45; margin-top: 3px; }


/* ---------- demo drawer ---------- */
.demo-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 75;
  background: var(--ink); color: #fff; border: none; border-radius: 999px;
  padding: 10px 18px; font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow-pop);
}
.demo-fab:hover { background: #000; }
.demo-drawer {
  position: fixed; right: 18px; bottom: 66px; z-index: 76; width: 400px; max-width: calc(100vw - 36px);
  max-height: 74vh; overflow: auto; padding: 18px 20px; box-shadow: var(--shadow-pop);
}
.demo-drawer h3 { font-size: 14.5px; font-weight: 700; margin: 0; }
.demo-drawer .sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.demo-section { border-top: 1px solid var(--wash); margin-top: 12px; padding-top: 12px; }
.wiring-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.wiring-row .dot-state { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.wiring-row .dot-state.up { background: var(--good); }
.wiring-row .dot-state.down { background: var(--faint); }
.wiring-row .mode { margin-left: auto; font-size: 11px; color: var(--dim); }
.demo-log { font-size: 11px; color: var(--dim); line-height: 1.5; max-height: 130px; overflow: auto; background: var(--paper); border-radius: var(--radius-ctl); padding: 8px 10px; margin-top: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- toast ---------- */
@keyframes dsq-toast {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  12% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
  border-radius: 999px; padding: 10px 20px; z-index: 100;
  animation: dsq-toast 2.6s ease forwards; box-shadow: 0 8px 28px rgba(29, 29, 31, 0.25);
  max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- empty state ---------- */
.empty { padding: 34px 20px; text-align: center; }
.empty .t { font-size: 15px; font-weight: 700; }
.empty .d { font-size: 13px; color: var(--dim); margin-top: 4px; }
/* Story 29.8: the maven page's terminal states. Wider measure than a generic empty card because
   each one has to explain WHY, and an unpublished record needs a sentence, not a shrug. */
.mv-unavailable { max-width: 62ch; }
.mv-unavailable .d { line-height: 1.6; }
.mv-unavailable-detail { font-size: 12px; color: var(--faint); margin-top: 8px; }
.mv-unavailable-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- landing auth (real registration + sign in) ---------- */
.auth-tabs { display: flex; gap: 4px; background: var(--wash); border-radius: 999px; padding: 4px; }
.auth-tab { flex: 1; border: none; background: transparent; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 650; color: var(--dim); }
.auth-tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.auth-form { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.auth-form .input { width: 100%; }
.auth-form .btn-primary { width: 100%; margin-top: 2px; }
.auth-error { font-size: 12px; color: var(--bad); background: var(--bad-tint); border-radius: var(--radius-ctl); padding: 7px 10px; line-height: 1.45; }
.auth-pending { font-size: 13px; font-weight: 600; color: var(--good); background: var(--good-tint); border-radius: var(--radius-ctl); padding: 10px 12px; line-height: 1.5; }
.auth-foot { font-size: 11px; color: var(--faint); line-height: 1.5; }

.rail .maven-row-cta { font-size: 11px; font-weight: 700; color: var(--teal); cursor: pointer; white-space: nowrap; }
.rail .maven-row-cta:hover { color: var(--teal-hover); }

/* ---------- search (Reddit-style results page) ---------- */
.search-page { max-width: 1040px; }
.search-head { padding: 2px 4px 14px; }
.search-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.search-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hairline); margin-bottom: 14px; flex-wrap: wrap; }
.search-tab { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 13px; font-size: 13px; font-weight: 650; color: var(--dim); margin-bottom: -1px; }
.search-tab:hover { color: var(--ink); }
.search-tab.on { color: var(--teal); border-bottom-color: var(--teal); }
.search-tab .n { font-size: 11px; font-weight: 700; color: var(--faint); background: var(--wash); border-radius: 999px; padding: 0 7px; }
.search-tab.on .n { color: var(--teal-hover); background: var(--teal-tint); }
.search-results { display: flex; flex-direction: column; gap: 10px; }
.sr-group-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--dim); text-transform: uppercase; padding: 8px 2px 0; }
.sr-post { padding: 13px 16px; cursor: pointer; }
.sr-post:hover, .sr-comment:hover { border-color: var(--teal); }
.sr-post-meta { font-size: 11.5px; color: var(--dim); }
.sr-post-title { font-size: 15px; font-weight: 650; line-height: 1.35; margin-top: 3px; font-family: var(--font-display); }
.sr-post-snip { font-size: 13px; color: var(--body); line-height: 1.5; margin-top: 4px; }
.sr-post-foot { font-size: 11.5px; color: var(--faint); margin-top: 7px; }
.sr-comment { padding: 12px 16px; cursor: pointer; }
.sr-profile { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.sr-profile-mid { flex: 1; min-width: 0; }
.sr-profile-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; cursor: pointer; }
.sr-profile-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.sr-profile-cta { padding: 6px 12px; font-size: 12px; flex: none; }
.sr-comm { padding: 12px 14px; display: flex; align-items: center; gap: 11px; }
.sr-comm.compact { padding: 10px 12px; }
.sr-comm-avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.sr-comm-mid { flex: 1; min-width: 0; cursor: pointer; }
.sr-comm-name { font-size: 13.5px; font-weight: 700; }
.sr-comm-desc { font-size: 12px; color: var(--dim); line-height: 1.45; margin-top: 2px; }
.sr-comm-stats { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.sr-comm-cta { padding: 5px 14px; font-size: 12px; flex: none; }
.search-rail .card { padding: 14px 16px; }
.search-rail .card .section-label { margin-bottom: 4px; }
.search-rail .card .sr-comm { background: transparent; border: none; border-radius: 0; border-bottom: 1px solid var(--wash); padding: 9px 0; }
.search-rail .card .sr-comm:last-child { border-bottom: none; }

/* ---------- maven detail (eToro-style, PERCENT ONLY) ---------- */
.mv { max-width: 880px; }
.mv-head { padding: 20px 22px; display: flex; align-items: center; gap: 16px; }
.mv-head-mid { flex: 1; min-width: 0; }
.mv-head-name { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mv-head-cred { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.mv-head-followers { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.mv-head-followers b { color: var(--ink); }
/* Story 29.3: one line of About Me in the header, with the way to read the rest. Clamped to a single
   line so a long first sentence cannot push the header's height around between mavens. */
.mv-head-bio {
  font-size: 13px; color: var(--body); margin-top: 7px; line-height: 1.5;
  display: flex; align-items: baseline; gap: 6px; min-width: 0;
}
/* Actually one line. Without this the sentence wraps and "more →" strands itself at the first
   line's baseline off to the right, reading as unrelated furniture rather than the end of the
   sentence — and the header's height then varies with whoever's bio it is. */
.mv-head-bio-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-head-more {
  flex: 0 0 auto; background: none; border: 0; padding: 0; cursor: pointer;
  font: 700 12.5px/1.5 inherit; color: var(--teal);
}
.mv-head-more:hover { color: var(--teal-hover); text-decoration: underline; }
.mv-head-hero { text-align: right; flex: none; }
.mv-hero-v { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.mv-hero-l { font-size: 11px; color: var(--dim); }
.mv-ribbon { background: var(--good-tint); color: var(--good); font-size: 11.5px; font-weight: 650; border-radius: var(--radius-ctl); padding: 8px 14px; margin-top: 12px; }
.mv-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hairline); margin-top: 16px; }
/* The four tab labels total ~403px, so on any phone the last one ("Resources & voices") hung
   past the right edge and took the whole maven page sideways with it. Scroll the STRIP rather
   than the page: a tab rail is the one place a horizontal swipe is expected, and wrapping to a
   second row would push the chart below the fold on exactly the surface a maven is judged by.
   `scrollbar-width: none` keeps it clean; every tab stays reachable by swiping. */
@media (max-width: 720px) {
  .mv-tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mv-tabs::-webkit-scrollbar { display: none; }
  .mv-tab { flex: 0 0 auto; padding: 9px 12px; }
}
.mv-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 9px 16px; font-size: 13.5px; font-weight: 650; color: var(--dim); margin-bottom: -1px; }
.mv-tab:hover { color: var(--ink); }
.mv-tab.on { color: var(--teal); border-bottom-color: var(--teal); }
.mv-section { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 16px 18px; margin-top: 14px; }
.mv-section-head { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.mv-note { font-size: 11px; color: var(--faint); margin-top: 10px; line-height: 1.5; }
.mv-about { font-size: 13px; color: var(--body); line-height: 1.6; }
/* green ≥0, red <0 */
.mv-hero-v.pos, .mv-tile-v.pos, .mv-bar-val.pos, .mv-trade-pl.pos, .mv-chart-chg.pos { color: var(--good); }
.mv-hero-v.neg, .mv-tile-v.neg, .mv-bar-val.neg, .mv-trade-pl.neg, .mv-chart-chg.neg { color: var(--bad); }
.mv-bars { display: flex; align-items: stretch; gap: 12px; height: 168px; padding: 6px 4px 0; }
.mv-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
/* signed track: a zero baseline splits the column — gains grow up, losses grow down */
.mv-bar-track { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: stretch; }
.mv-bar-zone { display: flex; justify-content: center; width: 100%; min-height: 0; }
.mv-bar-zone-pos { flex-direction: column; justify-content: flex-end; }   /* value on top, bar sits on the baseline */
.mv-bar-zone-neg { flex-direction: column; justify-content: flex-start; } /* bar hangs from the baseline, value below */
.mv-bar-zone-pos > * , .mv-bar-zone-neg > * { align-self: center; }
.mv-bar-baseline { height: 0; border-top: 1px dashed var(--hairline); flex: 0 0 auto; }
.mv-bar { width: 58%; max-width: 44px; min-height: 3px; }
.mv-bar.up { border-radius: 5px 5px 0 0; }
.mv-bar.down { border-radius: 0 0 5px 5px; }
.mv-bar.pos { background: var(--good); }
.mv-bar.neg { background: var(--bad); }
.mv-bar-val { font-size: 11px; font-weight: 700; line-height: 1.3; }
.mv-bar-label { font-size: 11px; color: var(--dim); }
.mv-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
/* Story 29.2: the bars and tiles moved onto Stats, above the period selector. This line says the
   selector does not scope them — a control that silently applies to only half a page is a trap. */
.mv-tiles-note { margin-top: 8px; }
/* Story 29.4: a maven's own posts and comments, using the member profile's row shape unchanged. */
.mv-activity { display: flex; flex-direction: column; gap: 10px; }
.mv-tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-ctl); padding: 12px 8px; text-align: center; }
.mv-tile-v { font-size: 17px; font-weight: 700; }
.mv-tile-l { font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.mv-trades { display: flex; flex-direction: column; }
.mv-trade { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--wash); font-size: 13px; }
.mv-trade:last-child { border-bottom: none; }
.mv-trade-tkr { font-weight: 700; width: 64px; }
.mv-side { font-size: 10px; font-weight: 800; border-radius: 4px; padding: 1px 6px; letter-spacing: 0.04em; }
.mv-side.buy { background: var(--good-tint); color: var(--good); }
.mv-side.sell { background: var(--bad-tint); color: var(--bad); }
.mv-trade-at { flex: 1; color: var(--dim); font-size: 12px; }
.mv-trade-pl { font-weight: 700; }
.mv-heat-wrap { overflow-x: auto; }
.mv-heat { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 11px; }
.mv-heat th { font-size: 10px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.03em; padding: 2px; text-align: center; }
.mv-heat-yr { font-weight: 700; color: var(--ink); text-align: left; padding-right: 8px; white-space: nowrap; }
.mv-heat-cell { text-align: center; padding: 6px 4px; border-radius: 5px; font-weight: 650; white-space: nowrap; min-width: 42px; }
.mv-heat-cell.pos { background: var(--good-tint); color: var(--good); }
.mv-heat-cell.neg { background: var(--bad-tint); color: var(--bad); }
.mv-heat-cell.empty { color: var(--faint); background: var(--wash); }
.mv-heat-cell.tot { font-weight: 800; border: 1px solid var(--hairline); }
.mv-alloc { display: flex; flex-direction: column; gap: 2px; }
.mv-alloc-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.mv-alloc-label { width: 130px; font-weight: 600; }
.mv-alloc-bar { flex: 1; height: 8px; background: var(--wash); border-radius: 99px; overflow: hidden; }
.mv-alloc-bar > div { height: 8px; border-radius: 99px; background: var(--teal); }
.mv-alloc-pc { width: 52px; text-align: right; color: var(--dim); font-weight: 600; }
.mv-chart-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.mv-chart-idx { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
.mv-chart-idx-unit { font-size: 14px; font-weight: 600; color: var(--dim); }
.mv-chart-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.mv-chart-chg { font-size: 18px; font-weight: 700; }
.mv-line { width: 100%; height: 220px; display: block; background: linear-gradient(var(--wash), transparent 60%); border-radius: var(--radius-ctl); }

/* ================= Maven Portfolio — the four-tab module =================
   Maven Portfolio Design Doc (30 Jul 2026). The doc calls for a gold maven line against a
   dashed grey benchmark; Porcelain Slate is client-locked and has no gold, so the maven line
   takes the brand peacock and the benchmark stays muted-and-dashed. The grammar the doc is
   after — one confident line, one quiet reference, a signed spread between them — is intact.
   Nothing here renders a currency value: see src/maven-portfolio.mjs. */
:root {
  --maven-line: var(--teal);
  --bench-line: var(--faint);
  /* Categorical palette for donut / sector / drift fills. Muted, light-only, porcelain-safe. */
  --cat-1: #0C637C; --cat-2: #2F7D4F; --cat-3: #8A6D1F; --cat-4: #6B4E8E; --cat-5: #B3452E;
  --cat-6: #3E7C99; --cat-7: #5F7D4F; --cat-8: #A9772F; --cat-9: #4A5568; --cat-10: #8E4256;
}

.mv-photo { border-radius: 50%; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--maven-bg); flex: none; }
.mv-head-title { font-size: 14px; font-weight: 500; color: var(--dim); }
.mv-head-creds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mv-head-creds .badge { cursor: help; }
.mv-cta { margin-top: 10px; white-space: nowrap; }
.mv-empty-chart { font-size: 12.5px; color: var(--dim); padding: 20px 0; text-align: center; }

/* ---- chart primitives ---- */
.mv-chart-wrap { position: relative; }
.mv-svg { width: 100%; display: block; border-radius: var(--radius-ctl); }
.mv-grid { stroke: var(--hairline); stroke-width: 1; }
.mv-axis { font-size: 9.5px; fill: var(--faint); font-family: var(--font); }
.mv-band.pos { fill: var(--good); opacity: 0.16; }
.mv-band.neg { fill: var(--bad); opacity: 0.16; }
.mv-line-maven { fill: none; stroke: var(--maven-line); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.mv-line-bench { fill: none; stroke: var(--bench-line); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.mv-legend { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 12px; color: var(--dim); }
.mv-leg b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.sw.maven { background: var(--maven-line); height: 3px; }
.sw.bench { background: var(--bench-line); height: 2px; }
.sw.pos { background: var(--good); }
.sw.neg { background: var(--bad); }
.mv-rs { height: 120px; }
.mv-zero { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 3 3; }
.mv-rs-line { fill: none; stroke-width: 2; }
.mv-rs-line.pos { stroke: var(--good); } .mv-rs-line.neg { stroke: var(--bad); }
.mv-rs-fill.pos { fill: var(--good); opacity: 0.13; } .mv-rs-fill.neg { fill: var(--bad); opacity: 0.13; }
.mv-drift { height: 180px; }
.mv-drift-key { margin-top: 8px; }

/* ---- §3.4 period comparison ---- */
.mv-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 10px; }
.mv-cmp-group { text-align: center; border: 1px solid var(--hairline); border-radius: var(--radius-ctl); padding: 10px 6px 9px; }
.mv-cmp-group.short { border-style: dashed; }
.mv-cmp-plot { height: 78px; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.mv-cmp-bar { width: 17px; border-radius: 3px 3px 0 0; display: block; }
.mv-cmp-bar.maven { background: var(--maven-line); }
.mv-cmp-bar.bench { background: var(--bench-line); }
.mv-cmp-bar.down { border-radius: 0 0 3px 3px; opacity: 0.75; }
.mv-cmp-label { font-size: 11px; font-weight: 700; margin-top: 7px; }
.mv-cmp-nums { font-size: 11.5px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.mv-cmp-nums .pos { color: var(--good); font-weight: 700; } .mv-cmp-nums .neg { color: var(--bad); font-weight: 700; }
.mv-cmp-vs { color: var(--faint); margin: 0 3px; }
.mv-verdict { margin-top: 7px; font-size: 10px; font-weight: 800; letter-spacing: 0.03em; border-radius: 99px; padding: 4px 6px; }
.mv-verdict.good { background: var(--good-tint); color: var(--good); }
.mv-verdict.bad { background: var(--bad-tint); color: var(--bad); }
.mv-verdict.none { background: var(--wash); color: var(--faint); }
.mv-bps { display: block; font-weight: 700; font-size: 10px; opacity: 0.85; margin-top: 1px; font-variant-numeric: tabular-nums; }
.mv-cmp-note { font-size: 9.5px; color: var(--amber); margin-top: 5px; line-height: 1.4; }
.mv-cmp-empty { color: var(--faint); }
.mv-cmp-nodata { font-size: 10.5px; color: var(--faint); align-self: center; }
.mv-cmp-unavail { color: var(--faint); font-style: italic; }
.mv-reg { border-left: 3px solid var(--amber); }
.mv-shortfall { margin-top: 10px; background: var(--amber-tint); color: var(--amber); font-size: 11.5px; font-weight: 600; border-radius: var(--radius-ctl); padding: 8px 12px; }

/* ---- §3.1 period selector ---- */
.mv-period { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.mv-period-btn { appearance: none; border: 1px solid var(--hairline); background: var(--surface); font: inherit; font-size: 12px; font-weight: 700; color: var(--dim); padding: 6px 14px; border-radius: var(--radius-ctl); cursor: pointer; }
.mv-period-btn:hover { color: var(--ink); }
.mv-period-btn.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.mv-period-note { font-size: 10.5px; color: var(--faint); margin-left: 6px; }

/* ---- §3.5 rating gauge ---- */
.mv-rating { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.mv-gauge { flex: none; width: 170px; text-align: center; }
.mv-gauge svg { width: 170px; height: 104px; }
.mv-gauge-track { fill: none; stroke: var(--wash); stroke-linecap: round; }
.mv-gauge-fill { fill: none; stroke: var(--teal); stroke-linecap: round; }
.mv-gauge-v { font-size: 30px; font-weight: 800; fill: var(--ink); font-family: var(--font); }
.mv-gauge-scale { font-size: 10px; fill: var(--dim); font-family: var(--font); }
.mv-gauge-band { font-size: 12px; font-weight: 700; color: var(--teal); margin-top: 2px; }
.mv-rating-body { flex: 1; min-width: 280px; }
.mv-withheld { background: var(--amber-tint); color: var(--amber); font-size: 12px; border-radius: var(--radius-ctl); padding: 9px 12px; line-height: 1.5; margin-bottom: 10px; }
.mv-rating-bands { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.mv-band-chip { font-size: 10.5px; font-weight: 600; color: var(--dim); background: var(--wash); border-radius: 99px; padding: 3px 9px; }
.mv-band-chip.on { background: var(--teal-tint); color: var(--teal-hover); font-weight: 700; }
.mv-formula { width: 100%; border-collapse: collapse; font-size: 12px; }
.mv-formula th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); border-bottom: 1px solid var(--hairline); padding: 5px 6px; }
.mv-formula td { padding: 7px 6px; border-bottom: 1px solid var(--wash); vertical-align: top; }
.mv-formula td.k { font-weight: 700; white-space: nowrap; }
.mv-formula td.w, .mv-formula td.r, .mv-formula td.s { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-formula td.s { font-weight: 700; }
.mv-formula td.m { color: var(--body); }
.mv-formula .how { font-size: 10.5px; color: var(--faint); margin-top: 2px; line-height: 1.45; }
.mv-caption { font-size: 11px; color: var(--dim); font-style: italic; margin-top: 8px; }

/* ---- §2.2 style chips, §2.3 bio ---- */
.mv-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.mv-chip { background: var(--wash); border-radius: var(--radius-ctl); padding: 9px 12px; }
.mv-chip-l { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); }
.mv-chip-v { display: block; font-size: 12.5px; color: var(--ink); margin-top: 3px; line-height: 1.45; }
.mv-notdo { margin-top: 14px; border-left: 3px solid var(--hairline); padding-left: 12px; }
.mv-notdo-head { font-size: 12px; font-weight: 700; color: var(--dim); }
.mv-notdo ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--body); line-height: 1.7; }

/* ---- §2.4 track record table ---- */
.mv-table-wrap { overflow-x: auto; }
.mv-track { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.mv-track th { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); border-bottom: 1px solid var(--hairline); padding: 6px 8px; }
.mv-track th:first-child { text-align: left; }
.mv-track td { padding: 8px; text-align: right; border-bottom: 1px solid var(--wash); }
.mv-track td:first-child { text-align: left; font-weight: 700; }
.mv-track .pos { color: var(--good); font-weight: 700; } .mv-track .neg { color: var(--bad); font-weight: 700; }
.mv-tr-none td { color: var(--faint); font-style: italic; font-weight: 400 !important; text-align: left; }
.mv-tr-partial { background: var(--wash); }
.mv-tr-sum td { border-top: 1px solid var(--hairline); border-bottom: none; font-weight: 700; background: var(--wash); }
.mv-res.good { color: var(--good); } .mv-res.bad { color: var(--bad); }
.mv-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--dim); background: var(--wash); border-radius: 3px; padding: 1px 5px; margin-left: 5px; }
.mv-basis { margin-top: 10px; font-size: 11px; color: var(--dim); line-height: 1.55; background: var(--wash); border-radius: var(--radius-ctl); padding: 9px 12px; }
.mv-basis b { color: var(--ink); }
.mv-consistency { margin-top: 10px; display: inline-block; background: var(--teal-tint); color: var(--teal-hover); font-size: 12px; font-weight: 700; border-radius: 99px; padding: 6px 14px; }

/* ---- §2.5 risk strip ---- */
.mv-rstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 9px; }
.mv-rstat { border: 1px solid var(--hairline); border-radius: var(--radius-ctl); padding: 10px 8px; text-align: center; }
.mv-rstat-v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mv-rstat-v.pos { color: var(--good); } .mv-rstat-v.neg { color: var(--bad); }
.mv-rstat-l { font-size: 10px; color: var(--dim); margin-top: 3px; line-height: 1.3; }
.mv-of { font-size: 10px; color: var(--dim); font-weight: 600; }
.mv-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

/* ---- §3.6 allocation ---- */
.mv-donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.mv-donut { width: 150px; height: 150px; flex: none; }
.mv-donut-key { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 4px; }
.mv-key-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mv-key-row i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.mv-key-row span { flex: 1; color: var(--body); }
.mv-key-row b { font-variant-numeric: tabular-nums; }
.mv-drift-key { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
.mv-drift-key .mv-key-row { flex: none; font-size: 11px; }
.mv-sectors { display: flex; flex-direction: column; gap: 3px; }
.mv-sector-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.mv-sector-label { width: 108px; font-weight: 600; flex: none; }
.mv-sector-track { flex: 1; height: 14px; background: var(--wash); border-radius: 3px; position: relative; }
.mv-sector-fill { position: absolute; inset: 0 auto 0 0; background: var(--teal); border-radius: 3px; display: block; }
.mv-sector-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: 0.65; display: block; }
.mv-sector-pc { width: 48px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.mv-sector-ow { width: 44px; text-align: right; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mv-sector-ow.pos { color: var(--good); } .mv-sector-ow.neg { color: var(--bad); }
.mv-conc-bar { display: flex; height: 26px; border-radius: var(--radius-ctl); overflow: hidden; }
.mv-conc-seg { display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: #fff; }
.mv-conc-seg.a { background: var(--cat-1); } .mv-conc-seg.b { background: var(--cat-6); } .mv-conc-seg.c { background: var(--faint); }
.mv-conc-key { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.mv-conc-k::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.mv-conc-k.a::before { background: var(--cat-1); } .mv-conc-k.b::before { background: var(--cat-6); } .mv-conc-k.c::before { background: var(--faint); }
.mv-conc-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mv-conc-hold { font-size: 11.5px; background: var(--wash); border-radius: 99px; padding: 3px 10px; font-variant-numeric: tabular-nums; }

/* ---- §4 portfolio tab ---- */
.mv-weekbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mv-week-nav { appearance: none; border: 1px solid var(--hairline); background: var(--surface); font-size: 15px; line-height: 1; color: var(--ink); width: 30px; height: 30px; border-radius: var(--radius-ctl); cursor: pointer; }
.mv-week-nav:disabled { color: var(--faint); cursor: default; }
.mv-week-select { font: inherit; font-size: 13px; font-weight: 650; padding: 6px 10px; border: 1px solid var(--hairline); border-radius: var(--radius-ctl); background: var(--surface); color: var(--ink); }
.mv-week-arch { font-size: 10.5px; color: var(--faint); margin-left: auto; }
.mv-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.mv-sum-tile { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-ctl); padding: 12px 10px; text-align: center; }
.mv-sum-v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mv-sum-v.pos { color: var(--good); } .mv-sum-v.neg { color: var(--bad); }
.mv-sum-l { font-size: 10.5px; color: var(--dim); margin-top: 2px; }
.mv-lag { margin-top: 8px; font-size: 11px; color: var(--dim); background: var(--wash); border-radius: var(--radius-ctl); padding: 7px 12px; }
.mv-pos { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.mv-pos th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); border-bottom: 1px solid var(--hairline); padding: 6px 8px; white-space: nowrap; }
.mv-pos td { padding: 9px 8px; border-bottom: 1px solid var(--wash); }
.mv-pos .pos { color: var(--good); font-weight: 700; } .mv-pos .neg { color: var(--bad); font-weight: 700; }
.mv-pos .mv-strong { font-size: 13.5px; }
.mv-row { cursor: pointer; }
.mv-row:hover { background: var(--wash); }
.mv-row.on { background: var(--teal-tint); }
.mv-tkr { white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.mv-tkr-t { min-width: 0; }
.mv-tkr b { font-weight: 700; }
.mv-tkr-n { display: block; font-size: 10.5px; color: var(--dim); font-weight: 400; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
/* §4.2 "logo + symbol" — a deterministic monogram, so no row costs an external request. */
.mv-tkr-logo { flex: none; width: 26px; height: 26px; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.02em; display: inline-flex; align-items: center; justify-content: center; }
/* §4.5 sortable headers */
.mv-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.mv-th-sort:hover { color: var(--ink); }
.mv-th-sort.on { color: var(--teal); }
.mv-sort-caret { font-size: 8.5px; margin-left: 4px; opacity: 0.55; }
.mv-th-sort.on .mv-sort-caret { opacity: 1; }
/* §3.2 hover readout */
.mv-cross { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.mv-dot-maven { fill: var(--maven-line); stroke: var(--surface); stroke-width: 1.5; pointer-events: none; }
.mv-dot-bench { fill: var(--bench-line); stroke: var(--surface); stroke-width: 1.5; pointer-events: none; }
.mv-tip { position: absolute; top: 8px; pointer-events: none; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-ctl); box-shadow: var(--shadow-pop); padding: 8px 10px; font-size: 11.5px; z-index: 3; min-width: 150px; }
.mv-tip-d { font-weight: 700; margin-bottom: 4px; font-size: 11px; color: var(--dim); }
.mv-tip-r { display: flex; align-items: center; gap: 6px; line-height: 1.7; }
.mv-tip-r b { margin-left: auto; font-variant-numeric: tabular-nums; }
.mv-tip-r b.pos { color: var(--good); } .mv-tip-r b.neg { color: var(--bad); }
.mv-leg-at { color: var(--faint); margin-left: auto; }
.mv-px { color: var(--body); }
.mv-caret { color: var(--faint); width: 18px; }
.mv-wbar { display: inline-block; width: 42px; height: 6px; background: var(--wash); border-radius: 99px; overflow: hidden; margin-right: 6px; vertical-align: middle; }
.mv-wbar > i { display: block; height: 6px; background: var(--teal); border-radius: 99px; }
.mv-reason { font-size: 10.5px; font-weight: 700; background: var(--wash); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.mv-jump { color: var(--teal); font-weight: 700; cursor: pointer; }
.mv-thesis { font-size: 12px; color: var(--body); line-height: 1.6; padding: 7px 0 0; }
.mv-thesis b { color: var(--ink); }
.mv-row-drawer > td { padding: 0 !important; border-bottom: 1px solid var(--hairline) !important; }
.mv-drawer { background: var(--wash); padding: 14px 16px; }
.mv-drawer-lead { font-size: 13px; margin-bottom: 10px; }
.mv-drawer-lead .pos { color: var(--good); } .mv-drawer-lead .neg { color: var(--bad); }
.mv-range { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.mv-range-track { flex: 1; height: 6px; background: linear-gradient(90deg, var(--bad-tint), var(--wash) 50%, var(--good-tint)); border-radius: 99px; position: relative; min-width: 90px; }
.mv-range-dot { position: absolute; top: -4px; width: 3px; height: 14px; border-radius: 2px; background: var(--ink); transform: translateX(-1.5px); display: block; }
.mv-range-end { font-weight: 600; color: var(--body); }
.mv-range-pc { font-weight: 700; color: var(--ink); white-space: nowrap; }
.mv-tstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.mv-tstat { background: var(--surface); border-radius: var(--radius-ctl); padding: 9px 8px; text-align: center; }
.mv-tstat-v { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mv-tstat-v.pos { color: var(--good); } .mv-tstat-v.neg { color: var(--bad); }
.mv-tstat-l { font-size: 10px; color: var(--dim); margin-top: 2px; }
.mv-base { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.mv-base-l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); }
.mv-base-v { font-size: 12.5px; font-weight: 700; background: var(--surface); border-radius: 99px; padding: 4px 12px; }

/* ---- §5 methodology tab ---- */
.mv-m-badge { display: inline-block; background: var(--teal-tint); color: var(--teal-hover); font-size: 12px; font-weight: 700; border-radius: 99px; padding: 5px 13px; margin-bottom: 10px; }
.mv-m-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 8px 0; border-top: 1px solid var(--wash); }
.mv-m-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--dim); }
.mv-m-v { font-size: 12.5px; color: var(--body); line-height: 1.6; }
.mv-disc p { font-size: 12.5px; color: var(--body); line-height: 1.65; margin: 0 0 8px; }
.mv-open { margin: 10px 0 0; padding-left: 18px; font-size: 11.5px; color: var(--dim); line-height: 1.65; }
.mv-footer-disc .mv-basis-line { margin-top: 5px; font-size: 10.5px; color: var(--faint); }

@media (max-width: 720px) {
  .mv-m-row { grid-template-columns: 1fr; gap: 3px; }
  .mv-rating { gap: 12px; }
  .mv-week-arch { margin-left: 0; width: 100%; }
}

/* ---------- admin panel ---------- */
.admin { max-width: 960px; }
.admin-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.admin-tile { padding: 16px 18px; }
.admin-tile-v { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.admin-tile-l { font-size: 12px; color: var(--dim); margin-top: 2px; }
.admin-block { padding: 16px 18px; margin-top: 14px; }
.admin-block-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.admin-count { font-size: 12px; font-weight: 600; color: var(--dim); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-filter { margin-bottom: 12px; max-width: 340px; }

/* Story 25.1 — the tabbed console: one task's content on screen at a time. */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid var(--hairline); padding-bottom: 0; }
.admin-tab { appearance: none; border: none; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--dim); padding: 8px 12px 9px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.on { color: var(--teal); border-bottom-color: var(--teal); }
.admin-tab-pill { display: inline-block; min-width: 16px; text-align: center; background: var(--bad-tint); color: var(--bad); border-radius: 8px; font-size: 10.5px; padding: 1px 5px; margin-left: 2px; }
.admin-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.admin-toolbar .admin-filter { margin-bottom: 0; flex: 1; }
.admin-pager { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 12px; }
.admin-pager-label { font-size: 12px; color: var(--dim); }
.admin-confirm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-confirm-note { font-size: 11.5px; color: var(--bad); }
/* B10 — a member whose voucher was later un-verified. Deliberately quiet: it informs a review,
   it does not accuse anybody, and nothing was changed automatically. --amber, not --saffron:
   the light theme remaps saffron to the teal accent (line 48), so a marker painted with it comes
   out the same colour as a MOD badge and a nav count pill. Amber is the palette's one caution
   colour and is not reused as a general accent. */
.admin-vouch-broken { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--amber);
  background: var(--amber-tint);
  border: 1px solid currentColor; border-radius: 999px; padding: 1px 7px; white-space: nowrap; cursor: help; }
.admin-candidate-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--wash); font-size: 12.5px; }
.admin-cr-candidates { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-modq-row { padding: 8px 0; border-bottom: 1px solid var(--wash); display: flex; flex-direction: column; gap: 6px; }
.admin-modq-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-modq-quote { font-size: 12.5px; color: var(--body); background: var(--wash); border-radius: var(--radius-ctl); padding: 8px 10px; overflow-wrap: anywhere; }
.review-resolved-toggle { appearance: none; border: none; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--dim); cursor: pointer; padding: 2px 0; }
.review-resolved-toggle:hover { color: var(--ink); }
.feed-more { display: flex; justify-content: center; padding: 4px 0 2px; }
.admin-table th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); padding: 6px 8px; border-bottom: 1px solid var(--hairline); }
.admin-table td { padding: 9px 8px; border-bottom: 1px solid var(--wash); vertical-align: middle; }
.admin-user { display: flex; align-items: center; gap: 9px; }
.admin-user-name { font-weight: 650; }
.admin-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-role-btn { padding: 5px 10px; font-size: 11.5px; }
.admin-spaces { display: flex; flex-direction: column; gap: 2px; }
.admin-space-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--wash); }
.admin-space-row:last-child { border-bottom: none; }
.admin-space-row.archived .admin-space-name { opacity: 0.6; }
.admin-space-name { flex: 1; font-weight: 650; font-size: 13px; }
.admin-space-count { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.admin-space-btn { padding: 5px 10px; font-size: 11.5px; }
.admin-space-add { display: flex; gap: 8px; margin-top: 12px; }
.admin-space-add .input { flex: 1; }
.admin-links { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; }

@media (max-width: 1080px) {
  .search-grid { grid-template-columns: minmax(0, 1fr); }
  .search-rail { display: none; }
}
@media (max-width: 760px) {
  .mv-tiles { grid-template-columns: repeat(3, 1fr); }
  .admin-tiles { grid-template-columns: repeat(2, 1fr); }
  .mv-head { flex-wrap: wrap; }
  .mv-head-hero { text-align: left; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .main-grid { grid-template-columns: minmax(0, 1fr); }
  /* The rail's cards fold away below 1080px — but Epic 28 moved the ticker rail INTO the rail, and
     dropping it here would have silently deleted it from every phone, which is the device most of
     this audience reads on. So the rail keeps flowing and only the ticker card survives: in a
     single-column grid it renders after `.feed-col`, so posts still come first (DS-243's actual
     goal) and the swipeable-chip rules below still apply, because they key on `.tkr-chips` rather
     than on where it sits. */
  .rail > * { display: none; }
  .rail > .tkr-rail { display: block; margin-bottom: 0; }
  /* Omkara-6 FR-10 — Similar investors survives too, for the same reason: the client asked for it on
     the RHS so people find other gurus, and a phone is where most of this audience reads. It lands
     after the page's own column, so the profile or guru page still comes first. */
  .rail > .si-card { display: block; margin-top: 16px; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .sidebar .side-spaces { display: none; }
  .side-nav { display: flex; flex-direction: row; gap: 4px; }
      .landing-hero h1 { font-size: 32px; }
  .search { display: none; }
  .lab-choices { grid-template-columns: 1fr; }
}

/* ============================================================================
   v4b additions — Popular/New feed · public teaser · structured flags + penalties
   · community calendar · karma (engagement reputation). All engagement/percent-free:
   never a $ or a % return on any karma / leaderboard / calendar surface (#9). */

/* ---------- feed sort tabs (Reddit-style) ---------- */
.feed-sort {
  display: inline-flex; gap: 2px; align-self: flex-start;
  background: var(--wash); border: 1px solid var(--hairline); border-radius: 999px; padding: 3px;
}
.feed-sort-tab {
  border: none; background: transparent; border-radius: 999px; padding: 6px 16px;
  font-size: 12.5px; font-weight: 700; color: var(--dim); transition: color .12s ease, background .12s ease;
}
.feed-sort-tab:hover { color: var(--ink); }
.feed-sort-tab.on { background: var(--surface); color: var(--teal); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

/* ---------- "#n POPULAR" chip ---------- */
.pop-rank {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800;
  letter-spacing: 0.06em; color: var(--saffron); background: var(--saffron-tint);
  border-radius: 999px; padding: 2px 9px; margin-bottom: 8px;
}

/* ---------- karma + tier chips (bylines / profiles / leaderboard) ---------- */
.karma-chip {
  display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700;
  color: var(--teal-hover); background: var(--teal-tint); border-radius: 999px;
  padding: 1px 7px; white-space: nowrap; cursor: help;
}
.badge-flag { background: var(--bad-tint); color: var(--bad); }
.lb-how { color: var(--teal); font-weight: 600; cursor: pointer; }
.lb-how:hover { text-decoration: underline; }

.tier-chip {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 5px; padding: 1.5px 7px; white-space: nowrap; background: var(--wash); color: var(--dim); cursor: help;
}
.tier-elder { background: var(--saffron-tint); color: var(--saffron); }
.tier-trusted { background: var(--good-tint); color: var(--good); }
.tier-regular { background: var(--teal-tint); color: var(--teal-hover); }
.tier-neighbor { background: var(--wash); color: var(--dim); }
.tier-new { background: var(--wash); color: var(--faint); }

/* ---------- "How karma works" transparency page (#/karma) ---------- */
.karma-page { max-width: 680px; margin: 0 auto; }
.karma-h1 { font-size: 22px; font-weight: 800; margin: 2px 0 6px; }
.karma-statement { font-size: 14px; color: var(--body); line-height: 1.6; margin-bottom: 16px; }
.karma-card { padding: 16px 18px; margin-top: 14px; }
.karma-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.karma-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.03em; padding: 0 0 8px; border-bottom: 1px solid var(--hairline); }
.karma-table th.pts, .karma-table td.pts { text-align: right; white-space: nowrap; }
.karma-table td { padding: 9px 0; border-bottom: 1px solid var(--wash); }
.karma-table tr:last-child td { border-bottom: none; }
.karma-table td.pts { font-weight: 800; color: var(--good); font-variant-numeric: tabular-nums; }
.karma-soon { font-size: 10.5px; font-weight: 700; color: var(--faint); background: var(--wash); border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
.karma-note { font-size: 11.5px; color: var(--faint); line-height: 1.5; margin-top: 12px; }
.karma-tiers { display: flex; flex-direction: column; gap: 8px; }
.karma-tier-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.karma-tier-min { font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.karma-rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; }
.karma-rules li { font-size: 13px; color: var(--body); line-height: 1.5; }
.karma-changelog { display: flex; flex-direction: column; gap: 8px; }
.karma-cl-row { display: flex; gap: 12px; font-size: 13px; color: var(--body); }
.karma-cl-date { flex: 0 0 84px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------- Services & Products Hub (#/hub · EP-03) ---------- */
.hub-page { max-width: 720px; margin: 0 auto; }
.hub-head { margin-bottom: 6px; }
.hub-h1 { font-size: 22px; font-weight: 800; margin: 2px 0 6px; }
.hub-sub { font-size: 13.5px; color: var(--body); line-height: 1.6; margin: 0 0 14px; }
.hub-experts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hub-expert { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 14px 16px; }
.hub-expert-top { display: flex; align-items: flex-start; gap: 10px; }
.hub-av { width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.hub-expert-id { flex: 1; min-width: 0; }
.hub-expert-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Story 29.7: the name and the avatar open the maven page, so both look like the links they are. */
.hub-expert-link { cursor: pointer; }
.hub-expert-link:hover { color: var(--teal-hover); text-decoration: underline; }
.hub-av[data-action] { cursor: pointer; }
.hub-flair { font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--good); background: var(--good-tint); border-radius: 5px; padding: 1px 6px; }
.hub-cred { font-size: 12px; color: var(--dim); margin-top: 2px; }
.hub-track { text-align: right; flex: 0 0 auto; }
.hub-track-v { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.hub-track.pos .hub-track-v { color: var(--good); }
.hub-track.neg .hub-track-v { color: var(--bad); }
.hub-track-l { font-size: 10px; color: var(--faint); }
.hub-tagline { font-size: 12.5px; color: var(--body); line-height: 1.5; margin: 10px 0 8px; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.hub-chip { font-size: 10.5px; font-weight: 650; color: var(--dim); background: var(--wash); border-radius: 999px; padding: 2px 8px; }
.hub-chip.corridor { color: var(--teal-hover); background: var(--teal-tint); }
.hub-expert-foot { font-size: 11.5px; color: var(--dim); margin-top: 10px; }
.hub-link { color: var(--teal); font-weight: 600; cursor: pointer; }
.hub-services { padding: 4px 16px; }
.hub-service { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--wash); }
.hub-service:last-child { border-bottom: none; }
.hub-service-main { flex: 1; min-width: 0; }
.hub-service-title { font-size: 13.5px; font-weight: 650; }
.hub-service-meta { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.hub-tier { font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
.hub-tier.tier-complimentary { background: var(--good-tint); color: var(--good); }
.hub-tier.tier-member { background: var(--teal-tint); color: var(--teal-hover); }
.hub-tier.tier-premium { background: var(--saffron-tint); color: var(--saffron); }
.btn-sm { font-size: 12px; padding: 5px 12px; border-radius: var(--radius-ctl); }
.hub-bookings { padding: 4px 16px; }
.hub-booking { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--wash); font-size: 13px; }
.hub-booking:last-child { border-bottom: none; }
.hub-booking-status { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--amber); background: var(--amber-tint); border-radius: 5px; padding: 2px 8px; }
/* 31.16 — the maven's inbox row. Two buttons while a request is unanswered; an answered row keeps
   its outcome and steps back visually, because the queue is the unanswered ones. */
.hub-booking-actions { display: flex; gap: 6px; flex-shrink: 0; }
.hub-booking.is-answered { opacity: .72; }
.hub-guides { display: flex; flex-direction: column; gap: 10px; }
.hub-guide { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 13px 16px; }
.hub-guide-title { font-size: 14px; font-weight: 700; }
.hub-guide-sum { font-size: 12.5px; color: var(--body); line-height: 1.5; margin: 5px 0 8px; }
.hub-guide-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hub-guide-by { font-size: 11.5px; color: var(--dim); }
.hub-empty { font-size: 12.5px; color: var(--faint); padding: 12px 4px; }
@media (max-width: 640px) { .hub-experts { grid-template-columns: 1fr; } }

/* ---------- Deals & offers (#/deals · EP-04) ---------- */
.deals-page { max-width: 720px; margin: 0 auto; }
.deals-head { margin-bottom: 8px; }
.deals-h1 { font-size: 22px; font-weight: 800; margin: 2px 0 6px; }
.deals-sub { font-size: 13.5px; color: var(--body); line-height: 1.6; margin: 0 0 14px; }
.deals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deal-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 14px 16px; display: flex; flex-direction: column; }
.deal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.deal-cat { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.deal-sponsored { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--amber); background: var(--amber-tint); border-radius: 5px; padding: 1.5px 7px; }
.deal-first { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-hover); background: var(--teal-tint); border-radius: 5px; padding: 1.5px 7px; }
.deal-title { font-size: 14.5px; font-weight: 700; margin-top: 8px; }
.deal-benefit { font-size: 13px; font-weight: 700; color: var(--good); margin-top: 3px; }
.deal-blurb { font-size: 12.5px; color: var(--body); line-height: 1.5; margin-top: 6px; }
.deal-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.deal-sponsor { font-size: 11.5px; color: var(--dim); }
.deal-remaining { font-size: 10.5px; font-weight: 700; color: var(--bad); background: var(--bad-tint); border-radius: 5px; padding: 1.5px 7px; }
.deal-terms { font-size: 11px; color: var(--faint); line-height: 1.4; margin-top: 8px; }
.deal-foot { margin-top: 10px; }
.deal-redeemed { font-size: 12px; font-weight: 700; color: var(--good); }
.deal-disclosure { font-size: 10px; color: var(--faint); line-height: 1.4; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--wash); }
.deal-redemptions { padding: 4px 16px; }
.deal-redemption { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--wash); font-size: 13px; }
.deal-redemption:last-child { border-bottom: none; }
.deal-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 700; color: var(--teal-hover); background: var(--teal-tint); border-radius: 5px; padding: 2px 8px; }
.deals-empty { font-size: 12.5px; color: var(--faint); padding: 12px 4px; }
@media (max-width: 640px) { .deals-grid { grid-template-columns: 1fr; } }

/* ---------- landing teaser ("Popular this week" — general visitors) ---------- */
.teaser { max-width: 640px; margin: 18px auto 0; text-align: left; min-width: 0; }
.teaser-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 10px; }
.teaser-flame { color: var(--saffron); font-weight: 800; }
.teaser-title-lbl { font-size: 15px; font-weight: 700; }
.teaser-sub { font-size: 11.5px; color: var(--dim); }
.teaser-lb { padding: 6px 16px; }
.teaser-lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--wash); }
.teaser-lb-row:last-child { border-bottom: none; }
.teaser-lb-rank { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--faint); width: 18px; text-align: right; }
.teaser-lb-av { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 10.5px; flex: 0 0 auto; }
.teaser-lb-name { font-size: 13px; font-weight: 650; color: var(--ink); flex: 1; }
.teaser-lb-mv { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--teal-hover); background: var(--teal-tint); border-radius: 4px; padding: 1px 5px; margin-left: 5px; }
.teaser-lb-karma { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 800; color: var(--ink); width: 40px; text-align: right; }
.teaser-events { padding: 6px 16px; }
.teaser-event { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--wash); }
.teaser-event:last-child { border-bottom: none; }
.teaser-event-date { font-size: 11px; font-weight: 800; color: var(--saffron); background: var(--saffron-tint); border-radius: 6px; padding: 4px 8px; white-space: nowrap; text-align: center; min-width: 52px; }
.teaser-event-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.teaser-event-main b { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.teaser-event-meta { font-size: 11.5px; color: var(--dim); margin-top: 1px; }
.teaser-event-join { font-size: 11.5px; font-weight: 650; color: var(--teal); white-space: nowrap; }
.teaser-note { font-size: 11.5px; color: var(--faint); text-align: center; margin-top: 12px; }
.join-gate-note {
  font-size: 12px; font-weight: 650; color: var(--teal-hover); background: var(--teal-tint);
  border-radius: var(--radius-ctl); padding: 8px 10px; line-height: 1.45;
}

/* ---------- top contributors (feed rail) ---------- */
.lb-card .lb-sub { font-size: 11px; color: var(--dim); margin-top: 1px; margin-bottom: 8px; }
.lb-list { display: flex; flex-direction: column; }
.lb-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--wash); font-size: 12.5px; }
.lb-row:last-child { border-bottom: none; }
.lb-rank { width: 16px; flex: none; font-weight: 800; color: var(--faint); text-align: center; }
.lb-name { min-width: 0; font-weight: 700; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name:hover { color: var(--teal); }
.lb-karma { margin-left: auto; flex: none; font-weight: 700; color: var(--teal-hover); white-space: nowrap; cursor: help; }
.lb-note { font-size: 10.5px; color: var(--faint); margin-top: 9px; line-height: 1.5; }

/* ---------- community calendar (moderator surface; compact in the rail) ---------- */
.cal-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 14px 16px; }
.cal-head { display: flex; align-items: baseline; gap: 8px; }
.cal-title { font-size: 13px; font-weight: 700; }
.cal-managed { font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal); background: var(--teal-tint); border-radius: 5px; padding: 1.5px 7px; }
.cal-note { font-size: 11px; color: var(--dim); margin: 4px 0 10px; line-height: 1.45; }
.cal-list { display: flex; flex-direction: column; gap: 8px; }
.cal-event { display: flex; align-items: center; gap: 11px; }
.cal-date { flex: none; width: 42px; text-align: center; border: 1px solid var(--hairline); border-radius: 8px; padding: 4px 0; line-height: 1.05; background: var(--paper); }
.cal-date .m { display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--saffron); }
.cal-date .d { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.cal-mid { flex: 1; min-width: 0; }
.cal-ev-title { font-size: 12.5px; font-weight: 650; line-height: 1.3; }
.cal-ev-sub { font-size: 11px; color: var(--dim); margin-top: 1px; }
.cal-scope { flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--dim); background: var(--wash); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.cal-del { flex: none; background: none; border: none; color: var(--faint); font-size: 16px; line-height: 1; padding: 0 2px; }
.cal-del:hover { color: var(--bad); }
.cal-empty { font-size: 12px; color: var(--dim); }
.cal-tools { margin-top: 10px; }
.cal-add-btn { padding: 5px 12px; font-size: 12px; }
.cal-form { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; border-top: 1px solid var(--wash); padding-top: 10px; }
.cal-form .input { width: 100%; }
.cal-form-row { display: flex; gap: 7px; }
.cal-form-row .input { flex: 1; min-width: 0; }
.cal-form .btn-primary { margin-top: 2px; }
.cal-panel.compact .cal-scope { display: none; }
.cal-panel.compact .cal-note { margin-bottom: 8px; }

/* ---------- structured flag cards + posting penalties (review queue) ---------- */
.flag-card { padding: 15px 18px; margin-bottom: 10px; }
.flag-card-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.flag-reason { font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 5px; padding: 2.5px 9px; }
.flag-reason.reason-market { background: var(--saffron-tint); color: var(--saffron); }
.flag-reason.reason-mislead { background: var(--bad-tint); color: var(--bad); }
.flag-who { font-size: 12px; color: var(--dim); }
/* 29.18 — which piece of content this item is about, and the thread it came from. */
.flag-kind { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--teal-hover); background: var(--teal-tint); border-radius: 999px; padding: 2px 8px; }
.flag-context { margin-top: 6px; font-size: 12px; color: var(--faint); }
.flag-count { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--bad); background: var(--bad-tint); border-radius: 999px; padding: 2px 10px; }
.flag-quote { font-size: 13.5px; color: var(--body); line-height: 1.55; margin-top: 10px; border-left: 3px solid var(--hairline); padding-left: 12px; font-style: italic; }
.flag-actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.flag-actions .btn { font-size: 12.5px; padding: 8px 14px; }
.flag-resolution { font-size: 12.5px; font-weight: 650; margin-top: 12px; border-radius: var(--radius-ctl); padding: 8px 12px; }
.flag-resolution.removed { color: var(--bad); background: var(--bad-tint); }
.flag-resolution.dismissed { color: var(--dim); background: var(--wash); }
.review-cal { margin-top: 18px; }

/* ---------------- minimal landing (client feedback Jul 2026): search-first hero,
   Reddit-style popular rows, modal auth sheet. Porcelain Slate stays. ---------------- */
.landing-min .landing-top { padding: 14px 22px; }
.btn-slim { border-radius: 999px; font-size: 12.5px; padding: 7px 14px; }
.hero-min { max-width: 720px; margin: 0 auto; padding: 7vh 20px 34px; text-align: center; }
.hero-brand { display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: clamp(34px, 6vw, 52px); letter-spacing: -0.03em; margin: 0 0 10px; }
.hero-mark { width: 26px; height: 26px; border-radius: 7px; }
.hero-tag { font-size: 14.5px; color: var(--dim); max-width: 560px; margin: 0 auto 26px; line-height: 1.55; }
.hero-search { display: flex; align-items: center; gap: 8px; max-width: 580px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 6px 8px 6px 18px; box-shadow: 0 1px 6px rgba(29, 29, 31, .06); }
.hero-search:focus-within { border-color: var(--teal); box-shadow: 0 2px 12px rgba(29, 29, 31, .10); }
.hero-search-ico { font-size: 17px; color: var(--faint); }
.hero-search-input { flex: 1; border: none; outline: none; background: none; font: inherit;
  font-size: 14.5px; color: inherit; min-width: 0; }
.hero-search-go { border: none; border-radius: 999px; background: var(--wash); color: var(--dim);
  font: inherit; font-size: 13px; font-weight: 650; padding: 8px 16px; cursor: pointer; }
.hero-search-go:hover { background: var(--teal); color: #fff; }
.hero-actions { display: flex; gap: 10px; justify-content: center; margin: 22px 0 18px; }
.hero-join { padding: 10px 26px; border-radius: 999px; }
.hero-stats { justify-content: center; gap: 8px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.hero-stats b { color: var(--dim); }

/* `min-width: 0` on `.teaser` above is load-bearing: it is a flex item of `.landing`, and a flex
   item's default `min-width: auto` refuses to shrink below its content's min-content width — so
   on a phone the whole signed-out landing page (the first thing every visitor sees) laid out at
   457px inside a 390px viewport and scrolled sideways, clipping titles and comment counts. */
.teaser-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px;
  max-width: 980px; margin: 0 auto; padding: 0 20px; }
/* `1fr` is shorthand for `minmax(auto, 1fr)`, and that `auto` minimum is exactly the same trap:
   the single mobile column could not shrink below the longest teaser row. The desktop rule above
   already spells out `minmax(0, 1fr)` for its first column; this one has to as well. */
@media (max-width: 900px) { .teaser-cols { grid-template-columns: minmax(0, 1fr); } }
.teaser-rows { padding: 0; overflow: hidden; }
.teaser-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--wash); padding: 11px 14px;
  cursor: pointer; font: inherit; color: inherit; }
.teaser-row:last-child { border-bottom: none; }
.teaser-row:hover { background: var(--wash); }
.tr-rank { font-size: 11.5px; color: var(--faint); min-width: 14px; text-align: right; }
.tr-votes { font-size: 12px; font-weight: 700; color: var(--teal); min-width: 52px; }
.tr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-title { font-size: 14px; font-weight: 650; line-height: 1.35; }
.tr-meta { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-lock { font-size: 12px; opacity: .55; }
.teaser-rail { display: flex; flex-direction: column; gap: 12px; }
.rail-card { padding: 12px 14px; }
.rail-title { font-size: 12.5px; font-weight: 750; margin-bottom: 8px; }
.rail-sub { font-weight: 500; color: var(--faint); font-size: 11px; margin-left: 4px; }
.rail-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.rail-event { align-items: flex-start; }
.rail-event-main { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; }
.landing-props { text-align: center; font-size: 12px; color: var(--dim); margin: 30px auto 6px;
  max-width: 720px; padding: 0 20px; }
.landing-min .landing-foot { text-align: center; margin: 4px auto 30px; }
.landing-min .landing-signin-panel { max-width: 560px; margin: 18px auto 0; text-align: left; }

.auth-sheet-backdrop { position: fixed; inset: 0; background: rgba(29, 29, 31, .38); z-index: 88; }
.auth-sheet { position: fixed; z-index: 89; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px)); max-height: min(88vh, 720px); overflow: auto;
  background: var(--surface); border-radius: var(--radius-card); padding: 18px;
  box-shadow: 0 18px 60px rgba(29, 29, 31, .25); }
.auth-sheet-x { position: absolute; top: 10px; right: 12px; border: none; background: none;
  font-size: 22px; color: var(--faint); cursor: pointer; line-height: 1; }
.auth-sheet-x:hover { color: var(--dim); }
.auth-alt { border-top: 1px solid var(--wash); margin-top: 14px; padding-top: 12px;
  display: flex; flex-direction: column; gap: 8px; }
.auth-alt-row { display: flex; gap: 8px; }
.auth-alt-row .input { flex: 1; min-width: 0; }
.landing-min .teaser { max-width: 1000px; margin: 30px auto 0; }
.landing-min .teaser-head { flex-wrap: nowrap; white-space: nowrap; }
.landing-min .teaser-note { text-align: center; }
/* portfolio manager popup — reuses the auth-sheet chrome, a touch wider */
.pf-sheet { width: min(540px, calc(100vw - 32px)); }
.pf-sheet-title { font-size: 16px; font-weight: 750; margin: 2px 0 12px; }
.pf-sheet .section-label { margin-top: 4px; }
/* admin: add-user form, mirror status, suspend/delete */
.admin-mirror{font-size:11.5px;font-weight:650}
.admin-mirror.on{color:var(--good)}
.admin-mirror.off{color:var(--faint)}
.admin-add-user{display:grid;grid-template-columns:1fr 1.3fr auto 1fr auto;gap:8px;margin-top:10px}
.admin-add-user .input{min-width:0}
.admin-temp-cred{margin-top:12px;padding:12px;border:1px solid var(--hairline);border-radius:10px;background:var(--wash)}
.admin-temp-cred-head{font-size:12.5px;margin-bottom:8px}
.admin-temp-cred-row{display:flex;gap:8px;align-items:center}
.admin-temp-cred-value{flex:1;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.4px}
.admin-temp-cred-note{font-size:11.5px;color:var(--dim);margin-top:8px}
.admin-danger{color:var(--bad)}
.admin-danger:hover{background:var(--bad-tint);border-color:var(--bad)}
.admin-row-suspended{opacity:.72}
@media (max-width:760px){.admin-add-user{grid-template-columns:1fr 1fr}}
/* Jul-26 iteration: experts/services split, service descriptions, community-role chips,
   admin community-roles matrix, email outbox */
.hub-service-desc { font-size: 12.5px; color: var(--body); line-height: 1.55; margin-top: 4px; max-width: 62ch; }
.hub-comms { font-size: 11px; color: var(--dim); margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.hub-chip.comm { color: var(--teal-hover); background: var(--teal-tint); }
.hub-mavens-all { padding: 4px 16px; }
.hub-mavens-all .maven-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--wash); }
.hub-mavens-all .maven-row:last-child { border-bottom: none; }
.hub-mavens-all .maven-row .who { flex: 1; min-width: 0; }
.hub-mavens-all .maven-row .who .n { font-size: 13px; font-weight: 700; cursor: pointer; }
.hub-mavens-all .maven-row .who .c { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-mavens-all .maven-row-cta { font-size: 11px; font-weight: 700; color: var(--teal); cursor: pointer; white-space: nowrap; }
.hub-booking-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.hub-booking-title { font-weight: 650; }
.hub-booking-meta { font-size: 11.5px; color: var(--dim); }
.hub-note { font-size: 11.5px; color: var(--dim); margin-top: 8px; }
.mv-head-comms { font-size: 11px; color: var(--dim); margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.admin-cr-intro { font-size: 12.5px; color: var(--body); line-height: 1.55; margin-top: 8px; }
.admin-cr-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0 10px; }
.admin-cr-current { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 11.5px; }
.admin-cr-mini { font-size: 10.5px; color: var(--dim); margin-top: 4px; }

/* 23.2: no horizontal overflow in the 901-1080px band — search shrinks before pills wrap. */
@media (max-width: 1080px) {
  .topbar-inner { gap: 10px; }
  .search { max-width: 240px; min-width: 0; }
}

/* ---- Maven surface, trimmed to minimum essentials (client direction, 31 Jul 2026) ---- */
.mv-howlink { color: var(--teal); font-weight: 650; cursor: pointer; white-space: nowrap; }
.mv-rstats-slim { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.mv-rating-quiet { background: var(--wash); }
.mv-locked { border-style: dashed; }
.mv-method { border-left: 3px solid var(--teal); background: var(--wash); }
.mv-method-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mv-m-sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); margin: 18px 0 8px; padding-top: 12px; border-top: 1px solid var(--hairline); }

/* ---- Story 27.4 · ticker tags in the feed ---- */
.tkr-rail { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 12px 14px; margin-bottom: 12px; }
.tkr-rail-head { margin-bottom: 9px; }
.tkr-rail-t { display: block; font-size: 13px; font-weight: 700; }
.tkr-rail-s { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; }
.tkr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* Story 29.22: the chips are now the tail of the trending card, not their own card. A hairline and a
   little air separate the two halves so the consolidation reads as one list with a spillover rather
   than two lists that lost their heading. */
.tkr-chips-more { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--wash); }
.tkr-chip { display: inline-flex; align-items: center; gap: 6px; appearance: none; border: 1px solid var(--hairline); background: var(--surface); border-radius: 99px; padding: 5px 11px; font: inherit; font-size: 12px; font-weight: 650; color: var(--ink); cursor: pointer; }
.tkr-chip:hover { border-color: var(--teal); color: var(--teal); }
.tkr-chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.tkr-chip.quiet { color: var(--dim); }
.tkr-chip.quiet .tkr-sym { font-weight: 600; }
.tkr-sym { font-variant-numeric: tabular-nums; }
.tkr-n { font-size: 10.5px; background: var(--wash); color: var(--dim); border-radius: 99px; padding: 1px 6px; font-weight: 700; }
.tkr-chip.on .tkr-n { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---- Epic 20 · Market Pulse: trending rail (20.2), ticker hub (20.1/20.5) ----
   Every number styled here is a discussion count or a week-over-week movement in discussion
   counts. The one exception is the hub's quote line (20.5), which is exchange-published market
   data with no portfolio anchor — see the note on constraint #8. */
.tkr-trend { padding: 12px 14px; margin-bottom: 10px; }
.tkr-trend-head { margin-bottom: 9px; }
.tkr-trend-rows { display: grid; gap: 2px; }
.tkr-trend-row { display: flex; align-items: center; gap: 10px; width: 100%; appearance: none; border: 0; background: none; border-radius: var(--radius-ctl); padding: 6px 8px; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--ink); cursor: pointer; text-align: left; }
.tkr-trend-row:hover { background: var(--wash); }
.tkr-trend-row .tkr-sym { min-width: 62px; color: var(--teal); font-weight: 700; }
.tkr-trend-n { flex: 1; font-size: 11.5px; color: var(--dim); font-weight: 400; }
.tkr-spark { flex: 0 0 auto; height: 18px; }
.tkr-spark path { fill: none; stroke: var(--teal); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; opacity: 0.75; }
.tkr-delta { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tkr-delta.up { color: var(--good); }
.tkr-delta.down { color: var(--bad); }
.tkr-delta.flat { color: var(--dim); }

.tkr-hub-head { padding-bottom: 4px; }
.tkr-hub-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tkr-hub-sym { font-size: 24px; font-weight: 800; color: var(--teal); font-variant-numeric: tabular-nums; }
.tkr-hub-name { font-size: 14px; color: var(--dim); font-weight: 600; }
.tkr-hub-stats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--dim); }
.tkr-hub-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tkr-hub-quote { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px 11px; background: var(--wash); border-radius: var(--radius-ctl); }
.tkr-hub-last { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tkr-hub-qlbl { font-size: 11px; color: var(--dim); }
.tkr-moments, .tkr-related { padding: 12px 14px; margin-top: 12px; }

/* Story 20.4 · the signed-out "talked about this week" strip — counts only. */
.teaser-tickers { margin-top: 22px; }
.teaser-tickers .tkr-chips { margin-top: 10px; }
/* The public tools strip — the one teaser block that links OUT instead of gating: /tools/* is
   sessionless public surface by design (#7-A's deliberate complement), so these are real links. */
.teaser-tools { margin-top: 22px; }
.teaser-tools .tools-links { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 16px; margin-top: 10px; font-size: 13.5px; }
.teaser-tools .tools-links a { color: var(--teal); text-decoration: none; }
.teaser-tools .tools-links a:hover { text-decoration: underline; }
.teaser-tools .tools-links .tools-all { margin-left: auto; font-weight: 600; }

/* ---- Story 27.5 · most-helpful members rail (engagement, never returns — #9) ---- */
.tm-rail { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 14px 16px; margin-bottom: 12px; }
.tm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.tm-t { font-size: 14px; font-weight: 700; }
.tm-s { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.tm-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .tm-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tm-card { border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 12px 8px 10px; text-align: center; min-width: 0; }
.tm-av { margin: 0 auto 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.tm-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-handle { font-size: 11px; color: var(--dim); margin-bottom: 6px; }
.tm-spark { width: 100%; height: 34px; display: block; }
.tm-spark path { fill: none; stroke: var(--good); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tm-karma { font-size: 15px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tm-karma span { font-size: 10.5px; font-weight: 600; color: var(--dim); }
.tm-tier { font-size: 10.5px; font-weight: 700; color: var(--teal-hover); background: var(--teal-tint); border-radius: 99px; padding: 2px 9px; display: inline-block; margin-top: 5px; }
.tm-cta { margin-top: 9px; width: 100%; }

/* ---- Story 27.8 · community about panel (the sidebar once a community is chosen) ---- */
.ca { padding: 14px 16px; }
.ca + .ca { margin-top: 12px; }
.ca-title { font-size: 15px; font-weight: 700; }
.ca-desc { font-size: 12.5px; color: var(--body); line-height: 1.55; margin-top: 5px; }
.ca-meta { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--wash); }
.ca-meta-row { font-size: 11.5px; color: var(--dim); }
.ca-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ca-stat-v { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ca-stat-l { font-size: 10.5px; color: var(--dim); margin-top: 1px; }
.ca-basis { font-size: 10.5px; color: var(--faint); line-height: 1.5; margin-top: 10px; }

.ca-flair { display: flex; align-items: center; gap: 10px; }
.ca-flair-who { flex: 1; min-width: 0; }
.ca-flair-n { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-flair-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.ca-chip { font-size: 10px; font-weight: 700; color: var(--dim); background: var(--wash); border-radius: 99px; padding: 2px 8px; }
.ca-chip.role { background: var(--maven-bg); color: var(--maven-fg); text-transform: capitalize; }
.ca-flair-k { text-align: right; flex: none; }
.ca-flair-k b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.ca-flair-k span { font-size: 10px; color: var(--dim); }

.ca-badges { display: flex; flex-direction: column; gap: 4px; }
.ca-badge { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--radius-ctl); background: var(--wash); opacity: 0.65; }
.ca-badge.on { background: var(--good-tint); opacity: 1; }
.ca-badge-i { font-size: 16px; line-height: 1; flex: none; filter: grayscale(1); }
.ca-badge.on .ca-badge-i { filter: none; }
.ca-badge-t { flex: 1; min-width: 0; }
.ca-badge-n { display: block; font-size: 12px; font-weight: 700; }
.ca-badge-c { display: block; font-size: 10.5px; color: var(--dim); }
.ca-badge.on .ca-badge-c { color: var(--good); font-weight: 650; }
.ca-badge-tick { color: var(--good); font-weight: 800; flex: none; }
.ca-badge-foot { font-size: 11.5px; color: var(--dim); margin-top: 9px; }

.ca-rules { display: flex; flex-direction: column; }
.ca-rule { border-bottom: 1px solid var(--wash); }
.ca-rule:last-child { border-bottom: none; }
.ca-rule-head { display: flex; align-items: center; gap: 9px; width: 100%; appearance: none; border: none; background: none; font: inherit; text-align: left; padding: 9px 0; cursor: pointer; color: var(--ink); }
.ca-rule-head:hover .ca-rule-t { color: var(--teal); }
.ca-rule-n { font-size: 11.5px; color: var(--dim); width: 12px; flex: none; font-variant-numeric: tabular-nums; }
.ca-rule-t { flex: 1; font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.ca-rule-caret { color: var(--faint); font-size: 11px; flex: none; }
.ca-rule-d { font-size: 11.5px; color: var(--body); line-height: 1.6; padding: 0 0 10px 21px; }

/* ---------- mobile: put the content first (DS-243) ----------------------------------------
   Measured on the live build at 390px: the first post card started at y=1343 — a member
   scrolled more than 1.5 screens before seeing a single discussion. The desktop layout stacks
   the right-rail components into the main column on a phone, and two of them are mine from
   Epic 27:

       topbar + scope strip   121px
       sidebar nav            206px   (five links, one per row)
       educational banner      54px
       ticker rail            236px   (27.4 — chips wrapped over four rows)
       "Most helpful members" 612px   (27.5)
       ------------------------------------
       composer at            1343px

   848px of that is the two rails. The client's own words about the members rail were "not must
   have or needed on day one" — it has no business being the tallest thing above the feed on the
   device most members read on. Nothing is removed: the rail moves below the feed, the ticker
   chips become one swipeable row, and the nav becomes a scrollable chip strip. Desktop is
   untouched — all of this is inside the phone breakpoint. */
@media (max-width: 720px) {
  /* `.feed-col` is a flex column, so this is pure ordering — no markup moves. Everything else
     keeps the default order 0; the members rail sorts after the posts. */
  .tm-rail { order: 1; margin-top: 4px; }

  /* One swipeable row instead of four wrapped ones: ~236px -> ~90px. */
  .tkr-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .tkr-chips::-webkit-scrollbar { display: none; }
  .tkr-chip { flex: 0 0 auto; }

  /* Five stacked links -> one scrollable rail: ~206px -> ~44px. `position: sticky` with a 100px
     offset is a desktop affordance; on a phone it would pin a horizontal strip over the feed. */
  .sidebar { position: static; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .sidebar::-webkit-scrollbar { display: none; }
  .side-nav { flex-direction: row; gap: 6px; }
  .nav-item { flex: 0 0 auto; white-space: nowrap; }
  /* The sidebar's secondary blocks (spaces list) would make that rail unreadable sideways; the
     same destinations are reachable from the feed and the communities page. */
  .sidebar .space-item, .sidebar .section-label { display: none; }
}

/* Compact "open this post" rows — the communities page's popular list and the composer's
   "already asked?" suggestions. Both shipped as inline-styled divs, which is how they escaped
   the touch-target pass: an inline style outranks the stylesheet, exactly like the nav did. */
/* `display` on an interactive element belongs in CSS, never inline — an inline style beats
   every media query, which is how the nav stayed stacked on phones for as long as it did. */
.hub-link.block { display: block; margin-top: 8px; }
.post-link-row { display: flex; gap: 8px; align-items: baseline; font-size: 12px; cursor: pointer; padding: 2px 0; }
.post-link-row.similar { font-size: 12.5px; padding: 3px 0; }

/* ---------- Epic 28 — the community editor (admins and moderators) -------------------------
   The moderator half of the console. Rules had no editor before this: they were seeded, so
   amending one meant a redeploy — on the panel that tells members what this place enforces. */
.admin-block-note { font-size: 12px; color: var(--dim); line-height: 1.5; margin-bottom: 10px; }
.admin-comm-list { display: flex; flex-direction: column; }
.admin-comm-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px solid var(--wash); min-height: 24px;
}
.admin-comm-row.on { border-bottom-color: transparent; }
.admin-comm-name { font-size: 13.5px; font-weight: 650; color: var(--ink); }
.admin-comm-meta { flex: 1; font-size: 11.5px; color: var(--faint); }
.admin-comm-editor {
  background: var(--wash); border: 1px solid var(--hairline); border-radius: var(--radius-ctl);
  padding: 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px;
}
.admin-comm-label { font-size: 11px; font-weight: 700; color: var(--dim); margin-top: 6px; }
.admin-comm-hint { font-weight: 400; color: var(--faint); }
.admin-comm-rules { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.admin-comm-rule { display: flex; align-items: center; gap: 8px; }
.admin-comm-rule-n {
  flex: none; width: 20px; text-align: right; font-size: 11.5px; color: var(--faint); font-weight: 700;
}
.admin-comm-rule .ce-rule-title { flex: 0 0 32%; min-width: 0; }
.admin-comm-rule .ce-rule-detail { flex: 1; min-width: 0; }
.admin-comm-actions { display: flex; gap: 8px; margin-top: 12px; }
/* Story 30.3 — a maven's own record editor, in Settings. Two columns on a wide screen because
   most of these are short answers and a single column of eleven inputs reads as a form to escape
   rather than fill in; the long-form answers span both. */
.mv-self-form {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 18px; margin-top: 10px; align-items: start;
}
.mv-self-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mv-self-field > .admin-comm-label { margin-top: 0; }
.mv-self-field.wide { grid-column: 1 / -1; }
.mv-self-area { resize: vertical; min-height: 62px; font: inherit; line-height: 1.5; }
.mv-self-staff {
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--hairline);
  font-size: 12px; color: var(--dim); line-height: 1.55;
}
@media (max-width: 720px) {
  .mv-self-form { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Story 30.3 — the maven record editor -------------------------------------------
   Two columns because the record has two authors, and a form that mixed them would invite an
   admin to type into a field the server refuses. Left is staff attestation and editable; right is
   the maven's own words, rendered read-only with a note saying whose they are. */
.admin-mv-editor-row > td { padding: 0 !important; background: none !important; }
.admin-mv-editor {
  background: var(--wash); border: 1px solid var(--hairline); border-radius: var(--radius-ctl);
  padding: 14px; margin: 4px 0 10px; display: flex; flex-direction: column; gap: 6px;
}
.admin-mv-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.admin-mv-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-mv-legend {
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); padding-bottom: 6px; border-bottom: 1px solid var(--hairline); margin-bottom: 4px;
}
.admin-mv-legend .admin-comm-hint { text-transform: none; letter-spacing: 0; margin-left: 6px; }
.admin-mv-creds { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.admin-mv-readonly { display: flex; flex-direction: column; gap: 7px; }
.admin-mv-ro { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; line-height: 1.5; }
.admin-mv-ro-k {
  flex: 0 0 108px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--faint); text-align: right;
}
.admin-mv-ro-v { flex: 1; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
/* The save result sits beside the buttons rather than in a toast, so a refusal keeps the typed
   values on screen instead of reloading them away. */
.admin-mv-status { align-self: center; font-size: 12px; color: var(--dim); }
.admin-mv-status.bad { color: var(--bad); font-weight: 600; }
@media (max-width: 860px) {
  .admin-mv-cols { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .admin-mv-ro { flex-direction: column; gap: 1px; }
  .admin-mv-ro-k { text-align: left; flex-basis: auto; }
}

/* An admin sees WHO holds the top roles without being offered a button the server would refuse. */
.admin-role-static {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--teal-tint); color: var(--teal-hover); border-radius: 999px; padding: 2px 8px;
  align-self: center; white-space: nowrap;
}
@media (max-width: 720px) {
  .admin-comm-rule { flex-wrap: wrap; }
  .admin-comm-rule .ce-rule-title { flex: 1 1 100%; }
}

/* ---------- Epic 28 — the Moderators panel + modmail ---------------------------------------
   The rail card that answers "who runs this place". Rows are identity and role only: there is no
   karma column and no return, because #9 forbids a recognition surface built on money and because
   a moderator's standing is not why you report something to them. Reaching them goes through the
   Message-mods sheet, so there is no contact detail on the card to leak (#5). */
.mods-card .section-label { margin-bottom: 8px; }
.mods-msg { width: 100%; justify-content: center; margin-bottom: 10px; }
.mods-list { display: flex; flex-direction: column; }
.mods-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; min-height: 24px; }
.mods-name { font-size: 12.5px; font-weight: 650; cursor: pointer; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.mods-name:hover { color: var(--teal); }
.mods-flair { font-size: 10px; font-weight: 700; letter-spacing: .02em; border-radius: 999px;
  padding: 1px 7px; background: var(--teal-tint); color: var(--teal-hover); white-space: nowrap; }

.modmail-sheet { width: min(480px, calc(100vw - 32px)); }
.modmail-head { font-size: 15.5px; font-weight: 750; padding-right: 24px; }
.modmail-sub { font-size: 12px; color: var(--dim); line-height: 1.5; margin: 6px 0 12px; }
.modmail-box { width: 100%; resize: vertical; margin-bottom: 12px; font: inherit; font-size: 13px; }

/* ---------- touch targets (DS-244) --------------------------------------------------------
   WCAG 2.2 AA (2.5.8 Target Size, Minimum) sets a 24x24 CSS-pixel floor for pointer targets.
   Measured on the live build at 390px, the feed had 231 interactive elements under it:

       120 x .rx-pill        76x23   the four reaction pills — the product's primary interaction
        30 x .who .name      68x21   post author
        30 x .flag-btn       28x20   the "…" menu — the entry point for flagging (#3)
        30 x .comments-link  67x18   "40 comments"
        21 x .chip           43x18   label chips (#Roth)
         1 x .mv-howlink    147x12   "How these numbers work" on the maven page

   Most miss by 1–6px, so this raises the HIT AREA and leaves the visual weight alone: no font
   sizes change, and where padding grows it is balanced by a negative margin so the surrounding
   layout does not shift. The reaction pills needed exactly one pixel.

   Guarded on `pointer: coarse` rather than a width breakpoint, because this is about input
   modality, not screen size — a touch laptop or tablet needs it as much as a phone, and a
   desktop mouse does not. */
@media (pointer: coarse) {
  .rx-pill { min-height: 24px; }
  .chip { min-height: 24px; display: inline-flex; align-items: center; }

  /* Inline text controls: grow the box, pull the extra back out of the flow. */
  .post-head .who .name { display: inline-flex; align-items: center; min-height: 24px; }
  .post-foot .comments-link { min-height: 24px; padding: 2px 6px; margin-block: -2px; }
  .flag-btn { min-width: 24px; min-height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 2px; margin: -2px; }
  .mv-howlink { display: inline-flex; align-items: center; min-height: 24px; }
  .post-link-row { min-height: 24px; align-items: center; }
}

/* Focus visibility (WCAG 2.4.7) for the controls made focusable in app.js. `:focus-visible`
   rather than `:focus` so a mouse click does not leave a ring behind, which is the reason
   focus outlines get removed from products in the first place. */
[data-action]:focus-visible,
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Story 29.12 · Discover — people-first, card grid ----
   Cards rather than rows because the unit here is a PERSON you are deciding whether to read, and a
   row optimises for scanning a list you have already decided about. No figure column: nothing on
   this page ranks by money (#9), so there is nothing numeric to line up. */
.disc { max-width: 1000px; }
.disc-rail { margin-top: 26px; }
.disc-rail-head { margin-bottom: 12px; }
.disc-rail-t { display: block; font-size: 15.5px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.disc-rail-s { display: block; font-size: 12.5px; color: var(--dim); margin-top: 2px; line-height: 1.5; }
.disc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
/* 30.1 — the absorbed browse hub. A rule above it, because the people rails and the topic grid
   answer different questions and running them together reads as one very long list. The cards
   inside are `.label-card`, unchanged, so the two entry points cannot drift apart visually. */
.disc-topics { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--hairline); }
.disc-topics .label-card:last-of-type { margin-bottom: 0; }
.disc-card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card);
  padding: 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
}
.disc-card .disc-av { margin-bottom: 2px; }
.disc-n { font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; overflow-wrap: anywhere; }
.disc-n:hover { color: var(--teal-hover); }
.disc-meta { display: flex; gap: 5px; align-items: center; min-height: 15px; }
.disc-tier { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.disc-stats { display: flex; flex-direction: column; gap: 1px; font-size: 11.5px; color: var(--dim); }
.disc-stats b { color: var(--ink); font-weight: 700; }
.disc-card .follow-btn { width: 100%; margin-top: 4px; }

/* ---- Story 29.19 · threaded replies ----
   Indentation is driven by one custom property so the depth cap lives in JS (MAX_VISIBLE_DEPTH) and
   the CSS never has to be edited to change it. A rule down the left of each indent gives the eye the
   thread to follow — without it, three levels of margin read as three unrelated cards. */
.comment-thread { display: flex; flex-direction: column; gap: 10px; }
.comment-row { --d: 0; padding-left: calc(var(--d) * 26px); position: relative; }
.comment-row[data-depth="1"]::before,
.comment-row[data-depth="2"]::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 2px; border-radius: 1px;
  background: var(--wash); left: calc((var(--d) - 1) * 26px + 11px);
}
.comment-acts { margin-top: 8px; display: flex; gap: 10px; }
.comment-reply-btn {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font: 700 11.5px/1 inherit; color: var(--teal); letter-spacing: 0.01em;
}
.comment-reply-btn:hover { color: var(--teal-hover); text-decoration: underline; }
.reply-bar-inline { margin-top: 8px; padding: 10px 12px; }
/* The way into a branch that stopped indenting. Deliberately a link rather than a card: it is a
   continuation of the conversation above it, not a new object in the list. */
.thread-more {
  appearance: none; background: none; border: 0; cursor: pointer; text-align: left;
  padding: 6px 2px; font: 700 12px/1.4 inherit; color: var(--teal);
}
.thread-more:hover { color: var(--teal-hover); }
.thread-more-n { font-weight: 400; color: var(--dim); }

/* A phone is the device most of this audience reads on, and 26px per level eats the column at
   360px. Halve the indent there — the rule still carries the thread, and the text keeps its room. */
@media (max-width: 560px) {
  .comment-row { padding-left: calc(var(--d) * 13px); }
  .comment-row[data-depth="1"]::before,
  .comment-row[data-depth="2"]::before { left: calc((var(--d) - 1) * 13px + 5px); }
}

/* ---- Story 29.13 · the track-record rail's percent (D1, the one #9 carve-out) ----
   Deliberately the only place on Discover where a return renders. Percent only; there is no
   currency-typed field in the payload behind it and there never may be (#8). */
.disc-perf { display: flex; flex-direction: column; align-items: center; gap: 1px; margin: 6px 0 2px; }
.disc-perf-v { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.disc-perf.up .disc-perf-v { color: var(--good); }
.disc-perf.down .disc-perf-v { color: var(--bad); }
.disc-perf-l { font-size: 10.5px; color: var(--faint); }

/* ---- Story 29.27 · declared buy/sell notices in the bell ----
   The side is the whole point of the row, so it gets the colour. Percent only — allocation is
   permitted on a public surface (#4); a share count or a total never is (#8). */
.trade-side { font-weight: 800; font-size: 11.5px; letter-spacing: .02em; border-radius: 5px; padding: 1px 5px; }
.trade-buy { color: var(--good); background: var(--good-tint); }
.trade-sell { color: var(--bad); background: var(--bad-tint); }

/* ---- Story 29.26 · the Following scope ----
   A second, quieter strip under the sort tabs. Quieter on purpose: scope and sort are different
   questions ("whose posts" vs "in what order"), and giving them equal weight in one row made the
   feed head read as six competing tabs. */
.feed-scope { display: flex; gap: 6px; align-items: center; margin: -4px 0 12px; padding: 0 2px; }
.feed-scope-tab { border: 1px solid var(--hairline); background: var(--surface); color: var(--dim);
  border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.feed-scope-tab:hover { border-color: var(--teal); color: var(--teal-hover); }
.feed-scope-tab.on { background: var(--teal-tint); border-color: var(--teal); color: var(--teal-hover); }

/* ---- Stories 29.17 / 29.18 · reactions and flags on comments ----
   The pills are the post's, at comment scale: compact (emoji + count, no label) because four labelled
   pills under every reply at three indent levels is more chrome than conversation. */
.comment-acts { align-items: center; }
.comment-rx { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }
.comment-rx .rx-pill { font-size: 11.5px; padding: 2px 7px; }
.comment-flag-wrap { position: relative; flex: 0 0 auto; }
.comment-flag-wrap .flag-btn { font-size: 13px; line-height: 1; }
/* #3: this is the member's OWN choice reflected back. There is no count here and never will be —
   a public negative number on a comment is precisely the flag indicator the constraint forbids. */
.comment-flagged { margin-top: 8px; font-size: 11.5px; }
/* A moderated-out reply: a quiet placeholder, not a scarlet letter. It holds the slot so the replies
   below it keep their place in the conversation. */
.comment-removed { background: var(--wash); border-style: dashed; }
.comment-removed-text { color: var(--faint); font-style: italic; }
/* The picker gained an emoji column when the vocabulary did (29.18). */
.flag-option { display: flex; align-items: center; gap: 8px; }
.flag-emoji { font-size: 13px; width: 16px; text-align: center; flex: 0 0 auto; }
.flag-label { flex: 1; }

/* Build watermark — deliberately quiet: it identifies the build for support and QA without
   competing with content. Fixed to the corner, never intercepts a click. */
.version-mark { position: fixed; right: 10px; bottom: 8px; font-size: 10.5px; color: var(--faint); opacity: .65; z-index: 40; pointer-events: none; user-select: none; font-variant-numeric: tabular-nums; }


/* 31.6 — the office-hours question queue. Collapsed by default: a calendar is a list of dates
   first, and a queue that is always open pushes the next event off the panel. */
.cal-q { padding: 0 0 8px 0; border-bottom: 1px solid var(--wash); }
.cal-q:last-child { border-bottom: none; }
.cal-q-toggle { background: none; border: none; padding: 2px 0 4px; font: inherit; font-size: 11.5px;
  color: var(--dim); cursor: pointer; }
.cal-q-toggle:hover { color: var(--ink); }
.cal-q-body { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 2px; }
.cal-q-row { display: flex; align-items: flex-start; gap: 8px; }
.cal-q-main { flex: 1; min-width: 0; }
.cal-q-text { font-size: 12.5px; line-height: 1.45; }
.cal-q-by { font-size: 10.5px; color: var(--faint); margin-top: 1px; }
.cal-q-vote, .cal-q-votes { flex-shrink: 0; font-size: 11px; font-weight: 650; border-radius: 5px;
  padding: 2px 7px; border: 1px solid var(--hairline); background: var(--surface); color: var(--dim); }
.cal-q-vote { cursor: pointer; }
.cal-q-vote:hover { border-color: var(--ink); color: var(--ink); }
.cal-q-vote.on { background: var(--wash); color: var(--ink); border-color: var(--ink); }
.cal-q-votes { cursor: default; opacity: .7; }
.cal-q-empty { font-size: 11.5px; color: var(--faint); }
.cal-q-ask { display: flex; gap: 6px; margin-top: 2px; }
.cal-q-ask .input { flex: 1; font-size: 12px; }


/* Signed-in devices (Settings). A security surface, so it reads as a list of facts rather than a
   styled card: label, when it started, when it was last used, and one way out. */
.sess-list { display: flex; flex-direction: column; margin-top: 10px; }
.sess-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--wash); }
.sess-row:last-child { border-bottom: none; }
.sess-main { flex: 1; min-width: 0; }
.sess-label { font-size: 13px; font-weight: 650; }
.sess-now { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--teal); background: var(--wash); border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
.sess-meta { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.sess-empty { font-size: 12.5px; color: var(--faint); padding: 8px 0; }

/* B8 — the paper-track card on a maven's Stats tab. Two figures side by side and deliberately
   no third: see mvPaperTrackCard in app.js for why no difference is computed. */
.mv-paper-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mv-paper-col { border: 1px solid var(--hairline); border-radius: var(--radius-card); padding: 10px 12px; background: var(--surface); }
.mv-paper-v { font-size: 20px; font-weight: 800; line-height: 1.2; }
.mv-paper-l { font-size: 12px; font-weight: 700; margin-top: 2px; }
.mv-paper-d { font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.mv-paper-w { margin-top: 9px; font-size: 11.5px; }
.mv-paper-w summary { cursor: pointer; color: var(--dim); }
.mv-paper-wl { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px; }
.mv-paper-wl span { font-size: 11.5px; color: var(--body); }
@media (max-width: 560px) { .mv-paper-grid { grid-template-columns: 1fr; } }
/* The maven half before publication catches up — a "not yet", not a fault, and styled as one. */
.mv-paper-pending { background: var(--wash); border-style: dashed; }

/* B9 — the private "not helpful" mark. Quiet by design: it is a personal preference, not a verdict,
   and nothing about it is visible to anybody but the member who set it. */
.flag-sep { height: 1px; background: var(--hairline); margin: 5px 0; }
.nh-option.on { background: var(--wash); }
.comment-nh { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--wash);
  border: 1px dashed var(--hairline); }   /* the full shorthand: .card sets `border`, so border-style alone loses */
.comment-nh-text { font-size: 12px; color: var(--dim); flex: 1; }
.comment-nh-show { background: none; border: 0; padding: 0; font: inherit; font-size: 11.5px; font-weight: 700;
  color: var(--teal); cursor: pointer; }
.comment-nh-show:hover { text-decoration: underline; }

/* ---- Epic 33: the household plan (#/plan). Porcelain Slate, same tokens as every other card.
   Amounts render as bare numerals via planNum() — there is no currency styling here because there
   is no currency symbol to style. */
.plan-page { max-width: 760px; margin: 0 auto; }
.plan-card { margin-bottom: 14px; }
.plan-group { margin: 0 0 14px; }
.plan-group:last-of-type { margin-bottom: 6px; }
.plan-group-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin: 0 0 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 14px; }
.plan-grid > * { min-width: 0; }
.plan-field { display: flex; flex-direction: column; gap: 3px; }
.plan-label { font-size: 12.5px; line-height: 1.35; }
.plan-field input { font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%; }
.plan-field input:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.plan-hint { font-size: 11px; color: var(--dim); }
.plan-opt .plan-label { display: flex; align-items: baseline; gap: 7px; font-weight: 600; cursor: pointer; }
.plan-opt input[type="checkbox"] { width: auto; accent-color: var(--teal); cursor: pointer; }
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; border-top: 1px solid var(--hairline); padding-top: 10px; margin-top: 4px; }
.plan-stat { margin: 0 0 16px; }
.plan-stat:last-child { margin-bottom: 0; }
.plan-stat-head { font-size: 13px; font-weight: 700; margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.plan-band { font-size: 11px; font-weight: 600; border: 1px solid var(--hairline); border-radius: 999px; padding: 1px 8px; color: var(--dim); }
.plan-band-ok { color: var(--good); border-color: currentColor; }
.plan-band-warn { color: var(--amber); border-color: currentColor; }
.plan-band-bad { color: var(--bad); border-color: currentColor; }
.plan-note, .plan-empty, .plan-foot { font-size: 12px; color: var(--dim); line-height: 1.55; }
.plan-note { margin: 6px 0 0; }
.plan-foot { margin: 14px 0 0; }
.plan-findings { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; }
.plan-findings li { margin: 6px 0; }
.plan-refs { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; }
.plan-refs li { margin: 4px 0; }
.plan-links a { font-size: 12px; }
@media (max-width: 520px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-sub { padding-left: 14px; color: var(--dim); }
.plan-key { font-size: 11px; color: var(--dim); font-weight: 400; white-space: nowrap; }
.plan-miles { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 8px 0 0; font-size: 12px; color: var(--dim); }
.plan-mile b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Increment 8: "Print / save as PDF" is the browser's own print engine — no PDF library, no upload.
   Everything that is chrome rather than the plan disappears; the two plan cards print clean. */
@media print {
  .topbar, .sidebar, .rail, .back-link, .plan-actions, .plan-import-label,
  .plan-page button, .demo-drawer, .toast { display: none !important; }
  body { background: #fff; }
  .plan-page { max-width: none; }
  .plan-card, .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}

/* Omkara-6 FR-01/02/07 — the whole card is the target. Pointer and a hairline lift say so; the
   focus ring is the keyboard half (makeInteractiveAccessible() gives the card tabindex + role). */
.card-hit { cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
.card-hit:hover { border-color: var(--teal); box-shadow: 0 1px 4px rgba(15, 118, 110, .12); }
.maven-row.card-hit:hover, .si-row.card-hit:hover { box-shadow: none; background: var(--wash); }
.card-hit:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.card-hit input, .card-hit select, .card-hit textarea { cursor: auto; }

/* Omkara-6 FR-06/10 — Similar investors: the row is the target and "More →" says so. */
.si-row.card-hit { padding: 4px 6px; margin: 0 -6px; border-radius: 6px; }
.si-more { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--teal); white-space: nowrap; }
.si-row .hub-track-v { font-size: 15px; }

/* Omkara-6 FR-13 — Home: the page title and the editorial Community Picks strip. */
.home-title { margin-bottom: 8px; }
.home-picks { padding: 12px 14px; margin-bottom: 12px; }
.home-picks-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.home-picks-t { font-weight: 700; font-size: 14px; }
.home-picks-s { font-size: 12px; color: var(--dim); }
.home-pick { padding: 8px 8px; margin: 0 -8px; border-radius: 6px; border: 1px solid transparent; }
.home-pick + .home-pick { border-top-color: var(--wash); }
.home-pick-title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.home-pick-meta { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* Omkara-6 G10 — the owner's own portfolio-sharing state, on their own profile only. */
.pf-share-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-top: 8px; font-size: 12px; color: var(--dim); }
.pf-share-note.on { color: var(--good); }

/* Omkara-6 FR-05 — earned badges: icons beside a name, named chips on the profile. */
.earned-icons { display: inline-flex; gap: 1px; font-size: 12px; line-height: 1; margin-left: 2px; cursor: default; }
.earned-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.earned-chip { font-size: 11.5px; font-weight: 600; color: var(--ink); background: var(--wash); border: 1px solid var(--hairline); border-radius: 999px; padding: 2px 9px; }
/* Omkara-6 FR-07 — Discover cards end in More →, the same affordance as the RHS rail. */
.disc-more { margin-top: auto; align-self: center; font-size: 12.5px; font-weight: 600; color: var(--teal); padding-top: 6px; }

/* Omkara-6 FR-08 — the optional flag note: an input in the picker, a quoted list in the queue. */
.flag-menu .flag-note { width: 100%; font-size: 12px; padding: 6px 8px; margin: 2px 0 6px; }
.flag-notes { margin-top: 8px; padding: 8px 10px; background: var(--wash); border-radius: 6px; font-size: 12.5px; color: var(--body); }
.flag-notes-h { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.flag-note-line + .flag-note-line { margin-top: 3px; }
