/* Junabase studio site — single stylesheet.
 * Imported as /assets/styles/site.css (dev) or via the Vite manifest (prod).
 * Aesthetic: Swiss · Mono Grid. Monochrome, hairline rules, no radii, no shadows.
 */

:root {
  --bg:          #fafaf7;
  --bg-elev:     #ffffff;
  --bg-ink:      #0a0a0a;
  --bg-muted:    #efece5;
  --bg-subtle:   #f3f1ea;

  --fg:          #0a0a0a;
  --fg-muted:    #6f6f6a;
  --fg-faint:    #a8a8a2;
  --fg-inverse:  #fafaf7;

  --line:        #0a0a0a;
  --line-faint:  #d6d4cd;

  --live-accent: #c4322a;

  --font-sans:   "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:   "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0;
  box-shadow: none;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }

button { font-family: inherit; }
button:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }

input, textarea, select {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  width: 100%;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 2px;
}
input[readonly] { background: var(--bg-muted); }

textarea { line-height: 1.5; resize: vertical; min-height: 88px; }

hr.rule, hr { border: none; border-top: 1px solid var(--line); margin: 0; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Type ────────────────────────────────────────────────────────── */

h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 36px; line-height: 1.05; }
h2 { font-size: 22px; line-height: 1.1; }
h3 { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; }
p { margin: 0; }
small { font-size: 12px; }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--bg-subtle); padding: 0 4px; }
pre { font-family: var(--font-mono); font-size: 13px; background: var(--bg-subtle); padding: 12px; overflow-x: auto; }
blockquote { border-left: 1px solid var(--line); padding-left: 12px; margin: 8px 0; color: var(--fg-muted); }

.display {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  text-wrap: balance;
}
/* Design has 28px between display H1 and lede paragraph. */
.display + .lede,
.display + .muted { margin-top: 28px; }
.lede { font-size: 17px; line-height: 1.55; max-width: 560px; }

.mono { font-family: var(--font-mono); white-space: nowrap; }
.mono.small { font-size: 12px; }
/* For paragraph-style mono callouts (notes, hints, constraint text). */
.mono--wrap, .mono.mono--wrap { white-space: normal; }
.small { font-size: 12px; }
.muted { color: var(--fg-muted); }
.right { text-align: right; }
.block { display: block; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--fg);
}
.mono-label--dim   { color: var(--fg-muted); }
.mono-label--faint { color: var(--fg-faint); }

/* ── Site chrome ──────────────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative; /* drawer absolute-positions inside */
}
.site-header__brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; }
.site-header__brand:hover { text-decoration: none; }
.site-header__wordmark {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--fg);
}
.jb-asterisk { display: block; flex-shrink: 0; }

/* Desktop nav (visible ≥ 600px). */
.site-header__nav--desktop { display: flex; gap: 20px; align-items: center; }

/* Thin vertical separator between primary nav links and the signed-in
   chip / Log in pill. Hidden on mobile. */
.site-header__sep {
  width: 1px;
  height: 16px;
  background: var(--line-faint);
  display: inline-block;
}

/* Log in pill (public viewers) — hairline-bordered, mono, uppercase. */
.site-header__login {
  color: var(--fg);
  padding: 4px 10px;
  border: 1px solid var(--line);
}

/* Signed-in chip: tier pill (link) · handle · thin divider · LOG OUT */
.site-header__viewer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-header__tier-link {
  display: inline-flex;
  text-decoration: none;
  color: inherit;
}
.site-header__tier-link:hover { text-decoration: none; }
.site-header__tier-link:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }
.site-header__divider {
  width: 1px;
  height: 14px;
  background: var(--line-faint);
  display: inline-block;
}
.site-header__logout-form { display: inline-flex; margin: 0; }
.site-header__logout {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-header__logout:hover { color: var(--fg); text-decoration: underline; }

/* Mobile nav container — hidden on desktop, shown on mobile. */
.site-header__mobile { display: none; }

/* Hamburger button — matches mobile.jsx MobileNav design. */
.site-header__hamburger {
  cursor: pointer;
  width: 28px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  align-items: center;
  font: inherit;
}
.site-header__hamburger-bar {
  width: 12px;
  height: 1px;
  background: var(--fg);
  display: block;
  transition: transform 120ms ease-out, opacity 120ms ease-out;
}
/* When open: rotate top + bottom bars into an X, fade the middle. */
.site-header__mobile.is-open .site-header__hamburger-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.site-header__mobile.is-open .site-header__hamburger-bar:nth-child(2) { opacity: 0; }
.site-header__mobile.is-open .site-header__hamburger-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Drawer hidden by default, shown when container has .is-open. */
.site-header__drawer { display: none; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 64px;
  border-top: 1px solid var(--line);
  margin-top: 64px;
}
.site-footer__links { display: flex; gap: 16px; }

main { display: block; }

/* ── Sections (homepage) ──────────────────────────────────────────── */

/* Default: 2-col (label · main). Used by § 03 Latest updates. Other
   sections override grid + padding below. */
.section {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  padding: 48px 64px;
  border-bottom: 1px solid var(--line);
}
.section__label { padding-top: 6px; }
.section__body { min-width: 0; }

/* § 01 Thesis — 3-col grid leaves room for an optional right stat
   rail. Body column stays readable via max-width. */
.section--thesis {
  grid-template-columns: 180px 1fr 280px;
  padding: 80px 64px 56px;
  scroll-margin-top: 12px;
}
/* Anchored sections (#thesis, #access) need a little breathing room
   so they don't land flush with the header on jump. */
.section[id] { scroll-margin-top: 12px; }
.section--thesis .section__body { max-width: 760px; }

/* § 02 Project ledger — single column. Label + right-aligned counter
   in a header row, table fills full width below. */
.section--ledger { display: block; }
.section--ledger__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 24px;
}

/* § 04 Access — 4-col grid (label + 3 cards inline). */
.section--access {
  grid-template-columns: 180px 1fr 1fr 1fr;
  gap: 32px;
}

.all-link { margin-top: 16px; }

/* ── Thesis stat rail (right column of § 01) ──────────────────────── */
.stat-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.stat-line__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-line__value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg);
}
.stat-line__value.muted { color: var(--fg-muted); }
.stat-rail__est {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-faint);
}

/* ── Project ledger ──────────────────────────────────────────────── */

/* CSS-grid rows matching design (homepage.jsx:122-181).
   5-col for public/friends, 6-col with MRR for investors+. */
.ledger { display: block; }
.ledger__row {
  display: grid;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-faint);
  align-items: center;
  text-decoration: none;
  color: var(--fg);
}
.ledger--standard .ledger__row { grid-template-columns: 1.6fr 1.8fr 110px 110px 130px; }
.ledger--investor .ledger__row { grid-template-columns: 1.6fr 1.8fr 110px 110px 90px 130px; }
.ledger__head {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  align-items: end;
}
.ledger__row--data:hover { background: var(--bg-subtle); }
.ledger__row--data .ledger__name-text {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.ledger__pitch {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
}
.ledger__row .right { text-align: right; }
.ledger__entries { font-family: var(--font-mono); font-size: 11px; }
.ledger__entries-link {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
}
.ledger__entries-empty { color: var(--fg-faint); }

/* ── Updates list ────────────────────────────────────────────────── */

.updates-list { list-style: none; padding: 0; margin: 0; }
.update-row {
  display: grid;
  grid-template-columns: 120px 1fr 110px;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line-faint);
  align-items: baseline;
}
.update-row:first-child { border-top: none; }

/* ── Contact cards (§ 04 Access) ─────────────────────────────────── */
/* Three stacked elements per the design's ContactCard: title (18px sans
   500), body (14px muted), CTA (12px mono underlined). No outer
   border — the cards sit directly in the 4-col section grid. */
.contact-card { display: block; }
.contact-card__title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
}
.contact-card__body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin: 0 0 14px;
}
.contact-card__cta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
  text-decoration: none;
  display: inline-block;
}
.contact-card__cta:hover { text-decoration: none; }

/* ── Status / visibility / tier badges ───────────────────────────── */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status--lg { padding: 4px 8px; font-size: 12px; }
.status__dot { width: 6px; height: 6px; background: var(--fg); display: inline-block; }
.status--live .status__dot { background: var(--live-accent); }
.status--paused { color: var(--fg-muted); border-color: var(--line-faint); }
.status--paused .status__dot { background: var(--fg-faint); }
.status--stopped { color: var(--fg-faint); border-color: var(--line-faint); text-decoration: line-through; }
.status--stopped .status__dot { background: var(--fg-faint); }

/* VisibilityBadge — dot + label, hairline border. */
.vis {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 6px;
  border: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}
.vis__dot {
  width: 4px;
  height: 4px;
  background: var(--fg-faint);
  display: inline-block;
}
.vis--admin       { color: var(--fg); border-color: var(--line); }
.vis--admin .vis__dot { background: var(--fg); }

/* TierPill — inverted small pill in the nav for signed-in users. */
.tier-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--fg);
  color: var(--fg-inverse);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-muted); text-decoration: none; }
.btn--primary { background: var(--bg-ink); color: var(--fg-inverse); }
.btn--primary:hover { background: #1f1f1f; }
.btn--ghost { border-color: var(--line-faint); color: var(--fg-muted); }
.btn--danger { border-color: var(--live-accent); color: var(--live-accent); }

/* Size variants — `--sm` matches `<Button size="sm">` (4px/10px, 11px font).
   Default `--md` is 7px/14px, 12px font. `--lg` is 10px/16px, 13px font. */
.btn--sm { padding: 4px 10px; font-size: 11px; }
.btn--lg { padding: 10px 16px; font-size: 13px; }

/* Row-level action chip — used in admin tables and moderation rows.
   Smaller than --sm, hairline border, no fill. Mirrors design's
   modActionStyle in dashboards.jsx:330-336. */
.btn--mod {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-faint);
  color: var(--fg-muted);
  background: transparent;
  cursor: pointer;
}
.btn--mod:hover { color: var(--fg); border-color: var(--line); background: transparent; text-decoration: none; }

/* Red dot — "new since last visit" indicator. */
.new-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--live-accent);
  vertical-align: middle;
  margin-left: 6px;
  flex-shrink: 0;
}

/* DashHeader — shared by /dashboard and (via adminShell) /admin/*. */
.dash-header {
  padding: 32px 48px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.dash-header__main { min-width: 0; }
.dash-header__title {
  margin: 4px 0 6px;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 38px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.dash-header__subtitle {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg-muted);
}
.dash-header__right { flex-shrink: 0; }

/* ── Forms ───────────────────────────────────────────────────────── */

label { display: block; margin-bottom: 14px; }
label > .mono-label { display: block; margin-bottom: 4px; }

.admin-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 14px;
}
.admin-form .form-actions { margin-top: 24px; display: flex; gap: 12px; align-items: center; }
.flash { padding: 10px 12px; border: 1px solid var(--line); background: var(--bg-subtle); margin-bottom: 16px; font-size: 14px; }

/* ── Auth pages ──────────────────────────────────────────────────── */

/* Auth pages — two widths, matching admin.jsx SignIn (420px) and
   FriendRequest (560px). Padding picks up extra top space on signin so
   the form sits visually centred without the brand header crowding it. */
.auth-page { display: flex; justify-content: center; }
.auth-page--signin { padding: 120px 32px; }
.auth-page--friend { padding: 80px 32px; }

.auth-card { width: 100%; }
.auth-card--signin { max-width: 420px; }
.auth-card--friend { max-width: 560px; }

.auth-card__eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  margin: 0;
}
.auth-card h1 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 12px 0 24px;
}
.auth-card--friend h1 {
  font-size: 40px;
  margin: 16px 0 12px;
}
.auth-card__lede {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 32px;
  max-width: 60ch;
}
.auth-card__footnote {
  margin: 16px 0 0;
  line-height: 1.6;
}
.auth-card__footnote a {
  color: var(--fg);
  text-decoration: underline;
}

/* Fields already have label { margin-bottom: 14px }; no double-stacking. */
.auth-form__submit { width: 100%; margin-top: 16px; padding: 12px 16px; font-size: 12px; }

/* Friend-request form sits in a bordered, elevated container. */
.auth-form--boxed {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 24px;
}
.auth-form__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

/* ── Admin chrome ────────────────────────────────────────────────── */

.admin-page { padding: 32px 64px 64px; }

/* DashHeader is now the shared atom (see .dash-header rules). Admin
   pages add the breadcrumb trail above the h1. */
.admin-page__header { /* layout from .dash-header; no extra rules needed */ }
.admin-crumbs { color: var(--fg-muted); margin-bottom: 6px; }
.admin-crumbs a { color: var(--fg-muted); text-decoration: none; }
.admin-crumbs a:hover { color: var(--fg); }
.admin-crumbs span { color: var(--fg); }
.admin-crumbs__sep { margin: 0 6px; color: var(--fg-muted); }
.dash-actions { display: flex; gap: 8px; }
/* AdminNav — persistent sub-header below the site header on every
   admin page. Tabbed look: muted by default, inverted-elevated when
   active. Horizontally scrollable on narrow widths. */
.admin-nav {
  display: flex;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  padding: 0 32px;
  gap: 0;
  overflow-x: auto;
}
.admin-nav__item {
  display: inline-block;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  white-space: nowrap;
  border-right: 1px solid var(--line-faint);
}
.admin-nav__item:last-child { border-right: none; }
.admin-nav__item.is-active {
  color: var(--fg);
  background: var(--bg-elev);
  box-shadow: inset 0 -2px 0 0 var(--fg);
}

/* h1 + subtitle sizing comes from the shared .dash-header rules. */
.admin-counters {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  margin: 24px 0 32px;
}
.counter { padding: 16px; border-right: 1px solid var(--line-faint); }
.counter:last-child { border-right: none; }
.counter__value { font-size: 32px; line-height: 1.05; letter-spacing: -0.02em; margin-top: 6px; }
.counter__hint { display: block; margin-top: 6px; }

/* ── Admin areas — shortcut grid on /admin overview ───────────────── */

.admin-areas {
  margin-bottom: 32px;
}
.admin-areas__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--line);
}
.admin-areas__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-top: none;
  background: var(--bg-elev);
}
.admin-area {
  display: block;
  padding: 16px 18px;
  border-right: 1px solid var(--line-faint);
  border-top: 1px solid var(--line-faint);
  text-decoration: none;
  color: var(--fg);
}
/* No top border on the first row (4 cells). */
.admin-area:nth-child(-n+4) { border-top: none; }
/* No right border on the last column (every 4th cell). */
.admin-area:nth-child(4n) { border-right: none; }
.admin-area:hover { background: var(--bg-subtle); text-decoration: none; }
.admin-area--disabled { opacity: 0.45; pointer-events: none; }
.admin-area__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.admin-area__title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.admin-area__arrow {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}
.admin-area__body {
  margin: 4px 0 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.admin-area__hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
}

/* ── Admin Dashboard bottom section ──────────────────────────────── */
/* 2-col grid below the shortcut grid. Left: project table panel.
   Right: stacked mini-panels (friend requests / invites / comments). */

.admin-bottom {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}
.admin-bottom__main { min-width: 0; }
.admin-bottom__rail { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* Panel variant — body has no inner padding (rows handle their own). */
.panel--flush > .panel__body,
.panel--flush > * { padding: 0; }
.panel--flush > .panel__header { padding: 10px 14px; }
.panel--flush > .panel__empty { padding: 16px 18px; margin: 0; }

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.panel__header-right { display: flex; gap: 12px; align-items: baseline; }

/* AdminProjectTable — 6-col grid inside a flush panel. */
/* ── Dashboard (/dashboard for friends + investors) ──────────────── */

.dashboard__body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  padding: 24px 48px 64px;
  align-items: start;
}
.dashboard__main { min-width: 0; }
.dashboard__rail { min-width: 0; }
.dashboard__section { padding: 24px 48px 0; }
.dashboard__last-seen { color: var(--fg); }

/* ProjectTable inside a flush panel — 5-col grid for friends, 6-col
   with MRR for investor. Rows are <a>, the whole row is clickable. */
.project-table { font-size: 14px; }
.project-table__row {
  display: grid;
  gap: 16px;
  padding: 14px 16px;
  align-items: center;
  text-decoration: none;
  color: var(--fg);
  border-top: 1px solid var(--line-faint);
}
.project-table__row--data:hover { background: var(--bg-subtle); }
.project-table__row--data.is-stopped { opacity: 0.55; }
.project-table > .project-table__row:first-child,
.project-table > .project-table__head { border-top: none; border-bottom: 1px solid var(--line); padding: 8px 16px; }
.project-table .project-table__row { grid-template-columns: 1.6fr 1.8fr 110px 110px 130px; }
.project-table--investor .project-table__row { grid-template-columns: 1.6fr 1.8fr 110px 110px 90px 130px; }
.project-table__name { font-family: var(--font-sans); font-size: 16px; font-weight: 500; letter-spacing: -0.005em; }
.project-table__pitch { font-family: var(--font-sans); font-size: 13px; line-height: 1.4; }
.project-table .right { text-align: right; }
.project-table__entries-link { color: var(--fg); border-bottom: 1px solid var(--fg); padding-bottom: 1px; }

/* FeedList — 3-col grid (date / title+kind+body / vis-badge). */
.feed-list { list-style: none; padding: 0; margin: 0; }
.feed-item {
  display: grid;
  grid-template-columns: 100px 1fr 110px;
  gap: 16px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-faint);
  align-items: baseline;
}
.feed-list > .feed-item:first-child { border-top: none; }
.feed-item__date { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.feed-item__main { min-width: 0; }
.feed-item__title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.feed-item__title a { color: var(--fg); text-decoration: none; }
.feed-item__title a:hover { border-bottom: 1px solid var(--fg); padding-bottom: 1px; }
.feed-item__kind {
  display: block;
  margin-top: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.feed-item__body {
  margin: 6px 0 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-muted);
}
.feed-item__vis { display: flex; justify-content: flex-end; }

/* "Since last visit" panel — list of new counts with NewDots. */
.new-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.new-list__row { display: flex; align-items: center; }

/* Investor portfolio revenue rollup — chart + stats column + per-
   project breakdown bars. */
.portfolio-rollup {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}
.portfolio-rollup__stats { display: flex; flex-direction: column; gap: 16px; }
.portfolio-rollup__chart { overflow-x: auto; }
.portfolio-rollup__breakdown {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.breakdown-list { list-style: none; padding: 0; margin: 12px 0 0; }
.breakdown-row {
  display: grid;
  grid-template-columns: 180px 1fr 120px 80px;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line-faint);
  align-items: center;
}
.breakdown-row--first { border-top: 1px solid var(--line); }
.breakdown-row__name { font-family: var(--font-sans); font-size: 14px; font-weight: 500; }
.breakdown-row__bar { height: 4px; background: var(--bg-muted); position: relative; }
.breakdown-row__fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--fg); }
.breakdown-row__money { text-align: right; }
.breakdown-row__pct { text-align: right; }

/* ── Portfolio traffic rollup ────────────────────────────────────── */
.portfolio-traffic__stats { margin-bottom: 18px; grid-template-columns: repeat(3, 1fr); }
.portfolio-traffic__table { border-top: 1px solid var(--line); }
.portfolio-traffic__head,
.portfolio-traffic__row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 100px;
  gap: 12px;
  padding: 10px 0;
  align-items: center;
}
.portfolio-traffic__head { border-bottom: 1px solid var(--line); }
.portfolio-traffic__row { border-bottom: 1px solid var(--line-faint); }
.portfolio-traffic__row:last-child { border-bottom: none; }
.portfolio-traffic__name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.portfolio-traffic__name:hover { text-decoration: none; }
.portfolio-traffic__row .right { text-align: right; }
.sparkline--empty { color: var(--fg-faint); }

.admin-project-table { font-size: 14px; }
.admin-project-table__head,
.admin-project-table__row {
  display: grid;
  grid-template-columns: 1.6fr 1.6fr 0.8fr 0.8fr 0.8fr 0.6fr;
  gap: 12px;
  padding: 12px 14px;
  align-items: center;
}
.admin-project-table__head {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.admin-project-table__row {
  border-bottom: 1px solid var(--line-faint);
}
.admin-project-table__row:last-child { border-bottom: none; }
.admin-project-table__row.is-stopped { opacity: 0.55; }
.admin-project-table__name a { color: var(--fg); }
.admin-project-table__pitch { font-size: 13px; }
.admin-project-table .right { text-align: right; }

/* Mini-row used inside friend-request / invites / comments panels. */
.mini-row {
  padding: 12px 14px;
  border-top: 1px solid var(--line-faint);
}
.panel--flush > .mini-row:first-of-type { border-top: none; }
.mini-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.mini-row__name {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
}
.mini-row__sub { display: block; margin-top: 2px; }
.mini-row__body {
  margin: 8px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.mini-row__actions { display: flex; gap: 6px; margin-top: 8px; }
.mini-row__date { margin-left: auto; }
.mini-row__status { display: block; }

.mini-row--two-col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.mini-row--two-col .right { text-align: right; }

.admin-toolbar { margin-bottom: 18px; }

/* ── Admin: New project layout ─────────────────────────────────────── */

.admin-create .breadcrumb {
  padding: 0;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}
.admin-create .breadcrumb a { color: var(--fg-muted); }
.admin-create .breadcrumb span { color: var(--fg); }

.admin-create .page-h1 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 8px 0 28px;
}

.admin-create__grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

.admin-create__form .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.admin-create__form .form-grid-2 > .field { margin-bottom: 0; }
.admin-create__pitch { margin-top: 18px; }
.admin-create__pitch .field { margin-bottom: 0; }

/* Field with optional inline hint after the mono-label. */
.field__label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.field__hint  { font-weight: 400; }

.admin-create__rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.admin-create__note {
  border: 1px dashed var(--line);
  padding: 14px;
  min-width: 0;
}
.admin-create__note p { margin: 0; line-height: 1.65; }
/* The note text uses `.mono small` for the typeface, but inside the
   320px rail the default `.mono { white-space: nowrap }` forces each
   bullet onto a single line and overflows. Allow wrapping here. */
.admin-create__note .mono,
.admin-create__note .mono * { white-space: normal; }
.admin-create__note .muted { display: block; margin-top: 4px; }

.admin-create__footer {
  grid-column: 1 / -1;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.admin-create__actions { display: flex; gap: 8px; }
.admin-create .ink { color: var(--fg); font-weight: 500; }
.admin-subsection { margin-top: 36px; }
.admin-subsection__header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.admin-subsection.danger-zone { border-top: 1px solid var(--line-faint); padding-top: 16px; }

.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-faint);
}
.admin-list--detailed li { display: block; padding: 14px 0; }
.admin-list--detailed li .row { margin-top: 10px; display: flex; gap: 10px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
  padding: 10px 10px 10px 0;
  text-align: left;
  border-bottom: 1px solid var(--line-faint);
  vertical-align: top;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 400;
  border-bottom: 1px solid var(--line);
}

form.inline { display: inline-block; margin: 0; }

/* ── Admin: shared form-wrap (centers + caps form pages) ─────────── */
.admin-form-wrap { max-width: 760px; }
.admin-form-wrap > .panel { margin-bottom: 16px; }
.admin-form-wrap__note { margin-top: 8px; }
.admin-form__slug { margin-top: 12px; }

/* ── Admin: friend-requests rows ─────────────────────────────────── */
.request-list { list-style: none; padding: 0; margin: 0; }
.request-row {
  padding: 14px 16px;
  border-top: 1px solid var(--line-faint);
}
.request-list > .request-row:first-child { border-top: none; }
.request-row__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.request-row__name { font-family: var(--font-sans); font-size: 14px; font-weight: 600; }
.request-row__context {
  margin: 8px 0 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.request-row__actions { display: flex; gap: 6px; }

/* ── Admin: journal + updates row lists ──────────────────────────── */
.journal-admin-list,
.updates-admin-list { list-style: none; padding: 0; margin: 0; }
.journal-admin-list__row,
.updates-admin-list__row {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line-faint);
}
.journal-admin-list > .journal-admin-list__row:first-child,
.updates-admin-list > .updates-admin-list__row:first-child { border-top: none; }
.journal-admin-list__title a,
.updates-admin-list__title { color: var(--fg); text-decoration: none; }
.journal-admin-list__title a:hover,
.updates-admin-list__title:hover { border-bottom: 1px solid var(--fg); padding-bottom: 1px; }

/* ── Admin: moderation rows (per-comment in /admin/comments) ─────── */
.moderation-list { list-style: none; padding: 0; margin: 0; }
.moderation-row {
  padding: 14px 16px;
  border-top: 1px solid var(--line-faint);
}
.moderation-list > .moderation-row:first-child { border-top: none; }
.moderation-row.is-pinned { background: var(--bg-subtle); }
.moderation-row.is-hidden { opacity: 0.55; }
.moderation-row__meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.moderation-row__author { font-family: var(--font-sans); font-size: 14px; font-weight: 600; }
.moderation-row__tier,
.moderation-row__flag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.moderation-row__date { margin-left: auto; }
.moderation-row__body { margin: 6px 0; font-size: 13px; line-height: 1.55; }
.moderation-row__where { margin: 4px 0 8px; }
.moderation-row__actions { display: flex; gap: 6px; }

/* ── Admin: filter chips with counts ─────────────────────────────── */
.chip__count {
  display: inline-block;
  margin-left: 4px;
  color: var(--fg-muted);
  font-size: 10px;
}
.chip.is-active .chip__count { color: var(--fg-inverse); opacity: 0.7; }

/* ── Admin: Users table ──────────────────────────────────────────── */
/* 7-col grid: Name · Email · Tier · Joined · Last active · Status · Actions.
   Last-active gets a 100px column (fits "yesterday" / "2026-04-22" /
   "5d ago"). Design baseline was 6-col; the 7th is a v4 add. */
.users-table { font-size: 14px; }
.users-table__row {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 120px 100px 100px 90px 160px;
  gap: 12px;
  align-items: center;
}
.users-table__head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.users-table__row--data {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-faint);
}
.users-table > .users-table__row--data:last-child { border-bottom: none; }
.users-table__row--data.is-inactive { opacity: 0.55; }
.users-table__name { font-family: var(--font-sans); font-size: 14px; font-weight: 500; }
.users-table__email { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.users-table__tier-select {
  padding: 3px 6px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  width: 100%;
}
.users-table__status {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--fg);
}
.users-table__status.is-inactive { color: var(--fg-muted); }
/* Last-active cell: dim when "never", normal otherwise. */
.users-table__last-active { color: var(--fg); }
.users-table__last-active[title=""] { color: var(--fg-faint); }
.users-table__actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Admin: LinkedIn cover generator ─────────────────────────────── */
.li-cover {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}
.li-cover__form { position: sticky; top: 16px; }
.li-cover__preview { min-width: 0; }
.li-cover__stage {
  overflow: auto;
  background: var(--bg-subtle);
  border: 1px solid var(--line-faint);
  /* Stage height = preview at 50% + small breathing room. */
  height: 240px;
}
.li-cover__inner { transition: transform 120ms ease-out; }
.li-cover__inner svg { display: block; }
.li-cover__scale { display: inline-flex; gap: 4px; }
.li-cover__scale-opt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid var(--line-faint);
  color: var(--fg-muted);
  cursor: pointer;
  text-decoration: none;
}
.li-cover__scale-opt:hover { color: var(--fg); }
.li-cover__scale-opt.is-active {
  background: var(--bg-ink);
  color: var(--fg-inverse);
  border-color: var(--bg-ink);
}
.li-cover__exports { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.li-cover__note { margin-top: 8px; }

/* ── Admin: § 04 access cards editor (3-card grid) ───────────────── */
.access-edit__intro { margin: 0 0 16px; }
.access-edit__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.access-edit__card {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line-faint);
}
.access-edit__heading { margin: 0 0 12px; }

/* ── Reorderable tables (drag-and-drop) ──────────────────────────── */

.data-table--reorderable tbody tr { transition: background 80ms ease-out; }
.drag-cell {
  width: 28px;
  padding-right: 0 !important;
  cursor: grab;
  user-select: none;
  color: var(--fg-faint);
}
.drag-cell:active { cursor: grabbing; }
.drag-cell:hover { color: var(--fg-muted); }
.drag-handle {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.1em;
}
.data-table--reorderable tbody tr.is-dragging {
  opacity: 0.4;
  background: var(--bg-subtle);
}
.data-table--reorderable tbody tr.is-drop-before {
  box-shadow: inset 0 2px 0 0 var(--fg);
}
.data-table--reorderable tbody tr.is-drop-after {
  box-shadow: inset 0 -2px 0 0 var(--fg);
}

/* Segmented control — used for the Users page tier filter and
   anywhere we want a grouped tab feel. Container has line-color
   background; child opts have their own background and a 1px gap
   showing the line color through the seam. */
.seg-control {
  display: inline-flex;
  gap: 1px;
  padding: 1px;
  background: var(--line);
  width: fit-content;
  margin: 0 0 16px;
}
.seg-control__opt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  background: var(--bg-elev);
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.seg-control__opt:hover { background: var(--bg-subtle); text-decoration: none; }
.seg-control__opt.is-active {
  background: var(--bg-ink);
  color: var(--fg-inverse);
}

/* Legacy .filter-chips / .chip kept for any non-Users surface — no
   longer used on Users. */
.filter-chips { display: flex; gap: 8px; margin: 0 0 16px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line-faint);
  color: var(--fg-muted);
}
.chip.is-active { border-color: var(--line); color: var(--fg); }

.revenue-grid-wrap { overflow-x: auto; border: 1px solid var(--line-faint); }
.revenue-grid { border-collapse: collapse; font-size: 13px; }
.revenue-grid th, .revenue-grid td {
  border: 1px solid var(--line-faint);
  padding: 4px 8px;
  font-family: var(--font-mono);
}
.revenue-grid input { width: 80px; border: none; padding: 4px; text-align: right; }

.overview-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }

/* ── Project page ─────────────────────────────────────────────────── */

.breadcrumb { padding: 12px 48px; border-bottom: 1px solid var(--line-faint); font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.breadcrumb a { color: var(--fg-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb__sep { margin: 0 8px; }

/* 2-col header — left has badges/name/domain/pitch/long;
   right hosts the Snapshot panel as a header aside. */
.project-header {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  padding: 48px 48px 40px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.project-header__left { min-width: 0; }
.project-header__meta { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.project-header__name {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.0;
  letter-spacing: -0.025em;
}
.project-header__domain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
  text-decoration: none;
}
.project-header__pitch {
  margin: 24px 0 0;
  max-width: 640px;
  font-family: var(--font-sans);
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg);
  font-weight: 400;
  text-wrap: balance;
}
.project-header__long { margin-top: 16px; max-width: 640px; color: var(--fg-muted); font-size: 15px; line-height: 1.65; }
.project-header__right > .panel { margin-bottom: 0; }

.project-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  padding: 32px 48px 64px;
  align-items: start;
}
.project-body__main { min-width: 0; }
.project-body__aside { position: sticky; top: 16px; align-self: start; }

.panel { border: 1px solid var(--line); background: var(--bg-elev); margin-bottom: 24px; }
/* In explicit gap containers, panels manage spacing via the parent's
   `gap`, not their own margin. Opt-in via `.panel-stack`. */
.panel-stack { display: flex; flex-direction: column; gap: 24px; }
.panel-stack > .panel { margin-bottom: 0; }
.panel__header { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.panel__title { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; color: var(--fg); font-family: var(--font-mono); }
.panel__body { padding: 16px 18px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; }

.entry-list { list-style: none; padding: 0; margin: 0; }
.entry {
  display: grid;
  grid-template-columns: 110px 1fr 110px;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line-faint);
  align-items: baseline;
}
.entry-list .entry:first-child { border-top: none; }
.entry__date { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.entry__main { min-width: 0; }
.entry__vis { display: flex; justify-content: flex-end; }
.entry__title {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
}
.entry__title a { color: var(--fg); text-decoration: none; }
.entry__title a:hover { border-bottom: 1px solid var(--fg); padding-bottom: 1px; }
.entry__body.markdown { color: var(--fg); font-family: var(--font-sans); font-size: 14px; line-height: 1.6; }
.entry__body.markdown p { margin: 8px 0; }
.markdown img { max-width: 100%; height: auto; }

/* Markdown body links — hairline underline by default so they're
   visually distinct from surrounding text. Applies to journal
   entries, update bodies, comment bodies, project long descriptions. */
.markdown a {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
  text-decoration: none;
}
.markdown a:hover {
  color: var(--live-accent);
  border-bottom-color: var(--live-accent);
  text-decoration: none;
}

/* Snapshot rows — one per row in a flush panel. Bottom rule per row,
   none on the last. Label in mono dim, value in sans (or mono for
   identifier-style values like Domain / Visibility). */
.snapshot__list { list-style: none; padding: 0; margin: 0; }
.snapshot__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-faint);
}
.snapshot__row:first-child { border-top: none; }
.snapshot__label { letter-spacing: 0.08em; text-transform: uppercase; }
.snapshot__value { color: var(--fg); font-family: var(--font-sans); font-size: 13px; text-align: right; }
.snapshot__value.mono { font-family: var(--font-mono); font-size: 12px; }
.snapshot__value strong { font-weight: 600; }

/* Chart wrapper — center + max-width so charts shrink gracefully. */
.chart-wrap { margin-top: 16px; overflow-x: auto; }
.chart-wrap svg { max-width: 100%; height: auto; }

/* Window selector — segmented control rendered as <a> links. */
.window-selector { display: inline-flex; align-items: stretch; }
.window-selector__opt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid var(--line-faint);
  color: var(--fg-muted);
  text-decoration: none;
  margin-left: -1px;
}
.window-selector__opt:first-child { margin-left: 0; }
.window-selector__opt.is-active {
  background: var(--bg-ink);
  color: var(--fg-inverse);
  border-color: var(--bg-ink);
  z-index: 1;
}
.window-selector__opt:hover { color: var(--fg); text-decoration: none; }

/* Investor-view CTA inside body sidebar. */
.cta-body { margin: 0 0 12px; font-family: var(--font-sans); font-size: 13px; line-height: 1.5; color: var(--fg-muted); }

/* Related projects sidebar panel — one row per project, name+status
   on top, domain below. Entire row clickable. */
.related-list { list-style: none; padding: 0; margin: 0; }
.related-row {
  display: block;
  padding: 12px 14px;
  border-top: 1px solid var(--line-faint);
  text-decoration: none;
  color: var(--fg);
}
.related-list li:first-child .related-row { border-top: none; }
.related-row:hover { background: var(--bg-subtle); text-decoration: none; }
.related-row__top { display: flex; justify-content: space-between; align-items: baseline; }
.related-row__name { font-family: var(--font-sans); font-size: 14px; font-weight: 500; }

/* Panel-internal entry list (used inside Journal panel) needs row
   padding since the panel itself is flush. */
.entry-list--panel .entry { padding: 20px 16px; }

.update-page { padding: 32px 64px 64px; max-width: 760px; }

/* ── /updates archive (v4) ───────────────────────────────────────── */

.archive { background: var(--bg); min-height: 100%; }

.archive-header {
  display: grid;
  grid-template-columns: 180px 1fr 280px;
  gap: 48px;
  align-items: end;
  padding: 48px 64px 32px;
  border-bottom: 1px solid var(--line);
}
.archive-header__main { min-width: 0; }
.archive-header__title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.0;
  letter-spacing: -0.025em;
}
.archive-header__lede {
  margin: 12px 0 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 560px;
  text-wrap: balance;
}
.archive-header__stats { display: flex; flex-direction: column; gap: 8px; }
.archive-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.archive-stat__label { letter-spacing: 0.06em; text-transform: uppercase; }
.archive-stat__value { font-family: var(--font-sans); font-size: 16px; color: var(--fg); }
.archive-stat__value--mono { font-family: var(--font-mono); font-size: 13px; }

.archive-filter {
  padding: 16px 64px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.archive-filter__right { display: flex; align-items: center; gap: 10px; }
.archive-filter__projsel {
  padding: 5px 10px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}
.archive-filter__divider { width: 1px; height: 14px; background: var(--line-faint); }
.archive-filter__rss { color: var(--fg); }

.archive-body { padding: 32px 64px 64px; }
.archive-empty { padding: 80px 0; text-align: center; }

.archive-month {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}
.archive-month__label {
  position: sticky;
  top: 24px;
  align-self: flex-start;
}
.archive-month__count { display: block; margin-top: 6px; }
.archive-month__entries { min-width: 0; }

.archive-row {
  display: grid;
  grid-template-columns: 90px 1fr 110px;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line-faint);
  align-items: start;
}
.archive-row--first { border-top: none; }
.archive-row__when { display: flex; flex-direction: column; gap: 4px; }
.archive-row__source { letter-spacing: 0.1em; text-transform: uppercase; }
.archive-row__title-link { text-decoration: none; color: var(--fg); }
.archive-row__title-link:hover { text-decoration: none; }
.archive-row__title-link:hover .archive-row__title { border-bottom: 1px solid var(--fg); padding-bottom: 1px; }
.archive-row__title {
  display: inline;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.archive-row__teaser {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 680px;
}
.archive-row__more { margin-top: 10px; }
.archive-row__more-link {
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.archive-row__more-link:hover { color: var(--live-accent); border-bottom-color: var(--live-accent); }
.archive-row__vis { display: flex; justify-content: flex-end; }

/* ── /updates/:id detail (v4) ────────────────────────────────────── */

.update-detail-page { background: var(--bg); }
.update-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 32px 48px;
}
.update-detail__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.update-detail__source {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.update-detail__divider { width: 1px; height: 12px; background: var(--line-faint); }
.update-detail__edit { margin-left: auto; }
.update-detail__title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.update-detail__body {
  margin-top: 28px;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
}
.update-detail__body p { margin: 1.2em 0 0; }
.update-detail__body p:first-child { margin-top: 0; }

.update-detail__nav {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  border-top: 1px solid var(--line);
}
.update-detail__nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--fg);
}
.update-detail__nav-link:hover { text-decoration: none; }
.update-detail__nav-link:hover .update-detail__nav-title { border-bottom: 1px solid var(--fg); padding-bottom: 1px; }
.update-detail__nav-link--next { text-align: right; align-items: flex-end; }
.update-detail__nav-link--disabled { opacity: 0.35; cursor: default; }
.update-detail__nav-link--disabled:hover .update-detail__nav-title { border-bottom: none; padding-bottom: 0; }
.update-detail__nav-title {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
}

.update-detail__comments {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 64px;
}
.update-page .entry-header { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.updates-archive { padding: 32px 64px 64px; }
.updates-archive .page-header { margin-bottom: 24px; }
.updates-archive .entry { grid-template-columns: 130px 1fr 110px; }

/* ── Traffic widget ───────────────────────────────────────────────── */

.traffic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.traffic-block { display: flex; flex-direction: column; gap: 12px; }
.traffic-list ul { list-style: none; padding: 0; margin: 6px 0 0; }
.traffic-list li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line-faint); }
.traffic-note { margin-top: 16px; }

/* ── Comments ─────────────────────────────────────────────────────── */

.comments { /* container inside flush comments panel */ }
.comment-list, .comment-replies { list-style: none; padding: 0; margin: 0; }
/* Replies indent with a single 2px line — no extra left margin, per design. */
.comment-replies {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}
.comment {
  padding: 14px 16px;
  border-top: 1px solid var(--line-faint);
}
.comment-list > .comment:first-child { border-top: none; }
.comment--hidden { opacity: 0.5; }
.comment--pinned { background: var(--bg-subtle); }

.comment__meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.comment__author { font-family: var(--font-sans); font-size: 14px; font-weight: 600; }
.comment__tier {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.comment__flag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.comment__meta time {
  margin-left: auto;       /* push date to the right */
}
.comment__body { margin: 6px 0; font-size: 13px; line-height: 1.55; }
.comment__actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* Composer — eyebrow above textarea, footer with hint + button. */
.comment-composer-wrap {
  padding: 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
}
.comment-inline-form { padding: 12px 16px 0; }
.comment-form { margin: 0; }
.comment-form__eyebrow { display: block; margin-bottom: 8px; }
.comment-form textarea {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 14px;
  min-height: 64px;
  resize: vertical;
  outline: none;
}
.comment-form textarea:focus { border-color: var(--fg); }
.comment-form__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 12px;
}
.comment-form__actions { display: flex; gap: 8px; }

.moderation-list { list-style: none; padding: 0; margin: 0; }
.moderation-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-faint);
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.moderation-row.is-hidden { opacity: 0.6; }
.moderation-row__meta { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.moderation-row__where { font-size: 13px; color: var(--fg-muted); }
.moderation-row__actions { display: flex; gap: 8px; }

/* ── Mobile reflow ─────────────────────────────────────────────────── */
/* Breakpoint per design handoff (README §Component inventory / Mobile). */

@media (max-width: 600px) {
  /* ── Site chrome — mobile-only structure ───────────────────── */
  .site-header {
    padding: 12px 18px;
    gap: 10px;
  }
  .site-header__brand { gap: 10px; }
  .site-header__wordmark { font-size: 17px; }
  /* Hide desktop nav, show mobile container. */
  .site-header__nav--desktop { display: none; }
  .site-header__mobile { display: inline-flex; align-items: center; gap: 8px; }

  /* When the toggle button has flipped `.is-open` on the container,
     the drawer appears as a stacked menu absolutely positioned below
     the header (spanning the full width of the header, not the
     container — left/right: 0 against the .site-header position
     context). */
  .site-header__mobile.is-open .site-header__drawer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 16px 18px;
    z-index: 100;
  }
  /* Drawer links + buttons get larger tap targets in mobile context. */
  .site-header__drawer a,
  .site-header__drawer button {
    padding: 8px 0;
    font-size: 12px;
  }

  .site-footer {
    padding: 24px 18px;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    margin-top: 32px;
  }
  .site-footer__links { flex-wrap: wrap; gap: 12px 16px; }

  /* ── Type ───────────────────────────────────────────────────── */
  .display { font-size: 32px; }
  h1 { font-size: 28px; }
  .lede { font-size: 15px; }

  /* ── Section grid (homepage) ────────────────────────────────── */
  .section {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 18px;
  }
  /* Modifier overrides also need to collapse to single column on mobile. */
  .section--thesis  { grid-template-columns: 1fr; padding: 32px 18px 24px; }
  .section--access  { grid-template-columns: 1fr; gap: 12px; }
  .section--ledger__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 16px;
  }

  /* ── Project ledger collapses to stacked cards ──────────────── */
  .ledger__head { display: none; }
  .ledger--standard .ledger__row,
  .ledger--investor .ledger__row {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 16px 0;
  }
  .ledger__row--data { grid-template-areas:
      "name status"
      "pitch pitch"
      "updated entries"; }
  .ledger__row--data .ledger__name    { grid-area: name; }
  .ledger__row--data .ledger__pitch   { grid-area: pitch; }
  .ledger__row--data > div:nth-child(3) { grid-area: status; justify-self: end; }
  .ledger__row--data > div:nth-child(4) { grid-area: updated; }
  .ledger__row--data .ledger__entries { grid-area: entries; }
  /* Hide MRR cell on mobile for investor variant (info already in dashboard). */
  .ledger--investor .ledger__row--data > div:nth-child(5) { display: none; }

  .update-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 0;
  }

  /* ── Project detail page ────────────────────────────────────── */
  .breadcrumb { padding: 12px 18px; }
  .project-header {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 18px;
  }
  .project-header__name { font-size: 36px; line-height: 1.05; }
  .project-header__pitch { font-size: 17px; }
  .project-body {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 18px 32px;
  }
  /* Sidebar stops being sticky on mobile (no room to scroll past it). */
  .project-body__aside { position: static; top: auto; }

  /* Journal entry stacks; date + visibility share a row above. */
  .entry {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
  }
  .entry__meta { flex-direction: row; gap: 10px; align-items: baseline; }

  /* ── Panels + stats row ─────────────────────────────────────── */
  .panel { margin-bottom: 16px; }
  .panel__body { padding: 14px 16px; }
  .stats-row { grid-template-columns: 1fr; gap: 8px; }
  .stat__value { font-size: 24px; }

  /* ── Traffic widget ─────────────────────────────────────────── */
  .traffic-grid { grid-template-columns: 1fr; gap: 16px; }

  /* ── Comments ───────────────────────────────────────────────── */
  .comment { padding: 12px 14px; }
  .comment__meta { flex-wrap: wrap; gap: 8px 12px; }
  .comment__meta time { margin-left: 0; }
  .comment-replies { padding-left: 12px; }

  /* ── Updates archive + update detail ────────────────────────── */
  .updates-archive { padding: 20px 18px 32px; }
  .update-page     { padding: 20px 18px 32px; }

  /* ── Dashboard ──────────────────────────────────────────────── */
  .dashboard__header h1 { font-size: 32px; }

  /* Dashboard mobile reflow: collapse 2-col body, narrow padding. */
  .dashboard__body { grid-template-columns: 1fr; gap: 24px; padding: 16px 18px 32px; }
  .dashboard__section { padding: 16px 18px 0; }
  .dash-header { padding: 24px 18px 16px; flex-direction: column; align-items: stretch; gap: 12px; }
  .dash-header__title { font-size: 28px; }

  /* Project table mobile cards. */
  .project-table .project-table__head { display: none; }
  .project-table .project-table__row,
  .project-table--investor .project-table__row {
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 16px;
  }
  .project-table__row > div:nth-child(2) { grid-column: 1 / -1; }
  .project-table__row > div:nth-child(4) { display: none; } /* hide Updated */
  .project-table .right { text-align: left; }

  /* Feed item mobile: stack date/title/body, hide vis col. */
  .feed-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 16px;
  }
  .feed-item__vis { display: none; }

  /* Portfolio rollup: collapse to single column. */
  .portfolio-rollup { grid-template-columns: 1fr; gap: 16px; }
  .breakdown-row { grid-template-columns: 1fr auto; }
  .breakdown-row__bar,
  .breakdown-row__pct { display: none; }

  /* ── /updates archive + detail ───────────────────────────────── */
  .archive-header {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 18px 20px;
  }
  .archive-header__title { font-size: 32px; }
  .archive-filter { padding: 12px 18px; gap: 12px; }
  .archive-filter__right { flex-wrap: wrap; gap: 8px; }
  .archive-body { padding: 16px 18px 32px; }
  .archive-month {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
  }
  .archive-month__label { position: static; }
  .archive-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 0;
  }
  .archive-row__when { flex-direction: row; gap: 10px; align-items: baseline; }
  .archive-row__vis { justify-content: flex-start; }
  .archive-row__title { font-size: 17px; }

  .update-detail { padding: 32px 18px 32px; }
  .update-detail__title { font-size: 28px; }
  .update-detail__body { font-size: 16px; }
  .update-detail__nav { padding: 20px 18px 32px; grid-template-columns: 1fr; }
  .update-detail__nav-link--next { text-align: left; align-items: flex-start; }
  .update-detail__comments { padding: 0 18px 32px; }

  /* ── Auth pages ─────────────────────────────────────────────── */
  .auth-page { padding: 40px 18px; }
  .auth-card h1 { font-size: 28px; }

  /* ── Admin chrome ───────────────────────────────────────────── */
  .admin-page { padding: 20px 18px 32px; }
  .admin-nav { padding: 0 18px; }
  .admin-nav__item { padding: 10px 12px; }
  .admin-areas__grid { grid-template-columns: 1fr 1fr; }
  .admin-area { border-top: 1px solid var(--line-faint); }
  .admin-area:nth-child(-n+4) { border-top: 1px solid var(--line-faint); }
  .admin-area:nth-child(-n+2) { border-top: none; }
  .admin-area:nth-child(4n) { border-right: 1px solid var(--line-faint); }
  .admin-area:nth-child(2n) { border-right: none; }
  .site-header__sep { display: none; }
  .admin-page__header .dash-header__title { font-size: 28px; }
  .admin-counters { grid-template-columns: repeat(2, 1fr); }
  .counter { padding: 12px; }
  .counter__value { font-size: 24px; }
  .admin-form .form-grid { grid-template-columns: 1fr; }
  .admin-create__grid { grid-template-columns: 1fr; gap: 16px; }

  /* Admin dashboard bottom — collapse 2-col, flatten project table. */
  .admin-bottom { grid-template-columns: 1fr; gap: 24px; }
  .admin-page__header { flex-direction: column; align-items: stretch; }
  .dash-actions { flex-wrap: wrap; }
  .admin-project-table__head { display: none; }
  .admin-project-table__row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 14px;
  }
  .admin-project-table .right { text-align: left; }
  .admin-create__form .form-grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .admin-create__footer { flex-direction: column; align-items: stretch; gap: 12px; }
  .admin-create__actions { justify-content: flex-end; }
  .admin-list--detailed li .row { flex-wrap: wrap; }

  /* ── Admin .data-table (legacy tables): horizontally scroll. ─── */
  .data-table { display: block; overflow-x: auto; white-space: nowrap; }
  .data-table th, .data-table td { white-space: nowrap; }

  /* ── Admin Users table: stack to single-col card layout. ─────── */
  .users-table__head { display: none; }
  .users-table__row--data {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name        status"
      "email       email"
      "tier        joined"
      "lastactive  lastactive"
      "actions     actions";
    gap: 6px 12px;
    padding: 14px 16px;
  }
  .users-table__row--data > :nth-child(1) { grid-area: name; }
  .users-table__row--data > :nth-child(2) { grid-area: email; }
  .users-table__row--data > :nth-child(3) { grid-area: tier; }
  .users-table__row--data > :nth-child(4) { grid-area: joined; }
  .users-table__row--data > :nth-child(5) { grid-area: lastactive; }
  .users-table__row--data > :nth-child(6) { grid-area: status; justify-self: end; }
  .users-table__row--data > :nth-child(7) { grid-area: actions; }
  .users-table__actions { justify-content: flex-start; flex-wrap: wrap; }
  /* Inline label for the date row so it's not a bare value. */
  .users-table__row--data > :nth-child(5)::before {
    content: "Last active: ";
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-right: 6px;
  }

  /* ── Admin: § 04 access-cards editor stacks to 1 column. ─────── */
  .access-edit__grid { grid-template-columns: 1fr; gap: 16px; }

  /* ── Admin: journal + updates row lists tighten. ─────────────── */
  .journal-admin-list__row,
  .updates-admin-list__row { grid-template-columns: 90px 1fr auto; }
  .journal-admin-list__row > .vis,
  .updates-admin-list__row > .vis { grid-column: 1 / -1; }

  /* ── Admin: friend-request rows tighten. ─────────────────────── */
  .request-row__head { flex-wrap: wrap; gap: 6px; }
  .request-row__actions { flex-wrap: wrap; }

  /* ── Admin: moderation rows tighten. ─────────────────────────── */
  .moderation-row__meta { gap: 6px 10px; }
  .moderation-row__date { margin-left: 0; }
  .moderation-row__actions { flex-wrap: wrap; }

  /* ── Touch targets ──────────────────────────────────────────── */
  .btn { padding: 10px 14px; }
  .btn--sm { padding: 6px 12px; }
  .btn--mod { padding: 4px 10px; }   /* keep chip small even on mobile */
  .access-card { padding: 14px; }
}
