/* app.css — hand-authored styles for the customer portal.
   No build step: this file is shipped byte-for-byte in the Go binary (BOARD.md 2026-09-06 styling
   decision — no Tailwind CLI, no Alpine.js).

   VISUAL DIRECTION "AE" (2026-10-10, approved by the user from a canvas of nine designs; the spec
   and the design files are in web-updates-handoff/). It replaces direction G. What changed, and
   why each value is what it is:

   - THE ACCENT IS BLUE #4f8cff, not periwinkle #7f8cff. It is only ever used as a tint: icon tiles
     at 14%, badges at 16%, a selected row at 9-12%, the focus ring at 40%. Nothing large is painted
     in it, which is why the switch is a one-line change here rather than a repaint.
   - PRIMARY BUTTONS ARE LIGHT, not accent: #eef0f4 fill with #07080b text, hover
     filter: brightness(1.12). The accent never has to carry text contrast, so the old
     --brand-contrast problem (white on #7f8cff is 2.96:1) cannot recur — no button is accent-coloured.
   - THE FONT IS FIGTREE 400/500/600. Plus Jakarta Sans and DM Mono are both gone from the font
     link in base.html. --font-mono is KEPT, now as a system monospace stack with no webfont: <code>
     and <pre> in the docs still need a real monospace, and so do the tabular values the dashboard
     renders, but neither is worth a second network font.
   - THE GROUND IS DARKER (#07080b, was #08080a) and the surfaces are cooler. Six borders instead
     of two, because this design separates things with hairlines rather than with elevation.

   AE IS A DARK DESIGN, AND THE ONLY DESIGN. Unchanged from G and for the same reason: there is
   deliberately no light palette and no theme toggle. A light variant is a second design nobody has
   drawn, and under a prefers-color-scheme branch every visitor whose OS prefers light would get it.
   One palette means the status colours, the accent tints and the card shadows only ever have to
   work against one ground.

   WEIGHT BUDGET (2026-10-10, tightened from the earlier "the current font is okay just dont use
   the bold version too much"): 400 body, 500 labels/buttons/nav/card titles/section headings, 600
   ONLY page h1s and price figures, NEVER 700+. Figtree is not loaded above 600, so a stray
   font-weight:700 renders as synthetic bold and will look wrong — that is the intended guard rail.

   NAMING: the tokens below are the AE names (--surface/--raised/--inset/--border-strong/…). The
   pages that were NOT redesigned in this pass — the whole customer area, docs, status, checkout and
   the legal pages — are styled further down this file against the OLD G names, so those are kept as
   aliases pointing into the new palette. That is what makes them pick up AE without a line of their
   own CSS changing. Do not delete the alias block; retire it by rewriting the rules that use it. */

:root {
  /* -------------------------------------------------------------- AE palette (dark, the only one) */
  --bg: #07080b;            /* page ground */
  --surface: #0d0f13;       /* cards, nav bar, inputs */
  --raised: #121419;        /* category cards, chips, icon tiles */
  --inset: #0b0c10;         /* author columns, image wells, code */
  --border: #1c1f26;        /* default card / nav border */
  --border-soft: #16181e;   /* dividers INSIDE a card */
  --border-strong: #262a33; /* inputs, secondary buttons, list separators */
  --border-hover: #30353f;
  --text: #eef0f4;
  --text-muted: #a4aab7;    /* secondary — 8:1 on --surface */
  --text-faint: #878d9b;    /* tertiary — 5.2:1 */
  --placeholder: #7f8593;

  --accent: #4f8cff;
  --primary: #eef0f4;       /* primary button fill */
  --on-primary: #07080b;    /* text on it */

  /* The accent is only ever a tint, and these are the five it is allowed to be. Written with
     color-mix against the surface each tint sits on, so changing --accent above is genuinely the
     only edit a recolour needs. */
  --accent-tile: color-mix(in srgb, var(--accent) 14%, var(--raised));
  --accent-badge-bg: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-badge-text: color-mix(in srgb, var(--accent) 62%, #fff);
  --accent-selected: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-ring: color-mix(in srgb, var(--accent) 40%, transparent);

  /* -------------------------------------------------------------- semantic + status
     The hexes are UNCHANGED from G (internal/catalog/status.go, and web/admin/panel.css paints
     with the same ones). What changed is the tint: 12% alpha, not 14%. */
  --danger: #ff6b6b;  --danger-bg: rgba(255, 107, 107, .12);  --danger-border: rgba(255, 107, 107, .35);
  --ok: #3ddc97;      --ok-bg: rgba(61, 220, 151, .12);       --ok-border: rgba(61, 220, 151, .35);
  --warn: #f5b843;    --warn-bg: rgba(245, 184, 67, .12);     --warn-border: rgba(245, 184, 67, .35);
  --info: #63b3ff;    --info-bg: rgba(99, 179, 255, .12);     --info-border: rgba(99, 179, 255, .35);

  --status-working: #3ddc97;      --status-working-bg: rgba(61, 220, 151, .12);       --status-working-border: rgba(61, 220, 151, .35);
  --status-updating: #f5b843;     --status-updating-bg: rgba(245, 184, 67, .12);      --status-updating-border: rgba(245, 184, 67, .35);
  --status-testing: #63b3ff;      --status-testing-bg: rgba(99, 179, 255, .12);       --status-testing-border: rgba(99, 179, 255, .35);
  --status-maintenance: #f5b843;  --status-maintenance-bg: rgba(245, 184, 67, .12);   --status-maintenance-border: rgba(245, 184, 67, .35);
  --status-down: #ff6b6b;         --status-down-bg: rgba(255, 107, 107, .12);         --status-down-border: rgba(255, 107, 107, .35);
  --status-development: #a78bfa;  --status-development-bg: rgba(167, 139, 250, .12);  --status-development-border: rgba(167, 139, 250, .35);

  /* STAFF-ONLY UI (§22, phase 15). Violet marks what only a moderator or an admin can see, and
     is used for nothing else - so a moderator can always tell staff UI from what members get.
     The one other place this hex appears is --status-development above, which the handoff itself
     paints violet (§21.3); that is a product status, never a permission. */
  --staff: #a78bfa;
  --staff-tint: rgba(167, 139, 250, .14);
  --staff-border: rgba(167, 139, 250, .35);
  /* a 6% wash rather than a flat tint: a staff bar sits INSIDE the page a moderator is reading */
  --staff-wash: color-mix(in srgb, #a78bfa 6%, var(--surface));
  --status-private: #9a9aa6;      --status-private-bg: rgba(154, 154, 166, .12);      --status-private-border: rgba(154, 154, 166, .35);

  /* -------------------------------------------------------------- shape & depth */
  --shadow: 0 1px 2px rgba(0, 0, 0, .36), 0 8px 24px -12px rgba(0, 0, 0, .5);  /* cards, nav bar */
  --shadow-lg: 0 32px 64px -32px rgba(0, 0, 0, .75);                           /* floating panels */
  --radius: 12px;        /* buttons, inputs */
  --radius-lg: 16px;     /* cards */
  --radius-panel: 16px;  /* was 24 in G; in AE a panel is just a card */
  --radius-auth: 18px;   /* the one exception: the login/register card */
  --radius-pill: 999px;
  --radius-tile: 10px;   /* icon tiles */
  --focus: 0 0 0 4px var(--accent-ring);
  --code-bg: var(--inset);
  --scrollbar: #262a33;
  --content: 1200px;     /* every page's content width (120px side gutters at 1440) */
  /* The nav bar is 52px sitting 12px from the top, so anything sticky clears it at 64 + a 16px
     breath = 80px. ONE token, because the four sticky sidebars drifted apart the last time the bar
     changed height: .product-side and .forum-side were moved to 80 and .docs-nav/.side-nav were
     left on the old 76. */
  --sticky-top: 80px;

  --font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* -------------------------------------------------------------- aliases: G names -> AE palette
     See the NAMING note in the header. Everything below the "cards / surfaces" divider in this
     file still asks for these. */
  --bg-alt: var(--surface);
  --bg-raised: var(--raised);
  --raised-alt: var(--raised);
  --brand: var(--accent);
  --brand-hover: color-mix(in srgb, var(--accent) 78%, #fff);
  --brand-contrast: var(--on-primary);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 35%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
/* [hidden] HAS TO BE SAID AGAIN for anything this file gives a display: to, because a class
   selector outranks the UA sheet's `[hidden] { display: none }` — so an element a script hid by
   setting .hidden stays on the page. It has bitten the nav's no-JS group, the docs search box and
   the checkout pay buttons, each time silently.
   NOT a blanket `[hidden] { display: none !important }`: .feature-cat-body[hidden] deliberately
   keeps display:grid so that collapsing can animate, and !important would break it. So this is the
   list of things that are hidden by a script, and a new one belongs in it. */
.btn[hidden], .btn-group[hidden], .nav-nojs[hidden], .docs-search[hidden], .docs-card[hidden],
/* ...and the three it bit next, all shipped hidden and all drawn anyway: the Write/Preview tabs
   on the new-thread page, the Quote and Reply buttons on every post, and the showcase's slide
   counter. Each is a control only a script can operate, so each was a dead thing on the page for
   a visitor without one. */
.new-tabs[hidden], .post-action[hidden], .showcase-counter[hidden] { display: none; }
html {
  color-scheme: dark;
  /* EVERY anchor jump clears the sticky bar, not just the ones somebody remembered.
     scroll-padding-top insets the scrollport for all scroll-into-view work — a #hash navigation,
     :target, and scrollIntoView() alike — so it covers the lot in one declaration: #post-7 from a
     permalink, from "Jump to answer", from "Copy link to post" and from opening a notification;
     #reply from the phone's reply pill; #main from the skip link; and every heading the docs
     contents list points at.
     Without it the target landed at y=0, which is 64px UNDER the bar: a post whose author row and
     number were hidden behind the nav, and a skip link that skipped to something invisible. It was
     set per-element on exactly one selector (.doc-article h2) and nowhere else, which is how it
     stayed unnoticed — the page it was written for was the only page it worked on. */
  scroll-padding-top: calc(var(--sticky-top) + 8px);
}

/* A flex column so <main> can grow and the footer sits at the bottom of a short page instead of
   half way up it. The landing needs this too — it centres its hero in whatever height is left over
   between the nav and the footer rather than in a calc() of guessed numbers. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* See WEIGHT BUDGET in the header. h1 is 600; EVERY other heading is 500. */
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: 2.75rem; font-weight: 600; letter-spacing: -.035em; }
h2 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.025em; }
h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; }
h4 { font-size: 1rem; font-weight: 500; letter-spacing: -.015em; }
/* Emphasis inside body copy is 500, not the browser default 700: <strong> appears mid-sentence all
   over the downloads/subscription/checkout copy, and anything heavier reads as a small heading.
   Figtree is not loaded above 600, so 700 here would be synthesised. */
strong, b { font-weight: 500; }
p { margin: 0 0 1em; }
/* The transition is on the BASE rule, not on a handful of components: every link on the site
   changes colour on hover, and without this they all snap. Components that animate more than the
   colour (buttons, nav pills) declare their own transition and override this one. */
a { color: var(--accent); text-decoration: none; transition: color .14s ease; }
a:hover { color: var(--brand-hover); text-decoration: underline; }
small, .muted { color: var(--text-muted); }
code, pre { font: 13px/1.5 var(--font-mono); }
code { background: var(--code-bg); padding: .1em .4em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 1em; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }
hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
::selection { background: var(--accent); color: var(--text); }
/* ...except on the auth shell, which has NO accent anywhere (HANDOFF 6.3) — a blue selection is
   still the accent, and dragging across the heading was the one way to make it appear. */
.auth-main ::selection, .auth-main::selection { background: rgba(238, 240, 244, .22); color: var(--text); }
::placeholder { color: var(--placeholder); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

/* A quiet label above a row of content ("Live status" on the landing and the status page). In G
   this was uppercase DM Mono in the accent colour; AE states it plainly, because the thing it
   labels sits directly underneath and never needed a coloured signpost. */
.eyebrow { display: inline-flex; align-items: center; gap: .5em; font-size: 13px; font-weight: 400; color: var(--text-muted); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--primary); color: var(--on-primary);
  padding: .6em 1em; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- layout shell

   THE NAV IS A FLOATING PILL (AE), not a full-width bar with a bottom border: a 1200x60 rounded
   --surface bar sitting 16px below the top edge, with the page scrolling past underneath it. It is
   STICKY rather than fixed, so it occupies its own 76px of flow and no page needs a compensating
   top padding — and because it is in flow, the 16px above it is page ground on a cold load rather
   than a strip of whatever has scrolled under it. */

.site-header { position: sticky; top: 0; z-index: 20; padding: 12px 1.25rem 0; }
.nav-wrap {
  position: relative;          /* anchors the mobile dropdown below */
  max-width: var(--content); margin: 0 auto; height: 52px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 8px 0 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
}

/* The wordmark. The inner dot is an ::after, NOT a child element: a `<span class="dot">` is what
   the 2026-09-17 brand-dot removal deleted, and portal_test.go still asserts that no `class="dot"`
   reaches the page. A pseudo-element draws the same 9px dot and cannot trip that check. */
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; color: var(--text); font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark::after { content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--surface); }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  height: 32px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px;
  border-radius: var(--radius-pill); font-size: 14px; color: var(--text-muted); white-space: nowrap;
  transition: background .14s ease, color .14s ease;
}
.nav-links a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
/* The current page is a filled pill, and it is the only state the nav paints. app.js recomputes
   this attribute after every boosted swap — see syncNavActive. */
.nav-links a[aria-current="page"] { background: var(--bg); color: var(--text); }

/* "New" on the Forum link, and the same shape wherever a count or tag sits inside a nav row */
.nav-badge {
  height: 18px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: var(--radius-pill);
  background: var(--accent-badge-bg); color: var(--accent-badge-text); font-size: 11px; font-weight: 500;
}

.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-shrink: 0; }
/* the no-JS group: Account + Log out, hidden by app.js once the menu works */
.nav-nojs { display: flex; align-items: center; gap: 6px; }
/* "Log in" is a text link at button height so it optically pairs with the Sign up pill beside it */
.nav-text-link { height: 34px; padding: 0 13px; display: inline-flex; align-items: center; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap; transition: background .14s ease; }
.nav-text-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
/* signed in: the username chip, with the initial in a round tile */
.nav-user { height: 34px; padding: 0 12px 0 4px; display: inline-flex; align-items: center; gap: 8px; border-radius: var(--radius-pill); background: var(--bg); color: var(--text); font-size: 13px; font-weight: 500; max-width: 190px; transition: background .14s ease; }
.nav-user:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.nav-avatar { width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--border); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; text-transform: uppercase; }
/* The nav's own button size. .btn is 44px tall for a page, which is most of a 52px bar — these are
   the one place buttons are chrome rather than the action a page is about. */
.nav-actions .btn { min-height: 34px; padding: 0 14px; font-size: 14px; }
.nav-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; }

.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; }
.footer-wrap {
  max-width: calc(var(--content) + 2.5rem); margin: 0 auto; padding: 28px 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-brand .brand { font-size: 15px; }
.footer-brand .brand-mark { width: 20px; height: 20px; border-radius: 6px; }
/* ground, not surface: the footer has no card under it */
.footer-brand .brand-mark::after { width: 7px; height: 7px; background: var(--bg); }
.footer-copy { font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: color .14s ease; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-sep { width: 1px; height: 14px; background: var(--border-strong); flex-shrink: 0; }

/* grow, never shrink. min-width:0 so a wide table inside (invoices, devices) scrolls in its own
   wrapper instead of setting the whole page's min-content width. */
main#main { display: block; flex: 1 0 auto; min-width: 0; }
/* calc(var(--content) + 2.5rem), not var(--content): `box-sizing: border-box` is global (see the
   reset), so a 1200px max-width with 20px of side padding is 1160px of CONTENT at x=140 — while
   the nav pill, whose padding sits on .site-header outside it, is a true 1200 at x=120. Every page
   therefore sat 20px inside its own nav bar. The designs put both at x=120 (main padding
   `0 120px` inside a 1440 canvas), and the phase-5 note recording the forum grid as "796/340"
   is the same 40px short of the design's 836/340. Adding the gutter to the max-width makes
   --content mean what its comment says. */
.container { max-width: calc(var(--content) + 2.5rem); margin: 0 auto; padding: 2.5rem 1.25rem; }
.container-narrow { max-width: 620px; margin: 0 auto; padding: 2.5rem 1.25rem; }
/* minmax(0, 1fr), not 1fr, and a phone breakpoint — the same two things .container-side needed and
   for the same reason. A bare `1fr` track is minmax(AUTO, 1fr): its floor is the content's
   min-content width, so the docs index's .grid-2 cards (minmax(260px, 1fr) each) and a long token
   in a code block set the page's width instead of being clipped. Measured at 375 before this:
   /docs scrolled to 555px and /docs/{slug} to 422px, while every other page was exactly 375. The
   docs shell predates the 2026-09-17 customer-area rework, which is why it never got the
   breakpoint its twin has. */
.container-docs { max-width: calc(var(--content) + 2.5rem); margin: 0 auto; padding: 2.5rem 1.25rem; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; align-items: start; }

/* 760 to match .container-side: below it the docs sidebar stops being a column and becomes a row of
   wrapped chips above the article, so the prose gets the full width. */
@media (max-width: 760px) {
  .container-docs { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .docs-nav { position: static; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: .35rem; }
  .docs-nav a { border: 1px solid var(--border); border-radius: 999px; padding: .35rem .75rem; }
}

/* 860, not 760: the breakpoint is where four centre links plus a 200px username chip stop fitting
   inside 1200 — which happens well before phone width.

   WHAT USED TO BE HERE was a dropdown panel that showed .nav-links below this width. §19 replaced
   it with one phone menu that carries the links, the account items and the auth buttons together
   (partials/nav.html, and the §19 block at the end of this file). What is left here is the branch
   that menu cannot cover: with no script there is nothing to open, so the links stay the plain
   wrapped row they have always been, and the bar grows to hold them. A nav that needs a script to
   be reachable is not a nav. */
@media (max-width: 860px) {
  html:not([data-js]) .nav-links {
    display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px;
  }
  html:not([data-js]) .nav-links a { height: 36px; justify-content: center; }
  html:not([data-js]) .nav-wrap { height: auto; min-height: 52px; flex-wrap: wrap; padding: 6px 14px; }
}
@media (max-width: 560px) {
  .nav-text-link { padding: 0 10px; }
  .nav-username { display: none; }     /* the avatar tile alone is the chip on a phone */
  .nav-user { padding: 0 5px; }
  h1 { font-size: 2rem; }
}

/* ---------------------------------------------------------------- buttons & forms

   44px tall, radius 12. The primary button is the LIGHT one (#eef0f4 fill, #07080b text) — see the
   header note: no button is painted in the accent, so the accent never carries text contrast. */

/* NO BROWSER-DEFAULT BUTTON, ANYWHERE (§18.10, user, 2026-10-18). Every <button> in the portal
   carries a class that paints it, and the one place one did not, the browser's grey ButtonFace came
   through — the search filters in the design draft, which is where the user caught it. This is the
   net under all of them.

   It is a BARE `button` selector on purpose: at specificity 0,0,1 it loses to every class rule in
   this file, so it changes nothing that is already styled (.btn keeps its 1px border, .post-action
   its pill) and it catches whatever gets added next. `color` and `font` come with it because the
   UA sheet sets those too, and a button that inherits neither is the other half of the same bug.
   Quiet buttons that need to keep a bordered sibling's exact size say `border: 1px solid
   transparent` themselves (see .btn-ghost) rather than relying on this. */
button { background: transparent; border: 0; color: inherit; font: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--radius); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  line-height: 1.2; text-align: center;
  transition: background .14s ease, border-color .14s ease, color .14s ease, filter .14s ease, transform .06s ease;
}
.btn:hover { background: var(--raised); border-color: var(--border-hover); color: var(--text); text-decoration: none; }
/* the press. 1px is the whole animation budget for a button — it reads as a click without moving
   anything around it. */
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
/* brightness, not a second hex: the fill is already near-white, so a lighter hex has nowhere to go,
   and the design specifies exactly this filter. */
.btn-primary:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); filter: brightness(1.12); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #1a0505; }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #1a0505; filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--raised); border-color: var(--border); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn-lg { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn-pill { border-radius: var(--radius-pill); }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: .6rem; flex-wrap: wrap; }

/* A label names a field. It never competes with the heading above it. */
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: .4rem; color: var(--text-muted); }
.field { margin-bottom: 1.1rem; }
.hint { color: var(--text-muted); font-size: 13px; margin-top: .35rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="number"], input[type="url"], input[type="tel"], select {
  width: 100%; font: inherit; font-size: 15px; min-height: 44px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  transition: border-color .14s ease, box-shadow .14s ease;
}
textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 12px 14px; min-height: 7em; resize: vertical;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  transition: border-color .14s ease, box-shadow .14s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.checkbox-row { display: flex; align-items: flex-start; gap: .55em; font-weight: 400; color: var(--text); font-size: 14px; }
.checkbox-row input { margin-top: .2em; accent-color: var(--accent); }
/* .form-error is styled with .field-error in the ss21.2 block: same thing, and the pages written
   before phase 13 use this name. */
fieldset { border: none; padding: 0; margin: 0 0 1.25rem; }

/* ---------------------------------------------------------------- cards / surfaces */

.card {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.card + .card { margin-top: 1.25rem; }
/* ...but never inside a grid. The rule above is for cards stacked one under another in normal
   flow; in a grid the gap already separates them, and the stray top margin does TWO visible
   things: it pushes every card after the first down by 20px, and — because a grid item stretches
   to the row box MINUS its margins — it makes those cards 20px shorter than the first. That is
   exactly the "three feature cards bottom-aligned instead of stretched, 232px vs 212px, tops 20px
   apart" defect on the landing page, and the same leak hits the dashboard's 2x2 card grid. */
.grid > .card + .card { margin-top: 0; }
.card h2, .card h3 { margin-top: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.stat { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.stat .stat-label { color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stat .stat-value { font-size: 1.6rem; font-weight: 600; margin-top: .2rem; }

.badge {
  display: inline-flex; align-items: center; gap: .35em; padding: .2em .65em; border-radius: 999px;
  font-size: .78rem; font-weight: 500; border: 1px solid transparent; white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }
.badge-muted { background: var(--raised-alt); color: var(--text-muted); border-color: var(--border); }

/* status pill: coloured dot + label on a translucent tint of the same colour, matching border.

   THE NEUTRAL GREY IS THE DEFAULT, NOT A CASE. The catalog's status set is open — "development"
   and "private" were added while this page was being built, and more can follow — so the base rule
   below paints a legible grey pill and each known value overrides it. Had the colours only ever
   been set by .status-<value>, a value with no rule yet would render `border: 1px solid
   transparent` on no background in the inherited text colour: a badge that is invisible or a
   ghost, exactly when something new and worth noticing appears. statusLabel (render.go) does the
   same for the text. */
.status-pill {
  display: inline-flex; align-items: center; gap: .45em; padding: .25em .7em; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  color: var(--text-muted); background: var(--raised-alt); border: 1px solid var(--border);
}
.status-pill .status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-working    { color: var(--status-working);    background: var(--status-working-bg);    border-color: var(--status-working-border); }
.status-updating   { color: var(--status-updating);   background: var(--status-updating-bg);   border-color: var(--status-updating-border); }
.status-testing    { color: var(--status-testing);    background: var(--status-testing-bg);    border-color: var(--status-testing-border); }
.status-maintenance{ color: var(--status-maintenance);background: var(--status-maintenance-bg);border-color: var(--status-maintenance-border); }
.status-down       { color: var(--status-down);       background: var(--status-down-bg);       border-color: var(--status-down-border); }
.status-development{ color: var(--status-development);background: var(--status-development-bg);border-color: var(--status-development-border); }
.status-private    { color: var(--status-private);    background: var(--status-private-bg);    border-color: var(--status-private-border); }

/* ---------------------------------------------------------------- alerts / flash

   The alert's own rules moved to the ss21.2 block at the end of this file, where the tints, the
   coloured icon and the ordinary --text message are drawn together. They used to be here with the
   whole message painted in the tone's colour. */

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .7em .9em; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
thead th { background: var(--bg-alt); color: var(--text-muted); font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-alt); }

/* ---------------------------------------------------------------- landing

   The AE landing (2026-10-10): nav bar, a hero centred in the space between the nav and the footer,
   one row of live-status pills, footer. Nothing below the status row, and no dotted background —
   both were ruled out explicitly.

   HOW THE HERO IS CENTRED. body is a flex column with <main> as the growing item (see "layout
   shell"), so the leftover height between the sticky nav and the footer is a real box instead of a
   number to guess at. .landing takes that box with flex: 1 and centres inside it. The G rule this
   replaces was min-height: calc(100vh - 64px - 160px): two hardcoded numbers, one of which (the
   64px header) this very redesign invalidated, and the other a guess at the footer's height. The
   :has() rule is scoped to the landing so that no other page's <main> turns into a flex container,
   and min-height is the floor for a browser without :has(). */

main#main:has(.landing) { display: flex; flex-direction: column; }
/* .site-footer carries margin-top: 4rem so that a short CONTENT page does not end flush against
   it. On the landing that margin is 64px of dead band inside the very gap the hero is supposed to
   centre in, which put the hero 32px above the optical centre. Zeroed for this page only — the
   landing's own 64px padding already separates it from the footer. */
main#main:has(.landing) + .site-footer { margin-top: 0; }

.landing {
  position: relative; flex: 1; min-height: 60vh;
  max-width: calc(var(--content) + 2.5rem); margin: 0 auto; padding: 64px 1.25rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 72px; text-align: center;
}
/* No accent wash: removed at the owner's request (2026-11-18). The page is plain dark — the hero
   and the status row carry it alone. */
.landing-hero { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.landing-head { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.landing-head h1 { margin: 0; font-size: 64px; line-height: 1.05; font-weight: 600; letter-spacing: -.035em; }
/* UNUSED since 2026-10-26: the landing headline and its sub-line were removed at the owner's
   request, with replacement copy still to come. Kept rather than deleted because the sub-line
   is the first thing that copy will need, and these two rules are what it looked like. */
.landing-sub { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }

/* the "New — the forum is open" pill above the heading */
.landing-pill {
  height: 32px; display: inline-flex; align-items: center; gap: 10px; padding: 0 12px 0 5px;
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-muted); font-size: 13px;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.landing-pill:hover { background: var(--raised); border-color: var(--border-hover); color: var(--text); text-decoration: none; }
.landing-pill svg { flex-shrink: 0; }

.landing-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* The status row is ONE wrapping line: label, a pill per product, "Full status". */
/* Deliberately SMALLER than the rest of the page (12px, 26px pills) — user, 2026-10-12. This row
   is a reassurance, not a feature list: at the hero's scale five product names plus five status
   words were a second headline competing with the first, and the row wrapped at 1440. */
.landing-status { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.landing-status .eyebrow { padding-right: 6px; white-space: nowrap; font-size: 12px; }
.landing-status-list { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
/* A NEUTRAL pill with a COLOURED DOT here, not the tinted pill the rest of the site uses: five
   tinted pills in a row are five competing colours under a hero that has one.

   The pill KEEPS its status-<value> class, and therefore its `color`, so the dot's currentColor and
   the dot's ring are still the status colour and an unknown status still falls through to the
   neutral grey default. Only the surface and the text colours are overridden — which is why the
   name and the label below are coloured explicitly rather than left to inherit. */
.landing-status-list .status-pill {
  height: 26px; padding: 0 10px; gap: 6px; font-size: 12px; font-weight: 400;
  background: var(--surface); border-color: var(--border);
}
.landing-status-list .status-dot {
  width: 5px; height: 5px;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}
.landing-status-list .status-name { color: var(--text); }
.landing-status-list .status-sep, .landing-status-list .status-label { color: var(--text-muted); }
/* The pill is an <a> to /products/{slug} since §18.5. .status-pill already beats the global `a`
   rule on specificity, so the status colour survives; this is the affordance — the same hover the
   rest of the site's surfaces have, and no underline, because the pill is the hit area and an
   underline through "Working" reads as struck out. .landing-status-more (the old "Full status →"
   link) is gone with the route it pointed at. */
a.status-pill { text-decoration: none; transition: background .14s ease, border-color .14s ease; }
.landing-status-list a.status-pill:hover { background: var(--raised); border-color: var(--border-hover); }
.landing-status-list a.status-pill:hover .status-label { color: var(--text); }

@media (max-width: 860px) {
  .landing { padding: 48px 1.25rem; gap: 48px; }
  .landing-head h1 { font-size: 44px; }
}
@media (max-width: 560px) {
  .landing { padding: 40px 1.25rem; gap: 40px; }
  .landing-head h1 { font-size: 34px; }
  .landing-sub { font-size: 16px; }
  .landing-actions { flex-direction: column; width: 100%; max-width: 320px; }
  .landing-actions .btn { width: 100%; }
}

.section { padding: 2.5rem 1.25rem; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 2.25rem; }

/* ---------------------------------------------------------------- products (grid) */

.page-head { margin-bottom: 2rem; }
.page-head h1 { margin-bottom: .35rem; }

/* Three per row on desktop, two at tablet, one on a phone. Fixed track counts rather than
   auto-fit: the approved design is specifically a three-up grid, and auto-fit would silently
   become a four-up on a wide monitor. */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  display: flex; flex-direction: column; gap: .45rem; min-height: 162px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem; color: var(--text); box-shadow: var(--shadow);
  transition: border-color .12s, transform .12s;
}
.product-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); }
/* wraps rather than overflows when a long name meets a long status label at phone width */
.product-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.product-card-name { font-size: 1.15rem; font-weight: 500; letter-spacing: -.02em; min-width: 0; }
.product-card .status-pill { font-size: .7rem; padding: .24em .65em; }
.product-card-desc { color: var(--text-muted); font-size: .92rem; }
.product-card-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
  margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border-soft);
}
/* a price is a value the reader compares across cards, so it keeps real weight — 600, the
   budget's ceiling and what a price figure is allowed. 700 was never loaded: base.html requests
   Figtree 400;500;600 only, so it rendered as synthetic bold. */
.product-card-price { font-weight: 600; }
.product-card-go { color: var(--brand); font-weight: 500; font-size: .9rem; white-space: nowrap; }

/* ---------------------------------------------------------------- one product's page

   The AE product page (2026-10-10): a 7fr/5fr grid with an 80px gutter. Left is the identity, the
   screenshot showcase and the feature categories; right is a sticky column of the licence panel,
   the requirements card and "Questions first?".

   The container is WIDER here than .container's 2.5rem top padding allows for — the back link sits
   40px under the nav in the design — so .product-container sets its own padding rather than the
   page inventing a margin further in. */

.product-container { padding: 40px 1.25rem 72px; }

.back-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--text-muted); margin-bottom: 36px;
  transition: color .14s ease;
}
.back-link:hover { color: var(--text); text-decoration: none; }

.product-page { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 80px; align-items: start; }
.product-main { display: flex; flex-direction: column; gap: 48px; min-width: 0; }

/* ---- identity */
.product-head { display: flex; flex-direction: column; gap: 20px; }
.product-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* 44/500, NOT the global h1's 64/600: this heading sits beside a status pill in a 7fr column, and
   the page's single 600 is spent on the price in the panel opposite. */
.product-title h1 { margin: 0; font-size: 44px; line-height: 1.1; font-weight: 500; letter-spacing: -.03em; }
.product-title .status-pill { height: 28px; padding: 0 12px; gap: 8px; font-size: 13px; font-weight: 500; }
.product-title .status-pill .status-dot { width: 6px; height: 6px; }
.product-tagline { margin: 0; font-size: 20px; line-height: 1.5; letter-spacing: -.01em; color: var(--text); }
.product-description { margin: 0; max-width: 580px; font-size: 15px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }

/* the two-cell readout strip, hairlines above and below */
/* flex, not a two-column grid: the "Status note" cell is omitted entirely when a product has no
   note (most do not), and a fixed 2-track grid would leave half the strip empty. With flex:1 cells
   the strip is correct at one cell or two. */
.product-readout {
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.readout-cell { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 16px 24px 16px 0; min-width: 0; }
.readout-cell + .readout-cell { padding: 16px 0 16px 24px; border-left: 1px solid var(--border); }
.readout-label { font-size: 13px; color: var(--text-muted); }
.readout-value { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; min-width: 0; }
.readout-value svg { flex-shrink: 0; color: var(--text-muted); }
/* The dot borrows the status-<value> classes for its colour, so a new catalog status needs no rule
   here. currentColor is the status colour because .status-<value> sets `color`; the ring is the
   same colour at 12%, exactly like the landing's pills. */
.readout-dot {
  width: 6px; height: 6px; border-radius: var(--radius-pill); flex-shrink: 0;
  background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

/* ---- screenshot showcase */
.showcase { display: flex; flex-direction: column; gap: 12px; }
.showcase-frame {
  position: relative; height: 400px; border-radius: 14px; border: 1px solid var(--border);
  background-color: var(--inset);
  /* the dot grid is the EMPTY state's texture: it reads as "nothing here yet" rather than as a
     failed image, and a real screenshot covers it completely. */
  background-image: radial-gradient(circle, rgba(255, 255, 255, .06) 1px, transparent 1.5px);
  background-size: 24px 24px;
  overflow: hidden;
}
.showcase-slot {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--text-muted);
}
/* [hidden] needs the !important-free override here because .showcase-slot sets display:flex, and a
   bare attribute selector of equal specificity would lose to it depending on order. */
.showcase-slot[hidden] { display: none; }
.showcase-media { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-glyph { color: var(--text-muted); }
.showcase-play {
  width: 56px; height: 56px; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
}
.showcase-caption { font-size: 14px; color: var(--text-muted); }
.showcase-counter {
  position: absolute; left: 16px; bottom: 14px; height: 26px; padding: 0 10px;
  display: flex; align-items: center; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--bg) 80%, transparent); border: 1px solid var(--border);
  font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums;
}
.showcase-nav { position: absolute; right: 14px; bottom: 12px; display: flex; gap: 8px; }
.showcase-nav[hidden] { display: none; }
.showcase-arrow {
  width: 36px; height: 36px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background .14s ease, border-color .14s ease;
}
.showcase-arrow:hover { background: var(--raised); border-color: var(--border-hover); }

/* One column per media item, WHATEVER the count. This was repeat(5, …) — the number the design
   happens to draw — which meant a product with three screenshots laid them across three fifths of
   the row and left two empty columns. grid-auto-flow:column takes the count from the data. */
.showcase-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.showcase-thumbs[hidden] { display: none; }
.showcase-thumb {
  height: 72px; padding: 0; border-radius: var(--radius-tile); border: 1px solid var(--border);
  /* the same "no file yet" texture as the frame, at thumbnail scale */
  background: repeating-linear-gradient(135deg, var(--surface) 0 8px, #101217 8px 16px);
  color: var(--text-muted); font-size: 12px; cursor: pointer; opacity: .75;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .14s ease, border-color .14s ease;
}
.showcase-thumb:hover { opacity: 1; border-color: var(--border-hover); }
.showcase-thumb.is-current { border: 2px solid var(--accent); opacity: 1; }

/* ---- features card */
.features-card {
  display: flex; flex-direction: column; gap: 18px; padding: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.features-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.features-head-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.features-head h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -.02em; }
.features-summary { font-size: 13px; color: var(--text-muted); }
.features-expand {
  flex-shrink: 0; height: 32px; padding: 0 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--bg);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer;
  transition: color .14s ease, border-color .14s ease;
}
.features-expand:hover { color: var(--text); border-color: var(--border-hover); }
.features-expand[hidden] { display: none; }

.feature-cats { display: flex; flex-direction: column; gap: 10px; }
.feature-cat { display: flex; flex-direction: column; background: var(--raised); border: 1px solid var(--border-soft); border-radius: 14px; overflow: hidden; }
/* A 64px row that is a real <button> and had no hover state at all until 2026-10-12: it said
   cursor:pointer and then gave nothing back, which reads as a dead row rather than a control. */
.feature-cat-head {
  height: 64px; padding: 0 12px 0 14px; display: flex; align-items: center; gap: 14px;
  border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; width: 100%;
  transition: background .14s ease;
}
.feature-cat-head:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.feature-cat-head:hover .feature-cat-chevron { background: var(--inset); }
.feature-cat-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--radius-tile);
  background: var(--accent-tile); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.feature-cat-name { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.feature-cat-title { font-size: 16px; font-weight: 500; }
.feature-cat-count { font-size: 13px; color: var(--text-muted); }
.feature-cat-chevron {
  width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); background: var(--bg); color: var(--text);
  transition: transform .18s ease, background .14s ease;
}
/* The chevron is driven by aria-expanded, not by a second class: the attribute is already the
   accessible truth and app.js has to set it anyway, so there is exactly one state to keep correct. */
.feature-cat-head[aria-expanded="true"] .feature-cat-chevron { transform: rotate(180deg); }

/* THE OPEN/CLOSE ANIMATES, and this is the only way to do it without JS measuring heights: the
   body is a one-row grid whose track goes 1fr -> 0fr, and .feature-cat-tiles clips to it.
   height/max-height cannot be transitioned to `auto`, and a guessed max-height either cuts a long
   category off or makes a short one close in slow motion.

   [hidden] is kept as THE state — it is what the server renders, what app.js toggles and what
   screen readers honour — but its display:none is overridden here, because a display change cannot
   animate. visibility:hidden restores what display:none was doing that matters: the collapsed
   tiles leave the accessibility tree and the tab order. */
.feature-cat-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease, visibility .22s; }
/* The server now renders every category OPEN and app.js closes the ones the design shows closed,
   so the first state change of the page's life happens during load — animated, that reads as the
   page collapsing itself in front of the reader. app.js carries .is-booting across that one frame. */
.feature-cats.is-booting .feature-cat-body,
.feature-cats.is-booting .feature-cat-tiles { transition: none; }
.feature-cat-body[hidden] { display: grid; grid-template-rows: 0fr; visibility: hidden; }
/* min-height:0 is load-bearing: a grid item's default min-height is auto, which refuses to shrink
   below its content and would pin the track open at full height. */
.feature-cat-tiles {
  overflow: hidden; min-height: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px;
  transition: padding-bottom .22s ease;
}
/* The VERTICAL padding has to go as well, or the collapsed category is 14px tall instead of 0 and
   every closed card sits 14px too deep. overflow:hidden clips the CONTENT; it does not remove the
   element's own padding from its height, so zeroing it is the only way down to nothing. */
.feature-cat-body[hidden] .feature-cat-tiles { padding-bottom: 0; }
.feature-tile {
  padding: 14px 16px; display: flex; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.feature-check {
  width: 22px; height: 22px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent);
}
.feature-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-name { font-size: 15px; font-weight: 500; }
.feature-desc { font-size: 14px; line-height: 1.5; color: var(--text-muted); text-wrap: pretty; }

/* ---- right column */
.product-side { position: sticky; top: var(--sticky-top); display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.licence-panel {
  display: flex; flex-direction: column; gap: 24px; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel);
  /* the floating-panel shadow, not the card one: this is the thing the page is for */
  box-shadow: 0 1px 2px rgba(0, 0, 0, .36), var(--shadow-lg);
}
.licence-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.licence-head h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
.licence-currency { font-size: 13px; color: var(--text-muted); }
.licence-owned {
  margin: 0; padding: .6rem .8rem; border-radius: var(--radius);
  background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok); font-size: 14px;
}
.licence-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }

/* The 1px gaps over a --border-strong ground ARE the row separators: one background showing through
   the grid gaps, so there is no border to double up at the ends and no :last-child exception. */
.licence-rows {
  display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; border: 1px solid var(--border-strong);
  background: var(--border-strong); border-radius: var(--radius); overflow: hidden;
}
.licence-row {
  display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 16px;
  background: var(--surface); color: var(--text); font-size: 15px; cursor: pointer;
  transition: background .14s ease;
}
.licence-row:hover { background: var(--raised); }
/* The real radio is hidden but FOCUSABLE — opacity/position, never display:none, which would take
   it out of the tab order and break keyboard selection entirely. */
.licence-row input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.licence-radio {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: var(--radius-pill);
  border: 1.5px solid #4b5161; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .14s ease;
}
.licence-radio::after { content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill); background: transparent; transition: background .14s ease; }
/* :has() keeps the selected state in CSS, so the no-JS page still shows which row is checked — the
   .is-selected class app.js maintains is only a convenience for browsers without :has(). */
.licence-row:has(input:checked), .licence-row.is-selected { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.licence-row:has(input:checked) .licence-radio, .licence-row.is-selected .licence-radio { border-color: var(--accent); }
.licence-row:has(input:checked) .licence-radio::after, .licence-row.is-selected .licence-radio::after { background: var(--accent); }
.licence-row:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--accent-ring); }
.licence-row-label { flex: 1; min-width: 0; }
/* a price is a figure the reader compares down the column — one of the two places 600 is spent */
.licence-price { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.licence-cta { height: 48px; gap: 12px; }
.licence-cta-sep { width: 1px; height: 16px; background: rgba(7, 8, 11, .28); flex-shrink: 0; }
.licence-cta-price { font-variant-numeric: tabular-nums; font-weight: 600; }
.licence-note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.licence-divider { height: 1px; background: var(--border); }
.licence-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.licence-facts li { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.licence-fact { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; }
.licence-fact svg { flex-shrink: 0; color: var(--text-muted); }
.licence-fact-note { font-size: 13px; color: var(--text-muted); }

.req-card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.req-card h2 { margin: 0 0 6px; font-size: 16px; line-height: 1.3; font-weight: 500; }
.req-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border-soft); }
.req-key { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-muted); }
.req-key svg { color: var(--text); flex-shrink: 0; }
.req-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--radius-pill); background: var(--raised); border: 1px solid var(--border);
  font-size: 13px; color: var(--text);
}

.questions-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.questions-label { font-size: 14px; color: var(--text-muted); }
.questions-links { display: flex; align-items: center; gap: 16px; }
.questions-links a { font-size: 14px; font-weight: 500; }

/* Below 1100 the 5fr panel is too narrow for a 56px row with a price on the end, so the page goes
   to one column and the panel stops being sticky — a sticky panel in a single column follows you
   down past the content it belongs to. */
@media (max-width: 1100px) {
  .product-page { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .product-side { position: static; }
  .product-title h1 { font-size: 34px; }
}
@media (max-width: 760px) {
  .product-container { padding: 28px 1.25rem 56px; }
  .back-link { margin-bottom: 24px; }
  .product-title h1 { font-size: 28px; }
  .product-tagline { font-size: 17px; }
  /* one column each: two feature tiles side by side at 375 leaves ~140px for a name and a sentence.
     Targets .feature-cat-tiles, NOT .feature-cat-body — the body's own grid is the single row the
     open/close animation drives, and overriding its columns here would do nothing useful. */
  .feature-cat-tiles { grid-template-columns: minmax(0, 1fr); }
  /* flex-direction, not grid-template-columns: .product-readout became a flex row in the
     2026-10-12 fix pass (so the strip is right with one cell or two) and the old grid property
     stopped doing anything — the cells stayed side by side while the rule below moved their
     divider to a border-TOP, drawing a line above a cell that had not moved. */
  .product-readout { flex-direction: column; }
  .readout-cell { padding: 14px 0; }
  .readout-cell + .readout-cell { padding: 14px 0; border-left: 0; border-top: 1px solid var(--border-soft); }
  .showcase-frame { height: 240px; }
  /* gap only. repeat(5, …) was the number the design happens to draw, and it reintroduced at
     phone width exactly the defect the 2026-10-12 fix pass removed at desktop width: a product
     with three screenshots laid its thumbs across the first three of five fixed tracks. The base
     rule's grid-auto-flow: column takes the count from the data. */
  .showcase-thumbs { gap: 6px; }
  .showcase-thumb { height: 52px; }
  .licence-panel { padding: 20px; }
}

/* ---------------------------------------------------------------- status page */

.status-list { display: flex; flex-direction: column; gap: .85rem; }
/* Fixed first track, not flex space-between: this is a page people scan down, and with flex the
   notes started at whatever x the name+pill happened to end at (298/273/318/313/379px over five
   rows). A fixed name column gives every note one left edge to scan. */
/* The first track is `auto` — content width — NOT a fixed 260px cap. It was capped, and a name plus
   the gap plus the 118px pill exceeded it for exactly the two longest products ("Rainbow Six Siege"
   279px, "Counter-Strike 2" 269px), so .status-main wrapped and their pill dropped BELOW the name
   while every shorter name kept its pill beside it. Measured in a browser at 1280px, which is the
   only way that kind of defect shows up: every test was green. */
.status-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 1rem;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: .85rem 1.15rem;
}
.status-row.is-down { border-color: var(--status-down-border); }
.status-row .status-main { display: flex; align-items: center; gap: .9rem; flex-wrap: nowrap; }
.status-row .name { font-weight: 500; font-size: 1rem; }
.status-row .note { color: var(--text-muted); font-size: .9rem; }
.status-row .changed { color: var(--text-faint); font-size: .78rem; font-family: var(--font-mono); white-space: nowrap; }
/* Below this the three tracks stop fitting side by side, so the row stacks: name+pill, note,
   then the timestamp. */
@media (max-width: 760px) {
  .status-row { grid-template-columns: minmax(0, 1fr); gap: .5rem; padding: 1rem 1.15rem; }
  .status-row .changed { width: 100%; }
}

table.compare th, table.compare td { text-align: center; }
table.compare th:first-child, table.compare td:first-child { text-align: left; white-space: normal; }

/* ---------------------------------------------------------------- docs */

.docs-nav { position: sticky; top: var(--sticky-top); }
.docs-nav h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .6rem; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: .4rem .1rem; color: var(--text-muted); }
.docs-nav a[aria-current="page"] { color: var(--brand); font-weight: 500; }
.prose h1 { font-size: 1.9rem; }
.prose h2 { margin-top: 1.6em; padding-top: .2em; border-top: 1px solid var(--border-soft); }
.prose h2:first-child { border-top: none; margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose table { margin: 1em 0; }

/* ---------------------------------------------------------------- auth pages

   The AE sign-in family (2026-10-10, phase 4): login, register, the 2FA step, forgot/reset
   password, the sudo step-up and the two 2FA account pages. Rendered inside partials/auth.html —
   no nav bar, no footer — which is why these rules own the whole document rather than a region
   of one.

   THERE IS NO ACCENT ON THESE PAGES. Not a toned-down accent: none. Every link is --text or
   --text-muted, the checkbox is accent-color #eef0f4, and the focus ring is white at 22% instead
   of the blue the rest of the site uses. The reasoning the user approved: the only coloured thing
   on a credential page should be an error, and a blue ring on a password box next to a blue link
   next to a blue button gives a phishing-shaped page three different things competing to look
   like the thing you are meant to click. The primary button is already light rather than accent
   (see the header), so it needs no exception here. */

.auth-body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
}
/* The ground: a soft neutral glow from above and a fainter one from below, then a heavy inset
   vignette. Its own element rather than a background on <body> because the two radials plus the
   vignette are three layers, and a box-shadow on <body> does not paint over the page the way an
   absolutely positioned sibling does. */
.auth-backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 50% at 50% -8%, rgba(255, 255, 255, .075), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 108%, rgba(255, 255, 255, .03), transparent 70%);
  box-shadow: inset 0 0 240px rgba(0, 0, 0, .7);
}
/* main#main.auth-main, not .auth-main: the layout-shell rule `main#main { display: block }` carries
   an ID and would otherwise win, leaving this a block box — the card then sits top-left while
   .auth-legal, which centres itself, floats off on its own. Looked right in every measurement
   (440px card, 18px radius) and wrong in the browser, which is the only place it shows. */
main#main.auth-main {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 40px 1.25rem;
}

/* .alert carries margin-bottom: 1.25rem for ordinary pages, where it is a block in flow. The auth
   card is a 28px flex column, so that margin stacks on top of the gap and pushes an error 48px off
   the form it is about. */
.auth-card > .alert { margin-bottom: 0; }

/* the wordmark above the card: WHITE here, not accent — see the no-accent note above */
.auth-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.auth-brand:hover { color: var(--text); text-decoration: none; }
.auth-mark {
  width: 28px; height: 28px; border-radius: 9px; background: var(--primary);
  display: grid; place-items: center; flex-shrink: 0;
}
.auth-mark::after { content: ""; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--surface); }

.auth-card {
  width: 440px; max-width: 100%;
  display: flex; flex-direction: column; gap: 28px;
  padding: 28px 32px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-auth);
  /* the inset hairline at the top is what makes the card read as lit from above */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .4), 0 40px 80px -30px rgba(0, 0, 0, .85);
}

/* the "Log in | Create account" segmented control: a 4px-padded well with one raised half */
.auth-switch {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; background: var(--bg); border-radius: var(--radius);
}
.auth-switch a {
  height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-muted);
  transition: color .14s ease, background .14s ease;
}
.auth-switch a:hover { color: var(--text); text-decoration: none; }
.auth-switch a[aria-current="page"] {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 1px 1px rgba(0, 0, 0, .3);
}

.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-head h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.auth-head p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-muted); }

.auth-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
/* --text, not --text-muted: on a form that IS the page, the field name is content rather than
   secondary labelling. (The global label rule stays muted for the dashboard's dense forms.) */
.auth-field label { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.auth-field .hint { margin: 0; font-size: 13px; line-height: 1.4; }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-quiet { font-size: 14px; color: var(--text-muted); }
.auth-quiet:hover { color: var(--text); text-decoration: none; }

.auth-body input[type="text"], .auth-body input[type="email"], .auth-body input[type="password"] {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
/* The neutral focus state. --accent is NOT used here; see the header note. */
.auth-body input:focus, .auth-body textarea:focus, .auth-body select:focus {
  border-color: #4b5161;
  box-shadow: 0 0 0 4px rgba(238, 240, 244, .12);
}
.auth-body :focus-visible { box-shadow: 0 0 0 4px rgba(238, 240, 244, .22); }

.auth-input-wrap { position: relative; }
/* room for the reveal button, so a long password never runs under it */
.auth-input-wrap input { padding-right: 48px; }
.auth-reveal {
  position: absolute; right: 6px; top: 6px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; background: transparent; border: 0; border-radius: 8px;
  color: var(--text-muted); cursor: pointer; transition: color .14s ease;
}
.auth-reveal:hover { color: var(--text); }
/* [hidden] until app.js wires it up: a reveal button that cannot reveal anything is worse than none */
.auth-reveal[hidden] { display: none; }

.auth-check { display: flex; align-items: center; gap: 10px; }
.auth-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.auth-check label { margin: 0; font-size: 14px; font-weight: 400; color: var(--text); cursor: pointer; }

.auth-submit { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.auth-note { margin: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.auth-note svg { flex-shrink: 0; }
.auth-terms { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); text-align: center; text-wrap: balance; }

/* The card's footer line, and every "key" link on these pages: white, underlined at 35% so the
   underline reads as an affordance without the colour doing it. */
.auth-foot {
  margin: 0; padding-top: 20px; border-top: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; color: var(--text-muted); text-align: center; flex-wrap: wrap;
}
.auth-foot a, .auth-terms a {
  font-weight: 500; color: var(--text);
  text-decoration: underline; text-decoration-color: rgba(238, 240, 244, .35); text-underline-offset: 3px;
}
.auth-foot a:hover, .auth-terms a:hover { color: #fff; text-decoration-color: rgba(238, 240, 244, .7); }

.auth-legal { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.auth-legal a { font-size: 13px; color: var(--text-muted); transition: color .14s ease; }
.auth-legal a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 520px) {
  /* main#main.auth-main for the same reason the base rule carries the ID: a bare .auth-main
     loses to `main#main { display: block }` and this whole line did nothing. */
  main#main.auth-main { gap: 20px; padding: 28px 1rem; }
  .auth-card { padding: 22px 20px; gap: 22px; border-radius: var(--radius-lg); }
  .auth-head h1 { font-size: 22px; }
  .recovery-codes { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- customer area shell

   Every signed-in page (2026-09-17 rework) shares one shell: the same 220px + content grid the docs
   use, with a sidebar that IS the customer area's navigation — Overview / Products / Client /
   Billing are what you own and use; Profile / Security / HWID reset are the account itself. The
   account TABS that used to sit on the dashboard are gone with it. */

/* The token, like every other container. 1180 was a hand-picked number that made the customer
   area line up with neither the nav bar nor the rest of the site. */
.container-side {
  max-width: calc(var(--content) + 2.5rem); margin: 0 auto; padding: 2.5rem 1.25rem;
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; align-items: start;
}
.side-nav { position: sticky; top: var(--sticky-top); }
/* min-width: 0 — without it the invoice table's nowrap cells set the column's min-content and the
   whole page grows to the table's width on a phone (727px at 375). Same reason the mobile column
   below is minmax(0, 1fr) and not 1fr. */
.side-content { min-width: 0; }
.side-who { display: flex; align-items: center; gap: .7rem; padding-bottom: 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--border-soft); min-width: 0; }
.side-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; background: var(--accent-soft); color: var(--brand); display: grid; place-items: center; font-weight: 500; }
.side-name { font-weight: 500; line-height: 1.2; }
.side-mail { font-size: .78rem; color: var(--text-faint); overflow-wrap: anywhere; }
.side-nav h2 { font-family: var(--font-mono); font-size: .68rem; font-weight: 500; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); margin: 1.1rem 0 .4rem; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .45rem .65rem; margin: 0 -.65rem; border-radius: 10px;
  color: var(--text-muted); font-weight: 500; font-size: .92rem;
}
.side-nav a:hover { color: var(--text); background: var(--bg-raised); text-decoration: none; }
.side-nav a[aria-current="page"] { color: var(--text); background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--border); }
@media (max-width: 760px) {
  .container-side { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .side-nav { position: static; }
  .side-who { border-bottom: none; padding-bottom: 0; margin-bottom: .25rem; }
  .side-nav h2 { margin-top: .75rem; }
  .side-nav ul { display: flex; flex-wrap: wrap; gap: .35rem; }
  .side-nav a { margin: 0; border: 1px solid var(--border); padding: .4rem .75rem; }
}

/* section heading with an action on the right; used on Overview and Products */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2.25rem 0 1rem; }
.section-title h2 { margin: 0; font-size: 1.25rem; }
.section-title a { color: var(--text-muted); font-weight: 500; font-size: .9rem; }
.section-title a:hover { color: var(--text); text-decoration: none; }

/* ---------------------------------------------------------------- overview

   /dashboard is the signed-in home: a strip of tiles that answers "am I set up?", then what you
   own. The old 2x2 card grid is gone - two of its four cards were links to pages one click away,
   dressed as content. */

.dash-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dash-tiles { grid-template-columns: 1fr; } }
.dash-tile {
  display: flex; flex-direction: column; gap: .2rem;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
}
.dash-label { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); }
/* the one number in the tile - this is the value the reader came for, so it keeps 700 */
.dash-value { font-size: 1.3rem; font-weight: 600; letter-spacing: -.02em; overflow-wrap: anywhere; }
.dash-sub { color: var(--text-muted); font-size: .85rem; }
.dash-go { margin-top: auto; padding-top: .9rem; color: var(--brand); font-weight: 500; font-size: .88rem; }
/* the action sits on the same baseline in every tile whether it is a link or a button */
.dash-action { margin-top: auto; padding-top: .9rem; }
.dash-action .btn { vertical-align: top; }

/* what you own: one row per product, like the status page but with the licence on the right */
.owned-list { display: flex; flex-direction: column; gap: .75rem; }
.owned-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1.25rem;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}
.owned-main { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; min-width: 0; }
.owned-name { font-weight: 500; font-size: 1.05rem; }
.owned-term { color: var(--text-muted); font-size: .9rem; text-align: right; }
.owned-term strong { color: var(--text); }
.owned-term .warn { color: var(--warn); }
.owned-go { color: var(--brand); font-weight: 500; font-size: .9rem; white-space: nowrap; }
.owned-more {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem 1.25rem; border: 1px dashed var(--border); border-radius: var(--radius-lg); color: var(--text-muted);
}
.owned-more:hover { border-color: var(--brand); text-decoration: none; color: var(--text); }
@media (max-width: 640px) {
  .owned-row { grid-template-columns: 1fr; gap: .5rem; }
  .owned-term { text-align: left; }
}

/* ---------------------------------------------------------------- products (signed in)

   One management card per product the customer holds — the Licences tab and /portal/subscription
   merged. The cards are .acct-form; the facts row is .acct-facts. */
.manage-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.manage-head h3 { margin: 0; display: flex; align-items: center; gap: .75rem; }
.manage-head .status-pill { font-size: .7rem; padding: .24em .65em; }
/* four facts across on a desktop, two on a phone; auto-fit gave 3 + 1 at the card's 832px.
   Two classes, not one: .acct-facts (auto-fit) is declared LATER in this file, and at equal
   specificity the later rule wins — a bare .manage-facts was silently overridden. */
.acct-facts.manage-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .acct-facts.manage-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.manage-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.manage-actions .hint { margin: 0; }

/* the invoices table gets the same right-aligned amount every ledger has */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- account pages (forms) */

.acct-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.acct-form {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.acct-form h3 { margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.acct-form > :last-child { margin-bottom: 0; }

/* identity/device facts: label above value, several across a row */
.acct-panel > .acct-facts {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}
.acct-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .9rem 1.5rem; }
.acct-facts > div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.acct-key { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); }
.acct-val { overflow-wrap: anywhere; }

/* two or three short inputs sit side by side and collapse to one column on a phone */
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.acct-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.acct-actions .hint { margin-top: 0; }
textarea { min-height: 5.5em; resize: vertical; }

.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: flex; gap: 1rem; align-items: baseline; padding: .45em 0; border-bottom: 1px solid var(--border-soft); }
.event-list li:last-child { border-bottom: none; padding-bottom: 0; }
.event-when { font-family: var(--font-mono); font-size: .78rem; color: var(--text-faint); white-space: nowrap; }
.event-what { color: var(--text-muted); font-size: .9rem; overflow-wrap: anywhere; }

/* Deleting the account is folded away rather than given a red card of its own: it is the rarest
   thing on the page and used to be the loudest-looking, which is exactly backwards. */
.danger-zone { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.15rem 1.5rem; }
.danger-zone summary { cursor: pointer; font-weight: 500; color: var(--danger); }
.danger-zone[open] summary { margin-bottom: 1rem; }
.danger-zone > :last-child { margin-bottom: 0; }

.licence-held { list-style: none; margin: 0; padding: 0; }
.licence-held li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: .7em 0; border-bottom: 1px solid var(--border-soft); }
.licence-held li:last-child { border-bottom: none; padding-bottom: 0; }
.held-name { font-weight: 500; }
.held-meta { color: var(--text-muted); font-size: .85rem; font-family: var(--font-mono); }

/* the state of a HWID reset request: one block, colour-coded on its left edge only */
.reset-state {
  display: flex; flex-direction: column; gap: .4rem;
  background: var(--raised-alt); border: 1px solid var(--border); border-left-width: 3px;
  border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: 1.25rem;
}
.reset-pending  { border-left-color: var(--warn); }
.reset-approved { border-left-color: var(--ok); }
.reset-denied   { border-left-color: var(--danger); }
.reset-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; font-weight: 500; }
.reset-when { font-family: var(--font-mono); font-size: .78rem; color: var(--text-faint); font-weight: 400; }
.reset-reason, .reset-note { color: var(--text-muted); font-size: .9rem; }

/* ---------------------------------------------------------------- the account area (AE phase 9)

   Nine pages behind one shell (handoff §14): the site's own nav bar and footer, a breadcrumb
   "Account › {page}", then 232px of section nav beside the page. It replaces .container-side /
   .side-nav above, which was the G customer area — those rules stay only because /docs still uses
   .docs-nav beside them.

   Two of the nine are not under /dashboard at all: /support/tickets and /forum/settings render in
   this shell too, because they ARE account pages — where a thing lives in the URL space and where
   it lives in the information architecture are different questions, and the second one is what a
   customer navigates by.

   Everything INSIDE a page is the cards this file already has (.forum-section for a card with a
   header and hairline rows, .forum-card for a padded one, .chip-* for the badges). What is new
   here is the shell, the three overview tiles, the licence card's action row, the invoice table
   and the ticket row — the shapes the account pages do not share with anything else. */

.acct-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 40px; align-items: start; }

/* ---- the section nav */
.acct-nav { position: sticky; top: var(--sticky-top); display: flex; flex-direction: column; gap: 20px; }
/* The wrapper around the two groups. A plain column here; on a phone it is the scrolling line of
   chips (ss19) and the thing the right-edge fade is painted on. */
.acct-nav-groups { display: flex; flex-direction: column; gap: 20px; }
.acct-who { padding: 4px 12px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-who-avatar {
  width: 40px; height: 40px; flex-shrink: 0; box-sizing: border-box; border-radius: var(--radius-pill);
  background: var(--border); color: var(--text); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500;
}
.acct-who-text { display: flex; flex-direction: column; min-width: 0; }
.acct-who-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who-link { font-size: 13px; color: var(--text-muted); }
.acct-who-link:hover { color: var(--text); text-decoration: none; }
.acct-group { display: flex; flex-direction: column; gap: 2px; }
.acct-group-label {
  padding: 0 12px 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-faint);
}
/* 1px of TRANSPARENT border, not none: the current item has a real one, and without the spare
   pixel every other item would shift by one when it became current. */
.acct-item {
  height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 10px;
  border: 1px solid transparent; border-radius: 11px;
  color: var(--text-muted); font-size: 14px;
  transition: background .14s ease, color .14s ease;
}
.acct-item:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.acct-item[aria-current="page"] {
  background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 500;
}
.acct-ico { display: flex; flex-shrink: 0; }
.acct-item[aria-current="page"] .acct-ico { color: var(--accent); }
.acct-item-count {
  margin-left: auto; height: 20px; padding: 0 7px; display: flex; align-items: center;
  border-radius: var(--radius-pill); background: var(--warn-bg); color: var(--warn); font-size: 12px;
}
.acct-logout {
  height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 10px; width: 100%;
  border-top: 1px solid var(--border-soft); color: var(--text-muted); font-size: 14px;
  text-align: left; cursor: pointer;
}
.acct-logout:hover { color: var(--text); }

/* ---- the page beside it */
.acct-body { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.acct-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.acct-page-head > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.acct-page-head h1 { margin: 0; font-size: 36px; line-height: 1.15; font-weight: 600; letter-spacing: -.03em; }
.acct-page-head p { margin: 0; font-size: 16px; color: var(--text-muted); }
.acct-page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- the overview's three tiles */
.acct-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.acct-tile {
  padding: 20px 22px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.acct-tile-top { display: flex; align-items: center; gap: 10px; }
.acct-tile-label { font-size: 13px; color: var(--text-muted); }
.acct-tile-value { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.acct-tile-sub { font-size: 14px; color: var(--text-muted); }
.acct-tile-act { margin-top: auto; padding-top: 6px; }

/* The icon tiles, in the four tones the account area uses. .tile-sm is the 32px one in a card
   header or an activity row; .tile-md the 36/40px one on a ticket row. */
.tile-sm, .tile-md, .tile-lg {
  flex-shrink: 0; border-radius: var(--radius-tile); display: flex; align-items: center; justify-content: center;
  background: var(--raised); color: var(--text-muted);
}
.tile-sm { width: 32px; height: 32px; }
.tile-md { width: 36px; height: 36px; }
.tile-lg { width: 40px; height: 40px; }
.tile-accent { background: var(--accent-tile); color: var(--accent); }
.tile-ok { background: var(--ok-bg); color: var(--ok); }
.tile-warn { background: var(--warn-bg); color: var(--warn); }
.tile-danger { background: var(--danger-bg); color: var(--danger); }

/* ---- a row inside a card: tile | name | actions */
.acct-row {
  padding: 16px 24px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px;
  align-items: center; border-top: 1px solid var(--border-soft); color: var(--text);
}
.acct-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acct-row-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 16px; font-weight: 500; }
.acct-row-sub { font-size: 14px; color: var(--text-muted); }
.acct-row-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---- the overview's two bottom cards */
.acct-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.acct-card {
  padding: 22px 24px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.acct-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acct-card-head h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 500; }
.acct-card-head a { font-size: 14px; font-weight: 500; }
/* the one open ticket, as an inset row inside the Support card */
.acct-mini {
  padding: 14px; display: flex; align-items: center; gap: 12px; border-radius: var(--radius);
  background: var(--inset); border: 1px solid var(--border-soft); color: var(--text);
  transition: background .14s ease;
}
.acct-mini:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.acct-mini-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acct-mini-title { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-mini-sub { font-size: 13px; color: var(--text-muted); }
/* the notification rows reuse the bell panel's .npanel-row — same rows, so the same CSS. Only the
   frame differs: no card edge to divide against, so no top hairline and a tighter gutter. */
.acct-notifs .npanel-row { padding: 10px 8px; border-top: 0; border-radius: var(--radius-tile); align-items: center; }
.acct-notifs .npanel-row:hover { background: var(--raised); }

/* ---- the licence card (Products) */
.acct-lic-head { padding: 22px 24px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.acct-lic-name { flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; font-size: 18px; font-weight: 500; }
.acct-facts-strip {
  padding: 18px 24px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  border-top: 1px solid var(--border-soft); background: var(--inset);
}
.acct-facts-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acct-facts-strip > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acct-fact-key { font-size: 13px; color: var(--text-muted); }
.acct-fact-val { font-size: 15px; overflow-wrap: anywhere; }
.acct-lic-foot {
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; border-top: 1px solid var(--border-soft);
}
.acct-lic-foot-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.acct-note { font-size: 13px; color: var(--text-muted); }
/* the dashed closing card: "each product is its own licence" */
.acct-dashed {
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  font-size: 14px; color: var(--text-muted);
}

/* ---- the client page */
.acct-hero {
  padding: 28px; display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.acct-hero-tile {
  width: 56px; height: 56px; flex-shrink: 0; box-sizing: border-box; border-radius: 14px;
  background: var(--raised); border: 1px solid var(--border-strong); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.acct-hero-main { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 12px; }
.acct-hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acct-hero-title h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.acct-hero p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.acct-hero-act { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* The .acct-steps strip (Generate / Run it / Signed in) was removed from the client page in the
   2026-10-26 copy pass and nothing else used it, so its rules went with it. Recoverable from the
   backup at loader-server-backup-2026-10-26-round17 if a three-up strip is ever wanted again. */
/* a label/value row with a hairline above, used by Requirements */
.acct-kv {
  padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; flex-wrap: wrap;
}
.acct-kv + .acct-kv { border-top: 1px solid var(--border-soft); }
.acct-kv-key { color: var(--text-muted); }
.acct-kv-val { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* the help strip at the foot of the client page, and the payment-method card on Billing */
.acct-strip {
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.acct-strip-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.acct-strip-text { display: flex; flex-direction: column; min-width: 0; }
.acct-strip-title { font-size: 15px; font-weight: 500; }
.acct-strip-sub { font-size: 14px; color: var(--text-muted); }

/* ---- the invoice table. A real <table> so a screen reader reads it as one; the grid is on the
   rows, because seven tracks of fixed width is what the design specifies and <td> widths would
   fight the text. */
.acct-table { width: 100%; border-collapse: collapse; }
/* The global `thead th` above is the G table: uppercase, letter-spaced, on a tinted band. The AE
   header row is 13px muted sentence case on the card, so every one of those is undone here rather
   than the global rule being narrowed — /docs and the admin tables still want it. */
.acct-table thead th,
.acct-table tbody td { padding: 0; border-bottom: 0; white-space: normal; }
.acct-table thead th {
  background: none; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: normal;
}
.acct-table tbody tr:hover { background: none; }
.acct-table tr {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) 100px 150px 90px 110px 60px;
  gap: 12px; align-items: center; padding: 0 24px; border-top: 1px solid var(--border-soft);
}
.acct-table thead tr { height: 40px; font-size: 13px; color: var(--text-muted); }
.acct-table thead th { text-align: left; font-weight: 400; }
.acct-table tbody tr { min-height: 56px; font-size: 14px; }
.acct-table .acct-td-muted { color: var(--text-muted); }
.acct-crypto { display: block; font-size: 12px; color: var(--text-faint); }
/* The same faint second line, under a name rather than an amount: the invoice number lives here
   (2026-10-29) because the refund policy tells people to quote it and the table had nowhere to
   read it from. Not an eighth COLUMN: below 860px this table's cells are placed by nth-child,
   and a new one would land outside the grid. */
.acct-sub { display: block; font-size: 12px; color: var(--text-faint); }
.acct-empty { margin: 0; padding: 20px 24px; border-top: 1px solid var(--border-soft); font-size: 14px; color: var(--text-muted); }

/* ---- the ticket list */
.acct-ticket {
  padding: 16px 22px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 150px 140px 16px;
  gap: 16px; align-items: center; border-top: 1px solid var(--border-soft); color: var(--text);
  transition: background .14s ease;
}
.acct-ticket:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.acct-ticket-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-ticket-subject { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-ticket-meta { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-ticket-when { font-size: 13px; color: var(--text-muted); }
.acct-ticket-chev { display: flex; color: var(--text-faint); }
/* the Open / Resolved / All filters on the tickets list. NOT .acct-tabs: that was the account
   TAB STRIP the 2026-09-17 rework deleted, and portal_test pins that it never comes back. */
.acct-filters { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.acct-filters a {
  height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 9px;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
}
.acct-filters a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.acct-filters a[aria-current] { background: var(--border); color: var(--text); }
.acct-filters-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- forms on the account pages (Profile, Security) */
.acct-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.acct-fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acct-fields > .field { margin-bottom: 0; }
.acct-fields label { font-size: 14px; font-weight: 500; color: var(--text); }
.acct-save { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.acct-split { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
/* the avatar row on Profile */
.acct-avatar-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.acct-bio-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
/* the 2FA turn-off row: two inputs and the button on one baseline */
.acct-offrow { padding-top: 14px; border-top: 1px solid var(--border-soft); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 16px; align-items: end; }
.acct-offrow .field { margin-bottom: 0; }

/* ---- the delete-account disclosure (§14.7: a red-tinted border, folded away) */
.acct-danger { border-color: var(--danger-border); }
.acct-danger > summary { list-style: none; cursor: pointer; }
.acct-danger > summary::-webkit-details-marker { display: none; }
.acct-disclose { padding: 18px 24px; display: flex; align-items: center; gap: 12px; }
.acct-disclose-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acct-chev { display: flex; color: var(--text-muted); transition: transform .14s ease; }
.acct-danger[open] .acct-chev { transform: rotate(90deg); }
.acct-danger-body { padding: 0 24px 22px; display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--border-soft); padding-top: 18px; }

/* ---- the board page (§16.1): threads, their toolbar, and the About card */
.board-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.board-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.board-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.board-tools-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-search input { width: 240px; }
.board-sort { position: relative; display: flex; }
.board-sort select { height: 42px; padding-right: 36px; width: auto; }
/* app.js unhides the select and hides the links; with no script the links are the control */
.board-sort[hidden], .board-sort-links[hidden] { display: none; }

/* a pinned thread: a band above the table, on --inset so it reads as "not one of the rows" */
.th-pin {
  padding: 14px 24px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px;
  align-items: center; background: var(--inset); color: var(--text);
}
.th-pin + .th-pin { border-top: 1px solid var(--border-soft); }
.th-pin:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.th-pin-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.th-pin-title { font-size: 15px; font-weight: 500; }
.th-pin-sub { font-size: 13px; color: var(--text-muted); }
.th-locked { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-faint); }

/* the table: one grid shared by the header row and every thread row */
.th-head, .th-row {
  padding: 0 24px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 80px 80px 190px;
  gap: 16px; align-items: center;
}
.th-head {
  height: 40px; border-top: 1px solid var(--border-soft);
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint);
}
.th-row {
  position: relative; padding: 16px 24px; border-top: 1px solid var(--border-soft);
  color: var(--text); transition: background .14s ease;
}
.th-row:hover { background: var(--raised); text-decoration: none; color: var(--text); }
/* the unread dot sits in the gutter, so it cannot push the row's columns around */
.th-dot {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--accent);
}
.th-avatar {
  width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--border);
  color: var(--text); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
}
.th-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* read is a shade quieter than unread — the difference is the point of the dot */
.th-title { font-size: 16px; font-weight: 500; color: #c9cdd6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-row.is-unread .th-title { color: var(--text); }
.th-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
/* The two halves of the meta line. On a desktop they lay out exactly as one wrapped row did; the
   phone rules turn .th-meta into a column and these become its two lines. */
.th-who { white-space: nowrap; }
.th-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.th-count { display: flex; flex-direction: column; align-items: flex-end; }
.th-n { font-size: 15px; font-variant-numeric: tabular-nums; }
.th-unit { font-size: 12px; color: var(--text-faint); }
.th-last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.th-last-avatar {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--border); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500;
}
.th-last-avatar.is-staff { background: var(--primary); color: var(--on-primary); }
.th-last-text { display: flex; flex-direction: column; min-width: 0; }
.th-last-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-last-when { font-size: 13px; color: var(--text-muted); }

.board-stats { display: flex; gap: 24px; padding: 12px 0; }
.board-stats > span { display: flex; flex-direction: column; }
.board-stat-n { font-size: 18px; font-weight: 500; }
.board-stat-k { font-size: 12px; color: var(--text-muted); }
.board-mods { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.board-mod-avatars { display: flex; }
.board-mod-avatar {
  width: 28px; height: 28px; box-sizing: border-box; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--on-primary); border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500;
}
.board-mod-avatar + .board-mod-avatar { margin-left: -8px; }
.board-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.board-ticket { display: flex; }
/* the Follow button when it is on: the same accent badge a pressed post action gets */
.btn.is-on { background: var(--accent-badge-bg); border-color: transparent; color: var(--accent-badge-text); }

/* ---- the new-thread page (§16.2) */
.new-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.new-card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.new-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.new-tabs { display: flex; gap: 4px; }
/* .new-tab, not `.new-tabs button`: portal_test asserts that every <button> the portal renders
   carries a class of its own, because a class is what guarantees it is painted rather than left
   in the browser's grey (§18.10). A parent selector does paint it — and is exactly the kind of
   thing that stops being true when the markup moves. */
.new-tab {
  height: 30px; padding: 0 12px; border-radius: 8px; background: transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer;
}
.new-tab[aria-selected="true"] { background: var(--border); color: var(--text); }
.new-preview {
  min-height: 7em; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--bg);
}
.new-preview-empty { color: var(--text-faint); font-size: 15px; }
.new-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.new-foot-acts { display: flex; align-items: center; gap: 10px; }
.new-hits { display: flex; flex-direction: column; gap: 8px; }
.new-hit { padding: 10px 12px; border-radius: var(--radius-tile); background: var(--inset); border: 1px solid var(--border-soft); color: var(--text); }
.new-hit:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.new-hit-title { display: block; font-size: 14px; font-weight: 500; }
.new-hit-meta { display: block; font-size: 12px; color: var(--text-muted); }

/* ---- forum search (§16.3) */
.search-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 32px; align-items: start; }
.search-filters { display: flex; flex-direction: column; gap: 22px; position: sticky; top: var(--sticky-top); }
.search-group { display: flex; flex-direction: column; gap: 2px; }
.search-group-label { padding: 0 10px 6px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
/* THE UNSELECTED OPTION IS TRANSPARENT (user, 2026-10-18): no fill, no border, muted text and a
   grey ring. The selected one is the only thing on the rail with a surface under it. */
.search-opt {
  min-height: 36px; padding: 6px 10px; display: flex; align-items: center; gap: 10px; margin: 0;
  border: 1px solid transparent; border-radius: var(--radius-tile); background: transparent;
  color: var(--text-muted); font-size: 14px; font-weight: 400; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.search-opt:hover { background: var(--raised); color: var(--text); }
.search-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.search-ring {
  width: 16px; height: 16px; flex-shrink: 0; box-sizing: border-box;
  border-radius: var(--radius-pill); border: 2px solid #4b5161;
  display: flex; align-items: center; justify-content: center;
}
.search-ring::after { content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill); background: transparent; }
.search-opt:has(input:checked) { background: var(--surface); border-color: var(--border); color: var(--text); }
.search-opt:has(input:checked) .search-ring { border-color: var(--accent); }
.search-opt:has(input:checked) .search-ring::after { background: var(--accent); }
.search-opt:has(input:focus-visible) { box-shadow: var(--focus); }
.search-count { margin-left: auto; font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.search-note { padding: 0 10px; font-size: 13px; line-height: 1.5; color: var(--text-faint); }
.search-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.search-bar { display: flex; gap: 10px; }
.search-bar input { height: 52px; font-size: 17px; }
.search-bar .btn { height: 52px; }
.search-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.search-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.search-hit {
  padding: 18px 22px; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); transition: background .14s ease;
}
.search-hit:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.search-path { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.search-title { font-size: 17px; font-weight: 500; }
.search-snippet { font-size: 14px; line-height: 1.55; color: #c9cdd6; }
.search-meta { font-size: 13px; color: var(--text-faint); }
/* the highlight on a match. A <mark> is the right element and the UA paints it yellow. */
.search-hit mark { background: color-mix(in srgb, var(--accent) 24%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }

/* ---- the notifications page (§16.4) */
.notif-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.notif-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.notif-day { display: flex; flex-direction: column; gap: 8px; }
.notif-day-label { font-size: 13px; color: var(--text-muted); }
.notif-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
/* The row is a DIV with a stretched link, because it also carries a "Mark as read" form — a
   <form> cannot live inside an <a>. The link's ::after covers the row, so the whole row is
   clickable; the form sits above it on z-index, so the button is too. */
.notif-row {
  position: relative; padding: 14px 20px; display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  gap: 14px; align-items: center; border-top: 1px solid var(--border-soft); color: var(--text);
  transition: background .14s ease;
}
.notif-row:first-child { border-top: 0; }
.notif-row:hover { background: var(--raised); }
.notif-row .notif-lead { color: var(--text); }
.notif-row .notif-lead:hover { text-decoration: none; }
.notif-row .notif-lead::after { content: ""; position: absolute; inset: 0; }
.notif-row .notif-lead:focus-visible { outline: none; }
.notif-row:focus-within { box-shadow: inset var(--focus); }
.notif-act { position: relative; }
.notif-row.is-new { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.notif-row.is-new:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.notif-dot {
  position: absolute; left: 7px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--accent);
}
.notif-solution { background: var(--ok-bg); color: var(--ok); }
.notif-mention, .notif-announcement, .notif-helpful { background: var(--accent-tile); color: var(--accent); }
.notif-ticket { background: var(--warn-bg); color: var(--warn); }
.notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-lead { font-size: 15px; line-height: 1.45; }
.notif-lead strong { font-weight: 500; }
.notif-subject { font-size: 14px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-when { font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.notif-how { display: flex; flex-direction: column; gap: 10px; }
.notif-how-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.notif-how-ways { display: flex; gap: 10px; font-size: 13px; color: var(--text-muted); }
.notif-how-on { color: var(--ok); }
.notif-follow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.notif-follow:first-of-type { border-top: 0; }
.notif-follow-main { display: flex; flex-direction: column; min-width: 0; }
.notif-follow-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-follow-sub { font-size: 13px; color: var(--text-muted); }

/* ---- the products table (§15.1). Six tracks, shared by the header row and every product row so
   the two cannot drift; under 860px the header goes and a row becomes tile + name with the rest
   stacked, which is the only arrangement that keeps a tagline readable on a phone. */
.prod-head, .prod-row {
  padding: 0 24px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 190px 250px 100px 16px;
  gap: 18px; align-items: center;
}
.prod-head { height: 44px; font-size: 13px; color: var(--text-muted); }
.prod-row {
  padding: 18px 24px; border-top: 1px solid var(--border-soft); color: var(--text);
  transition: background .14s ease;
}
.prod-row:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.prod-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prod-title { font-size: 17px; font-weight: 500; }
.prod-tagline { font-size: 14px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.prod-updated { font-size: 13px; color: var(--text-faint); }
.prod-plans { font-size: 14px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-price { display: flex; flex-direction: column; align-items: flex-end; }
.prod-from { font-size: 13px; color: var(--text-muted); }
.prod-amount { font-size: 17px; font-weight: 600; }
.prod-chev { display: flex; color: var(--text-faint); }

/* ---- the docs index (§15.2) */
.docs-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.docs-card {
  padding: 22px; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); transition: background .14s ease, border-color .14s ease;
}
.docs-card:hover { background: var(--raised); border-color: var(--border-hover); text-decoration: none; color: var(--text); }
.docs-card-text { display: flex; flex-direction: column; gap: 4px; }
.docs-card-title { font-size: 16px; font-weight: 500; }
.docs-card-desc { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.docs-card-go { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); }
/* the two ways out of the docs: not articles, so not article cards */
.docs-card-alt { background: none; border: 1px dashed var(--border-strong); }
.docs-card-alt:hover { background: var(--raised); }
.docs-search { position: relative; display: flex; }
.docs-search input { width: 320px; max-width: 100%; height: 42px; padding-left: 40px; }
.docs-search-icon { position: absolute; left: 14px; top: 12px; color: var(--placeholder); display: flex; pointer-events: none; }
/* It is a GRID ITEM (the guide list is a grid), so without this the empty state renders one
   column wide and sits left of centre under a full-width list. It used to be one short sentence,
   which was narrow enough that nobody noticed. */
.docs-no-hits { grid-column: 1 / -1; margin: 0; font-size: 14px; color: var(--text-muted); }

/* ---- a docs article (§15.3): guide list | article | on-this-page */
.doc-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; gap: 48px; align-items: start; }
.doc-nav { position: sticky; top: var(--sticky-top); display: flex; flex-direction: column; gap: 2px; }
.doc-nav-label, .doc-toc-label {
  padding: 0 12px 8px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint);
}
.doc-nav a {
  height: 36px; padding: 0 12px; display: flex; align-items: center; border-radius: var(--radius-tile);
  border: 1px solid transparent; color: var(--text-muted); font-size: 14px;
}
.doc-nav a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.doc-nav a[aria-current="page"] { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 500; }
.doc-article { display: flex; flex-direction: column; gap: 16px; max-width: 700px; min-width: 0; }
.doc-article h1 { margin: 8px 0 0; font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; }
/* No scroll-margin here any more: html{scroll-padding-top} above does it for every target on
   every page, and the two ADD UP — a heading with both landed 80px lower than it should. */
.doc-article h2 {
  margin: 16px 0 0; font-size: 22px; line-height: 1.3; font-weight: 500; letter-spacing: -.015em;
}
.doc-article h3 { margin: 12px 0 0; font-size: 18px; font-weight: 500; }
.doc-article p { margin: 0; font-size: 16px; line-height: 1.75; color: #c9cdd6; }
/* the lead: the first paragraph after the h1, which every doc opens with */
.doc-article h1 + p { font-size: 19px; line-height: 1.6; color: var(--text-muted); }
.doc-article ul, .doc-article ol {
  margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px;
  font-size: 16px; line-height: 1.6; color: #c9cdd6;
}
.doc-article code { font-size: 14px; }
.doc-article pre { margin: 0; }
.doc-article table { font-size: 15px; }
/* a blockquote opening with Note becomes the design's callout (see internal/portal/docs.go) */
.doc-note {
  padding: 14px 16px; display: flex; gap: 12px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
}
.doc-note-icon { display: flex; flex-shrink: 0; color: var(--accent); }
.doc-note p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); }
.doc-ends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.doc-end {
  padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text);
}
.doc-end:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.doc-end-next { align-items: flex-end; text-align: right; }
.doc-end-label { font-size: 13px; color: var(--text-muted); }
.doc-end-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; }
/* A <details> since ss19 (it collapses on a phone). display:block, not flex: a flex <details> can
   stop its own disclosure working, so the COLUMN is the list inside it. */
.doc-toc { position: sticky; top: var(--sticky-top); display: block; }
.doc-toc-list { display: flex; flex-direction: column; gap: 4px; }
/* No disclosure triangle, and not clickable, above the phone breakpoint: up here it is the label
   it has always been, and a reader who collapsed it by accident would have no way to know why the
   rail vanished. */
.doc-toc-label { list-style: none; pointer-events: none; }
.doc-toc-label::-webkit-details-marker { display: none; }
.doc-toc a {
  padding: 4px 0 4px 12px; border-left: 2px solid var(--border-strong);
  font-size: 13px; color: var(--text-muted);
}
.doc-toc a:hover { color: var(--text); text-decoration: none; }
.doc-toc a.is-current { border-left-color: var(--accent); color: var(--text); }

/* ---- checkout (§15.4) */
.co-shell { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.co-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* flex-direction: row explicitly — .acct-card above is a column, and without this the tile,
   the name and "Change plan" stack. */
.co-order { padding: 22px 24px; display: flex; flex-direction: row; align-items: center; gap: 16px; flex-wrap: wrap; }
.co-order-tile {
  width: 48px; height: 48px; flex-shrink: 0; box-sizing: border-box; border-radius: 13px;
  background: var(--raised); border: 1px solid var(--border-strong); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500;
}
.co-order-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.co-order-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; font-weight: 500; }
.co-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* A REAL radio, with the label as the card: the keyboard, the arrow keys and the form POST all
   behave the way a browser already knows how to, and with JS off the two pay buttons below still
   work. The input is hidden from sight but not from the accessibility tree or the tab order. */
.co-method {
  padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; cursor: pointer; margin: 0;
  border-radius: 14px; border: 1px solid var(--border); background: var(--bg); font-weight: 400;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.co-method input { position: absolute; opacity: 0; width: 0; height: 0; }
.co-method-dot {
  width: 20px; height: 20px; flex-shrink: 0; box-sizing: border-box; margin-top: 2px;
  border-radius: var(--radius-pill); border: 2px solid #4b5161;
  display: flex; align-items: center; justify-content: center;
}
.co-method-dot::after { content: ""; width: 8px; height: 8px; border-radius: var(--radius-pill); background: transparent; }
.co-method:hover { background: var(--raised); }
.co-method:has(input:checked) {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.co-method:has(input:checked) .co-method-dot { border-color: var(--accent); }
.co-method:has(input:checked) .co-method-dot::after { background: var(--accent); }
.co-method:has(input:focus-visible) { box-shadow: var(--focus); }
.co-method-text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.co-method-name { font-size: 16px; font-weight: 500; color: var(--text); }
.co-method-desc { font-size: 14px; color: var(--text-muted); }
.co-method-note { font-size: 13px; color: var(--text-faint); }
.co-method:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.co-terms { padding: 0 4px; display: flex; align-items: flex-start; gap: 10px; }
.co-terms input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.co-terms label { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 400; color: var(--text-muted); }
.co-notice {
  padding: 14px 16px; display: flex; gap: 12px; border-radius: var(--radius);
  background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 14px; line-height: 1.55; color: var(--text-muted);
}
.co-notice-icon { display: flex; flex-shrink: 0; color: var(--warn); }
.co-notice strong { color: var(--text); font-weight: 500; }
.co-sum {
  position: sticky; top: var(--sticky-top);
  padding: 24px; display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.co-sum h2 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 500; }
.co-line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.co-line-key { color: var(--text-muted); }
.co-code { display: flex; flex-direction: column; gap: 8px; }
.co-code label { margin: 0; color: var(--text); }
.co-code-row { display: flex; gap: 8px; }
.co-code-row input { flex: 1; min-width: 0; height: 42px; }
.co-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.co-total-amount { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.co-total-per { font-size: 15px; font-weight: 400; color: var(--text-muted); }
.co-pay { height: 50px; font-size: 16px; }
.co-lock { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.co-lock svg { flex-shrink: 0; }

/* ---- the one-card pages: waiting for a payment, and payment received (§15.5/§15.6) */
.co-card-wrap { display: flex; justify-content: center; padding: 8px 0 24px; }
.co-card {
  width: 560px; max-width: 100%; padding: 32px; display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.co-card-mid { align-items: center; text-align: center; }
.co-card h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; }
.co-card-mid h1 { font-size: 28px; line-height: 1.2; }
.co-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.co-card-mid p { font-size: 16px; }
.co-card-head { display: flex; align-items: center; gap: 16px; }
.co-card-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.co-tile-xl { width: 48px; height: 48px; flex-shrink: 0; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
/* the 64px circle at the top of the one-card pages. Two classes rather than .co-tile-ok plus
   .tile-danger: .co-tile-ok is declared later than .tile-danger, so stacking them left the red
   icon on a green disc. */
.co-tile-ok, .co-tile-bad { width: 64px; height: 64px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; }
.co-tile-ok { background: var(--ok-bg); color: var(--ok); }
.co-tile-bad { background: var(--danger-bg); color: var(--danger); }
.co-steps { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; border-radius: 14px; background: var(--inset); border: 1px solid var(--border-soft); }
.co-step { display: flex; gap: 14px; align-items: flex-start; }
.co-step-mark { width: 28px; height: 28px; flex-shrink: 0; box-sizing: border-box; border-radius: var(--radius-pill); border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; }
.co-step-done { border: 0; background: var(--ok-bg); color: var(--ok); }
.co-step-now { border-color: var(--accent); }
.co-step-now::after { content: ""; width: 10px; height: 10px; border-radius: var(--radius-pill); background: var(--accent); }
.co-step-text { display: flex; flex-direction: column; gap: 2px; }
.co-step-name { font-size: 15px; font-weight: 500; }
.co-step-todo .co-step-name { color: var(--text-muted); }
.co-step-sub { font-size: 13px; color: var(--text-muted); }
.co-acts { display: flex; gap: 10px; }
.co-acts .btn { flex: 1; }
.co-acts .btn-ghost { flex: 0 0 auto; }
.co-foot { font-size: 13px; line-height: 1.5; color: var(--text-faint); }
/* the two "what next" rows on the success card */
.co-next { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.co-next-row {
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; text-align: left;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.co-next-row:hover { background: var(--raised); text-decoration: none; color: var(--text); }
.co-next-accent {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}
.co-next-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.co-next-title { font-size: 15px; font-weight: 500; }
.co-next-sub { font-size: 13px; color: var(--text-muted); }
.co-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.co-until { color: var(--text); }
.co-sum-body { display: contents; }

/* ---- the ticket conversation (§14.6). The old .msg / .composer rules are still below, used by
   nothing now that this page was rebuilt; they go when the admin side's ticket view is restyled. */
.tk-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.tk-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tk-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: var(--sticky-top); }
.tk-msg {
  padding: 20px 22px; display: flex; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
/* A staff reply is the one somebody is waiting for, so it is the one the eye finds: an accent
   wash and an accent-tinted edge, both at the lowest strength in the palette. */
.tk-msg.is-staff {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
/* AN INTERNAL NOTE, on the operator's view only (2026-10-26). Violet, because violet is this
   app's staff-only colour and nothing else uses it — so the one message on the page the customer
   will never see is also the one message in the palette they never see. It overrides .is-staff,
   which a note also carries: the fact that matters about it is not that staff wrote it.

   A left bar as well as the wash, because the wash alone is a tint at the strength the accent one
   is, and "did I post that as a note?" is not a question to answer by comparing two pale
   backgrounds. */
.tk-msg.is-internal {
  background: color-mix(in srgb, var(--staff) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--staff) 40%, var(--border));
  border-left: 3px solid var(--staff);
}
.chip-staff {
  background: var(--staff-tint); border-color: transparent; color: var(--staff);
  font-size: 12px; height: 22px;
}
.tk-avatar {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--border); color: var(--text); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
}
.tk-avatar.is-staff { background: var(--primary); color: var(--on-primary); }
.tk-msg-main { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tk-msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.tk-msg-who { font-weight: 500; }
.tk-msg-when { color: var(--text-faint); font-size: 13px; }
.tk-msg-body { margin: 0; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-inset {
  padding: 10px 12px; border-radius: var(--radius-tile); background: var(--inset);
  border: 1px solid var(--border-soft); font-size: 14px; color: var(--text-muted);
}
.tk-inset-val { color: var(--text); }
.tk-files { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-file {
  height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--radius-tile); background: var(--raised); border: 1px solid var(--border);
  font-size: 13px; color: var(--text); max-width: 100%;
}
.tk-file:hover { background: var(--bg); border-color: var(--border-hover); text-decoration: none; }
.tk-file-size { color: var(--text-faint); }
/* a system event: not a message, so not a card — a line between two of them */
.tk-event { padding: 4px 22px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.tk-event-text { flex: 1; min-width: 0; }
.tk-event-when { color: var(--text-faint); white-space: nowrap; }
.tk-reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
/* the file input inside a button-shaped label: the input stays focusable, so the keyboard and the
   file picker work, and the label is what is painted */
.tk-attach { position: relative; overflow: hidden; }
.tk-attach input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---- the security page's activity log */
.acct-event { padding: 12px 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; align-items: center; border-top: 1px solid var(--border-soft); }
.acct-event-main { display: flex; flex-direction: column; min-width: 0; }
.acct-event-what { font-size: 14px; }
.acct-event-detail { font-size: 13px; color: var(--text-faint); }
.acct-event-when { font-size: 13px; color: var(--text-faint); white-space: nowrap; }

/* ---- narrower. The nav becomes a wrapped row of chips above the page (§14.0), which is what
   .container-side did and the one arrangement that does not cost a 232px column on a laptop. */
@media (max-width: 1060px) {
  .acct-table tr { grid-template-columns: 110px minmax(0, 1fr) 90px 130px 80px 100px 50px; }
}
@media (max-width: 960px) {
  .acct-shell { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .acct-nav { position: static; gap: 12px; }
  .acct-who { padding: 0; }
  .acct-group { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .acct-group-label { display: none; }
  .acct-item { border-color: var(--border); padding: 0 14px; }
  .acct-logout { width: auto; border-top: 0; padding: 0; }
  .acct-tiles { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .acct-pair { grid-template-columns: minmax(0, 1fr); }
  .acct-page-head h1 { font-size: 30px; }
  /* the table stops being a table: seven columns do not fit, so each invoice is a block */
  .acct-table thead { display: none; }
  .acct-table tr { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 20px; min-height: 0; }
  .acct-table tbody td { display: inline; }
  .acct-ticket { grid-template-columns: 36px minmax(0, 1fr); row-gap: 8px; }
  .acct-ticket > :nth-child(3), .acct-ticket > :nth-child(4) { grid-column: 2; }
  .acct-ticket-chev { display: none; }
  .acct-facts-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct-offrow { grid-template-columns: minmax(0, 1fr); }
  .tk-layout { grid-template-columns: minmax(0, 1fr); }
  .tk-side { position: static; }
  .co-shell { grid-template-columns: minmax(0, 1fr); }
  .co-sum { position: static; }
  .board-shell, .new-shell, .notif-shell { grid-template-columns: minmax(0, 1fr); }
  .search-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .search-filters { position: static; flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .search-group { flex: 1 1 200px; }
  .board-search input { width: 100%; }
  .board-search { flex: 1 1 200px; }
  /* the thread table stops being a table: five columns do not fit beside a readable title */
  .th-head { display: none; }
  .th-row { grid-template-columns: 36px minmax(0, 1fr); row-gap: 8px; }
  /* BY CLASS, not by position. .th-dot is rendered only for an UNREAD thread, and :nth-child
     counts it even though it is position:absolute — so on an unread row every index shifted by
     one, .th-last matched nothing and auto-placed into the 36px avatar track. */
  .th-row > .th-main, .th-row > .th-count, .th-row > .th-count-views, .th-row > .th-last { grid-column: 2; }
  .th-count { flex-direction: row; align-items: baseline; gap: 6px; }
  .th-title { white-space: normal; }
  .docs-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  /* the products table stops being a table: six columns do not fit beside a readable name */
  .prod-head { display: none; }
  .prod-row { grid-template-columns: 44px minmax(0, 1fr); row-gap: 10px; }
  .prod-row > :nth-child(3), .prod-row > :nth-child(4), .prod-row > :nth-child(5) { grid-column: 2; }
  .prod-price { align-items: flex-start; }
  .prod-chev { display: none; }
}
/* §15.3: the right-hand table of contents goes first, then the guide list becomes chips. */
@media (max-width: 1100px) {
  .doc-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 36px; }
  .doc-toc { display: none; }
}
@media (max-width: 860px) {
  .doc-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .doc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .doc-nav-label { display: none; }
  .doc-nav a { border-color: var(--border); padding: 0 14px; }
  .doc-article h1 { font-size: 32px; }
}
@media (max-width: 560px) {
  .acct-page-head h1 { font-size: 26px; }
  .co-card { padding: 22px 20px; }
  .co-methods { grid-template-columns: minmax(0, 1fr); }
  .doc-ends { grid-template-columns: minmax(0, 1fr); }
  .acct-tiles { grid-template-columns: minmax(0, 1fr); }
  .acct-fields { grid-template-columns: minmax(0, 1fr); }
  .acct-lic-head, .acct-facts-strip, .acct-lic-foot, .acct-row { padding-left: 18px; padding-right: 18px; }
  .acct-card, .acct-strip, .acct-hero { padding: 18px 20px; }
}

/* ---------------------------------------------------------------- misc utility */

.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .75rem; } .mb-1 { margin-bottom: .75rem; }
.mt-2 { margin-top: 1.5rem; } .mb-2 { margin-bottom: 1.5rem; }
.flex { display: flex; } .flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
/* Visible to a screen reader, invisible on screen. clip-path + 1px box rather than display:none or
   visibility:hidden, both of which remove the element from the accessibility tree as well — which
   would defeat the entire purpose. Used for the licence fieldset's <legend>, which names the radio
   group for assistive tech while the visible heading above it names it for everyone else. */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.text-danger { color: var(--danger); } .text-ok { color: var(--ok); } .text-muted { color: var(--text-muted); }
/* .empty-state is the ss21.1 pattern now - see the block at the end of this file. It used to be
   one centred muted line, which is what /status still rendered until phase 13b. */
.htmx-indicator { opacity: 0; transition: opacity .15s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.spinner {
  display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -.15em;
}
@keyframes spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 6px; }

/* ---------------------------------------------------------------- reduced motion

   Every transition in this file is a hover tint, a 1px button press or a 2px card lift — none of
   it carries meaning, so all of it can go. The htmx spinner is the one thing kept: it is a
   progress indicator, and a frozen spinner says "hung" rather than "loading". */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .spinner { animation-duration: .7s !important; animation-iteration-count: infinite !important; }
  .btn:active { transform: none; }
  .product-card:hover { transform: none; }
}

/* ---------------------------------------------------------------- forum (AE, phase 5)

   The index: a 1fr/340px grid of section cards over a sidebar. A section card is a header strip
   with hairline-separated BOARD ROWS, each row a four-track grid — icon, name+description, counts,
   latest activity. The row is one <a>, not a card full of links: the whole 72px strip is the
   target, which is what makes a board list quick to use.

   Rows are rendered from data, so a board added by forum.EnsureProductBoards or by hand in the
   database appears with no template or stylesheet change. */

.forum-container { padding: 44px 1.25rem 72px; }
.forum-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.forum-head-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.forum-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.forum-head h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; }
.forum-head p { margin: 0; font-size: 16px; color: var(--text-muted); }

.forum-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.forum-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.forum-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
.forum-section-head { min-height: 52px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.forum-section-head h2 { margin: 0; font-size: 16px; font-weight: 500; }
.forum-section-note { font-size: 13px; color: var(--text-muted); }
.forum-section-foot { margin: 0; padding: 16px 24px; border-top: 1px solid var(--border-soft); font-size: 14px; color: var(--text-muted); }

/* The four tracks are the design's. min-width:0 on the name track is what makes the ellipsis in
   .board-latest-title possible — without it the grid child takes its min-content width and a long
   thread title widens the whole page instead of truncating. */
.board-row {
  padding: 16px 24px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px 280px;
  gap: 16px; align-items: center; border-top: 1px solid var(--border-soft); color: var(--text);
  transition: background .14s ease;
}
.board-row:hover { background: #101217; text-decoration: none; color: var(--text); }
.board-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent-tile); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
/* a product's row gets its initial on a neutral tile rather than a glyph: the product IS the label */
.board-tile {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: var(--raised); border: 1px solid var(--border); box-sizing: border-box;
  color: var(--text); display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; text-transform: uppercase;
}
/* The licence card's tile (/dashboard/products) is 44px, four bigger than a board row's. It lives
   HERE, after .board-tile, and not up with the rest of the account card: at the same specificity
   the later rule wins, so declared earlier the modifier set nothing and the tile was 40px. */
.board-tile-lg { width: 44px; height: 44px; }
.board-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.board-title { font-size: 16px; font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-title .status-pill { font-size: 12px; padding: 0 8px; height: 22px; gap: 6px; font-weight: 500; }
.board-title .status-pill .status-dot { width: 5px; height: 5px; }
.board-desc { font-size: 14px; color: var(--text-muted); }
.board-counts { display: flex; flex-direction: column; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.board-latest { display: flex; align-items: center; gap: 10px; min-width: 0; }
.board-latest-avatar {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; text-transform: uppercase;
}
.board-latest-text { display: flex; flex-direction: column; min-width: 0; }
.board-latest-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-latest-meta { font-size: 13px; color: var(--text-muted); }
.board-latest-empty { font-size: 13px; color: var(--text-faint); }

.forum-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: var(--sticky-top); }
/* The plus sign on "New thread" is for the phone button only (ss19); on a desktop the words are
   the button and a glyph beside them is decoration. */
.forum-new-ico { display: none; }
.forum-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.forum-card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.forum-card-empty { margin: 0; font-size: 14px; color: var(--text-muted); }

/* Below 1100 the sidebar goes under the list; below 860 the two right-hand tracks of a board row
   stop fitting beside a readable name, so the row becomes icon + name and drops the counts and the
   latest-post column rather than crushing all four. */
@media (max-width: 1100px) {
  .forum-page { grid-template-columns: minmax(0, 1fr); }
  .forum-side { position: static; }
}
/* The board rows, the head and the section padding at this width are §19's now — see the phone
   block at the end of this file. What is left here is the container's own padding, which §19 sets
   to the 16px gutter. */
@media (max-width: 860px) {
  .forum-container { padding: 24px 16px 40px; }
}

/* ---------------------------------------------------------------- forum: board & thread */

.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--text); text-decoration: none; }

/* chips: the small state markers on threads and posts. chip is also the Requirements chip on the
   product page — same shape, so it is defined once there and only the variants live here. */
.chip-quiet { background: var(--raised); border-color: var(--border); color: var(--text-muted); font-size: 12px; height: 22px; }
.chip-ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); font-size: 12px; height: 22px; }
.chip-accent { background: var(--accent-badge-bg); border-color: transparent; color: var(--accent-badge-text); font-size: 12px; height: 22px; }

.thread-row {
  padding: 14px 24px; display: grid; grid-template-columns: minmax(0, 1fr) 110px 220px; gap: 16px;
  align-items: center; border-top: 1px solid var(--border-soft); color: var(--text);
  transition: background .14s ease;
}
.thread-row:hover { background: #101217; text-decoration: none; color: var(--text); }
.thread-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.thread-title { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-meta, .thread-counts, .thread-latest { font-size: 13px; color: var(--text-muted); }
.thread-counts { font-variant-numeric: tabular-nums; }
.forum-empty { margin: 0; padding: 20px 24px; border-top: 1px solid var(--border-soft); font-size: 14px; color: var(--text-muted); }

.thread-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.thread-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-head h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; }
.thread-submeta { margin: 0; font-size: 14px; color: var(--text-muted); }

.posts { display: flex; flex-direction: column; gap: 12px; }
/* 200px author column, as drawn. The column is --inset so the body reads as the content and the
   author as the label beside it. */
.post {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
}
.post-author {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 20px 16px; background: var(--inset); border-right: 1px solid var(--border-soft);
}
.post-avatar {
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 500; text-transform: uppercase;
}
.post-name { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.post-role { font-size: 12px; color: var(--text-muted); }
.post-body { padding: 18px 22px; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.post-number { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.post-edited { font-style: italic; }
/* User-written content. The margins are set here because the markdown renderer emits bare <p>,
   <ul>, <pre> and so on with no classes of its own. */
.post-content { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.post-content > :first-child { margin-top: 0; }
.post-content > :last-child { margin-bottom: 0; }
.post-content pre { background: var(--inset); border: 1px solid var(--border-soft); }
.post-content blockquote {
  margin: 1em 0; padding: .2em 0 .2em 1em;
  border-left: 2px solid var(--border-strong); color: var(--text-muted);
}
.post-content img { max-width: 100%; }

/* the accepted answer */
.post.is-solution {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}
.post.is-solution .post-author { background: color-mix(in srgb, var(--accent) 7%, var(--inset)); }

/* "Solved — X's answer is marked as the solution." under the question, as drawn. Green, not
   accent: it is a status, and the accent in this design is reserved for the answer itself. */
.solved-box {
  margin-top: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-radius: var(--radius); background: rgba(61, 220, 151, .07); border: 1px solid rgba(61, 220, 151, .22);
}
.solved-icon { color: var(--ok); display: flex; flex-shrink: 0; }
.solved-text { flex: 1; min-width: 0; font-size: 14px; }
.solved-jump { font-size: 14px; font-weight: 500; }
.post-marked { font-size: 12px; color: var(--text-faint); }

/* the sidebar's facts list */
.thread-facts { margin: 0; display: flex; flex-direction: column; }
.thread-facts > div {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--border-soft); font-size: 14px;
}
.thread-facts dt { color: var(--text-muted); }
.thread-facts dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.thread-facts .is-solved { color: var(--ok); }
.avatar-stack { display: flex; }
.stack-avatar {
  width: 26px; height: 26px; border-radius: var(--radius-pill); background: var(--border);
  border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: 11px; text-transform: uppercase;
}
.stack-avatar + .stack-avatar { margin-left: -7px; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.related-list a { font-size: 14px; line-height: 1.5; color: var(--text); }
.related-list a:hover { color: var(--text); }

.composer {
  margin-top: 16px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 22px; box-shadow: var(--shadow);
}
.composer label { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.composer-who { display: flex; align-items: center; gap: 10px; }
.composer-who .post-avatar { width: 32px; height: 32px; font-size: 14px; }
.composer-tools { display: flex; gap: 4px; margin-left: -8px; }
.composer-tools[hidden] { display: none; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.composer-foot .hint { margin: 0; }

@media (max-width: 860px) {
  .thread-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 14px 18px; }
  .thread-counts, .thread-latest { display: none; }
  .thread-head h1 { font-size: 24px; }
  /* the author column becomes a row above the body: 200px of avatar beside a 170px-wide post is
     most of the screen spent on a name. */
  .post { grid-template-columns: minmax(0, 1fr); }
  .post-author {
    flex-direction: row; justify-content: flex-start; gap: 10px; text-align: left;
    padding: 12px 18px; border-right: 0; border-bottom: 1px solid var(--border-soft);
  }
  .post-avatar { width: 30px; height: 30px; font-size: 13px; }
  .post-body { padding: 16px 18px; }
}

/* ---------------------------------------------------------------- forum: product hub & locked */

.hub-head { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.hub-tile {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 18px;
  background: var(--raised); border: 1px solid var(--border); box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 500; text-transform: uppercase; color: var(--text);
}
.hub-head-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.hub-head h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 600; letter-spacing: -.03em; }
.hub-sub { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); }

/* sidebar cards: label/value pairs and the people list */
.side-facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.side-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.side-facts dt { font-size: 13px; color: var(--text-muted); }
.side-facts dd { margin: 0; font-size: 14px; }
.forum-card-row { margin: 0 0 8px; }
.forum-card-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 500; }
.forum-card .forum-card-empty + .forum-card-empty { margin-top: 4px; }
.side-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.side-people li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
/* The moderation page's two sidebar lists (§22.6: staff online, the guidelines). Same shape as
   .side-people, which the forum index uses — it had no rule at all, so both rendered as browser
   default <ul>s with bullets and 40px of indent inside a card. */
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.side-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.side-list li a { color: var(--text); }
.side-badge {
  margin-left: auto; height: 20px; padding: 0 8px; display: inline-flex; align-items: center;
  border-radius: var(--radius-pill); background: var(--raised); border: 1px solid var(--border);
  font-size: 11px; color: var(--text-muted); white-space: nowrap;
}
.side-avatar-sm {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--raised); border: 1px solid var(--border); box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; text-transform: uppercase;
}

/* the locked page */
.locked-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
  padding: 44px 32px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.locked-tile {
  position: relative; width: 72px; height: 72px; border-radius: 20px;
  background: var(--raised); border: 1px solid var(--border); box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 500; text-transform: uppercase; color: var(--text-muted);
}
.locked-badge {
  position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px;
  border-radius: var(--radius-pill); background: var(--primary); color: var(--on-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--surface);
}
.locked-card h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.locked-card p { margin: 0; max-width: 46ch; font-size: 15px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.locked-actions { justify-content: center; margin-top: 4px; }
.locked-note { font-size: 13px !important; color: var(--text-faint) !important; }

@media (max-width: 860px) {
  .hub-head { gap: 14px; }
  .hub-tile { width: 52px; height: 52px; border-radius: 15px; font-size: 20px; }
  .hub-head h1 { font-size: 26px; }
  .locked-card { padding: 32px 20px; }
}

/* post actions: quiet text buttons under a post's body */
.post-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.post-actions form { margin: 0; }
.post-action {
  height: 30px; padding: 0 11px; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.post-action:hover { color: var(--text); border-color: var(--border-hover); }
/* the pressed state of Helpful — aria-pressed carries it for assistive tech, this carries it
   visually, and both are set from the same HelpfulByMe value */
.post-action.is-on {
  background: var(--accent-badge-bg); border-color: transparent; color: var(--accent-badge-text);
}
.post-action.is-static { cursor: default; background: transparent; }
.post-action.is-static:hover { color: var(--text-muted); border-color: var(--border); }

/* forum search box, and the moderator bar on a thread */
.forum-search { position: relative; display: flex; margin: 0; }
.forum-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--placeholder); display: flex; pointer-events: none; }
.forum-search input { width: 300px; max-width: 100%; min-height: 42px; padding-left: 40px; }
.mod-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
  padding: 10px 14px; background: var(--raised); border: 1px solid var(--border-soft);
  border-radius: var(--radius); 
}
.mod-bar form { margin: 0; }
.mod-label { font-size: 12px; font-weight: 500; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.post-action.is-danger { color: var(--danger); }
.post-action.is-danger:hover { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }
@media (max-width: 860px) { .forum-search input { width: 100%; } }

/* the nav bell, and the notifications list */
.nav-bell {
  position: relative; width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); color: var(--text-muted);
  transition: background .14s ease, color .14s ease;
}
.nav-bell:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-bell.has-unread { color: var(--text); }
/* ring in --surface so the dot reads as sitting ON the bar rather than behind it */
.nav-bell-dot {
  position: absolute; top: 6px; right: 7px; width: 7px; height: 7px;
  border-radius: var(--radius-pill); background: var(--accent); box-shadow: 0 0 0 2px var(--surface);
}
.thread-follow { margin: 4px 0 0; }

/* The notifications PAGE's rules live up in the phase-11 block; the set that used to be here was
   the 2026-10-12 list, and being LATER in the file it quietly won — the page rendered with three
   columns where it asks for four, which put "Mark as read" on a line of its own under the icon.
   Deleted rather than reordered: the page it styled no longer exists. */

/* ---------------------------------------------------------------- tickets (AE, phase 6) */

.ticket-step { padding: 0; margin: 0 0 .6rem; font-size: 13px; font-weight: 500; color: var(--text-muted); }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat-card {
  display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 14px 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.cat-card:hover { border-color: var(--border-hover); }
/* The radio is hidden but FOCUSABLE — never display:none, which would take it out of the tab order
   and make the group unusable from the keyboard. :has() paints the selected state without JS; the
   .is-on class app.js maintains is the fallback for a browser without it. */
.cat-card input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.cat-card:has(input:checked), .cat-card.is-on {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}
.cat-card:has(input:focus-visible) { box-shadow: var(--focus); }
.cat-name { font-size: 15px; font-weight: 500; color: var(--text); }
.cat-desc { font-size: 13px; line-height: 1.45; color: var(--text-muted); }

/* Category-dependent fields, keyed on data-category — which the TEMPLATE renders from the
   validated category (ticket_new.html) and app.js then keeps in step as the radios change.
   It used to be set by app.js alone, and the comment here claimed the attribute's absence "shows
   both, which is the correct no-JS state". The second rule says the opposite: :not([data-category])
   matches an element with no such attribute, so with JS off the required "What changed?" select was
   hidden on the default (HWID) category and that ticket could not be submitted at all. */
[data-ticket-form][data-category="other"] [data-ticket-product] { display: none; }
[data-ticket-form]:not([data-category="hwid"]) [data-ticket-hwid] { display: none; }

.ticket-warn { display: flex; align-items: center; gap: 8px; margin: 0 0 1.1rem; font-size: 13px; color: var(--text-muted); }
.ticket-warn svg { flex-shrink: 0; }

.ticket-row { grid-template-columns: minmax(0, 1fr) auto; }
.ticket-status {
  display: inline-flex; align-items: center; gap: .45em; height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
/* The two OPEN states are the ones that need to stand out in a list; resolved and closed recede. */
.ticket-waiting_staff { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.ticket-waiting_user { background: var(--info-bg); border-color: var(--info-border); color: var(--info); }
.ticket-resolved { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.ticket-closed { background: var(--raised); border-color: var(--border); color: var(--text-muted); }
.chip-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); font-size: 12px; height: 20px; }

.support-row { padding: 18px 24px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; border-top: 1px solid var(--border-soft); }
.support-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.support-chips a { color: var(--text); }
.support-chips a:hover { border-color: var(--border-hover); text-decoration: none; }
.support-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* the conversation */
.messages { display: flex; flex-direction: column; gap: 10px; }
.msg {
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
/* a staff reply is the one the customer is waiting for, so it is the one that is marked */
.msg.is-staff {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.msg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.msg-who { font-size: 14px; font-weight: 500; }
.msg-when { font-size: 13px; color: var(--text-muted); }
/* pre-wrap: ticket bodies are plain text, and a customer pasting a log or an error expects their
   line breaks to survive */
.msg-body { margin: 0; font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-close { margin-top: 10px; }

@media (max-width: 640px) {
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .support-row { grid-template-columns: 44px minmax(0, 1fr); }
  .support-actions { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- ticket attachments (0178)

   The design draws a dashed drop zone. It is a <label> wrapping a real file input rather than a
   scripted drop target: the input is what makes it keyboard reachable and what makes it work with
   JS off, and a drop target that only accepts drops is unusable for anyone who cannot drag. */
.dropzone {
  min-height: 76px; padding: 14px 16px; display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; text-align: center;
  border: 1px dashed var(--border-hover); border-radius: var(--radius);
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.dropzone:hover { border-color: var(--text-faint); color: var(--text); background: var(--raised); }
.dropzone:focus-within { border-color: var(--accent); box-shadow: var(--focus); color: var(--text); }
.dropzone input[type="file"] { flex-basis: 100%; font-size: 13px; color: var(--text-muted); }
.field-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: .4rem; }
.hint-inline { font-weight: 400; color: var(--text-faint); }

.msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.msg-file {
  width: 120px; height: 80px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: var(--inset); display: block;
}
.msg-file img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-file:hover { border-color: var(--border-hover); }

/* ---------------------------------------------------------------- the create-ticket page

   Two columns, as drawn: the form, and the two cards that answer "have I already asked this?" and
   "should I be asking at all?". Same .forum-side as the forum pages, so the sidebars match. */
.ticket-page { max-width: calc(var(--content) + 2.5rem); }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ticket-main { min-width: 0; }
/* The icon tile sits BESIDE the text, as drawn — a two-column grid rather than the original
   single column, with the name and the description stacked in the second track. The radio itself
   is position:absolute (focusable, not displayed), so it takes no cell. */
.cat-card {
  position: relative;
  display: grid; grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas: "icon name" "icon desc";
  column-gap: 14px; row-gap: 3px; align-items: start;
}
.cat-card .cat-icon { grid-area: icon; }
.cat-card .cat-name { grid-area: name; }
.cat-card .cat-desc { grid-area: desc; }
.cat-icon {
  width: 36px; height: 36px; border-radius: var(--radius-tile); flex-shrink: 0;
  display: grid; place-items: center; background: var(--raised); color: var(--text-muted);
  transition: background .14s ease, color .14s ease;
}
.cat-card:has(input:checked) .cat-icon, .cat-card.is-on .cat-icon {
  background: color-mix(in srgb, var(--accent) 18%, var(--raised)); color: var(--accent);
}
.side-tickets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.side-tickets li { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.side-tickets a { font-size: 14px; color: var(--text); }
.side-ticket-meta { font-size: 12px; color: var(--text-faint); }
.side-rules { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-muted); }
@media (max-width: 860px) {
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ================================================================ phase 7: profiles & account

   The profile card, the member profile, the account menu, the notification panel and the forum
   settings page (AE-Forum-UserCard / Profile / AccountMenu / Notifications / Settings).

   One shared idea: all three popovers are the same floating panel — --surface, 1px --border-strong,
   radius 16, the heavy floating shadow — differing only in width (330 card, 290 menu, 420 bell),
   because they appear in the same places and a reader should not have to learn three objects. */

.av-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* the floating panel, shared */
.pcard, .nav-panel {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .35);
  overflow: hidden;
}

/* ---------------------------------------------------------------- the profile card (330px) */
.pcard-host { position: absolute; z-index: 60; width: 330px; }
.pcard { display: flex; flex-direction: column; }
.pcard-banner { height: 56px; background: color-mix(in srgb, var(--accent) 10%, var(--raised)); border-bottom: 1px solid var(--border-soft); }
.pcard-body { padding: 0 18px 18px; margin-top: -28px; display: flex; flex-direction: column; gap: 14px; }
.pcard-top { display: flex; align-items: flex-end; justify-content: space-between; }
.pcard-avatar-wrap { position: relative; display: flex; }
.pcard-avatar {
  width: 56px; height: 56px; flex-shrink: 0; box-sizing: border-box; border-radius: var(--radius-pill);
  background: var(--border-strong); color: var(--text); border: 3px solid var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 500;
  overflow: hidden; text-transform: uppercase;
}
.pcard-dot {
  position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px;
  border-radius: var(--radius-pill); background: var(--ok); border: 2px solid var(--surface);
}
.pcard-id { display: flex; align-items: center; gap: 8px; }
.pcard-name { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.pcard-when { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.online-dot {
  width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--ok);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, .15); flex-shrink: 0;
}
.pcard-bio { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.pcard-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--inset);
}
.pcard-stats span { padding: 10px 12px; display: flex; flex-direction: column; font-size: 12px; color: var(--text-muted); }
.pcard-stats span + span { border-left: 1px solid var(--border-soft); }
.pcard-stats b { font-size: 16px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.pcard-owns { display: flex; flex-direction: column; gap: 8px; }
.pcard-label { font-size: 12px; color: var(--text-faint); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard-actions { display: flex; gap: 8px; padding-top: 2px; }
.pcard-actions .btn { flex: 1; }
.pcard-actions form { display: flex; }
/* the name that opened it, while it is open */
.post-name.is-carded { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); text-underline-offset: 4px; }

/* ---------------------------------------------------------------- nav popovers */
/* .nav-staff-wrap joins the other two rather than getting a rule of its own: the shield's menu is
   positioned by .nav-panel exactly as the bell's and the avatar's are, and a separate wrapper rule
   would be a second place for the same three properties to drift. */
.nav-bell-wrap, .nav-user-wrap, .nav-staff-wrap { position: relative; display: flex; }
.nav-panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; }
.nav-panel[hidden] { display: none; }
.nav-bell.is-open, .nav-user.is-open { background: var(--bg); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
/* The shield's open ring is VIOLET, not accent. It is the only violet control in the bar and that
   is deliberate (§22.6) — giving it the accent ring on open would make the one staff control look
   like the two member ones at exactly the moment it is in use. */
.nav-staff.is-open { background: var(--staff-tint); box-shadow: 0 0 0 2px color-mix(in srgb, var(--staff) 55%, transparent); }
.nav-avatar { overflow: hidden; }

/* the account menu (290px) */
.nav-menu { width: 290px; padding: 8px; }
/* Narrower than the account menu's 290px: two items, the longer of them "Moderation queue" plus a
   count chip. MUST SIT AFTER .nav-menu — the shield's panel carries both classes and the two
   selectors have equal specificity, so source order is the only thing that decides. It was four
   lines ABOVE and did nothing at all. Not fixed by raising specificity: a .nav-panel.nav-staff-menu
   here would beat .nav-menu for width and start a precedence race with every other rule in this
   block. */
.nav-staff-menu { width: 230px; }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--border-soft); }
.menu-avatar {
  width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 16px; overflow: hidden; text-transform: uppercase;
}
.menu-who { display: flex; flex-direction: column; min-width: 0; }
.menu-name { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.menu-sub { font-size: 13px; color: var(--text-muted); text-transform: capitalize; }
.menu-items { display: flex; flex-direction: column; padding: 6px 0; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--radius-tile); background: none;
  color: var(--text-muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--raised); color: var(--text); text-decoration: none; }
.menu-badge {
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: color-mix(in srgb, var(--accent) 62%, #fff); font-size: 12px;
}
.menu-badge-warn { background: var(--warn-bg); color: var(--warn); }
.menu-switch { border-top: 1px solid var(--border-soft); border-radius: 0; margin-top: 6px; padding-top: 6px; }
.menu-switch-state {
  width: 40px; height: 24px; border-radius: var(--radius-pill); background: var(--border-strong);
  position: relative; flex-shrink: 0; transition: background .14s ease;
}
.menu-switch-state::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: var(--radius-pill); background: var(--primary); transition: transform .14s ease;
}
.menu-switch-state.is-on { background: var(--accent); }
.menu-switch-state.is-on::after { transform: translateX(16px); }
.menu-logout { border-top: 1px solid var(--border-soft); padding-top: 6px; }

/* the notification panel (420px) */
.npanel { width: 420px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; }
.npanel-head { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border-soft); }
.npanel-head h2 { margin: 0; font-size: 15px; font-weight: 500; }
.npanel-tabs { display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
.npanel-tabs a {
  height: 30px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--radius-pill);
  font-size: 13px; color: var(--text-muted);
}
.npanel-tabs a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.npanel-tabs a[aria-selected="true"] { background: var(--bg); color: var(--text); }
.npanel-list { max-height: 420px; overflow-y: auto; }
.npanel-row {
  padding: 12px 16px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px;
  align-items: start; border-top: 1px solid var(--border-soft); color: var(--text);
}
.npanel-row:first-child { border-top: 0; }
.npanel-row:hover { background: var(--raised); text-decoration: none; }
.npanel-row.is-new { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.npanel-icon {
  width: 36px; height: 36px; border-radius: var(--radius-tile); display: grid; place-items: center;
  background: var(--raised); color: var(--text-muted);
}
.npanel-solution { background: rgba(61, 220, 151, .12); color: var(--ok); }
.npanel-mention, .npanel-announcement { background: color-mix(in srgb, var(--accent) 14%, var(--raised)); color: var(--accent); }
.npanel-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.npanel-text { font-size: 14px; line-height: 1.45; }
.npanel-subject { font-weight: 500; }
.npanel-when { font-size: 12px; color: var(--text-faint); }
.npanel-dot { width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--accent); margin-top: 6px; }
.npanel-empty { padding: 20px 16px; }
.npanel-foot { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border-soft); font-size: 13px; }

/* ---------------------------------------------------------------- the profile page */
.pf-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 24px; }
.pf-banner { height: 120px; background: color-mix(in srgb, var(--accent) 9%, var(--inset)); border-bottom: 1px solid var(--border-soft); }
.pf-id { padding: 0 32px 24px; display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pf-avatar-wrap { position: relative; display: flex; margin-top: -48px; }
.pf-avatar {
  width: 96px; height: 96px; flex-shrink: 0; box-sizing: border-box; border-radius: var(--radius-pill);
  background: var(--border-strong); color: var(--text); border: 4px solid var(--surface);
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 500;
  overflow: hidden; text-transform: uppercase;
}
.pf-dot { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: var(--radius-pill); background: var(--ok); border: 3px solid var(--surface); }
.pf-id-main { display: flex; flex-direction: column; gap: 6px; padding-bottom: 2px; min-width: 0; flex: 1; }
.pf-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-name-row h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.025em; overflow-wrap: anywhere; }
.pf-when { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.pf-actions { display: flex; gap: 8px; align-items: center; }
.pf-bio { margin: 0; padding: 0 32px 24px; max-width: 640px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border-soft); background: var(--inset); }
.pf-stats > div { padding: 18px 24px; display: flex; flex-direction: column; gap: 2px; }
.pf-stats > div + div { border-left: 1px solid var(--border-soft); }
.pf-stat { font-size: 22px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pf-stat-label { font-size: 13px; color: var(--text-muted); }
.pf-note { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-faint); margin-top: 4px; }

/* the segmented tabs, as links */
.pf-tabs { align-self: flex-start; display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); margin-bottom: 14px; }
/* nowrap, because the moderation page's tabs carry a count ("Reports · 1") and at 390px the
   number wrapped under its own word, giving a row of two-line chips of different heights. The row
   is inline-flex inside a container that scrolls, so a long row moves rather than stacking. */
.pf-tabs a { height: 34px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.pf-tabs a:hover { color: var(--text); text-decoration: none; }
.pf-tabs a[aria-current="page"] { background: var(--bg); color: var(--text); }

/* one activity row */
.act-row { padding: 16px 22px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: start; border-top: 1px solid var(--border-soft); color: var(--text); }
.act-row:hover { background: #101217; text-decoration: none; }
.act-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--raised); color: var(--text-muted); }
.act-solution { background: rgba(61, 220, 151, .12); color: var(--ok); }
.act-thread { }
.act-icon.act-thread { background: color-mix(in srgb, var(--accent) 14%, var(--raised)); color: var(--accent); }
.act-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.act-text { font-size: 15px; line-height: 1.45; }
.act-text .act-thread { font-weight: 500; }
.act-snippet { font-size: 14px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-when { font-size: 13px; color: var(--text-faint); white-space: nowrap; }

/* the thread page's author column grew two lines */
.post-joined { font-size: 12px; color: var(--text-faint); line-height: 1.4; }
.post-name { font-weight: 500; }
.post-muted > summary { cursor: pointer; font-size: 14px; color: var(--text-muted); padding: 10px 0; list-style: none; }
.post-muted > summary::-webkit-details-marker { display: none; }
.post-muted-show { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-hover); }
.post.is-muted { opacity: .85; }

/* ---------------------------------------------------------------- forum settings */
.set-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.set-nav { position: sticky; top: var(--sticky-top); display: flex; flex-direction: column; gap: 2px; }
.set-nav a { height: 38px; padding: 0 12px; display: flex; align-items: center; border-radius: var(--radius-tile); color: var(--text-muted); font-size: 14px; }
.set-nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.set-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.set-card h2 { margin: 0; font-size: 18px; font-weight: 500; }
.set-card-inner { margin-top: -8px; }
.set-avatar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.set-avatar-img {
  width: 72px; height: 72px; border-radius: var(--radius-pill); background: var(--border-strong);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 500;
  overflow: hidden; text-transform: uppercase; flex-shrink: 0;
}
.set-avatar-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.set-avatar-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* the file input inside a button-shaped label: the input stays focusable, so the keyboard and the
   screen reader get a real control rather than a styled div that only a mouse can use. */
.set-file { position: relative; overflow: hidden; }
.set-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.set-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }

/* switches: a real checkbox, drawn as the design's 40x24 track with a 20px knob */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; margin: 0; cursor: pointer; }
.switch-row + .switch-row { border-top: 1px solid var(--border-soft); }
.switch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-name { font-size: 15px; color: var(--text); }
.switch-desc { font-size: 13px; color: var(--text-muted); }
.switch {
  appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0;
  width: 40px; height: 24px; border-radius: var(--radius-pill); background: var(--border-strong);
  position: relative; cursor: pointer; transition: background .14s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: var(--radius-pill); background: var(--primary); transition: transform .14s ease;
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: none; box-shadow: var(--focus); }

.matrix { display: flex; flex-direction: column; }
.matrix-head, .matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px; align-items: center; }
.matrix-head { padding: 8px 0; font-size: 13px; color: var(--text-muted); }
.matrix-head span + span, .matrix-cell { text-align: center; justify-self: center; }
.matrix-row { padding: 14px 0; border-top: 1px solid var(--border-soft); }
.matrix-label { font-size: 15px; }
.matrix-locked { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-faint); }
/* A row with no in-app form at all (round 16's renewal reminder): an em dash, not a dead switch.
   Same muted weight as .matrix-locked so the two "nothing to press here" cells read alike. */
.matrix-na { font-size: 13px; color: var(--text-faint); }

.mute-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mute-list li {
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  border-radius: var(--radius); background: var(--inset); border: 1px solid var(--border-soft);
}
.mute-avatar { width: 32px; height: 32px; border-radius: var(--radius-pill); background: var(--border-strong); display: grid; place-items: center; font-size: 13px; text-transform: uppercase; }
.mute-name { font-size: 14px; }
.mute-since { font-size: 13px; color: var(--text-faint); margin-left: auto; }

@media (max-width: 860px) {
  .set-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .set-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .set-nav a { border: 1px solid var(--border); border-radius: var(--radius-pill); }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-stats > div:nth-child(3) { border-left: 0; }
  .pf-stats > div:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
  .pf-id { padding: 0 20px 20px; }
  .pf-bio { padding: 0 20px 20px; }
  /* The nav panels are FIXED to the viewport below 860, not anchored to the bell. Anchored, a
     420px panel hanging off a chip that sits 60px from the right edge is 345px of it off-screen —
     measured at 375: the page scrolled to 615px wide. Fixed, both panels are one inset from the
     window and the page cannot grow at all. */
  .nav-panel { position: fixed; top: 72px; left: 12px; right: 12px; width: auto; }
  .npanel, .nav-menu { width: auto; max-width: none; }
  .npanel-list { max-height: 60vh; }
  .pcard-host { width: min(330px, calc(100vw - 24px)); }
  /* the author row wraps instead of breaking a username in half */
  .post-author { flex-wrap: wrap; }
  .post-joined { flex-basis: 100%; }
}

/* ---------------------------------------------------------------- phase 7 review fixes (2026-10-16)

   Everything here answers a finding from the verification pass over phase 7. */

/* The author's name became a LINK in phase 7, and nothing re-stated its colour, so every name on
   a thread page inherited the global `a { color: var(--brand) }` and rendered accent blue where
   the design has plain text with the accent reserved for the open-card underline. */
.post-name, .post-name:hover { color: var(--text); text-decoration: none; }
.post-name:hover { text-decoration: underline; text-decoration-color: var(--border-hover); }

/* §12.4: "text with names in 500, one-line subject (ellipsis)". The weight was on the subject and
   the subject was inline, so a long thread title wrapped the row instead of being clipped. */
.npanel-text { font-weight: 500; }
.npanel-subject {
  display: block; font-weight: 400; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* The account menu's presence dot (green/grey), which the design draws beside the row's label. */
.menu-switch-label { display: inline-flex; align-items: center; gap: 8px; }
.menu-dot {
  width: 8px; height: 8px; border-radius: var(--radius-pill); background: var(--text-faint); flex-shrink: 0;
}
.menu-dot.is-on { background: var(--ok); box-shadow: 0 0 0 3px rgba(61, 220, 151, .15); }

/* The file input is invisible (opacity 0) inside a clipped label, so :focus-visible painted a ring
   nobody could see — the keyboard path to "Choose image" had no indicator at all. The ring goes on
   the LABEL instead, driven by focus inside it. */
.set-file:focus-within { box-shadow: var(--focus); border-color: var(--accent); }

/* the settings section nav, with the design's icon and current-section pill */
.set-nav a { gap: 10px; }
.set-nav-icon { display: inline-flex; color: var(--text-faint); }
.set-nav a[aria-current="true"] { background: var(--surface); color: var(--text); }
.set-nav a[aria-current="true"] .set-nav-icon { color: var(--accent); }

/* the read-only username's lock, inside the field as drawn */
.locked-field { position: relative; display: block; }
.locked-field input { padding-right: 40px; }
.locked-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  display: inline-flex; color: var(--text-faint); pointer-events: none;
}

/* the bio counter sits on the label's row */
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bio-count { font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* Save changes / Cancel: right-aligned, Cancel first, as the design has them. */
.set-actions { justify-content: flex-end; }

/* The switch descriptions are body text, not labels: 14px at 400, where they were inheriting the
   label rule's 500 at 13px. */
.switch-desc { font-size: 14px; font-weight: 400; }

/* the profile card's two actions, at the design's size */
.pcard-actions .btn, .pcard-actions .btn-sm { min-height: 40px; border-radius: 11px; }

/* the Threads tab's "Solved" line */
.act-solved { font-size: 14px; color: var(--ok); }

/* the avatar is a card trigger as well as the name, and both show the open state the design draws:
   an accent underline on the name, a 3px accent-45% ring on the avatar. */
.post-avatar-link { display: inline-flex; border-radius: var(--radius-pill); }
.post-avatar-link:focus-visible { outline: none; box-shadow: var(--focus); }
.post-avatar-link.is-carded .post-avatar,
.post-avatar-link:hover .post-avatar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }

/* thread paging (added with the LIMIT that made it necessary) */
.pager { margin-top: 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-size: 14px; }
.pager a { color: var(--text-muted); }
.pager a:hover { color: var(--text); }
.pager a:last-child { text-align: right; }
.pager-at { color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- the error page (§17.1)
   One block for 404/403/500 — see pages/error.html. The numeral is an OUTLINE: transparent fill
   with a 1px stroke, which is why it needs -webkit-text-stroke (every engine we target supports
   the prefixed property; there is no unprefixed one). A browser that ignores it shows nothing at
   all where the numeral is, which is harmless — the <h1> underneath carries the message, and the
   numeral is aria-hidden for the same reason. */
.err-wrap {
  min-height: min(68vh, 620px); display: flex; align-items: center; justify-content: center;
}
.err-card { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.err-code {
  font-size: clamp(72px, 14vw, 120px); line-height: 1; font-weight: 600; letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 1px var(--border-hover);
}
.err-card h1 { margin: 8px 0 0; font-size: clamp(26px, 4vw, 32px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em; }
.err-card > p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-muted); }
.err-acts { padding-top: 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* The three quick cards. They stay a 3-up grid down to the phone, where 1fr columns of ~100px
   still fit an icon and one word — stacking them would push the two buttons above off the fold
   for no gain. */
.err-links {
  margin-top: 24px; width: 100%; padding-top: 24px; border-top: 1px solid var(--border-soft);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.err-link {
  padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); font-size: 14px;
}
.err-link:hover { border-color: var(--border-hover); }
.err-link:focus-visible { outline: none; box-shadow: var(--focus); }

@media (max-width: 480px) {
  .err-links { gap: 8px; }
  .err-link { padding: 12px 8px; }
}

/* ---------------------------------------------------------------- the auth notice card (§17.2)
   Six states of pages/auth_notice.html, inside the same shell as login. The card itself is
   .auth-card; only the padding differs (32px all round rather than 28/32), so it is set from here
   instead of adding a modifier class to the shell partial every auth page would have to pass. */
.auth-main:has(.notice) .auth-card { padding: 32px; }
.notice { display: flex; flex-direction: column; gap: 20px; }
.notice-tile {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--raised); color: var(--text);
}
.notice-tile-ok { background: var(--ok-bg); color: var(--ok); }
.notice-tile-warn { background: var(--warn-bg); color: var(--warn); }
.notice-head { display: flex; flex-direction: column; gap: 8px; }
.notice-head h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.notice-head p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
/* the masked address, lifted out of the muted line it sits in */
.notice-email { color: var(--text); }
.notice-acts { display: flex; flex-direction: column; gap: 12px; }
/* the POST button is a form, so the button inside it carries the width rather than the form */
.notice-acts form { margin: 0; display: flex; }
.notice-quiet { align-self: center; font-size: 14px; color: var(--text-muted); }
.notice-quiet:hover { color: var(--text); text-decoration: none; }
.notice-foot {
  padding-top: 18px; border-top: 1px solid var(--border-soft);
  font-size: 13px; line-height: 1.55; color: var(--text-muted);
}

/* The neutral 64px circle on the in-app result card (pages/notice.html): §15.6's "same card,
   neutral icon" for a cancelled payment. Beside .co-tile-ok / .co-tile-bad, which it matches in
   size — see the note there for why these are three classes and not one plus a tone. */
.co-tile-mute { width: 64px; height: 64px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; background: var(--raised); color: var(--text-muted); }

/* ---------------------------------------------------------------- the legal pages (§17.3)
   The docs article, three differences: 20px section headings instead of 22, a date line instead
   of a lead paragraph, and a NEUTRAL callout. The docs callout is accent-tinted because it is a
   tip worth noticing in a guide; on a legal page the one callout is the "not reviewed by a
   lawyer" note, and tinting that the colour of a helpful aside reads as decoration. */
.legal-article h2 { font-size: 20px; letter-spacing: -.01em; }
/* beats `.doc-article h1 + p`, which is the 19px lead every guide opens with */
.legal-article h1 + .legal-date { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.legal-article .doc-note {
  margin-top: 6px; background: var(--inset); border-color: var(--border-soft);
  font-size: 14px; line-height: 1.55;
}
.legal-article .doc-note p { font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.legal-article .doc-note-icon { padding-top: 1px; color: var(--text-faint); }

/* ================================================================================================
   §20 — SIGN-IN STEPS (AE-Auth-*, phase 13a). The six screens that are not /login and /register:
   the 2FA code, forgot, reset, the sudo step-up, 2FA setup and the recovery codes.

   They all sit on the phase-4 auth shell above, so what is here is only what those six add. The
   shell's rules — no accent, the neutral focus ring, the white-on-35% footer links — hold for
   every one of them and are deliberately not repeated.
   ================================================================================================ */

/* Two cards are wider than the 440px default, and nothing else is. The width is set in Go
   (authCardClass in render.go) rather than by each template, for the same reason authLayoutPages
   is: a page that forgets the class renders at the wrong width and still looks plausible. */
.auth-card-520 { width: 520px; }
.auth-card-480 { width: 480px; }

/* THE CODE INPUT, shared by the 2FA step, the step-up and setup's step 2.
   52px rather than 44, monospace and 22px with .18em of tracking: a six-digit code copied from a
   phone is read back character by character against the phone, so the characters have to be
   separable at a glance. Monospace is only ever for codes and keys here — everything else on these
   pages is Figtree (app.css header, weight budget). */
.code-input {
  height: 52px;
  font-family: var(--font-mono); font-size: 22px; letter-spacing: .18em; text-align: center;
}
/* The placeholder keeps the tracking but must not read as a typed value. */
.code-input::placeholder { letter-spacing: .18em; color: var(--placeholder); }

/* An inset aside inside the card: the recovery-code hint under the 2FA form, and the one-line
   "From your authenticator app" under the step-up field. --inset on --surface is a 2% step, which
   is the whole separation this needs — a border-strong box here would read as a second card. */
.auth-inset {
  padding: 12px 14px; display: flex; gap: 10px;
  background: var(--inset); border: 1px solid var(--border-soft); border-radius: var(--radius);
  font-size: 13px; line-height: 1.55; color: var(--text-muted);
}
.auth-inset svg { flex-shrink: 0; }
.auth-inset-icon { display: flex; padding-top: 1px; }
/* the code format shown inside a sentence (xxxx-xxxx) */
.auth-inset code, .auth-mono { font-family: var(--font-mono); font-size: inherit; color: var(--text); }

/* "You're about to ... Change your email address" (§20.4). A LABEL AND A NOUN PHRASE, not a
   sentence: the step-up page is reached by a redirect, so the one thing it has to answer before
   asking for a secret is which action the confirmation is being spent on. */
.auth-about {
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  background: var(--inset); border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.auth-about-tile {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px;
  background: var(--raised); border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.auth-about-text { display: flex; flex-direction: column; min-width: 0; }
.auth-about-label { font-size: 12px; color: var(--text-muted); }
.auth-about-act { font-size: 14px; font-weight: 500; color: var(--text); }

/* A centred 13px line under a form: "We won't ask again for the next 5 minutes.", "You'll be
   signed out on every other device." Both are consequences of pressing the button above them, so
   they belong under it rather than in the heading's supporting line. */
.auth-aside { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); text-align: center; }

/* The numbered steps on the 520px setup card. The circle is an outline, not a filled tile: it
   numbers a step rather than marking a status, and a filled one reads as "done". */
.auth-step { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.auth-step-n {
  width: 24px; height: 24px; flex-shrink: 0; border-radius: var(--radius-pill);
  border: 1px solid #4b5161; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; color: var(--text);
}
/* the hairline between step 1 and step 2 */
.auth-rule { height: 1px; background: var(--border-soft); }

/* ---- 2FA setup: the QR beside the typed key (§20.5) */
.auth-qr-grid { display: grid; grid-template-columns: 192px minmax(0, 1fr); gap: 18px; align-items: center; }
/* The plate is LIGHT (#eef0f4, the --text value) because a QR has to be dark-on-light to scan at
   all, and the 12px of it around the symbol is the quiet zone the symbol needs. The SVG draws the
   dark modules only and leaves its own background transparent, so the plate IS the light half of
   the code — one colour, not a near-white square inside an off-white one. */
/* 192 = the 168px symbol plus 12px of plate on each side. Written as the OUTER width because
   this stylesheet is border-box everywhere (see the reset at the top): at 168 the symbol kept its
   forced size and simply hung 12px over each edge of its own quiet zone, which is the one part of
   a QR code that has to stay light. */
.auth-qr-plate { width: 192px; padding: 12px; border-radius: 14px; background: #eef0f4; }
.auth-qr-plate svg, .auth-qr-plate img { display: block; width: 168px; height: 168px; }
.auth-qr-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.auth-qr-side p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }

/* The secret, in a bare <code> inside this wrapper.
   THE <code> CARRIES NO ATTRIBUTES, and that is load-bearing:
   TestPortal2FASetupRendersAUsableSecret matches `<code>([A-Z2-7]{16,})</code>` to prove the page
   renders the plaintext base32 secret rather than the sealed one (security review 2026-09-28), and
   a class on the element would break the assertion while the page still looked right. Hence the
   wrapper, and hence the tracking rather than four-character groups: grouping would mean spaces
   inside the element, which is the same break by another route. */
.auth-secret {
  display: block; padding: 10px 12px; border-radius: 10px;
  background: var(--inset); border: 1px solid var(--border-soft);
}
.auth-secret code {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: .06em; line-height: 1.6;
  color: var(--text); overflow-wrap: anywhere; word-break: break-all;
}

/* Copy key / Copy all / Download .txt: 40px secondary buttons, a step down from the 44px primary
   they sit under. [hidden] until app.js wires them, like the password reveal — see the note there. */
.auth-mini { min-height: 40px; padding: 0 14px; font-size: 14px; border-color: var(--border-strong); }
.auth-mini[hidden] { display: none; }
.auth-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- reset: the live "At least 10 characters" row (§20.3)
   With JS off this is one muted line with a hollow ring and no promise about the field's state;
   app.js adds .is-met once the value reaches 10 and the ring becomes a green check. The rule is
   the SERVER'S (the 10-character minimum the register and reset handlers enforce) — this only
   reports it. */
.pw-rules { display: flex; flex-direction: column; gap: 6px; }
.pw-rule { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.pw-rule-mark {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong); color: transparent;
}
.pw-rule-mark svg { opacity: 0; transition: opacity .14s ease; }
.pw-rule.is-met .pw-rule-mark { background: rgba(61, 220, 151, .14); border-color: transparent; color: var(--ok); }
.pw-rule.is-met .pw-rule-mark svg { opacity: 1; }

/* ---- the recovery codes (§20.6) */
/* "Two-factor is on" above the heading: the state that has already changed, said once, quietly.
   The h1 under it is about what is left to do. */
.auth-flag { display: flex; align-items: center; gap: 12px; }
.auth-flag-text { font-size: 13px; color: var(--text-muted); }

/* Two columns of monospace codes on --inset. The grid is 8px-padded with per-cell padding instead
   of a gap: the cells then share edges, which is what makes ten codes read as one block to copy
   rather than ten chips. */
.recovery-codes {
  padding: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--inset); border: 1px solid var(--border-soft); border-radius: 14px;
}
.recovery-codes > * {
  padding: 8px 10px; font-family: var(--font-mono); font-size: 15px; letter-spacing: .04em;
  color: var(--text); overflow-wrap: anywhere;
}

/* The "I've saved these" gate. A bordered row, not a bare checkbox: it is the one thing between
   the codes and leaving the only page that will ever show them, so it has to look like a control
   and be clickable across its whole width. accent-color is the light --primary, per the shell's
   no-accent rule. */
.auth-consent {
  margin: 0; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--text); cursor: pointer;
}
.auth-consent input { width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }

/* Continue, disabled until the box is ticked. An <a> rather than a button because it is a
   navigation, so pointer-events has to go with the opacity — aria-disabled alone would still let
   the link be followed.
   WITH JS OFF IT IS NEVER DISABLED: the attribute is added by app.js, not by the template, so a
   visitor with no script cannot be stranded on the page that is showing them their only copy. */
.btn[aria-disabled="true"] { pointer-events: none; }
/* ================================================================================================
   §21 — STATES (AE-States-*, AE-Error, phase 13b). Empty lists, alerts, field errors, toasts, the
   confirm dialog and the working/disabled states of a button.

   NONE OF THIS IS A PAGE. §21 is a sheet of examples with a note saying where each one is used,
   and the instruction with it is to build them as shared classes and then use them everywhere —
   including on the pages built in phases 8–12. So the rules are here and the markup is in
   templates/partials/states.html; a page that needs an empty list calls the partial.
   ================================================================================================ */

/* ---------------------------------------------------------------- §21.1 empty states

   One pattern for all nine: a 48px neutral icon tile, a 16/500 title saying what is missing, one
   muted line saying what fills it, at most one main action. 40px/24px padding, centred.

   NO BORDER AND NO BACKGROUND HERE. An empty state is always inside something that has both — a
   card, a panel, a board list — and the one that replaces a card's rows keeps that card's header
   above it. A second border would draw a box inside a box. */
.empty-state {
  padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
/* 36px inside a card whose header is already paying for some of the vertical space. */
.card > .empty-state, .panel > .empty-state { padding: 36px 24px; }
.empty-tile {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-tile);
  display: flex; align-items: center; justify-content: center;
  background: var(--raised); color: var(--text-muted);
}
/* Green ONLY for "you're all caught up" (.tile-ok, set by emptyView.Ok). Everywhere else an empty
   list is neutral news, and a green tile would congratulate somebody for owning nothing. */
.empty-title { margin-top: 4px; font-size: 16px; font-weight: 500; color: var(--text); }
.empty-line { max-width: 340px; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.empty-acts { margin-top: 6px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
/* the one quiet text link allowed beside the button — never instead of it */
.empty-quiet { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.empty-quiet:hover { color: var(--text); text-decoration: none; }

/* An inline variant: the forum index's "Your products" row, which is a row in a list rather than a
   panel of its own (§21.1, last but two). Tile | sentence | button, on one line. */
.empty-row { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.empty-row-line { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }

/* ---------------------------------------------------------------- §21.2 alerts

   RESTYLED, not added. .alert already existed and was used on eight pages, with the whole message
   painted in the tone's colour — red text on a red tint, which is both the least legible way to
   write a sentence and the reason an error read as decoration. Now only the ICON carries the tone
   and the text is ordinary --text at 14px, which is how the design draws it.

   The tints are .08 with a .28–.3 border, lighter than the .12/.35 the badges use: a badge is a
   label a few characters wide, an alert is a box the width of the form. */
.alert {
  padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  background: var(--inset); color: var(--text);
  font-size: 14px; line-height: 1.5;
  margin-bottom: 1.25rem;
}
.alert p { margin: 0; font-size: 14px; line-height: 1.5; color: inherit; }
.alert-icon { display: flex; padding-top: 2px; color: var(--text-muted); }
.alert-icon svg { flex-shrink: 0; }
.alert-error { background: rgba(255, 107, 107, .08); border-color: rgba(255, 107, 107, .3); }
.alert-error .alert-icon { color: var(--danger); }
.alert-ok { background: rgba(61, 220, 151, .08); border-color: rgba(61, 220, 151, .28); }
.alert-ok .alert-icon { color: var(--ok); }
/* Amber is "wait", not "you did something wrong": rate limits, and nothing else so far. */
.alert-warn { background: rgba(245, 184, 67, .08); border-color: rgba(245, 184, 67, .3); }
.alert-warn .alert-icon { color: var(--warn); }
.alert-info { background: var(--inset); border-color: var(--border-soft); }
.alert-info .alert-icon { color: var(--text-muted); }

/* ---------------------------------------------------------------- §21.2 field errors

   A FIELD ERROR GOES UNDER ITS FIELD, and the field itself says it is wrong: a red ring plus a
   13px line, aria-invalid plus aria-describedby pointing at that line. An alert at the top of a
   form cannot say WHICH of five fields is the problem, which is why register, the settings forms
   and the ticket form use these and not an alert.

   Keyed on [aria-invalid="true"] rather than on a class, so the attribute a screen reader reads
   and the ring a sighted reader sees cannot get out of step. */
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: rgba(255, 107, 107, .6); box-shadow: 0 0 0 4px rgba(255, 107, 107, .1);
}
/* The focus ring wins while the field is focused — it is the stronger signal of the two, and the
   red border stays underneath it. */
input[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus, select[aria-invalid="true"]:focus {
  border-color: rgba(255, 107, 107, .8); box-shadow: 0 0 0 4px rgba(255, 107, 107, .18);
}
.field-error, .form-error {
  margin-top: .3rem; display: flex; align-items: center; gap: 6px;
  font-size: 13px; line-height: 1.45; color: #ff8a8a;
}
.field-error svg, .form-error svg { flex-shrink: 0; }
/* inside an .auth-field, whose gap already provides the spacing */
.auth-field .field-error { margin-top: 0; }

/* ---------------------------------------------------------------- §21.2 the applied discount code

   Once a code applies, the input is replaced by this chip. Green, because it is a confirmation
   rather than a field; the code in monospace, because it is a code; and an × that re-applies
   nothing, which is how it is removed. */
.co-code-label { font-size: 14px; font-weight: 500; color: var(--text); }
.co-chip {
  height: 44px; padding: 0 6px 0 12px; display: flex; align-items: center; gap: 10px;
  border-radius: var(--radius);
  background: rgba(61, 220, 151, .08); border: 1px solid rgba(61, 220, 151, .28);
  font-size: 14px;
}
.co-chip-icon { display: flex; color: var(--ok); }
.co-chip-icon svg { flex-shrink: 0; }
.co-chip-text { flex: 1; min-width: 0; }
.co-chip-code { font-family: var(--font-mono); font-weight: 500; }
.co-chip-note { color: var(--text-muted); }
.co-chip-x {
  width: 32px; height: 32px; flex-shrink: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 8px; color: var(--text-muted); cursor: pointer;
}
.co-chip-x:hover { background: rgba(61, 220, 151, .1); color: var(--text); }

/* ---------------------------------------------------------------- §21.2 toasts

   For an action that STAYS ON THE PAGE and has no other visible result: settings saved, a key
   copied, a background action that failed. Never for an error in a form.

   Bottom-right, 24px from both edges, max three stacked (app.js enforces that), hidden after 4s
   and paused on hover or focus. z-index 70 puts them over the popovers (60) and under the skip
   link (100). The REGION ignores the pointer so it cannot swallow a click on the page behind it;
   each toast takes it back, because it has a dismiss button. */
.toast-region {
  position: fixed; right: 24px; bottom: 24px; z-index: 70;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 360px; max-width: calc(100vw - 48px);
  padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 12px;
  background: var(--raised); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .85);
  font-size: 14px; line-height: 1.45; color: var(--text);
  animation: toast-in .18s ease-out;
}
.toast-icon { display: flex; color: var(--text-muted); }
.toast-icon svg { flex-shrink: 0; }
.toast-ok .toast-icon { color: var(--ok); }
.toast-copy .toast-icon { color: var(--text-muted); }
.toast-error .toast-icon { color: var(--danger); }
.toast-text { flex: 1; min-width: 0; }
.toast-x {
  width: 28px; height: 28px; flex-shrink: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 8px; color: var(--text-muted); cursor: pointer;
}
.toast-x:hover { background: var(--surface); color: var(--text); }
.toast.is-going { opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Somebody who has asked for less motion still gets the toast — just not the slide.
   The duration needs !important to survive the blanket `transition-duration: .01ms !important` in
   the reduced-motion reset near the top of this file; without it the toast vanished instantly
   instead of fading, which is not what this block says and not what it wants. A fade carries no
   motion, so it is the one part worth keeping. Same cascade trap as .btn-spinner below. */
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .toast.is-going { transition: opacity .2s ease !important; transform: none; }
}

/* ---------------------------------------------------------------- §21.2 the confirm dialog

   Replaces the browser's confirm() behind hx-confirm. A real <dialog> with showModal(), so the
   browser gives the modality, the focus trap, the Escape key and the top layer for free — which is
   why there is no z-index here. ::backdrop is the scrim. */
/* display IS the open state for a <dialog>: the UA sheet hides a closed one with
   `dialog:not([open]) { display: none }`, and a `display: flex` here outranks it — which drew the
   dialog as a plain block at the top of every page, scrim and all. Same trap as a class rule with
   `display:` beating `[hidden]`, which this file has hit before. So the box is described on
   [open] and the element is hidden the rest of the time. */
dialog.confirm { display: none; }
dialog.confirm[open] {
  width: 400px; max-width: calc(100vw - 32px); padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-auth);
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, .9);
}
dialog.confirm::backdrop { background: rgba(4, 5, 7, .72); }
.confirm-head { display: flex; align-items: center; gap: 12px; }
.confirm-title { margin: 0; font-size: 18px; font-weight: 500; }
.confirm-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-muted); }
/* The safe choice first in the DOM and on screen, the destructive one last — and app.js puts the
   initial focus on the safe one, so a stray Return never destroys anything. */
.confirm-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------------------------------------------------------------- §21.2 buttons

   A 40px button, one step down from the 44px default: the empty states' action, the dialog's two
   choices, Copy all / Download .txt. */
.btn-sm-40 { min-height: 40px; padding: 0 16px; }
.btn-primary.btn-sm-40 { padding: 0 18px; }

/* The destructive choice in a dialog or on a row: a tinted outline, not a filled red button.
   .btn-danger (filled #ff6b6b) stays for the one place a page IS the deletion; a filled red button
   inside a dialog is the brightest thing on screen and reads as the recommended answer. */
.btn-soft-danger {
  background: rgba(255, 107, 107, .08); border-color: rgba(255, 107, 107, .4); color: #ff8a8a;
}
.btn-soft-danger:hover { background: rgba(255, 107, 107, .14); border-color: rgba(255, 107, 107, .5); color: #ff8a8a; }

/* WORKING: a spinner, a label that says what is happening, 80% opacity. app.js also sets
   `disabled` — that is the no-double-submit half — so this has to beat the :disabled rule below,
   hence the pairing in the selector rather than a plain [aria-busy]. */
.btn[aria-busy="true"], .btn[aria-busy="true"]:disabled { opacity: .8; cursor: progress; }
.btn-spinner { animation: btn-spin .8s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
/* !important on BOTH, and the iteration count restored, for the reason the reset block states about
   .spinner: "a frozen spinner says hung rather than loading". The reset forces
   `animation-duration: .01ms !important` and `animation-iteration-count: 1 !important` on every
   element, so this rule — written without !important — lost both. The button spinner turned once in
   a hundredth of a millisecond and then stopped dead for every visitor who asks for reduced motion,
   which is the exact failure .spinner is exempted to avoid. Slower rather than faster: 2.4s is a
   calm rotation that still plainly says "working". */
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
}

/* DISABLED: 45% for a primary, 60% for a secondary (§21.2). The primary is a near-white fill, so
   it needs to fade further than an outline before it stops reading as the thing to press. */
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] { opacity: .45; }

/* ---------------------------------------------------------------- §21.3 the licence panel's states

   Four panels in one <section> (pages/product.html). The head, the picker and the two facts are
   the phase-9 panel's and unchanged; everything below is what the three NON-buying states add. */

/* owned: the plan, then what we actually know about how long it runs */
.lp-own { display: flex; flex-direction: column; gap: 2px; }
.lp-plan { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.lp-meta { font-size: 14px; color: var(--text-muted); }

.lp-acts { display: flex; flex-direction: column; gap: 10px; }
.lp-line { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
/* the heading over the picker inside the pre-release panel */
.lp-sub { font-size: 14px; font-weight: 500; color: var(--text); }

/* "Switch plan or add time". Collapsed, and it has to LOOK like a control rather than a heading
   that happens to move - hence the chevron and the row treatment. */
.lp-more { border-top: 1px solid var(--border-soft); padding-top: 14px; }
.lp-more > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; list-style: none;
}
.lp-more > summary::-webkit-details-marker { display: none; }
.lp-more > summary::after {
  content: ""; width: 8px; height: 8px; flex-shrink: 0;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .14s ease;
}
.lp-more[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.lp-more > summary:hover { color: var(--text); }
.lp-more-body { padding-top: 14px; }

/* "coming": a skeleton where the plans will be, so the panel reads as "not yet" and not as
   "broken". It does NOT shimmer - nothing is loading, and a pulse would say something is. */
.lp-skeleton { display: flex; flex-direction: column; gap: 8px; }
.lp-skeleton span { height: 44px; border-radius: var(--radius); background: var(--raised); }
.lp-skeleton span:nth-child(2) { opacity: .7; }
.lp-skeleton span:nth-child(3) { opacity: .45; }

/* the status notice above the picker. A WARNING, not a gate: buying stays allowed (§15.4). */
.lp-notice {
  padding: 12px 14px; display: flex; gap: 10px;
  border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--inset);
  font-size: 13px; line-height: 1.55; color: var(--text-muted);
}
.lp-notice-icon { display: flex; padding-top: 1px; color: var(--text-muted); }
.lp-notice-icon svg { flex-shrink: 0; }
.lp-notice-head { display: block; font-weight: 500; color: var(--text); }
.lp-notice-note { display: block; }
.lp-notice-down { background: rgba(255, 107, 107, .08); border-color: rgba(255, 107, 107, .3); }
.lp-notice-down .lp-notice-icon { color: var(--danger); }
.lp-notice-warn { background: rgba(245, 184, 67, .08); border-color: rgba(245, 184, 67, .3); }
.lp-notice-warn .lp-notice-icon { color: var(--warn); }
.lp-notice-testing { background: rgba(99, 179, 255, .08); border-color: rgba(99, 179, 255, .3); }
.lp-notice-testing .lp-notice-icon { color: var(--info); }

/* the invoice number on the expired-window card (§21.3), same shape as the 500 page's reference */
.co-ref {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 12px; border-radius: 10px;
  background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text-muted);
}
.co-ref code { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.co-ref .btn { min-height: 28px; padding: 0 8px; border: 0; background: transparent; }
.co-ref .btn:hover { background: var(--raised); }
.co-ref-copy[hidden] { display: none; }

/* ---------------------------------------------------------------- §21.4 the error pages

   Same layout as the 404 (pages/error.html): outlined numeral, h1, one line, buttons, three quick
   cards. What 403/500/429 add is the reference chip — the request id on a 500, which is the one
   piece of information a visitor can give support that narrows anything down. It is in monospace
   because somebody is going to read it out or paste it. */
/* The standard advice under the caller's own sentence: what to do about THIS status, which is the
   same whatever the specific failure was. Muted, because the line above it is the news. */
/* .err-card > p above is (0,2,0); a bare .err-advice would lose to it and change nothing. */
.err-card > .err-advice { margin: -6px 0 0; max-width: 48ch; font-size: 15px; line-height: 1.6; color: var(--text-faint); }

.err-ref {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 12px; border-radius: 10px;
  background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text-muted);
}
.err-ref code { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.err-ref .btn { min-height: 28px; padding: 0 8px; border: 0; background: transparent; }
.err-ref .btn:hover { background: var(--raised); }
.err-ref-copy[hidden] { display: none; }
/* ================================================================================================
   §22 — FORUM STAFF TOOLS (AE-Mod-*, phase 15). Everything only a moderator or an admin sees.

   VIOLET IS THE WHOLE IDEA. #a78bfa marks staff-only UI and is used for nothing else, so a
   moderator reading a thread can always tell what members can see from what only they can. That is
   not decoration: a moderator who mistakes the staff bar for ordinary chrome will eventually
   assume a member saw something they did not.

   THE ONE PRE-EXISTING USE, and it is the handoff's own: --status-development is the same violet
   (§21.3 draws "Coming soon" with a violet Development pill). It is a product status, never a
   permission, and the two never appear in the same row — but it is why "nothing else uses this
   colour" is a rule about new UI rather than a claim about the file.
   ================================================================================================ */

/* A date or a short code inside an auth card's supporting line (the ban card's "until"). */
.auth-mono { font-family: var(--font-mono); color: var(--text); }

/* ---------------------------------------------------------------- the one role badge (§22.5)

   A member shows ONE badge wherever their name appears, the highest of
   Admin › Moderator › Staff › Beta › Member, and the rank is decided in Go (forum.roleBadge).
   What is decided HERE is that only Beta is coloured: the same blue as "Pre-release access",
   because it says what somebody can SEE rather than what they can do, and a reader scanning a
   thread should be able to spot a tester. Three coloured ranks in an author column would turn
   every thread into a legend. */
.post-role.is-beta, .side-badge.is-beta { color: var(--info); }
.chip-quiet.is-beta { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }

/* ---------------------------------------------------------------- the staff tools bar (§22.2)

   Under the thread title, above the first post: the actions that change the thread. The washed
   background is a 6% violet over --surface rather than a flat tint, so the bar reads as part of
   the page a moderator is reading and not as an alert sitting on top of it. */
.staff-bar {
  padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  border-radius: 14px;
  background: var(--staff-wash); border: 1px solid var(--staff-border);
}
.staff-bar-label {
  display: flex; align-items: center; gap: 8px; margin-right: auto;
  font-size: 13px; font-weight: 500; color: var(--staff);
}
.staff-bar-label svg { flex-shrink: 0; }
/* "· only staff see this bar" — said once, in the one place a moderator is about to act. */
.staff-bar-note { font-weight: 400; color: var(--text-muted); }
.staff-bar-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--border-strong); flex-shrink: 0; }

/* The bar's own buttons: ghost, 36px, so six of them read as one row of options rather than six
   competing controls. The destructive one keeps .btn-soft-danger from §21.2. */
.staff-act {
  height: 36px; min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 12px; background: transparent;
  color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.staff-act:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.staff-act svg { flex-shrink: 0; }
/* [hidden] again, for the reason given at the top of this file: the rule above gives .staff-act a
   display:, which outranks the UA sheet. Two of the bar's buttons (Move…, Edit title) ship hidden
   because they open dialogs and need a script — without this they were drawn for a reader with no
   JS and did nothing when pressed. */
.staff-act[hidden] { display: none; }
.staff-act.btn-soft-danger { padding: 0 16px; font-size: 15px; }
/* An action a moderator may not take is shown with the lock chip rather than hidden, where §22.1
   says so (the Restrict dialog's Permanent). Elsewhere admin-only controls are simply absent. */
.staff-act[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* The "Admin" lock chip, for a control a moderator can see but not use. */
.lock-chip {
  height: 20px; padding: 0 7px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: var(--radius-pill);
  background: var(--staff-tint); color: var(--staff);
  font-size: 11px; font-weight: 500; white-space: nowrap;
}

/* The profile's fourth tab is staff-only, so it carries the shield and the violet (§22.3): four
   tabs that look alike would leave a moderator unsure which three a member can see. */
.pf-tabs a.pf-tab-staff { gap: 6px; color: var(--staff); }
.pf-tabs a.pf-tab-staff svg { flex-shrink: 0; }
.pf-tabs a.pf-tab-staff[aria-current="page"] { background: var(--staff-tint); color: var(--staff); }

/* ---------------------------------------------------------------- the staff strip and cards (§22.3)

   The same object in three places: the violet block under a profile card, the sidebar card on a
   profile, and the sidebar card on a thread. One class, because they say the same kind of thing
   and a moderator should recognise it instantly wherever it appears. */
.staff-card {
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--staff-wash); border: 1px solid var(--staff-border);
}
.staff-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.staff-card-title {
  margin: 0; display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--staff);
}
.staff-card-title svg { flex-shrink: 0; }
.staff-only-chip {
  height: 20px; padding: 0 8px; display: inline-flex; align-items: center;
  border-radius: var(--radius-pill);
  background: var(--staff-tint); color: var(--staff);
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
/* key | value rows inside a staff card */
.staff-kv { display: flex; flex-direction: column; gap: 8px; }
.staff-kv-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.staff-kv-key { color: var(--text-muted); }
.staff-kv-val { color: var(--text); text-align: right; }
.staff-kv-val .badge { vertical-align: middle; }
.staff-roles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.staff-tag {
  height: 20px; padding: 0 7px; display: inline-flex; align-items: center;
  border-radius: 6px; background: var(--inset); border: 1px solid var(--border-soft);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
}
.staff-card-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-card-acts .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
/* the admin-only block at the bottom of a profile's staff card */
.staff-admin-block {
  padding-top: 12px; border-top: 1px solid var(--staff-border);
  display: flex; flex-direction: column; gap: 8px;
}
.staff-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-muted); }

/* The "recent actions" list on a thread's staff card. */
.staff-log-mini { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.staff-log-mini-row { display: flex; align-items: baseline; gap: 6px; color: var(--text-muted); }
.staff-log-mini-who { font-weight: 500; color: var(--text); }
.staff-log-mini-when { margin-left: auto; color: var(--text-faint); white-space: nowrap; }

/* The strip inside the profile CARD: the same object, narrower, and square at the bottom because
   it is the last thing in a card that already has its own corners. */
.pcard-staff { margin: 14px -16px -16px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-left: 0; border-right: 0; border-bottom: 0; }
.pcard-staff .staff-card-acts .btn { flex: 1; min-height: 32px; padding: 0 8px; font-size: 13px; }

/* ---------------------------------------------------------------- reported and hidden posts (§22.2)

   A report chip sits beside the time on the post it is about, amber because it is a thing waiting
   for a decision rather than a thing that has gone wrong. */
.report-chip {
  height: 22px; padding: 0 8px; display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--radius-pill);
  background: rgba(245, 184, 67, .14); color: var(--warn);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.report-chip:hover { background: rgba(245, 184, 67, .2); color: var(--warn); text-decoration: none; }
.report-chip svg { flex-shrink: 0; }
/* the faint amber outline on the post itself */
.post-reported { box-shadow: inset 0 0 0 1px rgba(245, 184, 67, .22); border-radius: var(--radius-lg); }

/* A hidden post, in the STAFF view: a dashed violet row where the post was. Dashed, because the
   thing it stands for is still there — a member sees the removed-post placeholder instead. */
.post-hidden {
  padding: 14px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--staff-border);
  background: color-mix(in srgb, #a78bfa 4%, var(--bg));
}
.post-hidden-tile {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px;
  background: var(--staff-tint); color: var(--staff);
  display: flex; align-items: center; justify-content: center;
}
.post-hidden-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.post-hidden-why { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.post-hidden-acts { display: flex; gap: 8px; }
.post-hidden-acts .btn { min-height: 34px; padding: 0 12px; font-size: 14px; }

/* The post itself, while hidden: faded, so a moderator reading the thread can tell at a glance
   which rows members are not seeing without having to read the violet row above each one. */
.post.is-hidden { opacity: .55; }

/* What a MEMBER sees in the same place. Neutral, and it says who did it and nothing else: the
   reason is the author's to be told privately (§22.7's "Tell the author"), not the thread's. */
.post-removed {
  padding: 14px 18px; border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong); background: var(--inset);
  font-size: 14px; color: var(--text-muted);
}

/* ---------------------------------------------------------------- the post "…" menu (§22.2)

   Members get Copy link + Report; staff get two more groups above them. It uses the popover
   machinery the account menu and the bell already use (app.js showPopover/closePopover), so there
   is one answer to Escape, to a click outside, and to two of them being open at once. */
/* .post carries overflow:hidden (it clips the rounded corners and the solution tint), which also
   clipped the menu to the bottom of the post it belongs to — the Author group simply was not
   there. :has() lifts it for exactly as long as a menu is open, which is narrower than turning
   the clipping off and hoping nothing else needed it. The file already uses :has() for the
   licence rows and the choice cards. */
.post:has(.post-menu:not([hidden])) { overflow: visible; }
.post-menu-wrap { position: relative; }
.post-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  width: 248px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--raised); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .9);
}
.post-menu[hidden] { display: none; }
.post-menu-group {
  padding: 8px 10px 4px; font-size: 11px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint);
}
.post-menu-item {
  height: 36px; padding: 0 10px; display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 14px; color: var(--text); text-align: left; cursor: pointer;
  transition: background .14s ease;
}
.post-menu-item:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.post-menu-item svg { flex-shrink: 0; color: var(--text-muted); }
.post-menu-item.is-danger { color: var(--danger); }
.post-menu-item.is-danger svg { color: var(--danger); }
/* the author group's icons are violet, because those actions are about the person and not the post */
.post-menu-item.is-staff svg { color: var(--staff); }
.post-menu-sep { height: 1px; margin: 4px 6px; background: var(--border-soft); }

/* ---------------------------------------------------------------- the moderation page (§22.6) */
/* The status buttons in the ticket side panel (2026-10-26). A column, so each reads as its own
   one-click decision rather than as a toolbar — and so the three of them fit a 300px aside without
   wrapping mid-label. Each is its own form (CSRF, one hidden field), hence the forms being the
   flex children. */
.mod-status-acts { display: flex; flex-direction: column; gap: 8px; }
.mod-status-acts form { display: flex; }
.mod-status-acts .btn { flex: 1; justify-content: center; }

/* UNUSED since 2026-10-26, and kept for one reason: three of this strip's four numbers were also
   on the tab bar directly below it, so the strip was removed rather than restyled. The rules stay
   because the strip is the obvious shape for a future staff dashboard that is NOT sitting on top
   of its own tab bar, and because deleting them is a separate decision from deleting the markup.
   If nothing claims them by the next pass through this file, drop them. */
.mod-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.mod-stat {
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.mod-stat-n { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.mod-stat-k { font-size: 13px; color: var(--text-muted); }

/* One card per reported post. */
.mod-report {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
/* "Personal or payment details" goes to the top with a red outline and its content stays blurred
   until opened (§22.6). The blur is not security — the text is in the page — it is so that a
   moderator working through a queue in a room with other people does not display somebody's card
   digits by scrolling. */
.mod-report.is-urgent { border-color: var(--danger-border); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .12); }
/* The card head, rebuilt 2026-10-26 (readability). Was one wrapping flex row in which the reason
   badge, the counts, the Hidden chip and the LOCATION were all 13px muted text — so the line a
   moderator orients by was the faintest thing on the card. Three zones now: the verdict on the
   left, its arithmetic pushed right, the address on its own line in ordinary text. */
.mod-report-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
/* margin-left:auto, not a grid: the badge and the chip are both optional-width, and a fixed
   column would leave a hole on the cards that have no chip. */
.mod-report-meta { margin-left: auto; color: var(--text-faint); white-space: nowrap; }
.mod-report-where {
  width: 100%; margin: 0; font-size: 14px; line-height: 1.5; color: var(--text);
}
.mod-report-where a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
.mod-report-where a:hover { text-decoration-color: currentColor; }
.mod-report-quote {
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 14px; line-height: 1.6;
}
.mod-report-blur > .mod-quote-body { filter: blur(5px); user-select: none; }
.mod-report-blur[open] > .mod-quote-body { filter: none; user-select: auto; }
.mod-report-blur > summary { cursor: pointer; font-size: 13px; color: var(--text-muted); list-style: none; }
.mod-report-blur > summary::-webkit-details-marker { display: none; }
.mod-report-who { display: flex; align-items: center; gap: 8px; font-size: 13px; }
/* Reporters, one per line, each with its own note (2026-10-26). A column rather than a sentence:
   with three reporters and two notes the old run-on gave no way to tell whose note was whose. */
.mod-report-notes { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.mod-report-notes-head { color: var(--text-faint); }
.mod-report-note { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mod-report-note-who { font-weight: 500; color: var(--text); flex-shrink: 0; }
/* min-width:0 + anywhere: a report note is member-written text of up to 1000 characters with no
   obligation to contain a space, so without this one word can push the card wider than the page. */
.mod-report-note-text { min-width: 0; overflow-wrap: anywhere; }

/* The two action groups (2026-10-26). The author group is pushed to the far end behind a rule:
   what happens to the post is the queue's work, what happens to the person is a separate judgement
   most reports do not call for, and at one weight in one row the two read as five equal buttons. */
.mod-report-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mod-report-acts .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
.mod-acts-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mod-acts-author {
  margin-left: auto; padding-left: 12px; border-left: 1px solid var(--border-soft);
}
.mod-acts-label { font-size: 13px; color: var(--text-faint); max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Narrow: the rule and the auto margin both stop meaning anything once the row wraps, so drop
   them rather than leave a border floating mid-card. */
@media (max-width: 620px) {
  .mod-acts-author { margin-left: 0; padding-left: 0; border-left: 0; }
}

/* Rows for the Hidden, Restricted and Log tabs. */
.mod-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft); font-size: 14px;
}
.mod-row:last-child { border-bottom: 0; }
.mod-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mod-row-sub { font-size: 13px; color: var(--text-muted); }
/* What an edit replaced (§22.10's staff-visible history). Clamped to three lines and scrollable
   past that: a 20,000-character post would otherwise push the rest of the log off the screen, and
   the common case is a title or a line or two. */
.mod-row-prev {
  margin-top: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px;
  border-radius: 10px; background: var(--bg); border: 1px solid var(--border);
  max-height: 120px; overflow: auto;
}
.mod-row-prev-label {
  font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-faint);
}
.mod-row-prev-text {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.5; color: var(--text-muted);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.mod-row-when { color: var(--text-faint); font-size: 13px; white-space: nowrap; }
.mod-row-acts { display: flex; gap: 8px; flex-shrink: 0; }
.mod-row-acts .btn { min-height: 34px; padding: 0 12px; font-size: 14px; }
/* The tabs and the log's filter chips are .pf-tabs, the profile page's strip of real links — not
   .new-tabs, which is the new-thread page's row of BUTTONS and has no styling for an <a>. */

/* The "Moved" note on the board a thread came from (§22.7). Dashed and quiet: it is a signpost,
   not a row of the listing, and it disappears by itself after seven days. */
.th-moved {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; margin-bottom: 8px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--inset); font-size: 14px; color: var(--text-muted);
}
.th-moved-icon { display: flex; color: var(--text-faint); }
.th-moved-icon svg { flex-shrink: 0; }
.th-moved-text { flex: 1; min-width: 0; }
.th-moved-when { color: var(--text-faint); font-size: 13px; white-space: nowrap; }

/* ---------------------------------------------------------------- the member side (§22.8) */

/* The read-only banner, on every forum page. Amber: it is a limit with an end date, not a refusal. */
.restrict-banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(245, 184, 67, .08); border: 1px solid rgba(245, 184, 67, .3);
}
.restrict-banner-icon { display: flex; padding-top: 2px; color: var(--warn); }
.restrict-banner-icon svg { flex-shrink: 0; }
.restrict-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.restrict-banner-head { font-size: 14px; font-weight: 500; }
.restrict-banner-why { font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.restrict-banner-acts { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }

/* Where the reply box would be. */
.restrict-instead {
  padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-radius: var(--radius-lg); background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 14px; color: var(--text-muted);
}

/* ---------------------------------------------------------------- the history timeline (§22.3) */
.history-add { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border-soft); }
.history-list { display: flex; flex-direction: column; }
.history-item {
  display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border-soft);
}
.history-item:last-child { border-bottom: 0; }
.history-tile {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--raised); color: var(--text-muted);
}
.history-tile.is-warn { background: var(--warn-bg); color: var(--warn); }
.history-tile.is-danger { background: var(--danger-bg); color: var(--danger); }
.history-tile.is-staff { background: var(--staff-tint); color: var(--staff); }
.history-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.history-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.history-when { margin-left: auto; font-size: 13px; color: var(--text-faint); white-space: nowrap; }
.history-sub { font-size: 13px; line-height: 1.55; color: var(--text-muted); }
.history-quote {
  margin-top: 4px; padding: 10px 12px; border-radius: 10px;
  background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 13px; line-height: 1.6; color: var(--text);
}

/* ---------------------------------------------------------------- the staff dialogs (§22.4, §22.7)

   `dlg-`, NOT `sheet-`. §19's phone search-filters sheet already owns .sheet-handle and
   .sheet-foot, and it declares `.sheet-handle, .sheet-foot { display: none }` near the top of its
   block because both are phone-only objects its media query brings in. Phase 15 first picked the
   same names, and that one rule hid every dialog's footer on the desktop — the Move dialog
   rendered with no Cancel and no Move thread button, which looks like a dialog that cannot be
   dismissed rather than like a CSS collision.

   They are <dialog>s like the confirm from §21.2, and the same trap applies: the UA sheet hides a
   closed dialog with `dialog:not([open]) { display: none }`, and a `display:` here outranks it. So
   the box is described on [open] and the element is hidden the rest of the time. */
dialog.dlg { display: none; }
dialog.dlg[open] {
  width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px); padding: 0;
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-auth);
  box-shadow: 0 32px 64px -24px rgba(0, 0, 0, .9);
}
dialog.dlg::backdrop { background: rgba(4, 5, 7, .72); }
.dlg-head {
  padding: 18px 20px 14px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.dlg-title { margin: 0; font-size: 18px; font-weight: 500; }
.dlg-x {
  width: 32px; height: 32px; margin-left: auto; flex-shrink: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 8px; color: var(--text-muted); cursor: pointer;
}
.dlg-x:hover { background: var(--raised); color: var(--text); }
.dlg-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.dlg-foot {
  padding: 14px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  border-top: 1px solid var(--border-soft); background: var(--surface);
}
.dlg-foot .btn { min-height: 40px; }
/* the pending-changes counter in the Roles dialog's footer */
.dlg-foot-note { margin-right: auto; font-size: 13px; color: var(--text-muted); }
.dlg-note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }

/* A radio rendered as a card: the three "what happens" choices, and the reason lists. Unselected
   radios are transparent, as §16.3 already established for the new-thread form. */
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  cursor: pointer; transition: border-color .14s ease, background .14s ease;
}
.choice:hover { border-color: var(--border-hover); }
.choice input { margin: 2px 0 0; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.choice-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice-name { font-size: 14px; font-weight: 500; }
.choice-desc { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-selected); }
.choice.is-danger:has(input:checked) { border-color: var(--danger-border); background: rgba(255, 107, 107, .08); }

/* "For how long": a row of segmented options. */
.span-row { display: flex; flex-wrap: wrap; gap: 8px; }
.span-opt {
  height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  font-size: 14px; color: var(--text-muted); cursor: pointer;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.span-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.span-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-selected); color: var(--text); }
/* The radio is invisible, so the ring has to go on the label — the same arrangement as .search-opt
   and .co-method. Without it a keyboard user tabbing through "For how long" had no idea where they
   were. */
.span-opt:has(input:focus-visible) { box-shadow: var(--focus); }
.span-opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
/* the resulting date, written out under the row so nobody has to count days */
.span-result { font-size: 13px; color: var(--text-muted); }

/* The red note listing a member's licences, shown when Ban account is selected (§22.4). */
.ban-note {
  padding: 12px 14px; display: flex; gap: 10px; border-radius: var(--radius);
  background: rgba(255, 107, 107, .08); border: 1px solid rgba(255, 107, 107, .3);
  font-size: 13px; line-height: 1.55;
}
.ban-note-icon { display: flex; padding-top: 2px; color: var(--danger); }
.ban-note-icon svg { flex-shrink: 0; }
.ban-note[hidden] { display: none; }

/* The Roles dialog's grouped list. */
.roles-filter { position: sticky; top: 0; z-index: 1; padding-bottom: 12px; background: var(--surface); }
.roles-group { display: flex; flex-direction: column; gap: 8px; }
.roles-group-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--text);
}
.roles-group-note { font-weight: 400; font-size: 12px; color: var(--text-faint); }
.role-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  cursor: pointer; transition: border-color .14s ease, background .14s ease;
}
.role-row:hover { border-color: var(--border-strong); }
.role-row:has(input:checked) { border-color: var(--accent); background: var(--accent-selected); }
.role-row input { margin: 3px 0 0; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--accent); }
.role-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.role-row-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.role-row-why { font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.role-row-perms { display: flex; flex-wrap: wrap; gap: 4px; }
.role-perm {
  height: 18px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: 5px;
  background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 11px; color: var(--text-faint);
}
.role-row[hidden] { display: none; }
/* the live badge preview */
.roles-preview {
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
  border-radius: var(--radius); background: var(--inset); border: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text-muted);
}

/* ---------------------------------------------------------------- the staff entry in the nav (§22.6)
   A violet shield beside the bell. It is the only violet in the nav bar, and it is only there for
   staff — which is exactly what the colour is for. */
.nav-staff { position: relative; color: var(--staff); }
.nav-staff:hover { background: var(--staff-tint); color: var(--staff); }
.nav-staff .nav-bell-dot { background: var(--staff); }
/* §22.6's "violet shield + count". Sized from the dot's position so the two sit identically; the
   number is the thing a moderator decides from, which a dot cannot carry. */
.nav-staff-count {
  position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  border-radius: var(--radius-pill); background: var(--staff); border: 2px solid var(--surface);
  font-size: 10px; font-weight: 600; line-height: 1; color: #fff;
}
/* ================================================================================================
   §19 — PHONE (AE-M-*, 390px). Everything below this line applies BELOW THE EXISTING 860px
   BREAKPOINT, which is where the desktop nav already folded.

   ONE BLOCK, at the END of the file, on purpose. The phone rules supersede several things built
   earlier — the nav dropdown, the account area's wrapped chips, the first stacked-table pass — and
   source order is what makes "supersede" true without a specificity arms race. It also means the
   mobile layer can be read as a whole, which is how it was designed.
   ================================================================================================ */

@media (max-width: 860px) {

  /* ---- the bar: same floating pill, 12px from the top AND the sides (§19) */
  .site-header { padding: 12px 12px 0; }
  .nav-wrap { position: relative; z-index: 1; padding: 0 6px 0 18px; gap: 8px; }

  /* The centre links are not in the bar any more; they are rows in the panel. With no script they
     come back as the wrapped row below — a nav that needs JS is not a nav. */
  [data-js] .nav-links,
  [data-js] .nav-user-wrap,
  [data-js] .nav-nojs,
  [data-js] .nav-text-link { display: none; }

  /* 40px round controls, as drawn: the bell, then the menu button. */
  .nav-actions { gap: 4px; }
  .nav-bell { width: 40px; height: 40px; }
  [data-js] .nav-toggle {
    display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0;
    border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--text-muted);
    cursor: pointer; padding: 0;
  }
  .nav-toggle:hover { background: var(--raised); color: var(--text); }
  .nav-toggle:focus-visible { outline: none; box-shadow: var(--focus); }
  /* Hamburger or ×, from the attribute the screen reader is reading anyway. */
  .nav-toggle-close { display: none; }
  .nav-toggle[aria-expanded="true"] { background: var(--bg); color: var(--text); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

  /* Signed out: the Sign up pill stays, at the drawn 36px. */
  .nav-actions .btn { min-height: 36px; padding: 0 16px; font-size: 14px; }

  /* ---- the scrim. Fixed, inside .site-header (z-index 20) so it covers the page; .nav-wrap sits
     above it because it comes later in the DOM and carries its own z-index. */
  .m-scrim { position: fixed; inset: 0; background: rgba(4, 5, 7, .72); }
  /* The one rule that makes `hidden` win over the display above — the same trap this file has hit
     three times: a class rule with `display:` beats the UA sheet's [hidden] { display: none }. */
  .m-scrim[hidden] { display: none; }
  /* The page stops scrolling under an open panel. */
  body.m-open { overflow: hidden; }

  /* ---- the panel itself: under the bar, 12px from both sides, radius 20 */
  .m-menu {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 2;
    display: flex; flex-direction: column; padding: 8px;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px;
    box-shadow: 0 28px 70px -18px rgba(0, 0, 0, .9);
    max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain;
  }
  .m-menu[hidden] { display: none; }

  /* Rows: 48px, 16px text, chevron at the end. */
  .m-row {
    height: 48px; padding: 0 12px; display: flex; align-items: center; gap: 12px;
    border: 0; border-radius: var(--radius); background: transparent;
    color: var(--text); font-size: 16px; font-weight: 400; text-align: left; width: 100%;
    font-family: inherit; cursor: pointer;
  }
  .m-row:hover { background: var(--raised); color: var(--text); text-decoration: none; }
  .m-row:focus-visible { outline: none; box-shadow: var(--focus); }
  .m-label { flex: 1; min-width: 0; }
  .m-icon { display: flex; flex-shrink: 0; color: var(--text-muted); }
  .m-chev { display: flex; flex-shrink: 0; color: var(--text-faint); }
  .m-row-quiet { color: var(--text-muted); }
  .m-row-quiet:hover { color: var(--text); }

  /* the user row at the top: 40px avatar, name, "Member · N products" */
  .m-row-user { height: auto; padding: 10px 12px; }
  .m-avatar {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-pill);
    background: var(--border); color: var(--text); display: grid; place-items: center;
    font-size: 15px; font-weight: 500; text-transform: uppercase; overflow: hidden;
  }
  .m-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .m-name { font-size: 15px; font-weight: 500; }
  .m-sub { font-size: 13px; color: var(--text-muted); }

  .m-hr { height: 1px; margin: 6px 12px; background: var(--border-soft); }
  .m-logout { margin: 0; display: flex; }
  .m-auth { padding: 4px; display: flex; flex-direction: column; gap: 8px; }
  .m-auth .btn { min-height: 48px; }

  /* The notification panel is a 360px popover hung off the bell on a desktop; here it is the
     width of the bar, like the menu beside it.
     FIXED to the viewport, not positioned off .nav-bell-wrap: the bell is not the last thing in
     the bar — the menu button sits after it — so a right offset measured from the bell's wrapper
     put the panel 45px left of where it belongs, hanging off the screen on one side and stopping
     short on the other. The two panels now share one pair of edges. */
  .nav-bell-wrap .nav-panel {
    position: fixed; top: 72px; left: 12px; right: 12px; width: auto; max-width: none;
  }

  /* ---- footer: wordmark + © on one line, links wrapped below (§19) */
  .footer-wrap { flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px 16px; }
  .footer-links { gap: 16px 20px; }
  .footer-links a, .footer-copy { font-size: 14px; }
  .footer-sep { display: none; }

  /* ---- the 16px gutter, everywhere a page sets one */
  .container, .container-narrow, .container-docs, .container-side { padding-left: 16px; padding-right: 16px; }
  .container, .container-narrow, .container-docs, .container-side { padding-top: 1.5rem; padding-bottom: 2rem; }

  /* ---- type: h1 28–32/600, body 15 */
  h1 { font-size: 28px; line-height: 1.2; }

  /* ---- inputs 48px with 16px text. SIXTEEN PIXELS IS NOT A STYLE CHOICE: iOS Safari zooms the
     whole page in when a focused field's text is smaller, and the page never zooms back out. */
  input[type="text"], input[type="email"], input[type="password"], input[type="search"],
  input[type="number"], input[type="url"], select, textarea {
    min-height: 48px; font-size: 16px;
  }
  textarea { min-height: 120px; }
  /* A select keeps the browser's own arrow on top of ours without this. */
  select {
    appearance: none; -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a4aab7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
  }

  /* ---- primary actions are full width at 48px, and every tap target clears 44 */
  .btn, .btn-sm { min-height: 44px; }
  .btn-primary { min-height: 48px; }
  .auth-submit .btn, .btn-block { width: 100%; }
}

/* ---------------------------------------------------------------- §19 layout patterns
   Tables become stacked rows, side columns move below the content or are dropped, and a few pages
   reorder. Still below 860px; a second block rather than one enormous one, because these are rules
   about PAGES where the block above is rules about the chrome. */
@media (max-width: 860px) {

  /* ---- cards keep radius 16 with 16–18px padding (§19) */
  .acct-card, .acct-strip, .acct-hero, .forum-card, .co-card { padding: 18px 16px; }
  .acct-lic-head, .acct-facts-strip, .acct-lic-foot, .acct-row { padding-left: 16px; padding-right: 16px; }
  /* A tab strip spans the width and its tabs share it. Products, notifications and the board all
     use .acct-filters for theirs. */
  .acct-filters { width: 100%; }
  .acct-filters a { flex: 1; justify-content: center; text-align: center; }

  /* ---- PRODUCTS LIST (§19): tile · name/tagline · status + updated · plans, price on the right.
     The first pass (at 960px) stacked everything into column 2, price included; the design keeps
     the price where a thumb looks for it. */
  .prod-row {
    grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 8px;
    align-items: start; padding: 16px;
  }
  .prod-row > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .prod-row > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .prod-row > :nth-child(3) { grid-column: 2; grid-row: 2; }
  .prod-row > :nth-child(4) { grid-column: 2; grid-row: 3; }
  /* `.prod-row > .prod-price`, not `.prod-price`: the 960px block above puts :nth-child(5) in
     column 2, and a bare class selector loses to it however late it comes. */
  .prod-row > .prod-price { grid-column: 3; grid-row: 1 / span 3; align-self: start; align-items: flex-end; text-align: right; }
  .prod-plans { font-size: 13px; }

  /* ---- INVOICES (§19): product + plan · date, amount on the right, then status + method + PDF.
     The cells are placed BY COLUMN NUMBER — the one thing here that has to be kept in step with
     dash_billing.html, whose <thead> names them in the same order. */
  .inv-table thead { display: none; }
  .inv-table tr {
    display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto;
    column-gap: 8px; row-gap: 6px; padding: 14px 16px; min-height: 0; align-items: baseline;
  }
  .inv-table tbody td { display: block; padding: 0; border: 0; }
  .inv-table td:nth-child(2) { grid-area: 1 / 1 / 2 / 4; font-size: 15px; font-weight: 500; }
  .inv-table td:nth-child(4) { grid-area: 1 / 4 / 2 / 5; justify-self: end; font-variant-numeric: tabular-nums; }
  .inv-table td:nth-child(3) { grid-area: 2 / 1 / 3 / 2; }
  .inv-table td:nth-child(1) { grid-area: 2 / 2 / 3 / 5; }
  .inv-table td:nth-child(1)::before { content: "\00b7\00a0"; }
  .inv-table td:nth-child(6) { grid-area: 3 / 1 / 4 / 2; }
  .inv-table td:nth-child(5) { grid-area: 3 / 2 / 4 / 4; }
  .inv-table td:nth-child(7) { grid-area: 3 / 4 / 4 / 5; justify-self: end; }

  /* ---- BOARD THREADS (§19): avatar 32 · title (two lines) · author · age · badges, count right */
  .th-row {
    grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 0;
    align-items: start; padding: 14px 16px;
  }
  .th-avatar { width: 32px; height: 32px; }
  /* beside the avatar, not centred on a row that is now three lines tall */
  .th-dot { top: 22px; left: 6px; transform: none; width: 6px; height: 6px; }
  /* Child selectors, for the same reason .prod-price needs one: the 960px block above places
     :nth-child(3..5) in column 2, and those indices SHIFT when the unread dot is rendered. */
  .th-row > .th-main { grid-column: 2; grid-row: 1; }
  .th-title {
    white-space: normal; font-size: 15px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .th-meta { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px; }
  .th-row > .th-count { grid-column: 3; grid-row: 1; flex-direction: row; align-items: baseline; gap: 4px; padding-top: 2px; font-size: 13px; }
  .th-count .th-unit { display: none; }
  /* One number, not three columns of them: the views count and the last-reply column go. */
  .th-row > .th-count-views, .th-row > .th-last { display: none; }

  /* ---- SIDE COLUMNS move below the main content, or go (§19).
     The thread's and the board's rails simply follow the main column once the grid is one track,
     which is "after the posts". The forum index's rail is the one that goes: it holds the Staff
     card and nothing else, and §19 drops Staff on a phone. ("Before you post" is what it would
     have kept — that card does not exist, because the rules text does not.) */
  .forum-page { grid-template-columns: minmax(0, 1fr); }
  .forum-side { position: static; }
  .forum-side-index { display: none; }
  /* The board keeps only "Need private help?" (§19); About this board and Before you post are a
     desktop rail. */
  .board-shell .forum-side > :not(.board-ticket) { display: none; }

  /* ---- FORUM INDEX (§19): the search field and a 44px icon-only New thread, side by side */
  .forum-head { margin-bottom: 20px; gap: 14px; }
  .forum-head h1 { font-size: 28px; }
  .forum-head p { font-size: 15px; }
  /* The head's actions share the width, whatever there are of them: two buttons on a board
     (Follow + New thread), one on the notifications page, and on the INDEX a search field with a
     44px icon button beside it — which is the one shape that is not equal columns. */
  .forum-head-actions {
    width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px;
  }
  .forum-head-actions:has(.forum-search) { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr) 44px; }
  .forum-head-actions > form { display: flex; }
  .forum-head-actions .btn { width: 100%; min-height: 44px; }
  .forum-search { width: 100%; }
  .forum-new { width: 44px; min-width: 44px; padding: 0; }
  .forum-new-ico { display: block; }
  /* The label stays in the accessible name and leaves the picture. (The .sr-only recipe written
     out, because a class cannot be added by a media query.) */
  .forum-new-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  /* board rows: 38px tile · name · description · "N threads · latest title" */
  .board-row {
    grid-template-columns: 38px auto minmax(0, 1fr); column-gap: 12px; row-gap: 4px;
    padding: 14px 16px; align-items: start;
  }
  /* EVERY ONE OF THESE IS SCOPED TO .board-row, and that is not tidiness. .board-name is also the
     middle cell of .support-row (a 44px|1fr|auto grid on the same page), and .board-tile is also
     the 44px tile on /dashboard/products via .board-tile-lg — an unscoped rule here reaches both
     and wins on source order, which pushed the Support row's actions onto a row of their own and
     shrank the account tile by 6px. */
  .board-row > .board-icon,
  .board-row > .board-tile { width: 38px; height: 38px; grid-row: 1; grid-column: 1; }
  .board-row > .board-name { grid-row: 1; grid-column: 2 / 4; }
  .board-row .board-desc { font-size: 13px; }
  /* A product's row says what it is with the status pill on its title; "Updates · Help ·
     Discussion" is the same three words under every one of them (§19). */
  .board-row:has(.board-tile) .board-desc { display: none; }
  .board-row > .board-counts { display: flex; grid-row: 2; grid-column: 2; flex-direction: row; font-size: 13px; }
  .board-row > .board-counts > :nth-child(2) { display: none; }   /* one count, not two */
  .board-row > .board-counts::after { content: "\00a0\00b7"; color: var(--text-faint); }
  .board-row > .board-latest { display: flex; grid-row: 2; grid-column: 3; min-width: 0; }
  .board-row .board-latest-avatar, .board-row .board-latest-meta { display: none; }
  .board-row .board-latest-title, .board-row .board-latest-empty { font-size: 13px; color: var(--text-muted); }
  .forum-section-head { padding-left: 16px; padding-right: 16px; }
  .forum-section-foot { padding-left: 16px; padding-right: 16px; }

  /* ---- ACCOUNT: the section nav is ONE LINE of chips that scrolls sideways (§19), replacing the
     wrapped rows built at 960px. The mask is the fade that says there is more to the right. */
  .acct-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .acct-nav { position: static; gap: 14px; }
  .acct-nav-groups {
    flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent 100%);
  }
  .acct-nav-groups::-webkit-scrollbar { display: none; }
  /* nowrap and no shrink: the 960px block wraps these, and §19 wants ONE line that scrolls. */
  .acct-group { flex-direction: row; flex-wrap: nowrap; flex-shrink: 0; gap: 6px; }
  .acct-group-label { display: none; }
  .acct-item {
    height: 36px; padding: 0 14px; flex-shrink: 0; white-space: nowrap;
    border-radius: var(--radius-pill); background: transparent; border: 1px solid transparent;
    color: var(--text-muted);
  }
  .acct-item .acct-ico { display: none; }
  .acct-item[aria-current="page"] { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
  .acct-logout { width: auto; border-top: 0; padding: 0; }
  .acct-page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .acct-page-head h1 { font-size: 28px; }
  .acct-tiles, .acct-pair, .acct-fields, .acct-facts { grid-template-columns: minmax(0, 1fr); }
  .acct-actions, .set-actions { flex-direction: column-reverse; align-items: stretch; }
  .acct-actions .btn, .set-actions .btn { width: 100%; }

  /* ---- NOTIFICATIONS (§19): 36px tile, text, one-line subject, time */
  .notif-row { grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 16px; }
  .notif-row .tile-lg { width: 36px; height: 36px; }

  /* ---- CREATE TICKET (§19): category cards stacked full width, fields stacked */
  .ticket-layout { grid-template-columns: minmax(0, 1fr); }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }

  /* ---- THREAD POSTS (§19): author on a top row — 36px avatar, name + role badge, then the
     "joined · posts" line under them. The timestamp and #n stay at the top of the body, which is
     the line directly below: they are rendered inside .post-body, and html/template cannot put
     one block in two parents. */
  .post-author {
    display: grid; grid-template-columns: 36px auto minmax(0, 1fr); column-gap: 10px; row-gap: 2px;
    align-items: center; text-align: left; padding: 12px 16px;
  }
  .post-avatar-link { grid-row: 1 / 3; grid-column: 1; }
  .post-avatar { width: 36px; height: 36px; font-size: 15px; }
  .post-name { grid-row: 1; grid-column: 2; }
  .post-role { grid-row: 1; grid-column: 3; justify-self: start; }
  .post-joined { grid-row: 2; grid-column: 2 / 4; font-size: 12px; }
  .post-body { padding: 14px 16px; }
  .post-actions { gap: 6px; flex-wrap: wrap; }
  .post-action { height: 36px; }
  .composer { padding: 16px; }

  /* ---- the pages §19 does not draw, following its rules */
  .co-shell { grid-template-columns: minmax(0, 1fr); }
  .co-sum { position: static; }
  .auth-main { padding: 40px 16px; }
  .hub-head { gap: 12px; }
}

/* ---------------------------------------------------------------- §19 the sticky bottom bars,
   the search sheet and the docs controls. All of these are PHONE-ONLY objects: they are drawn
   nowhere else, so they start from `display: none` and the media query is what brings them in. */
.m-bar { display: none; }
.doc-select { display: none; }
.search-mbar { display: none; }
.sheet-handle, .sheet-foot { display: none; }

@media (max-width: 860px) {

  /* ---- the bar itself. Fixed to the bottom, with the safe-area inset added to its padding so it
     clears the home indicator on a modern iPhone rather than sitting under it. */
  .m-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(13, 15, 19, .94); border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .8);
    backdrop-filter: blur(8px);
  }
  .m-bar[hidden] { display: none; }
  /* The page gets the bar's height back, or the last thing on it is unreachable. The FOOTER is
     what needs it: it sits outside <main>, after it, so padding on main alone still left the
     footer's links under the fixed bar at the bottom of the document. */
  main#main:has(.m-bar) { padding-bottom: 24px; }
  body:has(.m-bar) .site-footer { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

  .m-bar-text { display: flex; flex-direction: column; min-width: 0; }
  .m-bar-label { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .m-bar-value { font-size: 20px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
  /* The action takes whatever the figures leave. */
  .m-bar-cta { flex: 1; min-height: 48px; }
  .m-bar-cancel { min-height: 48px; }
  .m-bar-cta[hidden] { display: none; }

  /* The thread's bar is the reply affordance, not a price: avatar + a pill that jumps down. */
  .m-bar-reply .post-avatar { width: 32px; height: 32px; font-size: 14px; }
  .m-reply-pill {
    flex: 1; min-width: 0; height: 44px; padding: 0 16px;
    display: flex; align-items: center;
    border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
    background: var(--bg); color: var(--text-muted); font-size: 15px;
  }
  .m-reply-pill:hover { color: var(--text); text-decoration: none; }

  /* ---- the search filters as a bottom sheet (§19, AE-M-Search-Filters) */
  .search-mbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .search-mbar[hidden] { display: none; }
  .search-mfilters { min-height: 44px; }
  .search-mchips { display: flex; gap: 6px; flex-wrap: wrap; }

  /* [data-js], like the nav and the docs rail: app.js is the only thing that can close this
     sheet, so without a script it must never become one. Ungated, the aside turned into an opaque
     panel pinned over the bottom 82vh with no Filters button and no scrim to dismiss it — and
     because app.js is deferred, that was a real paint for everybody, not just the no-JS case.
     The 960px block's static column is what remains underneath. */
  [data-js] .search-filters {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 16;
    max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; flex-wrap: nowrap; gap: 20px;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border-strong);
    border-radius: 22px 22px 0 0; box-shadow: 0 -28px 70px -18px rgba(0, 0, 0, .9);
  }
  .search-filters[hidden] { display: none; }
  [data-js] .sheet-handle {
    display: block; width: 36px; height: 4px; margin: 4px auto 6px;
    border-radius: var(--radius-pill); background: var(--border-strong);
  }
  /* 44px rows: unselected transparent, selected raised with the accent ring (§19). */
  .search-opt {
    min-height: 44px; padding: 0 12px; border-radius: var(--radius);
    border: 1px solid transparent; background: transparent;
  }
  .search-opt:has(input:checked) {
    background: var(--raised); border-color: var(--border-strong);
    box-shadow: 0 0 0 3px var(--accent-ring);
  }
  [data-js] .sheet-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
  .sheet-foot .btn { min-height: 48px; }
  [data-js] .search-note { display: none; }

  /* ---- docs and legal: the list becomes a select, "On this page" a collapsed details (§19) */
  [data-js] .doc-nav { display: none; }
  .doc-select { display: block; }
  .doc-select[hidden] { display: none; }
  .doc-select select { width: 100%; }
  .doc-toc { display: block; position: static; }
  .doc-toc-label {
    padding: 0; display: flex; align-items: center; gap: 8px; min-height: 44px;
    font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text);
    cursor: pointer; pointer-events: auto;
  }
  /* the marker comes back as the thing that says it opens */
  .doc-toc-label::after {
    content: ""; width: 8px; height: 8px; margin-left: auto;
    border-right: 1.5px solid var(--text-faint); border-bottom: 1.5px solid var(--text-faint);
    transform: rotate(45deg) translate(-2px, -2px); transition: transform .14s ease;
  }
  .doc-toc[open] .doc-toc-label::after { transform: rotate(-135deg) translate(-2px, -2px); }
  .doc-toc-list { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }
  .doc-article h1 { font-size: 28px; }
}

/* The phone-only note (§19: the client is a Windows binary and this page is read on a phone). */
.m-note { display: none; }

@media (max-width: 860px) {
  .m-note {
    margin: 0; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start;
    border-radius: var(--radius); background: var(--inset); border: 1px solid var(--border-soft);
    font-size: 14px; line-height: 1.5; color: var(--text-muted);
  }
  .m-note svg { flex-shrink: 0; margin-top: 2px; color: var(--text-faint); }

  /* ---- PRODUCT PAGE ORDER (§19): name/status → showcase → licence → features → requirements →
     questions. Those six live in two columns, so the two columns stop being boxes and their
     children become the page's own items — which is the only way to interleave them without
     rendering the licence panel twice. */
  .product-page { gap: 28px; }
  .product-main, .product-side { display: contents; }
  .product-head { order: 1; }
  .showcase { order: 2; }
  .licence-panel { order: 3; }
  .features-card { order: 4; }
  .req-card { order: 5; }
  .questions-card { order: 6; }
  .showcase-frame { height: 216px; }
  /* thumbnails scroll sideways rather than squeezing to five across a phone */
  .showcase-thumbs { grid-auto-columns: 92px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .showcase-thumbs::-webkit-scrollbar { display: none; }
  .showcase-thumb { height: 56px; }
  .product-head h1 { font-size: 32px; font-weight: 500; }
  .licence-row { min-height: 52px; }
  /* the panel's own CTA is the sticky bar's twin; one of them is enough on a phone */
  .licence-cta { display: none; }
}

/* Apply (the discount code) is an hx-post and nothing else, so it cannot work without a script.
   Hidden rather than drawn-and-dead; the typed code still applies on submit, because the pay POST
   reads the box itself (findDiscountForCheckout). */
html:not([data-js]) .co-apply { display: none; }

/* ================================================================================================
   §21.5 — PHONE STATES (AE-M-States). After the §19 block on purpose: these supersede parts of
   it (the toast's corner, the dialog's box) and source order is what makes that true without a
   specificity fight.
   ================================================================================================ */

/* The grip is a phone affordance only, so it starts hidden. BEFORE the media query and not after:
   the block below turns it on with the same specificity, and a `display: none` written afterwards
   would win on source order and leave the sheet with no handle. */
.confirm-grip { display: none; }

@media (max-width: 860px) {

  /* ---- toasts: along the bottom edge rather than in a corner there is no room for.
     env(safe-area-inset-bottom) keeps them clear of the home indicator on an iPhone; every other
     device gets the 0 fallback. */
  .toast-region {
    left: 12px; right: 12px; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
  }
  .toast { width: auto; max-width: none; }

  /* ---- confirm: a bottom sheet.
     It is still a <dialog> opened with showModal(), so the top layer, the focus trap and Escape
     are unchanged. What changes is where it sits and the order of the two buttons. */
  dialog.confirm[open] {
    width: auto; max-width: none;
    margin: 0; top: auto; bottom: 0; left: 0; right: 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    animation: sheet-up .2s ease-out;
  }
  .confirm-grip {
    display: block; width: 36px; height: 4px; margin: 0 auto 8px;
    border-radius: var(--radius-pill); background: var(--border-strong);
  }
  /* column-REVERSE, so the destructive button is on top (§21.5) while staying LAST in the DOM —
     which is what keeps Tab, and the initial focus, landing on the safe choice first. */
  .confirm-acts { flex-direction: column-reverse; gap: 10px; }
  .confirm-acts .btn { width: 100%; min-height: 48px; }

  /* ---- empty states: the action goes full width, like every other button at this size */
  .empty-state { padding: 32px 16px; }
  .empty-acts { width: 100%; flex-direction: column; align-items: stretch; }
  .empty-acts .btn { width: 100%; min-height: 48px; }
  /* the inline variant wraps instead of squeezing a button against a sentence */
  .empty-row { flex-wrap: wrap; }
  .empty-row-line { flex: 1 1 100%; }
  .empty-row .btn { width: 100%; min-height: 48px; }

  /* ---- the licence panel's states (§21.3) at phone width */
  .lp-acts .btn { min-height: 48px; }
  .lp-skeleton span { height: 48px; }

  /* ---- the auth cards (§20) at phone width: the two wide ones give up their fixed widths, and
     the QR grid stacks so the symbol is not squeezed to 192px of a 358px card. */
  .auth-card-520, .auth-card-480 { width: 100%; }
  .auth-qr-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 14px; }
  .auth-qr-side { width: 100%; }
  .auth-acts .btn, .auth-mini { min-height: 48px; }
  /* 16px, for the same reason every other input is: iOS Safari zooms the page in on a focused
     field whose text is smaller, and never zooms back out. The tracking is what keeps a 6-digit
     code readable at that size, so the box grows instead of the type shrinking. */
  .code-input { height: 56px; font-size: 20px; }
}

@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.confirm[open] { animation: none; } }

/* ================================================================================================
   §22.9 — PHONE STAFF TOOLS (AE-M-Mod). Last in the file, after §19 and §21.5, because it
   supersedes parts of both: the staff bar becomes a button, every staff dialog becomes a bottom
   sheet, and the post menu stops being a popover.
   ================================================================================================ */

/* The staff bar's phone form is a BUTTON in the thread header, and the bar itself is not drawn.
   Six ghost actions wrapped across a 390px screen would be a wall of grey words with no edges;
   one violet button that opens a sheet is the same six actions with somewhere to put them. */
.staff-bar-phone { display: none; }
/* …and still none when the script that gives it something to open has not run. The media query
   below sets display: inline-flex, which beats the UA sheet's [hidden] — so the button appeared on
   every phone with JS off and opened nothing. Higher specificity, so source order does not matter
   and this can stay beside the rule it guards. */
.staff-bar-phone[hidden] { display: none; }

/* The grip is a phone affordance, so it starts hidden — BEFORE the media query that shows it, for
   the same reason .confirm-grip is: a display:none written afterwards wins on source order and
   leaves every sheet without a handle. */
.dlg-grip { display: none; }

@media (max-width: 860px) {
  .staff-bar { display: none; }
  /* ...EXCEPT inside the sheet, which is where it goes when the Staff tools button opens it. The
     phone form reuses the same six forms rather than writing them out twice (app.js moves the
     element in and back), so the rule that hides the bar on the page has to stop at the dialog's
     edge - without this the sheet opens empty, which looks exactly like a button that does
     nothing. Stacked and full width, because a row of six was the thing being fixed. */
  dialog.dlg .staff-bar {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    padding: 0; background: transparent; border: 0;
  }
  dialog.dlg .staff-bar form { display: flex; }
  dialog.dlg .staff-bar .staff-act { width: 100%; justify-content: flex-start; }
  dialog.dlg .staff-bar .staff-bar-label { margin: 0 0 6px; }
  dialog.dlg .staff-bar .staff-bar-sep { display: none; }
  .staff-bar-phone {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 0 14px; border-radius: var(--radius);
    background: var(--staff-tint); border: 1px solid var(--staff-border); color: var(--staff);
    font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  }
  .staff-bar-phone svg { flex-shrink: 0; }

  /* The tab rows keep their chips on one line (see .pf-tabs a) and the ROW scrolls instead. Four
     chips carrying counts do not fit across 390px, and a row that wraps inside a pill-shaped
     container reads as a layout fault rather than as more tabs. */
  .pf-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .pf-tabs::-webkit-scrollbar { display: none; }

  /* ---- every staff dialog becomes a bottom sheet, like the confirm in §21.5. Near full height
     for Restrict, which has three radio cards, a duration row, a reason and two text areas. */
  dialog.dlg[open] {
    width: auto; max-width: none; max-height: 92vh;
    margin: 0; top: auto; bottom: 0; left: 0; right: 0;
    border-radius: 22px 22px 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    animation: sheet-up .2s ease-out;
  }
  .dlg-grip {
    display: block; width: 36px; height: 4px; margin: 10px auto 0;
    border-radius: var(--radius-pill); background: var(--border-strong);
  }
  .dlg-head { padding: 12px 16px 12px; }
  .dlg-body { padding: 16px; }
  /* THE ACTION GOES FIRST (§22.9, and §21.5 before it): column-reverse puts the confirm button on
     top while it stays LAST in the DOM, so Tab still reaches Cancel first. */
  .dlg-foot {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    flex-direction: column-reverse; align-items: stretch; gap: 10px;
  }
  .dlg-foot .btn { width: 100%; min-height: 48px; }
  .dlg-foot-note { margin: 0; text-align: center; }

  /* ---- the post "…" menu becomes a sheet too, with 48px rows */
  .post-menu {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; z-index: 80;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    animation: sheet-up .2s ease-out;
  }
  .post-menu-item { height: 48px; font-size: 15px; }
  .post-menu-group { padding: 10px 12px 6px; }

  /* ---- the member-side banner stacks */
  .restrict-banner { flex-direction: column; }
  .restrict-banner-acts { gap: 16px; }
  .restrict-instead { flex-direction: column; align-items: stretch; gap: 12px; }
  .restrict-instead .btn { width: 100%; min-height: 48px; }

  /* ---- the staff cards and the queue */
  .staff-card-acts .btn { flex: 1 1 auto; min-height: 44px; }
  .mod-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod-report-acts .btn { flex: 1 1 auto; min-height: 44px; }
  .mod-row { flex-wrap: wrap; }
  .mod-row-acts { width: 100%; }
  .mod-row-acts .btn { flex: 1 1 auto; min-height: 44px; }
  .post-hidden-acts { width: 100%; }
  .post-hidden-acts .btn { flex: 1 1 auto; min-height: 44px; }

  /* ---- the staff bar's own actions, where they still appear inside a sheet */
  .staff-act { min-height: 48px; font-size: 15px; }
}


/* ================================================================================================
   §24.3 — LOADING STATES (AE-States-Loading, round 16)

   THE RULE THAT MATTERS IS THE DELAY. Nothing here appears before ~300ms. A skeleton that flashes
   for 80ms on a fast swap is worse than no skeleton at all: the eye reads the flicker as a glitch,
   and the page feels less stable than if it had simply changed. The delay is done with an
   animation-delay on the fade-in rather than a timer in JS, so there is one mechanism and it cannot
   drift between the two.

   SKELETONS COPY THE SHAPE OF WHAT IS COMING — same rows, same tiles, same panel — rather than
   being a generic grey block. The point is that the layout does not jump when the content lands,
   which only works if the placeholder is the size of the thing it is holding a place for.
   ============================================================================================== */

/* The shimmer. Three stops so the highlight travels rather than pulsing in place; 1.4s because
   faster reads as agitation and slower stops reading as motion at all. */
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes sk-in { from { opacity: 0; } to { opacity: 1; } }

.skeleton,
.sk-line,
.sk-tile {
  background: linear-gradient(90deg, #14161b, #1a1d23, #14161b);
  background-size: 200% 100%;
  animation: sk-shimmer 1.4s linear infinite, sk-in .2s ease-out .3s both;
  border-radius: var(--radius);
}

/* `both` on sk-in holds the from-state during the delay, so the skeleton is INVISIBLE for the
   first 300ms and then fades in. Without `both` it would paint immediately and only then animate,
   which is the flicker this exists to avoid. */

.sk-line { height: 12px; }
.sk-line.is-short { width: 42%; }
.sk-line.is-half { width: 60%; }
.sk-tile { height: 92px; }

/* A list skeleton: the same 14px rhythm and hairline as .matrix-row and the board rows, so the
   real content lands on the same grid the placeholder drew. */
.sk-rows { display: flex; flex-direction: column; }
.sk-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 0; border-top: 1px solid var(--border-soft);
}
.sk-row:first-child { border-top: 0; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }

/* "Loading more…" under a pager or an infinite list. A row, not an overlay: the list keeps its
   place and the spinner sits where the next item will be. */
.sk-more {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 0; color: var(--text-muted); font-size: 13px;
}

/* The page-change bar: a 2px accent line under the nav while a boosted navigation is in flight.
   Fixed rather than absolute so it does not move with the scroll of the page being replaced, and
   under the header's z-index so it reads as part of the chrome. */
.boost-bar {
  /* --sticky-top is the header's own offset, already used by every sticky sidebar in this file;
     reusing it means the bar cannot drift from the header it sits under. */
  position: fixed; left: 0; right: 0; top: var(--sticky-top); height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: boost-slide 1s ease-in-out infinite, sk-in .15s linear .3s both;
  z-index: 60; pointer-events: none;
}
@keyframes boost-slide {
  from { background-position: -40% 0; }
  to   { background-position: 140% 0; }
}

/* REDUCED MOTION. The skeletons stay — they are structure, not decoration, and removing them would
   leave an empty box that says nothing is happening — but they stop travelling and sit at a flat
   tint instead. !important on every one of these, because the blanket reset at the top of this file
   sets animation-duration and iteration-count with !important and a plain rule loses to it; that
   cascade trap froze .btn-spinner for a whole release (see its comment). */
@media (prefers-reduced-motion: reduce) {
  .skeleton, .sk-line, .sk-tile {
    animation: none !important;
    background: var(--raised) !important;
  }
  .boost-bar {
    animation: none !important;
    background: var(--accent) !important;
    opacity: .5;
  }
}
