/* FOUNDERS Talk Africa - board design system (v2 "soft + depth", LOCKED).
 * Moved verbatim out of home.html so the board and the account pages share
 * one source of truth. Restyling here changes the live board - treat the
 * v2 lock as the authority.
 */

  :root {
    --bg: #F7F6F3;
    --glow: #FBEFD9;
    --surface: #FFFFFF;
    --ink: #16140F;
    --muted: #6B6660;
    --hair: #ECEAE4;
    --accent: #C8841E;
    --accent-soft: #F6E9D2;
    --good: #2E7D5B;
    --ask: #2D6CDF;
    --tell: #2E7D5B;
    --show: #C8841E;
    --find: #7C5CD6;
    /* Shadows: shadow-as-border (3 layers) — see better-ui/surfaces */
    /* soft, warm, diffuse — locked v2 */
    --shadow: 0 2px 5px rgba(20,18,12,.04), 0 22px 46px -20px rgba(200,132,30,.20);
    --shadow-hover: 0 4px 8px rgba(20,18,12,.05), 0 34px 64px -22px rgba(200,132,30,.28);
    --shadow-border: var(--shadow);
    --shadow-border-hover: var(--shadow-hover);
    /* Spacing scale — 4px base, single rhythmic ladder */
    --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
    --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;
    --radius: 22px;
    --r-sm: 13px;
    --maxw: 1200px;
    --chrome-h: 67px;   /* the band's MEASURED height (40px island + 2x13 padding +
                           1px border). The band enforces it via min-height and
                           both rails pin to it -- one source of truth. */
    --gap: 18px;
  }
  [data-theme="dark"] {
    --bg: #16140F;
    --glow: #2C2310;
    --surface: #1F1C16;
    --ink: #F7F6F3;
    --muted: #9C948A;
    --hair: #322E27;
    --accent: #E2A23C;
    --accent-soft: #2C2415;
    --good: #4FB083;
    --ask: #6BA1F0;
    --tell: #4FB083;
    --show: #E2A23C;
    --find: #A98FE6;
    --shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 50px -22px rgba(0,0,0,.6);
    --shadow-hover: inset 0 1px 0 rgba(255,255,255,.08), 0 34px 70px -22px rgba(0,0,0,.7);
    --shadow-border: var(--shadow);
    --shadow-border-hover: var(--shadow-hover);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  [hidden] { display: none !important; }
  body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    background:
      radial-gradient(38% 30% at 88% 12%, rgba(200,132,30,.16) 0%, transparent 60%),
      radial-gradient(34% 28% at 12% 42%, rgba(124,92,214,.10) 0%, transparent 62%),
      radial-gradient(30% 26% at 78% 78%, rgba(79,176,131,.09) 0%, transparent 60%),
      radial-gradient(95% 65% at 100% 0%, var(--glow) 0%, transparent 55%),
      var(--bg);
    background-attachment: fixed;
  }
  h1,h2,h3,.display { font-family: 'Satoshi', 'Inter', sans-serif; }
  .mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

  /* Icons — Phosphor sprite (inlined via board/_icons.html) */
  .ic { width: 1em; height: 1em; display: block; flex: none; fill: currentColor; }
  .ic-12 { font-size: 12px; } .ic-14 { font-size: 14px; } .ic-16 { font-size: 16px; }
  .ic-18 { font-size: 18px; } .ic-20 { font-size: 20px; } .ic-22 { font-size: 22px; }
  /* inline icon+label pair: 6px is an optical gap, not a rhythmic one */
  .mi { display: inline-flex; align-items: center; gap: 6px; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
  }

  /* Top bar */
  /* Chrome band: brand · island · account, one row. The island is the only
     desktop navigation, so this band is the single piece of chrome above the
     feed. It is sticky at top:0, so its height IS --chrome-h -- it enforces
     that with min-height rather than relying on the contents adding up. */
  .topbar {
    position: sticky; top: 0; z-index: 40;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4);
    min-height: var(--chrome-h);
    padding: calc(var(--s3) + env(safe-area-inset-top, 0px)) var(--s7);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hair);
  }
  /* Pinned to the last column so an empty centre column cannot pull the
     account controls into the middle (the sign-in pages have no island). */
  .band-end { grid-column: 3; justify-self: end; display:flex; align-items:center; gap: var(--s2); }
  .brand { display: flex; flex-direction: column; line-height: 1.1; }
  /* The masthead wears the same two weights as the event card and the door page: the borrowed
     name quiet, the owned word in ink, tracked wide. It is a name, not a headline. */
  .brand .name { font-family:'Satoshi'; font-weight:400; font-size:13px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); }
  .brand .name b { color:var(--ink); font-weight:600; }
  .spacer { flex: 1; }
  .search {
    display:flex; align-items:center; gap:var(--s2);
    background: color-mix(in srgb, var(--bg) 70%, var(--surface)); border:1px solid var(--hair);
    border-radius: 999px; padding: 9px 16px; width: 270px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
  }
  .search input { border:0; background:transparent; outline:0; color:var(--ink); font-size:14px; width:100%; }
  .search svg { opacity:.5; }
  .btn {
    border:1px solid var(--hair); background:var(--surface); color:var(--ink);
    border-radius:999px; padding: 9px 18px; font-size:14px; font-weight:500; cursor:pointer;
    text-decoration:none; display:inline-flex; align-items:center; gap:6px;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
  }
  .btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }

  /* A DOOR WITH NO BODY. Same box as .btn so it keeps the band's rhythm and its tap height,
     but no fill and no hairline: the bar spends exactly one black fill, and that is the door
     that means "join". Hover is ink (never a pill) -- the band's own law. */
  .btn.quiet {
    background:transparent; border-color:transparent; box-shadow:none;
    padding-left:10px; padding-right:10px; color:var(--ink);
  }
  .btn.quiet:hover { color:var(--accent); }
  .btn.icon { padding: var(--s2); display:grid; place-items:center; }
  .theme-toggle { cursor:pointer; }
  .theme-toggle .i-sun { display: none; }
  [data-theme="dark"] .theme-toggle .i-moon { display: none; }
  [data-theme="dark"] .theme-toggle .i-sun { display: block; }

  /* THE ISLAND. One row, centred in the band. Adapted from the reference dock
     (dark pill, 4px pad, 40px tall, 2px gap, 999px radius) but rebuilt on board
     tokens: the dark is --ink and the inverted active pill is --bg, so the
     island self-inverts in dark mode instead of staying a foreign black.

     Deliberately no fixed item widths -- add an item and the dock re-centres
     itself, instead of overflowing a hand-tuned total. */
  .dock {
    display:inline-flex; align-items:center; gap:2px;
    background: var(--ink); padding: 4px; border-radius:999px; height:40px;
    box-shadow: 0 8px 20px rgba(20,18,12,.10);
  }
  [data-theme="dark"] .dock { box-shadow: 0 8px 20px rgba(0,0,0,.45); }
  /* PAGE PADDING OUTSIDE THE SHELL. The City's feed is padded by `.shell`, the page wrapper
     (28px 26px, and var(--s4) below 900px). A page that is not the City -- a post, a public
     profile -- is a direct child of <body> with no shell around it, so it had NO page padding
     at all and its text ran into the screen edge: measured at a true 390px viewport, main
     was 0..390 with text starting at x=0, while the City's main was 16..374. Same padding,
     same breakpoint as the shell, so there is one answer to "how wide is the page margin".
     `.auth` and `.beta-wrap` set their own padding and, being classes, still win over this. */
  body > main { padding: 28px 26px; }

  /* One way back, from the head of the page's own content (see post_detail.html). Quiet: muted
     and borderless until you look at it, then it inks in. It is deliberately NOT a pill in the
     band -- the owner read that as "the <- the city is in the nav bar". A page's own control
     belongs with the page. */
  .page-back {
    display:inline-flex; align-items:center; gap:6px;
    min-height:32px; margin:0 0 var(--s2) -8px; padding:0 8px;
    border-radius:999px; color:var(--muted); font-size:13px; font-weight:600;
    text-decoration:none; transition: color .18s ease, background-color .18s ease;
  }
  .page-back:hover { color:var(--ink); background:var(--surface); }
  .page-back .ic { color:var(--muted); }
  .page-back:hover .ic { color:var(--ink); }
  .dock-item {
    display:inline-flex; align-items:center; gap:6px; height:32px; padding:0 14px;
    border:0; background:none; cursor:pointer; border-radius:999px; white-space:nowrap;
    color: color-mix(in srgb, var(--bg) 64%, transparent);
    font-family:inherit; font-size:13.5px; font-weight:500;
  }
  .dock-item:hover { color: color-mix(in srgb, var(--bg) 92%, transparent); }
  .dock-item.active { background: var(--bg); color: var(--ink); }
  .dock-item.active:hover { color: var(--ink); }
  /* The create door on the dark island. Accent ink instead of a light pill: it has to read
     as "this does something" without copying `.active`'s "you are here" fill. Anchors also
     arrive underlined where the buttons never did. */
  .dock-item.create { color: var(--accent); text-decoration: none; }
  .dock-item.create:hover { color: var(--accent); }
  /* Extension point: the board search as a dock item. Styled now, so adding it
     later is markup only. It still needs a view and a URL first -- the old
     input had no form, action or name, so it searched nothing. See _topbar.html. */
  .dock .search {
    width:auto; min-width:140px; height:32px; padding:0 12px;
    background: color-mix(in srgb, var(--bg) 14%, transparent);
    border:0; box-shadow:none;
  }
  .dock .search input { color: color-mix(in srgb, var(--bg) 94%, transparent); font-size:13px; }
  .dock .search input::placeholder { color: color-mix(in srgb, var(--bg) 52%, transparent); }

  /* Layout */
  .shell {
    max-width: var(--maxw); margin: 0 auto; padding: 28px 26px;
    display: grid; grid-template-columns: 224px 1fr 304px; gap: 26px;
    align-items: start;
  }
  .rail { position: sticky; top: var(--chrome-h); display:flex; flex-direction:column; gap:10px; }
  /* The section nav that used to be styled here is the island in the band now
     (.dock / .dock-item), so these rules were removed along with the rail buttons. */
  .profile {
    margin-top: var(--s6); padding: var(--s4); border:1px solid var(--hair); border-radius:var(--r-sm);
    background:var(--surface); font-size:13px;
  }
  .profile b { font-size:14px; }
  .profile .inv { color:var(--accent); font-weight:600; margin-top:var(--s2); }

  .feed { display:flex; flex-direction:column; gap: 20px; min-width:0; }
  /* Cards are children of the list containers, NOT of .feed - the inter-card
     gap must live here or the cards stack flush against each other. */
  #city-list, #world-list { display:flex; flex-direction:column; gap: 22px; }
  .feed-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 0; padding: 0 2px; }
  .feed-head h2 { font-size:24px; letter-spacing:-.025em; }
  .feed-head .sort { font-size:13px; color:var(--muted); }
  .feed-head .head-right { display:flex; align-items:center; gap:10px; }
  /* The refresh arrow: the manual half of the freshness promise, and the only version of it a
     keyboard or a screen reader can reach -- a pull-to-refresh gesture is invisible to both. */
  .refresh {
    border:0; background:none; cursor:pointer; border-radius:999px; padding:0 6px;
    color:var(--muted); font-family:inherit; font-size:16px; line-height:1.4;
  }
  .refresh:hover { color:var(--ink); }
  .refresh:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  /* "Something new": offered INSTEAD of moving the page when the board changes under a reader
     who has scrolled into the feed. Inverted ink, so it reads as the board speaking rather than
     as more chrome -- and it inverts again in dark mode, where --ink is the light one. */
  .newposts {
    position:fixed; top:calc(10px + env(safe-area-inset-top, 0px)); left:50%;
    transform:translateX(-50%); z-index:40; cursor:pointer;
    border:0; border-radius:999px; padding:9px 16px;
    background:var(--ink); color:var(--bg);
    font-family:inherit; font-size:13px; font-weight:600;
    box-shadow:0 6px 20px rgba(0,0,0,.22);
  }
  .newposts:hover { color:var(--bg); }

  /* THE OPENING. The feed head is the label; this is the sentence that tells a founder whether
     the feed is for them -- what it is, then who it's for. Body colour so it reads as an
     introduction rather than as an announcement, with the two labels in ink; the measure is
     capped so the line never runs wider than a comfortable read. It replaced .feed-head .sort
     on the World feed, so that rule is left in place for the City feed's own head. */
  /* THE OPENING -- the World feed's preface, and the only place the board speaks in prose.
     Dressed so it reads as part of the board's own anatomy rather than a paragraph dropped
     between the heading and the first card: the labels wear the eyebrow voice every card
     already uses for "The World · source · time" (11px, .1em, accent, 700), and the warm left
     edge and amber wash are the event card's own gradient at a whisper -- the RSVP card is the
     board's warmest surface, and this preface is the other place the board talks instead of
     showing a row.
     MEASURED, because the first attempt got this backwards: stacking each label on its own line
     made the preface 354px tall on a 390px phone -- 81px TALLER than the live head it replaced,
     for a copy that is 30 words SHORTER. A preface that eats 42% of the screen before the first
     card is the opposite of the board's own rule (decide in under three seconds), so the labels
     sit inline and the rhythm is tight: 297px at 390 against the live head's 273px -- 24px more
     for 30 fewer words, which is the rule's inset and the narrower measure, and 209px at 1280.
     The dressing must never be the reason a reader has to scroll; if it ever costs more than
     this, the wash and the rule go before the copy does. */
  .feed-open {
    display:flex; flex-direction:column; gap:var(--s2); max-width:74ch;
    margin: var(--s3) 0 var(--s5);
    padding: var(--s3) var(--s4);
    border-left: 2px solid color-mix(in srgb, var(--accent) 42%, transparent);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    background: linear-gradient(96deg,
      color-mix(in srgb, var(--accent-soft) 55%, transparent), transparent 68%);
  }
  .feed-open p { margin:0; font-size:14px; line-height:1.58; color:var(--muted); }
  .feed-open strong {
    font-size:11px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
    color:var(--accent); margin-right:6px; white-space:nowrap;
  }
  @media (max-width: 900px) {
    .feed-open { padding: var(--s3) var(--s3) var(--s3) var(--s4); }
  }

  /* Shelf filter */
  .shelf-row { display:flex; gap:var(--s2); flex-wrap:wrap; }
  .shelf-chip {
    font-size:12px; font-weight:600; padding: var(--s2) var(--s4); border-radius:999px;
    border:1px solid var(--hair); background:var(--bg); color:var(--muted); cursor:pointer;
    text-decoration:none;
  }
  .shelf-chip.active { background:var(--ink); color:var(--bg); border-color:var(--ink); }

  /* Card — frosted glass shell */
  .card {
    position: relative;
    background: rgba(255,255,255,.48);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 28px;
    box-shadow:
      0 0 0 1px rgba(20,18,12,.05),
      inset 0 1px 0 rgba(255,255,255,.9),
      0 20px 46px -16px rgba(20,18,12,.18);
    padding: 26px 28px 24px;
    transition: transform .25s cubic-bezier(.165,.84,.44,1), box-shadow .25s ease;
    animation: fadeInScaleUp .7s cubic-bezier(.165,.84,.44,1) both;
    overflow: hidden;
  }
  [data-theme="dark"] .card {
    background: rgba(34,30,23,.5);
    border-color: rgba(255,255,255,.14);
    box-shadow:
      0 0 0 1px rgba(0,0,0,.45),
      inset 0 1px 0 rgba(255,255,255,.07),
      0 20px 55px rgba(0,0,0,.55);
  }
  /* freshness marker — 11px amber square, top-right, on FRESH cards only */
  .card::after {
    content:""; position:absolute; top:18px; right:18px; width:11px; height:11px; border-radius:3px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 78%, white), var(--accent));
    box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 55%, transparent);
    animation: fresh 2.6s ease-in-out infinite;
  }
  /* An aged card draws NOTHING in that corner. The grey square that used to sit here was a
     marker for a fact that was not there: it said "old", which the `5d` in the card-top
     already says in words, right next to it. A slot drawn for a thing that cannot arrive is
     a promise, not information -- so fresh cards keep the live amber cue, aged cards stay
     bare. */
  .card.aged::after { display: none; }
  /* The post page ports the same rule, same meaning: the amber square is drawn for a FRESH
     post only, and an aged page draws nothing there either. See THE POST PAGE below. */
  .post::after {
    content:""; position:absolute; top:2px; right:0; width:11px; height:11px; border-radius:3px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 78%, white), var(--accent));
    box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 55%, transparent);
    animation: fresh 2.6s ease-in-out infinite;
  }
  .post.aged::after { display: none; }
  /* Phones: once the byline carries a real name the header row runs the full width of the
     panel, so a square drawn at the top of that row lands on the words. Lift it clear of the
     row on small screens -- the marker still marks the post as fresh, it just stops sitting
     on the byline. Desktop keeps the square beside the row, where there is room for both. */
  @media (max-width: 480px) {
    .post::after { top: -8px; }
  }
  @keyframes fresh {
    0%,100% { box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 45%, transparent); }
    50%     { box-shadow: 0 2px 16px color-mix(in srgb, var(--accent) 72%, transparent); }
  }
  .card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(20,18,12,.05), 0 28px 56px -18px rgba(20,18,12,.22); }
  .card:nth-child(2) { animation-delay: 60ms; }
  .card:nth-child(3) { animation-delay: 120ms; }
  .card:nth-child(4) { animation-delay: 180ms; }
  .card:nth-child(5) { animation-delay: 240ms; }
  .card:nth-child(6) { animation-delay: 300ms; }
  .card > :last-child { margin-bottom: 0; }
  @keyframes fadeInScaleUp {
    from { opacity: 0; transform: translateY(25px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  @keyframes rise { from { opacity:0; transform: translateY(10px);} to {opacity:1; transform:none;} }
  .card-top { display:flex; align-items:center; gap:11px; margin-bottom:13px; font-size:12px; color:var(--muted); flex-wrap:wrap; }
  .chip {
    display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:12px;
    padding:var(--s1) var(--s3); border-radius:999px; background: var(--bg); color:var(--ink);
  }
  .chip .d { width:6px; height:6px; border-radius:50%; }
  .chip.ask .d { background: var(--ask); } .chip.tell .d { background: var(--tell); }
  .chip.show .d { background: var(--show); } .chip.find .d { background: var(--find); }
  .world-tag { display:inline-flex; align-items:center; gap:6px; font-weight:600; color:var(--accent); }
  .domain { display:inline-flex; align-items:center; gap:6px; }
  .favi { width:14px; height:14px; border-radius:4px; background:var(--hair); display:inline-grid; place-items:center; font-size:9px; font-weight:700; color:var(--muted);}
  .card h3 { font-size:19px; line-height:1.32; letter-spacing:-.012em; margin-bottom:7px; padding-right:34px; }
  .card h3 a { color: var(--ink); text-decoration:none; }
  .card h3 a:hover { color: var(--accent); }
  /* The whole city card is the target of its own title link. One real anchor stays
     (keyboard focus, middle-click and JS-off all behave); the ::after just stretches
     its hit area over the card, so a tap anywhere inside a post opens it. City only:
     the World cards link off-site, and a tap anywhere there would leave the board. */
  #city-list .card h3 a::after { content:""; position:absolute; inset:0; z-index:1; }
  .card .note { font-size:15px; line-height:1.62; color: var(--muted); margin-bottom:18px; }
  /* The card body reads as two labelled parts, not one run of text: the label is its own
     line in ink and bold, the body keeps the muted tone. The labels are data (every
     summary is written "What it is: ... Who it's for: ..."), so the structure is made at
     render time -- board/templatetags/board_extras.py, filter `curate`. */
  .card .note .nl { display:block; font-weight:700; color: var(--ink); margin:7px 0 2px; }
  .card .note .nl:first-child { margin-top:0; }
  .card-foot { display:flex; align-items:center; gap:18px; font-size:13px; color:var(--muted); flex-wrap:wrap; }
  .card-foot .pts { font-family:'JetBrains Mono'; font-weight:700; color:var(--ink); }
  .card-foot .work { color: var(--good); font-weight:600; display:inline-flex; gap:6px; align-items:center; }
  .card-foot .src { color:var(--accent); font-weight:600; }
  /* The upvote (ARCHITECTURE.md §4). It only ever renders for a reader who has already been
     through the door, so it is drawn as a real tap target rather than a text link that needs
     aim — it is the one control on this card that asks for an action. */
  .card-foot .vote { margin:0; }
  .card-foot .vote-btn {
    font: inherit; font-weight:600; color:var(--accent);
    background:var(--accent-soft); border:1px solid var(--accent);
    border-radius:999px; padding:6px 14px; cursor:pointer;
  }
  .card-foot .vote-btn:hover { background:var(--accent); color:#fff; }
  .card-foot .vote-btn:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
  .card-foot .voted { color:var(--good); font-weight:600; display:inline-flex; gap:6px; align-items:center; }
  /* The reply tally on a card: the number alone, because the glyph beside it now belongs to
     the Reply door (the verb). It is still a count of rows that exist, so it renders only
     when it is true. The aria-label carries the word for a screen reader. */
  .card-foot .tally { display:inline-flex; align-items:center; gap:6px; font-weight:700; color:var(--ink); }
  .card-foot .tally .ic { color:var(--muted); }
  /* The Reply door: the verb that makes commenting visible from the index instead of a
     secret inside the post page. Named, so it shows at zero replies too. Hover reaches
     for ink, the same colour the nav's other items hover to. */
  .card-foot .reply-door {
    display:inline-flex; align-items:center; gap:6px; padding:4px 0;
    color:var(--muted); text-decoration:none; font-weight:600;
    transition:color .18s ease;
  }
  .card-foot .reply-door .ic { color:var(--muted); transition:color .18s ease; }
  /* --- the take-line (item 2 of the build order) ------------------------------------
     The post's closing offer: the person behind it. It sits between the body and the foot
     and is quiet -- the byline in the header is where a reader looks for "who is this",
     and this is where they find out whether the person is reachable. Empty parts are not
     rendered at all, so a founder who published nothing gets a short line instead of a
     row of blanks. */
  /* --- THE POST PAGE (design v5, approved 2026-10-06) -------------------------------
     The post page is NOT a card. The card is the index -- frosted shell, hover lift, a
     two-line clamp. The page you tap into is where you READ, so it takes no surface at
     all: the text sits on the board, and only the person's panel and the composer carry
     one. That is why .take-line stops at the profile page now: on the post page it was a
     second shell inside a shell, and its two links to the same person (the name, and
     "everything they've said") were the same way out drawn twice.

     THE IDENTITY ROW IS ONE HORIZONTAL LINE: kind . who . where . when.
     Nothing block-level may live inside it. An opened block inside a flex row makes the
     whole row wrap -- exactly how an earlier mock of this page read
       Show / by @Daniel V. / panel / in AI . 1 week
     on four lines, when the owner had asked for one. flex-wrap:nowrap is the load-bearing
     line here, and the panel below is a SIBLING of the row, never a child of it.

     THE DISCLOSURE IS A CHECKBOX, so it needs no JavaScript at all: a label toggles a
     checkbox from anywhere in the DOM, which a <details> element cannot do for a sibling.
     That makes this the board's first interactive control that needs no script -- on a
     board that installs as a PWA and is expected to work offline, that is the point. The
     closed panel is visibility:hidden so its links are not tabbable while it is shut; and
     with the stylesheet off it degrades to a visible checkbox and a visible panel, i.e.
     the person stays reachable no matter what arrives. */
  .post-page { max-width: 720px; margin: 0 auto; }
  .post { position: relative; }
  .idrow {
    display:flex; align-items:center; gap:6px 10px; flex-wrap:nowrap;
    font-size:12.5px; color:var(--muted); overflow:hidden;
    padding-right:26px;   /* reserves the corner the freshness square sits in */
  }
  .idrow .chip { flex:none; }

  /* where . when is ONE group: 6px inside it is an optical gap, the 10px between items is
     the row's rhythm. Pinning it to the right edge with an auto margin (v4) opened a hole
     in the middle of the row on a phone -- the owner caught that one too. */
  .idrow .meta { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; flex:none; }
  .idrow .meta b { color:var(--ink); font-weight:600; }
  /* The separator is a word gap, not a suffix: without its margins the header read
     "in Builders·28 minutes" -- the dot sat flush against the shelf name. */
  .idrow .sep { opacity:.55; margin:0 6px; }
  .idrow .mono { flex:none; white-space:nowrap; }
  /* The byline. A label when there is a person behind it, plain text when there is not:
     the board never draws a control that leads to somebody who is not there. */
  .who {
    display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:1px 10px 1px 8px;
    border:1px solid transparent; border-radius:999px; color:var(--muted); font-size:12.5px;
    white-space:nowrap; flex:0 1 auto; min-width:0;
  }
  .who > svg { flex:none; }
  /* The name stays on ONE line. When the row is too narrow to hold it the window it sits in
     closes and the name slides inside that window instead of wrapping, clipping, or hurling
     the where/when off the edge: a 320px screen cannot hold a 24-character handle, a kind
     chip and a timestamp on one line -- that is measured, not guessed. byline-roll.js sets
     --nm-shift from the real overflow. The keyframes hold at both ends so the eye can read
     the start and the end of the name; under reduced motion there is no drift at all. */
  .who b { color:var(--ink); font-weight:700; }
  .who .nm { display:inline-block; min-width:0; max-width:100%; overflow:hidden; vertical-align:bottom; }
  .who .nm-in { display:inline-block; white-space:nowrap; }
  .who .nm.can-roll { -webkit-mask-image:linear-gradient(90deg,#000 84%,transparent 100%);
                      mask-image:linear-gradient(90deg,#000 84%,transparent 100%); }
  .who .nm.can-roll .nm-in { animation:nm-roll var(--nm-dur,7s) cubic-bezier(.45,0,.25,1) 1s infinite; }
  @keyframes nm-roll {
    0%, 12%   { transform: translateX(0); }
    44%, 56%  { transform: translateX(var(--nm-shift,0)); }
    88%, 100% { transform: translateX(0); }
  }
  .who .ic { color:var(--muted); transition: transform .18s cubic-bezier(.165,.84,.44,1); }
  label.who { cursor:pointer; transition: border-color .18s ease, background-color .18s ease; }
  label.who:hover, .who-tgl:checked ~ .idrow label.who { border-color:var(--hair); background:var(--surface); }
  label.who:hover b, .who-tgl:checked ~ .idrow label.who b { color:var(--accent); }
  .who-tgl:checked ~ .idrow label.who .ic { transform: rotate(180deg); }
  /* The checkbox is .sr-only, so the ring has to be drawn on the label it belongs to. */
  .who-tgl:focus-visible ~ .idrow label.who { outline:2px solid var(--accent); outline-offset:2px; }
  /* The panel: its own grid track, 0fr -> 1fr. Its own track means the row is never asked
     to make room for it, and the content below is pushed down honestly (the title rolls). */
  .who-panel { display:grid; grid-template-rows:0fr; transition: grid-template-rows .2s cubic-bezier(.165,.84,.44,1); }
  .who-clip { overflow:hidden; min-height:0; visibility:hidden; }
  .who-tgl:checked ~ .who-panel { grid-template-rows:1fr; }
  .who-tgl:checked ~ .who-panel .who-clip { visibility:visible; }
  .drop {
    margin-top:var(--s3); padding:var(--s4); border:1px solid var(--hair);
    border-radius:var(--r-sm); background:var(--surface); box-shadow:var(--shadow);
    display:flex; gap:var(--s4); align-items:flex-start;
  }
  .drop .avatar {
    width:38px; height:38px; border-radius:999px; flex:none; display:grid; place-items:center;
    background:var(--accent-soft); color:var(--accent); font-weight:700; font-size:13px;
    font-family:'JetBrains Mono', monospace;
  }
  .drop .head { font-size:13.5px; color:var(--muted); line-height:1.5; }
  .drop .links { display:flex; flex-wrap:wrap; gap:var(--s4); margin-top:var(--s2); font-size:13px; }
  .drop .links .channel { color:var(--muted); }
  .drop .links a.channel:hover { color:var(--ink); }
  .drop .open-profile {
    display:inline-flex; align-items:center; gap:6px; margin-top:var(--s3);
    font-size:13px; font-weight:600; color:var(--accent); text-decoration:none;
  }
  .drop .open-profile .ic { transition: transform .18s ease; }
  .drop .open-profile:hover .ic { transform: translateX(3px); }
  .post-title { font-size:27px; line-height:1.24; letter-spacing:-.022em; margin:var(--s5) 0 var(--s4); }
  .post-body { font-size:16.5px; line-height:1.72; color:var(--ink); margin:0; max-width:64ch; }
  @media (min-width:700px) { .post-title { font-size:34px; letter-spacing:-.028em; } }

  /* The shape the post page uses on a profile: same disclosure, same one-door rule. */
  .take-line { border-top:1px solid var(--hair); margin-top:var(--s4); padding-top:var(--s3); display:flex; flex-wrap:wrap; gap:var(--s2) var(--s3); align-items:baseline; }
  .take-person { display:inline-flex; align-items:baseline; gap:6px; color:var(--ink); text-decoration:none; }
  .take-person:hover { color:var(--accent); }
  .take-headline { color:var(--muted); font-size:13px; }
  .take-links { display:inline-flex; flex-wrap:wrap; gap:var(--s3); font-size:13px; }
  .take-links .channel { color:var(--muted); }
  .take-links a.channel:hover { color:var(--ink); }
  a.byline { color:inherit; text-decoration:none; }
  a.byline:hover b { color:var(--accent); }
  .person-card .person-line { color:var(--muted); margin:0 0 var(--s2); }
  .person-posts { list-style:none; padding:0; margin:0; }
  .person-post { display:flex; align-items:baseline; gap:var(--s3); padding:var(--s2) 0; border-top:1px solid var(--hair); font-size:14px; }
  .person-post a { color:var(--ink); }
  [data-theme="dark"] .take-person:hover { color:var(--accent); }

  /* --- the flash strip (see _topbar.html) -------------------------------------------
     A message the view set has to be able to appear, so this class is NOT scoped to the
     auth cards the way `.msg` above is: it renders on the board, the door, the profile.
     Tag names match Django's defaults (success/info/error/warning) AND the short forms
     the profile page already hardcodes (ok/err), so neither has to be renamed. */
  .flash { max-width:1100px; margin:var(--s4) auto 0; padding:0 var(--s4); }
  .flash .msg { border-radius:var(--r-sm); padding:var(--s3) var(--s4); font-size:13px; }
  .flash .msg.ok, .flash .msg.success { background:#E8F5E9; color:#1B5E20; border:1px solid #BFE3C2; }
  .flash .msg.err, .flash .msg.error { background:#FDECEA; color:#8C1D18; border:1px solid #F5C6C1; }
  .flash .msg.info, .flash .msg.warning { background:var(--accent-soft); color:var(--ink); border:1px solid var(--hair); }
  [data-theme="dark"] .flash .msg.ok, [data-theme="dark"] .flash .msg.success { background:#1B2E1C; color:#A5D6A7; border-color:#2E4A30; }
  [data-theme="dark"] .flash .msg.err, [data-theme="dark"] .flash .msg.error { background:#3A1D1A; color:#FFB4AB; border-color:#5C2A26; }
  [data-theme="dark"] .flash .msg.info, [data-theme="dark"] .flash .msg.warning { background:#2A2416; color:#F0D9A8; border-color:#4A3F22; }
  /* The card is an index; the post page is where you read. Two lines of body, then the
     title link takes you to the rest. The text stays in the DOM, so screen readers and
     search engines still get all of it -- only the pixels are cut. */
  #city-list .card .note { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .shelf-muted { color: var(--muted); }

  /* Right rail */
  /* The rail may never be taller than the window. A sticky element taller than
     the viewport pins with its tail below the fold, and no amount of scrolling
     brings it back: measured on prod, a 634px rail in a 454px window put the
     last card permanently out of view. Capping it and letting the *list* absorb
     the squeeze keeps the event card (and RSVP) on screen and the list
     reachable inside its own scroll. */
  .side {
    position: sticky; top: var(--chrome-h);
    align-self: start;                       /* sticky in a grid needs this */
    max-height: calc(100vh - var(--chrome-h) - var(--s4));   /* fallback */
    max-height: calc(100dvh - var(--chrome-h) - var(--s4));  /* dvh counts mobile chrome */
    display:flex; flex-direction:column; gap:18px;
  }
  /* RSVP must never be the thing that gets squashed, so the event card holds
     its full height and the news list is what shrinks and scrolls. */
  .side > .panel.event { flex: 0 0 auto; }
  .side > .panel:last-child {
    overflow-y: auto; min-height: 0;
    overscroll-behavior: contain;            /* don't chain the scroll to the page */
    scrollbar-width: thin;
  }
  .panel {
    background: rgba(255,255,255,.48);
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 28px; padding: 20px;
    box-shadow:
      0 0 0 1px rgba(20,18,12,.05),
      inset 0 1px 0 rgba(255,255,255,.9),
      0 20px 46px -14px rgba(20,18,12,.16);
  }
  [data-theme="dark"] .panel {
    background: rgba(34,30,23,.5);
    border-color: rgba(255,255,255,.14);
    box-shadow: 0 0 0 1px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.07), 0 20px 55px rgba(0,0,0,.55);
  }
  /* The board's warmest surface, and it must be able to WIN -- so it is written as
     `.panel.event`, not a bare `.event`. A bare `.panel { ... }` appended at the foot of this
     file overrode this gradient (and every frosted shell on the board) on source order alone,
     the two selectors weighing the same: measured 2026-10-10, the RSVP card rendered #FFFFFF.
     A generic `.panel` addition belongs ABOVE this rule or scoped to its own surface -- the
     composer learned that the expensive way, see `.compose .panel` at the foot of the file. */
  .panel.event {
    background:
      radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 60%),
      linear-gradient(165deg, color-mix(in srgb, var(--accent-soft) 60%, transparent), color-mix(in srgb, var(--surface) 45%, transparent) 70%);
    border-color: color-mix(in srgb, var(--accent) 35%, rgba(255,255,255,.7));
  }
  /* The mark on the event card wears the door page's two-weight treatment: the borrowed
     name in quiet grey, the owned words in ink. Amber belonged to the VOL.01 edition. */
  .event .vol { font-size:11px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); font-weight:400; }
  .event .vol b { color:var(--ink); font-weight:600; }
  .event h3 { font-size:20px; margin:var(--s2) 0 var(--s1); letter-spacing:-.02em; }
  .event .meta { font-size:13px; color:var(--muted); display:flex; flex-direction:column; gap:var(--s2); }
  /* The countdown is where the card's bulk sits, so it is sized to read as a
     glance strip rather than three big tiles: 91px of card height before,
     ~60px after. Structure is unchanged -- still three tiles, number over
     label, just tighter padding, smaller numerals and less margin. */
  .countdown { display:flex; gap:var(--s1); margin:var(--s2) 0; }
  .cd { background:var(--surface); border:1px solid var(--hair); border-radius:10px; padding:var(--s2) var(--s1); text-align:center; flex:1; }
  .cd b { font-family:'JetBrains Mono'; font-size:14px; display:block; line-height:1.15; }
  .cd span { font-size:9px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; line-height:1.2; }
  .panel h4 { font-size:13px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:var(--s3); }
  .hi { display:flex; align-items:center; gap:var(--s3); padding:var(--s2) 0; border-top:1px solid var(--hair); font-size:13px; }
  .hi:first-of-type { border-top:0; }
  .hi .dot { width:6px; height:6px; border-radius:50%; background:var(--accent); flex:none; }
  .hi .ic { color: var(--accent); }
  .hi a { color:var(--ink); text-decoration:none; }
  .hi a:hover { color: var(--accent); }

  /* Pager — Previous / Next at the foot of a feed. Plain links: the page number
     lives in the URL, so a view is shareable, the back button behaves, and it
     works on a slow phone with no JS. 44px targets, same rule as the island. */
  .pager {
    display:flex; align-items:center; justify-content:space-between; gap:var(--s3);
    padding-top: var(--s4); border-top: 1px solid var(--hair);
  }
  .pager .pg {
    display:inline-flex; align-items:center; min-height:44px; padding:0 var(--s4);
    border:1px solid var(--hair); border-radius:999px;
    background:var(--surface); color:var(--ink);
    text-decoration:none; font-size:13px; font-weight:600;
    transition: border-color .18s ease, color .18s ease;
  }
  .pager a.pg:hover { color:var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--hair)); }
  .pager .pg.off { color:var(--muted); opacity:.5; }
  .pager .pg-count { font-family:'JetBrains Mono'; font-size:12px; color:var(--muted); }

  /* Short windows. Measured: event card 335px, news list 245px (1440x800);
     209px and 123px once compacted (999x454).  available = window - chrome - gutter.
       below 480px  the 335px card leaves too little of the window for the news
                    list to be worth showing, so the card compacts to 209px
                    (date, venue and RSVP survive; the eyebrow and the
                    countdown's bulk do not) and stays pinned and reachable.
       below 320px  not even the compact card fits, so pinning buys nothing and
                    costs reachability — the rail scrolls with the page instead. */
  @media (max-height: 480px) {
    .event .vol { display:none; }
    .event { padding: var(--s4); }
    .event h3 { font-size:17px; margin: 0 0 var(--s2); }
    .event .meta { gap: var(--s1); font-size:12px; }
    .event .meta .mi:nth-child(3) { display:none; }   /* "Gqeberha · MEDAI × Datamind Labs" */
    .countdown { gap: var(--s1); margin: var(--s1) 0; }
    .cd { padding: var(--s1) var(--s2); }
    .cd b { font-size:13px; }
    .cd span { font-size:8px; }
  }
  @media (max-height: 320px) {
    .side { position: static; max-height: none; }
    .side > .panel:last-child { overflow-y: visible; }
  }

  /* Mobile */
  .tabbar { display:none; }
  @media (max-width: 900px) {
    .shell { grid-template-columns: 1fr; padding:var(--s4); }
    .rail, .side { display:none; }
    .search { display:none; }
    /* Installed as a PWA there is no browser chrome: viewport-fit=cover lets the
       layout viewport run under the status bar, so the band insets itself or the
       brand renders beneath the clock. env() is 0 in a tab and on desktop. */
    .topbar { padding: calc(var(--s3) + env(safe-area-inset-top, 0px)) var(--s4); }
    /* Stop the account buttons breaking mid-label: "Sign in" was wrapping to
       "Sign" / "in" once the band ran out of room at phone width. */
    .band-end .btn { white-space: nowrap; }
    /* The island is desktop navigation; below this width the .tabbar takes
       over, and two nav controls doing the same job would be worse than one. */
    .dock { display: none; }
    /* The same page margin the shell gives the feeds, at the same breakpoint. */
    body > main { padding: var(--s4); }
    .feed-head h2 { font-size:20px; }
    /* Mobile chrome — "island": 02 Glassmorphism material in dock form factor.
       Detached from the screen edges (left/right/bottom insets) rather than welded
       to the bottom, so it reads as a floating capsule of frosted glass.
       See ARCHITECTURE.md §10 for the decision and the reference sheet. */
    .tabbar {
      display:flex; position:fixed; z-index:50;
      left:var(--s3); right:var(--s3);
      bottom:calc(var(--s3) + env(safe-area-inset-bottom, 0px));
      padding:6px; gap:2px; justify-content:space-around;
      border-radius:999px;
      background:var(--surface);                                     /* fallback */
      background:color-mix(in srgb, var(--surface) 72%, transparent);
      -webkit-backdrop-filter:blur(14px) saturate(140%);
      backdrop-filter:blur(14px) saturate(140%);
      border:1px solid var(--hair);
      box-shadow:var(--shadow);
      /* The home-indicator inset belongs in `bottom` above and NOT again here. Paying it twice
         lifted the capsule off the screen edge AND added 34px of empty space inside it, so on
         an installed iPhone the bar grew tall and swallowed the last card -- the owner's
         "the nav becomes extra" in the home-screen version (2026-10-09). */
    }

    /* TRAVELLING BAR. The capsule gets out of the way while the reader is moving FORWARD through
       the feed and comes back the moment they pull back towards the head: it is there when a thumb
       reaches for it and not a moment longer. The class is set in home.html, never here and never
       by the server -- with JavaScript off the bar is simply always up, which is this sheet's rule
       for every behaviour on the board.
       It leaves DOWNWARDS, the way it came, and it exits the viewport rather than fading in place,
       so there is no half-there capsule parked over the last card. The offset pays the same
       home-indicator inset `bottom` pays above, plus its own height, or the tail of it would still
       be on screen on an installed iPhone.
       While it is away it takes no taps. An invisible 48px target that still swallows taps is worse
       than no bar at all: the reader taps a card and nothing happens.
       No reduced-motion guard of its own -- the sheet's global opt-out already kills the transition. */
    .tabbar { transition: transform .24s ease, opacity .2s ease; }
    .tabbar.nav-hidden {
      transform: translateY(calc(100% + var(--s3) + env(safe-area-inset-bottom, 0px) + 8px));
      opacity: 0;
      pointer-events: none;
    }
    /* The sheet's rule, treated as an acceptance criterion: >=48x48 tap targets.
       The old bar was a 20px icon in var(--s2) padding — well under this. */
    .tabbar a {
      flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
      gap:2px; min-height:48px; min-width:48px; padding:6px 4px;
      color:var(--muted); text-decoration:none; font-size:10px; font-weight:500;
      border-radius:999px;
      transition:color .18s ease, background-color .18s ease;
    }
    .tabbar a .ic { transition:transform .18s ease; }
    .tabbar a:active .ic { transform:scale(.9); }
    /* Hover on a section label reaches for the colour the create door wears at rest: ink,
       still no fill. One step towards "this does something", never a pill. */
    .tabbar a:hover { color:var(--ink); }
    /* Where you are: the ONE filled pill on the bar. Nothing else on it may take a fill --
       two black shapes made the reader ask which black meant what (owner, 2026-10-04). */
    .tabbar a.active { color:var(--bg); background:var(--ink); }
    .tabbar a.active:hover { color:var(--bg); }
    /* The create door: no background, just ink. It reads as an action by being darker than
       the section labels and by carrying the +, not by wearing a pill it has not earned. */
    .tabbar a.create { color:var(--ink); background:none; font-weight:600; }
    .tabbar a.create:hover { color:var(--ink); background:none; }
    .tabbar a.create:active { transform:scale(.96); }
    .tabbar a.create .ic { color:inherit; }
    .hide-sm { display:none; }
    /* The capsule floats above the home indicator, so the page needs room for BOTH the bar
       and that inset -- at 48px alone the last card ran underneath it on an installed iPhone. */
    body { padding-bottom:calc(var(--s8) + 48px + env(safe-area-inset-bottom, 0px)); }
  }

  /* --- Install hint: one line, one time, on the board only ------------------- */
  /* Whether this paints is decided on the device, in _install_hint.html: only a phone
     that is NOT already in the installed app, and has not dismissed it, ever sees it.
     The card reuses the board's own paper surface so it reads as part of the feed
     rather than as a banner sold to somebody. */
  .install-hint {
    display:flex; align-items:center; gap:var(--s3); flex-wrap:wrap;
    margin:0 0 var(--gap); padding:var(--s3) var(--s4);
    background:var(--surface); border:1px solid var(--hair);
    border-radius:var(--r-sm); box-shadow:var(--shadow);
  }
  .install-hint .ih-body { flex:1 1 220px; min-width:0; }
  .install-hint .ih-title { font-size:13px; font-weight:600; letter-spacing:-.01em; }
  .install-hint .ih-copy { color:var(--muted); font-size:12.5px; line-height:1.45; margin:2px 0 0; }
  /* The two words the reader has to FIND on their screen wear the amber as a chip, not as
     coloured text: --accent at 12px is ~2.9:1 on paper and would fail AA, while ink on
     --accent-soft clears it and still says "this bit, here". */
  .install-hint .ih-step {
    display:inline-block; padding:1px 6px; margin:0 1px;
    background:var(--accent-soft); color:var(--ink);
    border:1px solid var(--accent); border-radius:6px;
    font-weight:600; font-size:12px; white-space:nowrap;
  }
  .install-hint .ih-go {
    font:inherit; font-size:12.5px; font-weight:600; line-height:1.2;
    color:var(--bg); background:var(--ink); border:0;
    min-height:44px; padding:0 16px; border-radius:999px; cursor:pointer;
    display:inline-flex; align-items:center; justify-content:center;
  }
  .install-hint .ih-go:active { transform:scale(.97); }
  .install-hint .ih-x {
    font:inherit; font-size:12.5px; line-height:1.2; color:var(--muted);
    background:none; border:0; padding:0 4px; cursor:pointer;
    min-height:44px; min-width:44px;
    display:inline-flex; align-items:center; justify-content:center;
    text-decoration:underline; text-underline-offset:2px;
  }
  @media (hover:hover) { .install-hint .ih-x:hover { color:var(--ink); } }

  /* --- Account pages: signup / login / profile ------------------------------ */
  a.brand { text-decoration:none; color:inherit; }
  a.profile { text-decoration:none; color:inherit; display:block; }
  .inline { display:inline; margin:0; }

  .auth { display:grid; place-items:center; padding:var(--s6) var(--s4) var(--s8); min-height:70vh; }
  .auth-card {
    width:100%; max-width:430px;
    background:var(--surface);                                       /* fallback */
    background:color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
    border:1px solid var(--hair); border-radius:var(--radius);
    box-shadow:var(--shadow); padding:var(--s6);
  }
  .auth-card h1 { font-family:'Satoshi'; font-size:26px; letter-spacing:-.02em; margin:0 0 var(--s1); }
  .auth-card .sub { color:var(--muted); font-size:13px; margin:0 0 var(--s5); line-height:1.5; }

  .field { display:block; margin-bottom:var(--s4); }
  .field > span:first-child {
    display:block; font-size:11px; font-weight:600; color:var(--muted);
    text-transform:uppercase; letter-spacing:.06em; margin-bottom:var(--s2);
  }
  .field input, .field textarea {
    width:100%; font:inherit; font-size:15px; color:var(--ink);
    background:var(--bg); border:1px solid var(--hair); border-radius:var(--r-sm);
    padding:12px 14px; min-height:48px;       /* 48px target, same rule as the island */
  }
  .field textarea { min-height:110px; resize:vertical; }
  .field input:focus, .field textarea:focus {
    outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft);
  }
  .field em.err { display:block; font-size:12px; font-style:normal; color:#B3261E; margin-top:var(--s2); }
  .helptext { display:block; font-size:11px; color:var(--muted); margin-top:var(--s2); line-height:1.5; }
  .helptext ul { margin:var(--s1) 0 0; padding-left:var(--s4); }

  .btn.wide { width:100%; justify-content:center; min-height:48px; }

  .msg { border-radius:var(--r-sm); padding:var(--s3) var(--s4); font-size:13px; margin-bottom:var(--s4); }
  .msg.err { background:#FDECEA; color:#8C1D18; border:1px solid #F5C6C1; }
  .msg.ok  { background:#E8F5E9; color:#1B5E20; border:1px solid #BFE3C2; }
  .auth-card .alt { font-size:13px; color:var(--muted); margin-top:var(--s5); text-align:center; }
  /* An action inside prose is type, not a hyperlink. The underline in this board is reserved
     for the things you READ and follow -- a post title, a person's name -- so an affordance
     sitting in a sentence ("your public profile", "Add a channel") drops it: the arrow in the
     text already says it goes somewhere, and a browser-default underline reads as a link from
     another site. */
  .alt-link { color:var(--ink); text-decoration:none; font-weight:600; }
    .alt-link:hover { color:var(--accent); }

      /* THE EDIT PAGE IS A FORM, SO ITS HEAD SITS ON THE FORM'S EDGE. .auth-card is centred because
         sign-in is one centred decision; the profile page is a column of labelled fields, and a
         centred head above left-aligned labels reads as two pages stacked on top of each other. The
         head takes the same leading edge as the labels, and the two groups are separated by more
         than they are held together: 12px inside the head, 24px between the head and the first
         field. That gap was 0 before -- the line that points at the public page carried no bottom
         margin, so it collided with DISPLAY NAME. */
      .auth-card.form-page h1,
      .auth-card.form-page .sub,
      .auth-card.form-page .alt { text-align:start; }
      .auth-card.form-page .sub { margin-bottom:var(--s3); }
      .auth-card.form-page .alt { margin-top:var(--s5); }
      .see-page {
        text-align:start; font-size:13px; color:var(--muted);
        margin:0 0 var(--s6); line-height:1.5;
      }

  [data-theme="dark"] .field input, [data-theme="dark"] .field textarea { background:var(--surface); }
  [data-theme="dark"] .msg.err { background:#3A1D1A; color:#FFB4AB; border-color:#5C2A26; }

  /* --- the connect layer: replies (ARCHITECTURE_confirmed.md §3, §6) ----------------- */
  .sr-only {
    position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
    clip:rect(0 0 0 0); white-space:nowrap; border:0;
  }
  .replies { margin-top:24px; }
  /* The heading row: the word, the count when one exists, and -- when the list has no rows --
     the sentence that used to be an empty <li>. A row cannot say "be the first" on behalf of
     a list that has no rows, and an <ol> that exists to hold nothing is the same empty slot
     the aged card's grey square was. */
  .replies-head { display:flex; align-items:baseline; gap:var(--s3); flex-wrap:wrap; margin:0 0 var(--s3); }
  .replies-head .replies-h { margin:0; }
  .quiet { font-size:13.5px; color:var(--muted); margin:0; }
  .replies-h {
    display:flex; align-items:center; gap:var(--s3); font-size:15px; letter-spacing:.02em;
    margin:0 0 var(--s3); color:var(--ink);
  }
  .replies-h .tally {
    font-size:12px; font-weight:700; color:var(--muted);
    border:1px solid var(--hair); border-radius:999px; padding:2px 9px;
  }
  /* The composer is one surface, not a bare box: the field sits inside it borderless and the
     foot is divided by a hairline, so the box reads as the thing you are writing in. The
     reordering (`order:-1` on the hint) is what puts the sentence under the field on the
     LEFT and the button on the RIGHT: the markup order is button-then-hint because that is
     the order a screen reader should hear (act, then consequence). */
  .composer {
    margin:0 0 var(--s4); padding:var(--s3); border:1px solid var(--hair);
    border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow);
    transition: border-color .18s ease, box-shadow .18s ease;
  }
  .composer:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft), var(--shadow); }
  .composer textarea {
    width:100%; font:inherit; font-size:15px; line-height:1.55; color:var(--ink);
    background:transparent; border:0; border-radius:0;
    padding:var(--s2) var(--s2) 0; min-height:96px; resize:vertical;
  }
  .composer textarea:focus { outline:none; }
  .composer-foot {
    display:flex; align-items:center; gap:var(--s4); flex-wrap:wrap;
    margin-top:var(--s2); padding:var(--s3) var(--s2) var(--s1);
    border-top:1px solid var(--hair);
  }
  .composer-foot .hint { order:-1; flex:1; font-size:12px; color:var(--muted); line-height:1.5; }
  .replies .err { color:#B3261E; font-size:13px; margin:0 0 var(--s2); }
  .signin-line {
    font-size:14px; color:var(--muted); margin:0; padding:var(--s4);
    border:1px dashed var(--hair); border-radius:var(--r-sm); line-height:1.6;
  }
  .signin-line a { color:var(--ink); font-weight:600; }
  .reply-list {
    list-style:none; margin:var(--s4) 0 0; padding:0;
    display:flex; flex-direction:column; gap:var(--s4);
  }
  .reply { border-top:1px solid var(--hair); padding-top:var(--s4); }
  .reply-top {
    display:flex; align-items:baseline; gap:var(--s3); font-size:13px;
    color:var(--muted); margin-bottom:var(--s2);
  }
  .reply-top b { color:var(--ink); font-size:14px; }
  .reply-body { font-size:15px; line-height:1.6; margin:0; color:var(--ink); }
  /* .reply-list .empty is GONE with the empty <li> it styled: the empty state is the sentence
     in the heading row now (.quiet), so nothing renders an empty row to hold it. */
  /* Landing on the reply you just wrote. One honest cue, no theatre: a left rule, nothing
     that pretends the page did something it did not. */
  .reply:target { border-left:2px solid var(--accent); padding-left:var(--s4); }
  [data-theme="dark"] .composer textarea { background:var(--surface); }
  [data-theme="dark"] .msg.ok  { background:#1B2E1C; color:#A5D6A7; border-color:#2E4A30; }

  /* ---- THE PERSON PAGE (item 2: the public profile as a stranger sees it) ----------------
     The rules the approved mock was drawn with, scoped under .person-page so that nothing
     here can reach the city feed, the post page or the dock. A profile is its own page, so
     it carries its own measure: 720px, the same one the post page reads at.

     Colour comes from the tokens, so the dark theme is inherited rather than restated --
     every rule below flips with the theme because none of them names a literal colour. */
  .person-page {
    display:flex; flex-direction:column; gap:var(--s8);
    max-width:720px; margin:0 auto; padding:28px 26px;
  }
/* THE SECTION BREAK IS A STEP, NOT A NUDGE. Inside a block the caption sits 8px off its content
   (and a caption inside a list 12px off its rows), so the space BETWEEN blocks has to be a
   different order of magnitude or the page reads as one long crowded column -- at 20-24px the
   break was barely 2.5x the in-block gap and the eye could not tell where a section started.
   48px against 8-12px is a 4-6x step (owner's call, after reading 32px: still tight), and it is
   the same token everywhere -- the <=900 override that shrank the break to 20px is gone, so the
   page's rhythm is one value at every width. */
  /* One way back, from the head of the page's own content. Quiet: borderless until you look
     at it, then it inks in -- never a pill, and never in the band. */
  .person-page .back-circle {
    width:38px; height:38px; border-radius:999px; border:1px solid var(--hair);
    background:var(--surface); display:inline-flex; align-items:center; justify-content:center;
    color:var(--ink); box-shadow:var(--shadow);
  }
  .person-page .page-back:hover .back-circle { border-color:var(--accent); color:var(--accent); }

/* ONE WAY BACK, CUT TO ITS OWN WIDTH. .page-back is an inline-flex control, but .person-page is
   a flex COLUMN, and a flex item is blockified and stretched across the cross axis whatever its
   display says -- so this control measured 362px wide on a 390px phone and its hover fill
   painted a full-width bar under the band instead of a pill around "The City". align-self is
   the whole fix: the control keeps its inline-flex shape and its hover stays inside its own
   words. The -8px left margin still lines the arrow up with the page's content edge. */
  .person-page .page-back { align-self:flex-start; }

/* A SECTION CAPTION'S SPACE BELONGS TO THE BLOCK, NOT TO THE CAPTION. In The City is a heading
   inside a .p-block now, and the block's own gap (8px) already holds it off the rows it names.
   Left with its own 12px bottom margin, that margin would add to the block gap and push the
   heading back toward the section above -- the same inverted proximity, one level down. */
  .person-page .p-block .replies-h { margin:0; }
  .person-page .p-head {
    display:flex; align-items:center; justify-content:space-between; gap:var(--s3);
    padding-bottom:var(--s3); border-bottom:1px solid var(--hair);
  }
  .person-page .p-head .mono {
    font-size:11px; letter-spacing:.14em; color:var(--muted); text-transform:uppercase;
  }
  /* A person is not a post: the amber freshness square marks a card as "new", and on a
     profile it would be a count the rows cannot produce. The card keeps its hairline and
     loses the corner. */
  .person-page .card.person-card::after { display:none; }
  .person-page .p-id { display:flex; align-items:center; gap:var(--s4); }
  .person-page .p-id-text { min-width:0; }
  .person-page .avatar {
    width:64px; height:64px; flex:0 0 auto; border-radius:999px; background:var(--accent-soft);
    color:var(--accent); display:inline-flex; align-items:center; justify-content:center;
    font-size:26px; font-weight:700; letter-spacing:0;
  }
  .person-page .p-id h1 {
    font-size:34px; line-height:1.02; letter-spacing:-.02em; margin:0;
    overflow-wrap:anywhere;
  }
  .person-page .p-meta {
    margin:6px 0 0; font-size:11px; letter-spacing:.12em; color:var(--muted);
    text-transform:uppercase;
  }
  .person-page .p-handle { margin:4px 0 0; font-size:12px; color:var(--muted); }
  .person-page .p-block { display:flex; flex-direction:column; gap:var(--s2); }
  .person-page .p-cap {
    margin:0; font-size:11px; font-weight:600; letter-spacing:.14em; color:var(--muted);
  }
  /* The reach row: ink only, the channel's own glyph and name, and an outbound arrow because
     the link genuinely leaves the board. One entry per channel the person published. */
  .person-page .p-reach {
    list-style:none; margin:0; padding:0;
    display:flex; flex-wrap:wrap; gap:var(--s2) var(--s5);
  }
  .person-page .p-reach li { display:flex; align-items:center; gap:8px; }
  .person-page .p-reach a {
    display:inline-flex; align-items:center; gap:8px; color:var(--ink);
    text-decoration:none; font-size:15px;
  }
  .person-page .p-reach a:hover { color:var(--accent); }
  .person-page .p-reach .out { color:var(--muted); }
  .person-page .p-reach a:hover .out { color:var(--accent); }
  .person-page .p-reach .tag {
    font-size:10px; letter-spacing:.1em; color:var(--accent);
    background:var(--accent-soft); border-radius:999px; padding:2px 7px;
  }
  /* CURRENT ASK and REACH OUT are one move -- what I need, and how to give it to me. They sit
     closer to each other than to the blocks around them so the pair reads as a single offer.
     The template applies .p-answer only when both are actually present, so the pull can never
     lie about a pair that is not there. */
  .person-page .p-answer { margin-top:calc(-1 * var(--s3)); }
  @media (max-width:900px) {
    .person-page { padding:20px 18px; }
    .person-page .p-id h1 { font-size:28px; }
    .person-page .avatar { width:54px; height:54px; font-size:22px; }
  }

/* ---------------------------------------------------------------------------------------------
   THE BAND'S FLOOR.

   Signed out, the band carries the masthead plus three controls (Sign in, Join, theme). The
   Sign in door cost the wordmark 42px of its grid track, and a brand name that breaks across
   two lines stops reading as a brand -- "FOUNDERS / TALK" stacked under the clock is not the
   wordmark anyone drew. So below this width the masthead steps down a size and stops breaking,
   and the two account doors give back horizontal padding they do not need at thumb size: a
   44px-tall target does not get better for having 18px of air beside its label.

   Measured, not guessed: at 420 and below this keeps the wordmark on one line, keeps the 16px
   page gutter at BOTH edges, wraps no label, and overflows nothing -- at 414, 375, 360 and 320.
   Above 420 the band has room and none of this applies.
   --------------------------------------------------------------------------------------------- */
@media (max-width: 420px) {
  .brand .name { font-size:11px; white-space:nowrap; }
  .band-end { gap:4px; }
  .band-end .btn { padding-left:10px; padding-right:10px; }
}
/* The narrowest phones the band is asked to serve: at 320 the wordmark steps down once more so
   IT gives way rather than the doors -- a masthead can be small, a way in cannot be gone. */
@media (max-width: 340px) {
  .brand .name { font-size:10px; }
}
/* ============================================================================================
   POST COMPOSER (post/new) -- the writing surface and the decisions stop competing for one
   430px column. Left card: what you are writing. Right rail: where it goes, who it is from,
   and the action. The rail is sticky, so on a long post "Post it" never leaves the screen;
   below 900 the rail drops under the body and the action sticks to the bottom edge.
   Same tokens as the rest of the board -- no new colours, no new face, no new radius.
   -------------------------------------------------------------------------------------------- */
/* .auth centres its single card with place-items:center -- right for a 430px auth card, wrong
   for a two-column composer: it shrink-wraps the form (824px of 1096) and centres it. Reset. */
.compose { display:block; place-items:normal; max-width:1128px; margin:0 auto; padding:var(--s6) var(--s4) var(--s8); }
.compose-grid { display:grid; width:100%; grid-template-columns:minmax(0,1.5fr) 296px; gap:var(--s6); align-items:start; }
/* SCOPED, and the scope is load-bearing. Written bare as `.panel` at the foot of the file this
   redefined the BOARD's panel for every page -- equal specificity, later source order -- which
   flattened the event card's gradient and every frosted shell to flat #FFFFFF. The composer's
   surface (opaque, tighter radius, roomier padding) is a decision about THIS form, so it is
   scoped to THIS form. A bare `.panel` here is a global change wearing a local intention. */
.compose .panel { background:var(--surface); border:1px solid var(--hair); border-radius:18px;
                  box-shadow:var(--shadow-border); padding:var(--s6); }
.compose-main h1 { font-family:'Satoshi'; font-size:30px; letter-spacing:-.02em; margin:0 0 var(--s1); }
.compose-main .sub { margin-bottom:var(--s5); }
.compose-rail { position:sticky; top:var(--s5); display:flex; flex-direction:column; gap:var(--s4); }
/* a section of the form: label, control, help -- divided so three decisions read as three */
.group + .group { margin-top:var(--s5); padding-top:var(--s5); border-top:1px solid var(--hair); }
.field-lbl { display:block; font-size:11px; font-weight:600; color:var(--muted);
             text-transform:uppercase; letter-spacing:.06em; margin-bottom:var(--s2); }
/* KIND -- a RadioSelect, worn as a segmented control. Each option keeps the dot colour its
   post will actually carry in the feed, so the choice is legible before it is made. */
.seg { display:inline-flex; gap:4px; padding:4px; background:var(--bg);
       border:1px solid var(--hair); border-radius:999px; }
.segopt { position:relative; display:inline-flex; }
.segopt input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.segopt .seglbl { display:inline-flex; align-items:center; gap:8px; padding:10px 16px;
                  border-radius:999px; font-size:14px; font-weight:600; color:var(--muted); }
.segopt input:checked + .seglbl { background:var(--surface); color:var(--ink);
                                 box-shadow:0 1px 3px rgba(20,18,12,.10); }
.segopt input:focus-visible + .seglbl { outline:2px solid var(--accent); outline-offset:2px; }
.segopt .d { width:7px; height:7px; border-radius:50%; background:var(--k, var(--muted)); opacity:.45; }
.segopt input:checked + .seglbl .d { opacity:1; }
.segopt[data-k="ask"]  { --k:var(--ask); }
.segopt[data-k="tell"] { --k:var(--tell); }
.segopt[data-k="show"] { --k:var(--show); }
/* SHELF -- four values, so four choices you can see rather than a native select */
.chipset { display:flex; flex-wrap:wrap; gap:var(--s2); }
.chipopt { position:relative; display:inline-flex; }
.chipopt input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.chipopt span { display:inline-block; padding:9px 15px; border:1px solid var(--hair);
                background:var(--bg); border-radius:999px; font-size:13px; font-weight:600; }
.chipopt input:checked + span { background:var(--accent-soft); border-color:var(--accent); color:var(--accent); }
.chipopt input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
/* who it will be from */
.who { display:flex; align-items:center; gap:var(--s3); }
.who .av { width:40px; height:40px; border-radius:999px; background:var(--accent-soft); color:var(--accent);
           display:grid; place-items:center; font-weight:700; font-size:17px; flex:none; }
.who .nm { font-weight:600; font-size:14px; }
.who .hn { font-size:12px; color:var(--muted); }
.count { display:block; text-align:right; font-size:11px; color:var(--muted);
         font-variant-numeric:tabular-nums; margin-top:var(--s2); }
.count.over { color:#B3261E; }
/* links in the composer wear board ink, not the browser default blue */
.compose a { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
/* A LINK INSIDE SOMEBODY'S WORDS. Bodies are written by people now, and the first real
   City post is an event whose whole point is a ticketing URL -- so the URL has to read as
   a link in the card and on the post page, not as grey text that looks like a typo. Same
   treatment as .compose a: the accent, and underlined as well as coloured, because colour
   alone is not a signal everybody receives. word-break keeps a long ticket URL from making
   a phone-width card scroll sideways. */
.note a, .post-body a, .reply-body a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
  word-break: break-word;
}
.compose .rail-actions a { color:var(--muted); font-size:13px; }
.rail-actions p.alt { margin:var(--s2) 0 0; text-align:center; }
@media (max-width: 900px) {
  .compose { padding:var(--s5) var(--s3) var(--s7); }
  .compose-grid { grid-template-columns:1fr; gap:var(--s5); }
  .compose-rail { position:static; }
  .seg { width:100%; justify-content:space-between; }
  .segopt { flex:1; } .segopt .seglbl { width:100%; justify-content:center; }
  /* No sticky action bar on phones: measured at 390/566/900, the pinned card landed on top of
     the Shelf panel (its natural position is below the fold, so bottom:0 lifted it over its own
     siblings -- overlap [Shelf, actions] at all three widths). The action stays in flow after
     the fields instead: one scroll, and no control hidden behind another. */
}

/* THE TOMBSTONE (CityPost.deleted_at, board/models.py). One rule on two surfaces: a removed
   post keeps its PLACE -- in the feed and in its thread -- and says so. So the card keeps
   its geometry and loses its surface: a dashed edge instead of a shadow, muted ink, no kind
   chip, no body. Nothing is greyed out in place as if it were still readable, because it is
   not readable: the words are gone and the only true thing left to print is what happened.
   A dashed edge is the point -- a solid one would make a removal look like a design choice. */
.card.removed { border:1px dashed var(--hair); background:transparent; box-shadow:none; }
.card.removed .tombstone-h { margin:0; font-size:15px; font-weight:600; color:var(--muted); }
.card.removed .note, .post-removed .note { color:var(--muted); font-size:13px; }
.post-removed {
  margin-top:var(--s3); padding:var(--s5);
  border:1px dashed var(--hair); border-radius:var(--radius);
}
.post-removed h1 { margin:0 0 var(--s2); font-size:19px; font-weight:600; color:var(--muted); }
.post-removed .note { margin:0; }

/* YOUR OWN REMOVAL CONTROL. Quiet, at the end of your own post, where nobody else sees it:
   no red, because this is not an error and the page should not shout at the person who wrote
   it. It leads to the confirmation page, which is where the cost gets stated. */
.remove-door { margin:var(--s5) 0 0; font-size:13px; }
.remove-door a { color:var(--muted); }
.remove-door a:hover { color:var(--ink); }
.remove-door .sep { opacity:.55; margin:0 7px; }

/* THE BOARD'S OWN CONTROLS. Same restraint as the author's removal control and for the same
   reason -- moderation is not an event the page should shout about -- but quieter still,
   because this one acts on somebody ELSE's words. It sits with the card's or the post's own
   furniture rather than standing on its own line, and it carries no red: the undo is one
   click away, so the interface has nothing to warn about. */
/* Inside .card-foot, which is already a flex row with a gap: the margin only made the button
   sit further from its neighbours than every other item in the row. */
.mod { display:inline; }
.mod-door {
  appearance:none; background:none; border:0; padding:0; cursor:pointer;
  font:inherit; font-size:13px; color:var(--muted);
  text-decoration:underline; text-underline-offset:2px;
}
.mod-door:hover { color:var(--ink); }
.mod-door:focus-visible { outline:var(--focus-ring); outline-offset:2px; }
/* On the post page there is no furniture to sit beside, so it takes its own quiet line. */
.mod-post { margin:var(--s4) 0 0; }
.mod-post .mod { margin:0; }


/* ── Mobile byline ──────────────────────────────────────────────────────────────
   These live at the END of the sheet on purpose. Cascade order, not specificity, is what
   makes them win: the base .who rules are declared far above, so an @media block placed up
   there with the other breakpoints (where it reads better) is silently overruled by them.
   Measured at a 320px viewport: the row is 273px of content, a 24-character handle wants
   174px on its own, the time wants 113 and the chip 50. They cannot all be full length, so
   the name keeps a 72px window to slide inside and the connective words go. */
@media (max-width: 480px) {
  /* The freshness square is lifted clear of this row at this width (see .post::after), and
     the 26px it reserved is dead space in exactly the row where space is scarcest. */
  .idrow { gap:6px; padding-right:0; }
  /* The byline shrinks when the row is tight, but it must never GROW into slack: with the
     pill at 1 1 auto it ate every spare pixel and shoved "in Builders . 1h" against the far
     edge, leaving a hand's width of nothing between the handle and the shelf. */ 
  .who { padding:1px 8px 1px 7px; gap:4px; flex:0 1 auto; }
  /* Below ~72px the window stops reading as a name at all, so the time is the one thing
     that never gives ground. */
  .who .nm { min-width:72px; flex:0 1 auto; }
  .idrow .meta { gap:5px; flex:none; }
  .idrow .chip { padding-left:9px; padding-right:9px; flex:none; }
}
@media (max-width: 430px) {
  /* Mobile only. Under ~430px the connective words ARE the space: drop the 'by', keep
     'in <shelf>' -- which shelf a post is filed under is the one thing in this row a reader
     cannot infer from anything else on the page. The time pays for it: it prints the card's
     own short age (33m, not "33 minutes"), which buys back more room than 'in' costs. */
  .who .by-word { display:none; }
}
@media (max-width: 360px) {
  /* The floor. At 320-360px the row cannot hold the preposition and the full name at once,
     but the shelf name itself is the one thing on the page that says where the post lives,
     so it stays and the word 'in' is what goes. What is left borrows the shelf row's own
     gesture: one line, scrolled sideways, no scrollbar, the cut edge soft under a mask. */
  .idrow .meta .shelf-bit .pre { display:none; }   /* the preposition is the last word to go */
  .idrow .meta { flex: 0 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap;
                 scrollbar-width: none; -webkit-overflow-scrolling: touch;
                 mask-image: linear-gradient(to right, #000 88%, transparent 100%);
                 -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%); }
  .idrow .meta::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .who .nm.can-roll .nm-in { animation:none; }
  .who .nm.can-roll { -webkit-mask-image:none; mask-image:none; }
}

/* ── The shelf picker ───────────────────────────────────────────────────────────
   Chips for the shelves we put in front of people, and one narrow field under them for a
   shelf nobody has needed yet. The field is deliberately quieter than the chips: naming a new
   shelf is the exception, not the path of least resistance, and every new shelf is one the
   filter row has to carry from then on. */
.shelf-new { margin-top: var(--s3); max-width: 320px; }
.shelf-new > span { display:block; font-size:11px; font-weight:600; color:var(--muted);
                   letter-spacing:.06em; text-transform:uppercase; margin-bottom:var(--s2); }
.shelf-new input { font-size:14px; min-height:44px; }
@media (max-width: 560px) {
  .shelf-new { max-width: none; }
  /* Nine shelves will not fit three-to-a-line on a phone without eating the top of the feed.
     One row that scrolls is the same information in one line's worth of height -- and it is
     where the thumb already is, so the extra shelves cost a swipe rather than a scroll. */
  .shelf-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
               -webkit-overflow-scrolling: touch; }
  .shelf-row::-webkit-scrollbar { display: none; }
  .shelf-row .shelf-chip { flex: 0 0 auto; }
}

/* ── The shelf row reads as a set of doors ──────────────────────────────────────
   Each chip carries its own count, because "Quantum" tells a reader nothing about whether
   the tap is worth it and "Quantum 1" does. On a phone the row stays one line and the last
   chip is cut under a soft mask -- that fade is the affordance. A row that ends flush with
   the edge reads as finished, and everything past it may as well not exist. */
.shelf-row { position: relative; gap: 10px; }
/* Slightly tighter than the 12px default so all six shelves in this city fit the desktop
   column as one row -- a single orphaned "General" on a second line reads as a mistake. */
.shelf-chip { display: inline-flex; align-items: center; gap: 7px; padding-inline: 13px; }
.shelf-n { font-size: 10.5px; letter-spacing: .04em; opacity: .6;
           font-variant-numeric: tabular-nums; }
.shelf-chip.active .shelf-n { opacity: .75; }

/* ── The gather row ─────────────────────────────────────────────────────────────
   The event's state as CONTENT, not chrome (owner's call, 2026-11-02). It used to be a
   floating dark pill -- "LAST 17 Oct" -- pinned under the topbar, in the same corner as
   the sort control, counting down to an event that had already happened. Two unrelated
   things in the highest-value corner of a phone is what read as cramped.

   In the flow it behaves like everything else the reader came for: it scrolls away, it
   costs no permanent pixels, and it cannot go stale without being seen. One muted line,
   the date set in ink, and a link to the full clock on the event surface.

   It hides at 901px and up because the rail's event card is right there carrying the same
   fact -- the row exists to replace what the rail cannot reach on a phone. */
.gather-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 0 11px; margin-bottom: 2px;
  border-bottom: 1px solid var(--hair);
  font-size: 13px; line-height: 1.45; color: var(--muted);
  animation: gr-in .28s ease both;
}
@keyframes gr-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gather-row { animation: none; } }

.gather-row .gr-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--accent); transform: translateY(-1px);
}
/* The dot reports state in the same colour language the capsule used: live is accent,
   finished is quiet. Never a second status sentence -- the line itself says which one. */
.gather-row[data-state="closed"] .gr-dot,
.gather-row[data-state="undated"] .gr-dot { background: #8A857A; }

.gather-row .gr-label { color: var(--muted); }
/* The outcome, on the same line as the date, so a closed gather says what happened as
   well as when it happened. Separated by a middot rather than wrapped in chrome. */
.gather-row .gr-note { color: var(--muted); }
.gather-row .gr-note:not([hidden])::before { content: "·"; margin: 0 .35em; opacity: .55; }
.gather-row b {
  color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gather-row a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* The countdown div stays mounted so the shared tick can drive the row, but the row is a
   sentence, not a clock: the three cells live on the event surface. Kept out of the
   accessibility tree for the same reason -- announcing "0 days 0 hrs 0 min" beside a
   sentence that already says the date is noise, not information. */
.gather-row .gr-clock,
.gather-row .gr-cap {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

@media (min-width: 901px) { .gather-row { display: none; } }

/* The tablet/laptop middle is the tight case: the board column is ~489px, which is wide
   enough for a wrapped second row of exactly one chip -- the one arrangement that reads as a
   mistake rather than a decision. Tighten rather than orphan. */
@media (min-width: 561px) and (max-width: 1199px) {
  .shelf-row { gap: 6px; }
  .shelf-chip { padding-inline: 10px; gap: 6px; }
}

@media (max-width: 560px) {
  .shelf-row {
    gap: 10px;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
            mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 26px), transparent 100%);
  }
  /* 44px is the thumb target; 10px is what keeps two adjacent chips from reading as one. */
  .shelf-chip { min-height: 44px; padding-inline: 15px; scroll-snap-align: start; }
}

/* ── The clock, on a phone: capsule by default, bar on tap ──────────────
   The event card is rail furniture, and the 900px block above deletes the rail
   (.rail, .side { display:none }) -- which took the countdown with it, on every
   handset, silently. So the mobile form is a floating capsule below the topbar:
   one fact, ~100px, OUT of the feed's flow, so it can never reflow a post and never
   spends the top of the feed saying "thank you" about a past gather.
   Tap (it is a real <button>, so keyboard and screen readers get it too) opens the
   bar. Scrolling down hides it entirely; scrolling up brings it back, collapsed.
   Desktop keeps the rail card; display:none above 900px, so the two never double up. */
.clock-float { display: none; }

@media (max-width: 900px) {
  .clock-float {
    display: block; position: fixed; z-index: 45;
    top: calc(66px + env(safe-area-inset-top, 0px));
    right: var(--s3);
    /* Real estate: never wider than the room between the insets. */
    max-width: calc(100vw - var(--s3) * 2);
    transition: transform .2s ease, opacity .2s ease;
  }
  .clock-float.away { transform: translateY(-180%); opacity: 0; pointer-events: none; }

  .clock-capsule {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--ink); color: var(--bg);
    border: 0; border-radius: 999px; padding: 7px 13px 7px 10px;
    font: inherit; font-size: 12px; line-height: 1; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 10px 24px -10px rgba(20, 18, 12, .55);
  }
  .clock-capsule:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .clock-capsule .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: 0 0 auto;
  }
  /* A closed gather is not an alert: the dot goes quiet with the state. */
  .clock-float[data-state="closed"] .clock-capsule .dot { background: #8A857A; }
  .clock-capsule .k {
    font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .62;
  }
  .clock-capsule b {
    font-size: 12px; font-weight: 600; letter-spacing: -.01em;
    font-variant-numeric: tabular-nums; white-space: nowrap;
  }

  .clock-panel {
    position: absolute; top: calc(100% + var(--s2)); right: 0;
    width: min(calc(100vw - var(--s3) * 2), 360px);
    background: var(--surface); border: 1px solid var(--hair);
    border-radius: var(--r-sm); padding: var(--s3);
    box-shadow: var(--shadow);
  }
  .clock-panel[hidden] { display: none; }
  .clock-panel .cb-top {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: var(--s2); margin-bottom: var(--s2);
  }
  .clock-panel .cb-lab {
    display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
    font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  }
  .clock-panel .cb-lab .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  }
  .clock-panel .cb-when { font-size: 12px; color: var(--muted); text-align: right; }
  /* The panel supplies its own card, so the partial's own margins are dropped. */
  .clock-panel .countdown { margin: 0; }
}

/* Narrow handsets: the date wraps under the label instead of squeezing it. */
@media (max-width: 380px) {
  .clock-panel .cb-top { flex-direction: column; align-items: flex-start; gap: 2px; }
  .clock-panel .cb-when { text-align: left; }
}
