/* ===========================================================================
   ornge.app — site styles. Depends on tokens.css.

   Layout, components, and the in-app mockups. Those mockups are hand-built
   HTML rather than screenshots: they stay sharp at any size, follow the
   palette, and cannot go stale against a UI that has moved on.
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0 0 .5em;
    text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: -.02em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }
p  { text-wrap: pretty; }

.container { width: 100%; max-width: var(--container-max); margin-inline: auto; padding-inline: 22px; }
.container-narrow { max-width: 820px; }
.section { padding-block: var(--section-padding-y); position: relative; }
.section-tint { background: var(--bg-secondary); }

.eyebrow {
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--app-accent, var(--accent-light));
    margin: 0 0 14px;
}
.lede { font-size: 1.15rem; color: var(--text-secondary); max-width: 62ch; }

/* The navbar is sticky, so an in-page jump lands with its target underneath
   it. Every element that can be a scroll target keeps the bar's height clear;
   it costs nothing on elements nobody ever links to. */
[id] { scroll-margin-top: calc(var(--nav-height) + 20px); }

/* --- Skip link ----------------------------------------------------------- */
.skip-link { position: absolute; left: -9999px; background: var(--accent); color: #1a0d00;
    padding: 10px 16px; border-radius: var(--radius); z-index: 200; font-weight: 700; }
.skip-link:focus { left: 12px; top: 12px; }

/* --- Navigation ---------------------------------------------------------- */
.navbar {
    position: sticky; top: 0; z-index: 100; height: var(--nav-height);
    background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
}
.nav-container { height: 100%; display: flex; align-items: center; gap: 24px;
    max-width: var(--container-max); margin-inline: auto; padding-inline: 22px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display);
    font-weight: 700; font-size: 1.05rem; color: var(--text-primary); }
.nav-logo:hover { text-decoration: none; }
.logo-icon { width: 30px; height: 30px; flex: none; }
/* Below 900px the links are a panel behind a button; from 900px the button
   goes and the same list lays out as a row. One list, two layouts.

   A checkbox rather than <details>: a closed details computes to width 0 as a
   flex item, so its links rendered but pushed off the right edge of the
   viewport. Nothing here is inside a collapsed element.

   The input is visually hidden rather than display:none so it still takes
   focus and space still toggles it. */
.nav-check { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    border: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.nav-toggle { display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 10px; cursor: pointer;
    color: var(--text-secondary); background: var(--glass-bg);
    border: 1px solid var(--glass-border); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle:hover { color: var(--text-primary); border-color: var(--glass-border-hover); }
.nav-check:focus-visible + .nav-toggle { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.nav-check:checked + .nav-toggle { color: var(--accent-light); border-color: var(--glass-border-hover); }

.nav-links { display: none; position: absolute; right: 22px; top: var(--nav-height);
    z-index: 10; flex-direction: column; gap: 2px; min-width: 210px; padding: 8px;
    border-radius: var(--radius); background: var(--bg-elevated);
    border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); }
.nav-check:checked ~ .nav-links { display: flex; }
.nav-links a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 8px;
    color: var(--text-secondary); font-weight: 600; font-size: .98rem; }
.nav-links a:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent-light); }

/* 1280px, not 900: six products plus Home, Downloads and Account is nine
   links, and they stop fitting beside the logo and the user chip well
   before a laptop runs out of width. The menu is the honest answer at that
   count -- a row that wraps or clips is worse than a button. */
@media (min-width: 1280px) {
    .nav-check, .nav-toggle { display: none; }
    .nav-links { display: flex; position: static; flex-direction: row; align-items: center;
        margin-left: auto; gap: 24px; min-width: 0; padding: 0;
        background: none; border: 0; box-shadow: none; }
    .nav-links a { padding: 0; }
    .nav-links a:hover { background: none; color: var(--accent-light); }
}

/* --- Buttons ------------------------------------------------------------- */
/* min-height, not more padding: the large buttons already clear 44px and
   would only get taller. This lifts the small ones to meet it. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px;
    padding: 12px 24px; border-radius: var(--radius); font-family: var(--font-body);
    font-weight: 700; font-size: 1rem; border: 1px solid transparent; cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast); }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--gradient-orange); color: #1a0d00; box-shadow: var(--shadow-glow); }
.btn-primary:hover { box-shadow: var(--shadow-glow-strong); }
.btn-secondary { background: var(--glass-bg); border-color: var(--glass-border); color: var(--text-primary); }
.btn-secondary:hover { border-color: var(--glass-border-hover); }
.btn-sm { padding: 8px 16px; font-size: .92rem; }

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(44px, 8vw, 92px); }
.hero::before { content: ''; position: absolute; inset: -40% 0 auto; height: 140%;
    background: radial-gradient(58% 48% at 50% 0%,
        color-mix(in srgb, var(--app-accent, var(--accent)) 18%, transparent), transparent 70%);
    pointer-events: none; }
.hero > * { position: relative; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* Sits beside the status pill: what it runs on, in a line rather than a row of
   a panel. Monospace because it is a list of platforms, not a sentence. */
.hero-plat { margin-left: 12px; font-family: var(--font-mono); font-size: .8rem;
    color: var(--text-muted); }
@media (max-width: 560px) { .hero-plat { display: block; margin-left: 0; margin-top: 8px; } }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--text-secondary); }

/* --- Feature rows -------------------------------------------------------- */
.feature-row { display: grid; gap: 34px; align-items: center; padding-block: 30px; }
@media (min-width: 900px) {
    .feature-row { grid-template-columns: 1fr 1fr; gap: 54px; padding-block: 46px; }
    .feature-row.reverse .feature-text { order: 2; }
}
.feature-text h3 { margin-bottom: .4em; }
.feature-text > p { color: var(--text-secondary); margin: 0 0 14px; }

/* --- Spec lists ---------------------------------------------------------- */
.spec { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.spec li { position: relative; padding-left: 24px; color: var(--text-secondary); font-size: .98rem; }
.spec li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px;
    border-radius: 50%; background: var(--app-accent, var(--accent)); }
.spec strong { color: var(--text-primary); font-weight: 600; }

/* --- Cards --------------------------------------------------------------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
/* auto-fit gives three tracks at this container width, so a grid of four
   leaves one card orphaned at a third width in a row of its own, and a grid of
   two leaves the third track empty. Neither reads as deliberate. */
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
/* The marks. Sized in CSS rather than trusted to the width/height attributes,
   which are only there so the row does not reflow when the file arrives. */
.card-mark { width: 40px; height: 40px; display: block; margin-bottom: 14px; }
.hero-mark { width: 64px; height: 64px; display: block; margin-bottom: 18px; }
@media (max-width: 600px) { .hero-mark { width: 52px; height: 52px; } }

.card { display: flex; flex-direction: column; background: var(--glass-bg);
    border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 26px;
    transition: border-color var(--transition), transform var(--transition); }
.card:hover { border-color: var(--glass-border-hover); transform: translateY(-3px); }
.card p { color: var(--text-secondary); margin-top: 0; }
.card .card-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.card-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px;
    font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
    padding: 4px 11px; border-radius: 999px; border: 1px solid currentColor; align-self: flex-start;
    color: var(--app-accent, var(--accent)); }

/* --- Status pill --------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono);
    font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px;
    border-radius: 999px; border: 1px solid; }
.pill-live  { color: #6ee7a8; border-color: rgba(110,231,168,.35); background: rgba(110,231,168,.08); }
.pill-early { color: #ffc36e; border-color: rgba(255,195,110,.35); background: rgba(255,195,110,.08); }
/* Earlier than pill-early, which means "there is a build you can install".
   This one means there is not one yet, so it is deliberately the quietest. */
.pill-dev   { color: #9db4e8; border-color: rgba(157,180,232,.32); background: rgba(157,180,232,.07); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

@media (max-width: 520px) {
    }

/* --- The account hub ------------------------------------------------------
   One panel, six states. Colours come from the site tokens rather than the app
   palettes, because this is a page of the website and not a mockup of a
   client. */
.acct { margin-top: 30px; display: grid; gap: 20px; }
.acct-panel { background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 26px; }
.acct-h { margin: 0 0 12px; font-size: 1.3rem; }
.acct-panel p { color: var(--text-secondary); margin: 0 0 14px; }
.acct-panel p:last-child { margin-bottom: 0; }
.acct-panel .spec { margin: 16px 0; }
.acct-note { font-size: .92rem; }
.acct-working { color: var(--text-secondary); }
.acct-alert { color: var(--accent-light); font-weight: 600; }
.acct-code { display: inline-block; font-family: var(--font-mono); font-size: .82rem;
    color: var(--text-muted); background: var(--bg-void); border: 1px solid var(--glass-border);
    border-radius: 8px; padding: 8px 12px; }
.acct-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.acct-id { display: flex; align-items: center; gap: 18px; }
.acct-avatar { width: 68px; height: 68px; border-radius: 50%; flex: none; overflow: hidden;
    display: grid; place-items: center; background: var(--gradient-orange); color: #1a0d00;
    /* Body face, not the display one: Orbitron's capitals are geometric enough
       that a lone initial reads as an icon rather than a letter. */
    font-family: var(--font-body); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.acct-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acct-who { min-width: 0; }
.acct-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.acct-handle { color: var(--text-secondary); }
.acct-uid { font-family: var(--font-mono); font-size: .74rem; color: var(--text-muted);
    margin-top: 6px; word-break: break-all; }
.acct-flag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
    font-family: var(--font-mono); font-size: .62rem; letter-spacing: .06em;
    text-transform: uppercase; color: #ffc36e; background: rgba(255, 195, 110, .1);
    border: 1px solid rgba(255, 195, 110, .32); vertical-align: 1px; }

.acct-apps { display: grid; gap: 14px; margin-top: 18px;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
.acct-app { display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 16px; border-radius: 10px; background: var(--bg-void);
    border: 1px solid var(--glass-border); }
.acct-app h3 { margin: 0; font-size: 1rem; }
.acct-app p { flex: 1; margin: 0; font-size: .9rem; }

/* Side padding is deliberately small: this chip is usually followed by a
   comma or a full stop, and the padding sits inside the chip while the
   punctuation sits outside, so anything wider reads as a stray space. */
code { font-family: var(--font-mono); font-size: .88em; padding: 1px 4px; border-radius: 5px;
    background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-primary); }

/* --- Downloads -------------------------------------------------------------
   One platform at a time. The page used to print every build for every
   platform at once -- five platform headings, seven cards, then three sections
   saying nothing was published -- which was four screens for eight files.
   Almost nobody wants eight files; they want the one for the machine they are
   on, and the switcher is there for when the guess is wrong. */
.dl-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.dl-switch-b { display: inline-flex; align-items: baseline; gap: 7px; cursor: pointer;
    padding: 9px 16px; border-radius: 999px; font: inherit; font-size: .95rem;
    font-weight: 600; color: var(--text-secondary); background: var(--glass-bg);
    border: 1px solid var(--glass-border); }
.dl-switch-b:hover { color: var(--text-primary); border-color: var(--glass-border-hover); }
.dl-switch-b[aria-current="true"] { color: #1a0d00; background: var(--gradient-orange);
    border-color: transparent; }
.dl-switch-n { font-family: var(--font-mono); font-size: .76rem; opacity: .75; }

.dl-product { margin-block: 30px; }
.dl-product:first-of-type { margin-top: 0; }
.dl-product-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
    padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--glass-border); }
.dl-product-head h2 { margin: 0; }
.dl-about { font-weight: 600; font-size: .92rem; white-space: nowrap; }
.dl-platform-h { margin: 22px 0 10px; font-size: .95rem; font-weight: 600;
    color: var(--text-muted); }

/* Capped rather than 1fr: a platform with one build was stretching a single
   card the full width of the page. */
.dl-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(255px, 330px)); justify-content: start; }
@media (max-width: 620px) { .dl-cards { grid-template-columns: minmax(0, 1fr); } }

.dl-card { display: flex; flex-direction: column; gap: 7px; padding: 15px; min-width: 0;
    border-radius: var(--radius); background: var(--glass-bg);
    border: 1px solid var(--glass-border); }
.dl-card:hover { border-color: var(--glass-border-hover); }
.dl-card-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.dl-card-name { margin: 0; font-size: 1rem; }
.dl-card-ver { font-family: var(--font-mono); font-size: .78rem; color: var(--accent-light); }
.dl-card-size { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted);
    margin-left: auto; white-space: nowrap; }
.dl-card-file { margin: 0; font-family: var(--font-mono); font-size: .76rem;
    color: var(--text-muted); overflow-wrap: anywhere; }
.dl-card-notes { margin: 0; font-size: .88rem; color: var(--text-secondary); }

/* The button and the verdict share a row now. The 64-character hash used to
   have a line of its own on every card and was the single biggest thing making
   this page tall; it lives on the chip's tooltip, which is the one element
   whose entire job is that hash. */
.dl-card-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 6px; }
.dl-get { flex: 1; justify-content: center; }
.dl-vt { font-size: .76rem; font-weight: 700; white-space: nowrap; padding: 3px 9px;
    border-radius: 999px; border: 1px solid currentColor; }
.dl-vt:hover { text-decoration: none; filter: brightness(1.15); }
.dl-vt-ok { color: #4ade80; }
.dl-vt-warn { color: #fbbf24; }
.dl-vt-bad { color: #f87171; }
.dl-vt-unknown { color: var(--text-muted); }

.dl-pending { margin-top: 30px; color: var(--text-secondary); }
.dl-provenance { margin-top: 10px; font-size: .86rem; color: var(--text-muted); }

/* The blocked notice is a panel rather than a one-line error, because it has
   something to say and something to offer rather than just bad news. */
.dl-blocked { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.dl-blocked p { margin: 0; }
.dl-hosts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px; }
.dl-host { font-family: var(--font-mono); font-size: .85rem; font-weight: 600;
    padding: 7px 14px; border-radius: 999px; color: var(--accent-light);
    background: var(--bg-void); border: 1px solid var(--glass-border); }
.dl-host:hover { border-color: var(--glass-border-hover); text-decoration: none; }
.dl-index { margin-top: 38px; }
.dl-index .acct-h { margin-bottom: 14px; }

.dl-status { padding: 20px; border-radius: var(--radius); background: var(--glass-bg);
    border: 1px solid var(--glass-border); color: var(--text-secondary); }
.dl-status[data-state="error"] { border-color: rgba(255,107,0,.4); color: var(--text-primary); }

/* A section that follows the hero directly. The hero's own bottom padding is
   then the whole gap, instead of being added to this one's top.
   A class rather than style="padding-top:0": account, security and settings
   each carry a CSP with style-src 'self' and no 'unsafe-inline', so an inline
   style attribute on those pages is parsed by nobody and dropped in silence. */
.section-tight { padding-top: 0; }

/* --- The apps, on the home page ------------------------------------------ */
/* Unboxed, to match the feature lists on the app pages. These are navigation
   rather than a list of facts, so the heading carries the link and the separate
   "What it does" button went with the box - a btn-sm floating under bullets
   with nothing around it reads as stranded rather than as a control.
   Three columns rather than the feature lists' two: six entries in two columns
   is three tall rows, and these entries are short. */
.applist { display: grid; gap: 34px 44px; align-items: start; grid-template-columns: 1fr; }
@media (min-width: 680px)  { .applist { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .applist { grid-template-columns: repeat(3, 1fr); } }
.app h3 { margin: 0 0 14px; padding-bottom: 11px; font-size: 1.06rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.app h3 a { color: var(--text-primary); text-decoration: none; }
.app h3 a:hover, .app h3 a:focus-visible { color: var(--app-accent, var(--accent)); }

/* --- Features ------------------------------------------------------------ */
/* No boxes. These were .card, but a card stretches to the height of the tallest
   one in its row, and once the explanatory paragraph came out of them a short
   group ended in an empty bordered rectangle. With no border there is nothing to
   stretch: a group ends where its last bullet ends, and the rule under the
   heading does the structural work the box was doing.
   Two columns at most - at 1200px a four-column auto-fit would leave every
   bullet wrapping in a 280px gutter. */
.feat { display: grid; gap: 34px 48px; align-items: start; grid-template-columns: 1fr; }
@media (min-width: 760px) { .feat { grid-template-columns: 1fr 1fr; } }
.feat-group h3 { margin: 0 0 14px; padding-bottom: 11px; font-size: 1.04rem;
    border-bottom: 1px solid var(--glass-border); }

/* The "What it is" paragraph. Body size, not .lede: it is three or four
   sentences, and at lede size that is the wall of text this section replaced. */
.about { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.75;
    max-width: 68ch; margin: 0; }

/* --- Supported platforms -------------------------------------------------- */
/* An OS and what you get on it, one per row. A list rather than a table,
   because two columns of prose in a table is a list with lines drawn on it.
   Same seam-through-the-border construction as .stats below. */
.plat { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
    background: var(--glass-border); border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden; }
.plat li { background: var(--bg-secondary); padding: 15px 18px; display: grid;
    grid-template-columns: 215px 1fr; gap: 5px 22px; align-items: baseline; }
.plat-os { font-family: var(--font-display); font-weight: 600; font-size: .96rem;
    color: var(--text-primary); }
.plat-what { color: var(--text-secondary); font-size: .97rem; }
.plat-what b { color: var(--text-primary); font-weight: 600; }
.plat-note { margin-top: 16px; color: var(--text-muted); font-size: .92rem; max-width: 70ch; }
/* One column on a phone: 215px of label beside prose leaves the prose in a gutter. */
@media (max-width: 620px) { .plat li { grid-template-columns: 1fr; } }

/* --- Stat strip ---------------------------------------------------------- */
.stats { display: grid; gap: 1px; background: var(--glass-border);
    border: 1px solid var(--glass-border); border-radius: var(--radius); overflow: hidden;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
.stat { background: var(--bg-secondary); padding: 20px 18px; }
.stat-n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
    color: var(--app-accent, var(--accent)); font-variant-numeric: tabular-nums; line-height: 1; }
.stat-l { font-size: .86rem; color: var(--text-secondary); margin-top: 7px; }

/* --- Platform matrix ----------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--glass-border); border-radius: var(--radius); }
table.matrix { border-collapse: collapse; width: 100%; font-size: .92rem; min-width: 440px; }
table.matrix th, table.matrix td { padding: 10px 14px; border-bottom: 1px solid var(--glass-border); text-align: left; }
table.matrix thead th { background: var(--bg-elevated); font-family: var(--font-mono);
    font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
table.matrix td:not(:first-child), table.matrix thead th:not(:first-child) { text-align: center; width: 88px; }
table.matrix tbody tr:last-child td { border-bottom: none; }
table.matrix td { color: var(--text-secondary); }
.yes { color: #6ee7a8; font-weight: 700; } .no { color: var(--text-muted); } .part { color: #ffc36e; font-weight: 700; }

/* Below 600px the matrix stacks: a four-column table in a 331px box scrolls
   sideways inside its own border, and a reader who does not think to swipe it
   sees one column of ticks and concludes the other platforms have none. Each
   row becomes a card naming its own columns, so nothing is off-screen.

   The header row is hidden from sight but left in the accessibility tree --
   removing it would leave the cells with nothing to be headed by. */
@media (max-width: 599px) {
    .table-wrap { overflow-x: visible; border: 0; border-radius: 0; }
    table.matrix { min-width: 0; }
    /* Two columns already fit a phone -- only min-width was making them
       scroll. Stacking one of these produces a card per row whose whole body
       is "Status: verified", which the heading above already said. */
    table.matrix.matrix-2col th, table.matrix.matrix-2col td { padding: 10px 8px; }
    table.matrix.matrix-2col td:not(:first-child),
    table.matrix.matrix-2col thead th:not(:first-child) { width: auto; white-space: nowrap; }
    table.matrix:not(.matrix-2col) thead { position: absolute; width: 1px; height: 1px;
        overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    table.matrix:not(.matrix-2col) tr { display: block; padding: 14px 16px; border: 1px solid var(--glass-border);
        border-radius: var(--radius); background: var(--glass-bg); }
    table.matrix:not(.matrix-2col) tr + tr { margin-top: 10px; }
    table.matrix:not(.matrix-2col) td { display: flex; align-items: baseline; justify-content: space-between;
        gap: 14px; padding: 5px 0; border: 0; text-align: left; }
    table.matrix:not(.matrix-2col) td[data-label] { width: auto; }
    table.matrix:not(.matrix-2col) td:first-child { display: block; color: var(--text-primary);
        font-weight: 600; margin-bottom: 6px; padding-top: 0; }
    table.matrix:not(.matrix-2col) td[data-label]::before { content: attr(data-label);
        color: var(--text-muted); font-family: var(--font-mono);
        font-size: .74rem; letter-spacing: .05em; }
}

/* --- Footer -------------------------------------------------------------- */
/* Sits above the copyright. True of every product rather than of whichever
   page you are on, which is why it is here and not in a hero. */
.footer-note { margin: 0 0 6px; font-size: .88rem; color: var(--text-secondary); }
.site-footer { border-top: 1px solid var(--glass-border); padding-block: 34px; margin-top: 48px;
    color: var(--text-secondary); font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Nav user menu ---------------------------------------------------------
   Sits between the logo and the burger in source order, which is the order it
   needs on a phone. At 900px the chip is ordered past the link row instead, so
   one piece of markup gives logo/user/burger narrow and logo/links/user wide.

   It is markup that only ever appears for someone signed in, so it is built in
   JS rather than written into eleven pages and hidden ten times. */
.nav-user { margin-left: auto; position: relative; display: flex; align-items: center; }
.nav-signin { color: var(--text-secondary); font-weight: 600; font-size: .98rem; }
.nav-signin:hover { color: var(--accent-light); text-decoration: none; }

.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px;
    border-radius: 999px; cursor: pointer; font: inherit; font-size: .92rem;
    font-weight: 600; color: var(--text-secondary); background: var(--glass-bg);
    border: 1px solid var(--glass-border); }
.user-chip:hover { color: var(--text-primary); border-color: var(--glass-border-hover); }
.user-chip[aria-expanded="true"] { color: var(--text-primary); border-color: var(--glass-border-hover); }
.user-face { width: 28px; height: 28px; border-radius: 50%; flex: none; overflow: hidden;
    display: grid; place-items: center; background: var(--gradient-orange); color: #1a0d00;
    font-family: var(--font-body); font-size: .88rem; font-weight: 700; line-height: 1; }
.user-face img { width: 100%; height: 100%; object-fit: cover; }
/* The name is the first thing to go when the bar is tight; the face still
   identifies who is signed in, and the menu repeats the name in full. */
.user-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chev { width: 15px; height: 15px; flex: none; }

.user-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 20;
    display: flex; flex-direction: column; gap: 2px; min-width: 210px; padding: 8px;
    border-radius: var(--radius); background: var(--bg-elevated);
    border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); }
.user-menu[hidden] { display: none; }
.user-menu-head { padding: 8px 12px 10px; margin-bottom: 4px;
    border-bottom: 1px solid var(--glass-border); }
.user-menu-name { font-weight: 700; color: var(--text-primary); }
.user-menu-handle { font-size: .86rem; color: var(--text-muted); }
.user-menu-item { display: block; width: 100%; padding: 10px 12px; border: 0;
    border-radius: 8px; text-align: left; cursor: pointer; font: inherit;
    font-size: .95rem; font-weight: 600; color: var(--text-secondary); background: none; }
.user-menu-item:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.user-menu-out { margin-top: 4px; border-top: 1px solid var(--glass-border);
    border-radius: 0 0 8px 8px; }

@media (min-width: 1280px) {
    .nav-user { order: 2; margin-left: 18px; }
}
@media (max-width: 520px) {
    .user-name { display: none; }
    .user-chip { padding: 5px; gap: 4px; }
}

/* --- Account section tabs -------------------------------------------------- */
.acct-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 22px; padding: 5px;
    border-radius: 999px; background: var(--glass-bg);
    border: 1px solid var(--glass-border); align-self: start; }
.acct-tab { padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: .95rem;
    color: var(--text-secondary); }
.acct-tab:hover { color: var(--text-primary); text-decoration: none; }
.acct-tab[aria-current="page"] { color: #1a0d00; background: var(--gradient-orange); }

/* --- Security page ---------------------------------------------------------- */
.sec-facts { display: grid; gap: 0; margin: 0 0 16px; }
.sec-fact { display: grid; grid-template-columns: 11rem 1fr; gap: 6px 20px;
    padding: 14px 0; border-top: 1px solid var(--glass-border); }
.sec-fact:first-child { border-top: 0; padding-top: 0; }
.sec-fact dt { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); }
.sec-fact dd { margin: 0; color: var(--text-primary); font-weight: 600; }
.sec-note { display: block; margin-top: 4px; font-weight: 400; font-size: .92rem;
    color: var(--text-secondary); }

.sec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sec-card { padding: 18px; border-radius: var(--radius); background: var(--bg-void);
    border: 1px solid var(--glass-border); display: flex; flex-direction: column;
    align-items: start; gap: 8px; }
.sec-card h3 { margin: 0; font-size: 1.05rem; }
.sec-card p { margin: 0 0 4px; font-size: .94rem; color: var(--text-secondary); flex: 1; }

/* --- Settings page ---------------------------------------------------------- */
.set-list { margin: 0 0 16px; }
.set-row { display: grid; grid-template-columns: 11rem 1fr auto; gap: 6px 20px;
    align-items: baseline; padding: 14px 0; border-top: 1px solid var(--glass-border); }
.set-row:first-child { border-top: 0; padding-top: 0; }
.set-row dt { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); }
.set-row dd { margin: 0; color: var(--text-primary); font-weight: 600;
    overflow-wrap: anywhere; }
.set-muted { color: var(--text-muted); font-weight: 400; }
.set-where { font-size: .84rem; color: var(--text-muted); white-space: nowrap; }

.set-preview { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.set-preview p { margin: 0; flex: 1; min-width: 15rem; }

@media (max-width: 600px) {
    .sec-fact, .set-row { grid-template-columns: 1fr; }
    .set-where { white-space: normal; }
}

/* --- Legal pages (terms, privacy) ------------------------------------------ */
/* Two documents of four thousand words each, which is a kind of page this site
   did not have before. The marketing pages are short blocks with a lot of air;
   these are read top to bottom, or jumped into from a footer link and read in
   one place, so they need a measure, numbered landmarks and a way back out.

   Scoped under .legal rather than loosened globally: h2 here is a clause
   heading in a numbered sequence, not a section banner, and it wants to be
   smaller and quieter than the one on the home page. */
.legal { max-width: 74ch; }
.legal p, .legal li { color: var(--text-secondary); font-size: 1.02rem; line-height: 1.75; }
.legal p { margin: 0 0 1em; }
.legal strong { color: var(--text-primary); font-weight: 600; }
.legal a { overflow-wrap: anywhere; }

/* The rule above each clause is the structure. It replaces the boxes the rest
   of the site uses: forty bordered panels down one page is a filing cabinet. */
.legal h2 {
    font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    margin: 46px 0 .6em;
    padding-top: 26px;
    border-top: 1px solid var(--glass-border);
}
.legal > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { font-size: 1.02rem; margin: 28px 0 .5em; color: var(--text-primary); }

/* The clause number is a span, not a CSS counter. A counter would renumber
   itself when a clause is added, which sounds like the point until you
   remember that these numbers get quoted in emails and in Play Console
   submissions: "clause 11" has to keep meaning the clause it meant last year,
   so the numbers are written down and changing one is a deliberate act. */
.legal-n {
    font-family: var(--font-mono);
    font-size: .8em;
    color: var(--accent-light);
    margin-right: .6em;
    font-weight: 400;
}

.legal ul { margin: 0 0 1em; padding-left: 0; list-style: none; }
.legal li { margin-bottom: .55em; padding-left: 1.3em; position: relative; }
.legal li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* --- The date line -------------------------------------------------------- */
/* Which version of the document you are reading. Mono, because it is a fact
   about the file rather than part of the prose, and both documents are
   superseded by whatever is at this URL rather than by a version number. */
.legal-date {
    font-family: var(--font-mono);
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 18px 0 0;
}

/* --- Plain-English summary ------------------------------------------------- */
/* Not the agreement, and it says so. It is here because a policy nobody reads
   protects nobody: the summary is what people actually take in, and the ICO
   asks for exactly this in a layered privacy notice. */
.legal-tldr {
    padding: 20px 22px;
    border-radius: var(--radius);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--accent);
}
.legal-tldr h2 { margin: 0 0 .6em; padding: 0; border: 0; font-size: 1.1rem; }
.legal-tldr p:last-child, .legal-tldr ul:last-child { margin-bottom: 0; }
.legal-tldr ul { margin-bottom: 0; }

/* --- Contents ------------------------------------------------------------- */
/* Two columns of jump links. The numbers are in the link text so a clause can
   be found by number from the contents as well as from the prose. */
.legal-toc { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px 30px;
    grid-template-columns: 1fr; counter-reset: none; }
@media (min-width: 680px) { .legal-toc { grid-template-columns: 1fr 1fr; } }
.legal-toc li { margin: 0; padding: 0; }
.legal-toc li::before { content: none; }
.legal-toc a { display: block; padding: 7px 0; font-size: .95rem; color: var(--text-secondary); }
.legal-toc a:hover { color: var(--accent-light); text-decoration: none; }
.legal-toc .legal-n { margin-right: .5em; }

/* --- A clause that has to be noticed --------------------------------------- */
/* Self-hosting, the remote-access warning, the age limit, how to delete an
   account. Each one is the answer to a question somebody arrives on this page
   already asking, and losing it in a wall of clauses is how it gets missed. */
.legal-callout {
    margin: 0 0 1.2em;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
}
.legal-callout p:last-child { margin-bottom: 0; }
.legal-callout-h {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: .45em;
}

/* --- Contact block --------------------------------------------------------- */
.legal-contact { display: grid; gap: 0; margin: 0; }
.legal-contact div { display: grid; grid-template-columns: 11rem 1fr; gap: 6px 20px;
    padding: 14px 0; border-top: 1px solid var(--glass-border); }
.legal-contact div:first-child { border-top: 0; padding-top: 0; }
.legal-contact dt { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); }
.legal-contact dd { margin: 0; color: var(--text-primary); font-weight: 600;
    overflow-wrap: anywhere; }
@media (max-width: 600px) { .legal-contact div { grid-template-columns: 1fr; } }

/* --- A label and a paragraph, paired -------------------------------------- */
/* Four of these on the privacy page: what the account holds and why, what
   each app collects, the lawful basis for each use, and how long each thing
   is kept. Every one is a short label beside a paragraph.

   Explicitly NOT table.matrix. That is the platform grid, where every column
   after the first is a centred 88px tick -- put a sentence in one and it
   wraps to a word a line, which is exactly what the first draft of this page
   did. It is not .matrix-2col either: that variant sets white-space: nowrap
   on the second column, for cells like "Status: verified".

   It is not a table at all, for the reason .plat gives above -- two columns
   of prose in a table is a list with lines drawn on it. A dl is what this
   is, a term and its description, and that is what a screen reader then
   announces. Same seam-through-the-border construction as .plat, and the
   same stack on a phone: 13rem of label beside prose at 375px would leave
   the prose in a gutter. */
.legal-rows { display: grid; gap: 1px; margin: 0 0 1.4em; padding: 0;
    background: var(--glass-border); border: 1px solid var(--glass-border);
    border-radius: var(--radius); overflow: hidden; }
.legal-rows > div { background: var(--bg-secondary); padding: 15px 18px;
    display: grid; grid-template-columns: 13rem 1fr; gap: 6px 22px; align-items: baseline; }
.legal-rows dt { color: var(--text-primary); font-weight: 600; font-size: .97rem; }
/* The qualifier under a label -- "a permanent GUID", "stored hashed". It is a
   fact about the row's subject rather than part of its name, so it drops to a
   line of its own instead of lengthening the label. */
.legal-rows dt span { display: block; margin-top: 3px; font-weight: 400;
    font-size: .85rem; color: var(--text-muted); }
.legal-rows dd { margin: 0; color: var(--text-secondary); font-size: .97rem; line-height: 1.7; }
.legal-rows dd strong { color: var(--text-primary); font-weight: 600; }
@media (max-width: 680px) { .legal-rows > div { grid-template-columns: 1fr; } }
