/* Landing page tabs */
.landing-tabs-shell {
    margin: 1.5rem auto 0;
    max-width: 900px;
    padding: 1rem 1.1rem 1.15rem;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    border-radius: 18px;
    background: linear-gradient(145deg, var(--surface) 0%, color-mix(in srgb, var(--accent-2) 7%, var(--surface)) 52%, color-mix(in srgb, var(--accent-2) 5%, var(--surface)) 100%);
}

.landing-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: flex-end;
    margin: -2.05rem 0 0.95rem;
    padding: 0 0.1rem;
    scroll-margin-top: 1.125rem;
}

.landing-tab-button {
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    border-top: 12px inset transparent;
    border-radius: 14px 14px 0 0;
    background: var(--surface);
    color: var(--accent-strong);
    padding: 0.82rem 1rem 0.96rem;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    top: 1px;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.landing-tab-button:hover,
.landing-tab-button:focus-visible {
    background: color-mix(in srgb, var(--accent-2) 3%, var(--surface));
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Split out of the rule above, which shared its whole treatment with :hover — so
 * a keyboard reader looked exactly like a mouse passing over the control, and
 * the `outline: none` removed the only thing that would have told them apart.
 * That pairing was the shape of ten rules across this file and
 * docs-endpoint-modal.css; each one is now split the same way, and the rest
 * point back here.
 *
 * --accent-text, not raw --accent / --accent-2: the fill tokens land under the
 * 3:1 non-text contrast floor, which tests/frontend/theme-focus-ring.spec.mjs
 * measures (raw --accent-2 fails on all fifteen light themes). Solid, never a
 * gradient — a gradient in the `outline` shorthand is invalid and the ring
 * silently disappears.
 *
 * Keyboard focus carries more weight since lib/arrow-focus-nav.js made the
 * arrows a second Tab: the ring is now how a reader tracks where they are. */
.landing-tab-button:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* Three tabs on one row on a phone (2026-10-14). At the desktop padding the
   strip needs ~300px and a 390px phone gives it ~275, so "About" dropped to a
   second row of its own. */
@media (max-width: 480px) {
    .landing-tab-button {
        padding: 0.7rem 0.72rem 0.85rem;
        font-size: 0.86rem;
    }
}

/* The narrowest phones (320px gives the strip ~205px). */
@media (max-width: 360px) {
    .landing-tabs-shell {
        padding-inline: 0.6rem;
    }

    .landing-tabs-bar {
        gap: 0.2rem;
    }

    .landing-tab-button {
        padding: 0.62rem 0.5rem 0.78rem;
        font-size: 0.8rem;
    }
}

.landing-tab-button[aria-selected="true"] {
    background: var(--surface);
    color: var(--text-strong);
    border-color: color-mix(in srgb, var(--accent-2) 48%, transparent);
    transform: translateY(-2px);
}

.landing-tab-panels {
    border-radius: 0 18px 18px 18px;
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    background: var(--surface);
    padding: 1.25rem;
}

.landing-tab-panel {
    display: none;
}

.landing-tab-panel.is-active {
    display: block;
}

.landing-tab-panel p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.landing-tab-panel p:last-child {
    margin-bottom: 0;
}

/* The highlighter pen. Named `.docs-highlight` while it lived only in the docs
   panel — where it was in fact never used — and renamed when the "Big tech"
   funding ask took it, because a class that says "docs" on the landing page's
   closing line is a name that lies.

   OPAQUE yellow, and that is the whole point of the treatment: a marker that
   composites against the page would go olive on a dark theme and pale on a
   light one, so "highlighted" would mean something different in every theme.
   Pinned, it is the same pen everywhere — and because both halves of the pair
   are literal, the contrast is exact rather than emergent (13.7:1 for the ink,
   8.4:1 for the dimmed aside). This is one of the self-paired literal islands
   summary/ops/ACCESSIBILITY.md names as exempt from the theme's repair layer: the
   text is dark BECAUSE the background is pinned light. */
.page-highlight {
    display: inline;
    background: linear-gradient(90deg, #faf992 0%, #faf05f 100%);
    box-shadow: inset 0 0 0px rgba(255,255,255,0.6), 0 0 0 2px rgba(250, 249, 146, 0.35);
    color: #0f172a;
    border-radius: 0.45rem;
    padding: 0 0.3rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    /* Every wrapped fragment gets the full pen — padding, radius and ring —
       instead of the first and last only, which is what makes a marker across
       two lines read as two strokes rather than one long smear with square
       ends in the middle. */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* The trailing aside keeps its quieter voice INSIDE the pen: `color: inherit`
   rather than the muted theme token it would otherwise take from
   .why-summary-block, which is a light grey and would sit on yellow at about
   1.5:1 on the dark themes. Dimmed by opacity, so the hierarchy survives and
   the pairing stays literal. */
.page-highlight small,
.page-highlight em {
    color: inherit;
    opacity: 0.8;
}

.page-highlight::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.5), transparent 35%);
    opacity: 0.35;
    border-radius: inherit;
    pointer-events: none;
}

.landing-quickstart-link {
    /* The theme accent, not the per-mode status green, so the steps follow the
       palette (2026-10-28). */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1rem 0.72rem 2.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    color: var(--accent-text);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.18s ease, border-color 0.18s ease;
    position: relative;
}

.landing-quickstart-link::before {
    content: attr(data-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent-text);
    font-weight: 800;
    border: 1px solid color-mix(in srgb, var(--accent) 66%, transparent);
    position: absolute;
    left: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
}

.landing-quickstart-link:hover,
.landing-quickstart-link:focus-visible {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

/* Focus split out of the shared :hover rule — see .landing-tab-button above. */
.landing-quickstart-link:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* ==================== QUICKLINKS ====================
 * A row of widget-testing links that used to be the first thing in the Widget
 * panel, above the widget itself. It reads as chrome to a first-time visitor,
 * so it is a disclosure now, and a quiet one: the control is a single small `Q`
 * pinned to the top-left corner of the panel's content box, OUT of the flow, so
 * collapsed the row costs the content no height at all and the widget is what
 * the panel opens with.
 *
 * The `<hr>` that used to separate this row from the widget went with it: a
 * divider under nothing is just a line, so the rule belongs to the disclosure
 * and wipes in with it.
 */
.landing-tab-panel[data-landing-panel="widget"] {
    position: relative;
}

.landing-widget-top-bar {
    /* Explicit so the quicklinks labels always follow the theme. */
    color: var(--text);
    /* In flow, but empty until it opens -- the button below is absolute, so a
       collapsed shell is a zero-height box. */
    margin: -0.7rem 0 0;
    text-align: center;
}

/* Flush into the corner of the panel's content box. The Q is the whole control
   in both states, so it never moves: the links open UNDER it rather than
   pushing it anywhere. */
.landing-quicklinks-toggle {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Zero at the base, not just while open: the text sits directly against the
       Q in every state that shows it, or the word reads as "Q uicklinks". */
    gap: 0;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.4rem;
    border: 1px solid color-mix(in srgb, var(--border-strong) 40%, transparent);
    border-radius: 999px;
    background: transparent;
    /* Quiet by ink, not by opacity. This was --text-muted at `opacity: 0.75`,
       which took the Q to 4.03:1 on the default theme: the repair layer
       (theme-derive.js) guarantees a token's AA, not that token faded. The
       faint token is about the same grey and is repaired on every theme. */
    color: var(--text-faint);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, opacity 0.15s ease;
}

/* Two selectors, one rule, because the open state below outranks a bare
   `:hover` (0-3-0 against 0-2-0) -- so while the Quicklinks were open, hovering
   the toggle changed only its background: the border and the ink were being held
   by the open rule, and `opacity: 1` was already true. Naming the open state
   here matches its weight, which is the only way a hover can win against it. */
.landing-quicklinks-toggle:hover,
.landing-widget-top-bar[data-open="true"] .landing-quicklinks-toggle:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
    color: var(--accent-text);
    opacity: 1;
}

/* The palette trigger, centred between the widget and the Tell AI row: the icon
   and the live theme name, nothing else. The icon sizes off the text so it
   tracks the row's font-size at every breakpoint. */
.landing-widget-palette-row {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.landing-palette-link {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0.15rem 0.3rem;
    /* WCAG 2.5.8 minimum target: this rendered 27x22 on a phone. */
    min-height: 24px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.92rem;
    white-space: nowrap;
    cursor: pointer;
}

.landing-palette-link .landing-widget-theme-palette-icon {
    /* `display: block` further down is the card-era rule, and it put the glyph
       on a line of its own here -- this sits beside a word now. Higher
       specificity, so it wins without touching the original. */
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.22em;
    /* Follows the link's ink, hover included, instead of pinning its own. */
    color: inherit;
    transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.landing-palette-link .landing-widget-theme-palette-icon path {
    transition: fill 0.22s ease;
}

/* Open: flipped AND filled in. Two signals, one state -- the control says which
   way it is pointing without a second word of copy, and `aria-expanded` (which
   is already the truth here) is what drives both, so the paint cannot disagree
   with the attribute a screen reader reads.
   The body fills to a TINT rather than to solid currentColor: the four dots on
   it are currentColor themselves, and a solid body would swallow them. */
.landing-palette-link[aria-expanded="true"] .landing-widget-theme-palette-icon {
    transform: scaleX(-1);
}

.landing-palette-link[aria-expanded="true"] .landing-widget-theme-palette-icon path {
    /* A CSS rule beats the `fill="none"` presentation attribute on the path --
       which is the same mechanism the note further down relies on to KEEP the
       outline an outline everywhere else. */
    fill: color-mix(in srgb, currentColor 32%, transparent);
}

.landing-quicklinks-toggle:focus-visible {
    /* --accent-text, not --accent-2: see the note in threat-catalog.css. */
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* Closed, the Q is the whole word. Open, the Q IS the word's first letter and
   the rest spells out after it -- so this span carries no "Q" of its own and
   must match the Q's own size exactly, or the word breaks in half visually.

   Collapsed it is a zero-width clipped box rather than `display: none`, because
   a hover has to be able to SPELL THE WORD OUT (below) and `display` cannot be
   transitioned. Zero width also keeps it out of Playwright's idea of visible,
   which is what `display: none` was buying. */
.landing-quicklinks-toggle-text {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    /* A max-width, not a width: the cap only has to exceed the word, and an
       em cap tracks the font rather than a pixel measurement that a reword or
       a theme swap would silently invalidate. */
    transition: max-width 0.18s ease, opacity 0.14s ease;
}

.landing-widget-top-bar[data-open="true"] .landing-quicklinks-toggle-text {
    max-width: 7em;
    opacity: 1;
}

/* HOVER, WHILE COLLAPSED: say what the Q stands for.
   A lone "Q" in a corner is a control that has to be guessed at or read out of
   a tooltip, and a tooltip arrives too late to be an invitation. Hovering
   spells the word out in place, so the affordance answers itself.

   It must not read as OPENED -- the panel below stays shut, and the two states
   are told apart by weight: this keeps the collapsed 700, while the open state
   drops the whole word to 500 and hands the bold down to the links. Scoped with
   `:not([data-open="true"])` so it never fights the open rule for the same span.
   `:focus-visible` gets it too: a keyboard reader arrives at the same control
   and is owed the same answer. */
.landing-widget-top-bar:not([data-open="true"]) .landing-quicklinks-toggle:hover .landing-quicklinks-toggle-text,
.landing-widget-top-bar:not([data-open="true"]) .landing-quicklinks-toggle:focus-visible .landing-quicklinks-toggle-text {
    max-width: 7em;
    opacity: 1;
}

/* `b` defaults to `bolder`, which against the button's own 700 computes to 900.
   Invisible while the Q stands alone; the moment the rest of the word is beside
   it, a 900 Q against a 700 "UICKLINKS" breaks the word in half -- the same
   defect the open state fixes for itself further down. */
.landing-widget-top-bar:not([data-open="true"]) .landing-quicklinks-toggle:hover b,
.landing-widget-top-bar:not([data-open="true"]) .landing-quicklinks-toggle:focus-visible b {
    font-weight: inherit;
}

/* One block for the open state, not two. There were two rules with this exact
   selector twelve lines apart, which is how the pair below drifted out of sight
   of the hover rule above -- a condition written twice is a condition that gets
   read once. */
.landing-widget-top-bar[data-open="true"] .landing-quicklinks-toggle {
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    color: var(--accent-text);
    opacity: 1;
    /* Bold marks the letter that is live. Collapsed, that is the Q and only the
       Q -- the links it hides are unreachable, so their initials carry no bold
       (below). Open, the letters below take over, and the word here drops to the
       row's weight so it stops competing with them. It drops as a WHOLE word:
       the Q is the first letter of "Quicklinks" at this size, and leaving it
       bold with the rest normal breaks the word in half visually. This is also
       what separates open from merely hovered, which spells the same word at
       the collapsed 700. */
    font-weight: 500;
}

.landing-widget-top-bar[data-open="true"] .landing-quicklinks-toggle b {
    font-weight: inherit;
}

/* The reveal. A 0fr -> 1fr grid track is the one height animation that needs no
   measured pixel value, so it survives a rewording of the links or a reflow at
   any width -- and unlike [hidden], it animates in BOTH directions, so closing
   is as smooth as opening. Hiding is `visibility`, which is what keeps the
   links out of the tab order while collapsed.
   Spam-safe by construction: transitions interrupt and reverse from wherever
   they are, so a run of presses just changes direction. */
.landing-quicklinks-body {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows 0.26s cubic-bezier(0.2, 0.7, 0.3, 1),
                opacity 0.2s ease,
                visibility 0s linear 0.26s;
}

.landing-widget-top-bar[data-open="true"] .landing-quicklinks-body {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    transition: grid-template-rows 0.26s cubic-bezier(0.2, 0.7, 0.3, 1),
                opacity 0.2s ease,
                visibility 0s;
}

/* Q fetching the panel from off screen (main.js) snaps it open for one style
   pass, so the page has its final height before the glide toward it starts.
   After the open rule above, at the same specificity, so this one wins. */
.landing-widget-top-bar[data-snap-open="true"] .landing-quicklinks-body {
    transition: none;
}

/* min-height: 0 is what lets the track actually collapse to nothing -- and the
   box must carry NO padding of its own: with border-box sizing a padded box
   cannot be squeezed below its own padding, so 30px of it survived the closed
   state as a permanent gap. Spacing lives on the children instead, where a
   margin inside a clipped zero-height box costs nothing. */
.landing-quicklinks-inner {
    min-height: 0;
    overflow: hidden;
}

/* The links' hover outline (2px at a 3px offset) is drawn OUTSIDE the link box,
   and the clipped inner box above ate it. The room for it has to be padding on
   a child, NOT on the clipping box itself: a padded border-box cannot squeeze
   below its own padding, so padding up there survives the closed state as a
   permanent gap (7px of one, measured -- the same trap the note above
   describes). Here the parent clips it to nothing when it closes. The negative
   margin hands the horizontal space back so the row still spans full width. */
.landing-quicklinks-row {
    padding: 0.45rem 0.5rem 0;
    /* Left only: the row is flex-end, so the last link sits against the right
       padding and a negative margin there would hand the outline's room
       straight back to the clip. */
    margin: 0 0 0 -0.5rem;
}

/* Open: the three links share the row, one line each, at the smaller weight
   that keeps them subordinate to the widget below. */
.landing-widget-top-bar-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    /* Roomy enough that two hover outlines cannot touch. */
    gap: 0.5rem 1.35rem;
    font-size: 0.92rem;
}

.landing-widget-top-bar-link {
    flex: 0 1 auto;
    /* Same reason as the gap: the outline is drawn outside the link box. */
    padding: 0.1rem 0.15rem;
    /* Closed is the resting state, and the open rule further down is what the
       link travels TO. See the note there for why this is a transition and not
       the animation it used to be. */
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.24s cubic-bezier(0.2, 0.7, 0.3, 1),
                transform 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Wide: caption left, links right, one line. A flex row rather than a float,
   so the two halves sit on a shared baseline whatever either one wraps to. */
@media (min-width: 900px) {
    .landing-quicklinks-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.6rem;
    }

    .landing-widget-top-bar-links {
        /* The three links are the row's job: they keep their natural width and
           stay on one line rather than wrapping their own text. */
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }
}

/* Each link is one line plus its parenthetical underneath -- the label itself
   must not wrap, or a three-line stack of fragments replaces the row. */
.landing-widget-top-bar-link a {
    display: inline-block;
    white-space: nowrap;
}

/* The debug switch is the one control in this row that is not an anchor, so it
   has to give up everything the UA gives a <button> and take the same box the
   links have. `.docs-link` already carries the ink, the hover and the focus
   ring for both element types, so only the chrome is left here. */
.landing-widget-top-bar-link button {
    display: inline-block;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: center;
    cursor: pointer;
}

/* A switch that names itself and nothing else is a control the reader has to
   press to find out where it stands. This is the value, printed. */
.landing-quicklinks-switch-state {
    display: inline-block;
    min-width: 1.9rem;
    padding: 0 0.3rem;
    border: 1px solid color-mix(in srgb, var(--border-strong) 45%, transparent);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.landing-quicklinks-switch[aria-checked="true"] .landing-quicklinks-switch-state {
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    background: color-mix(in srgb, var(--accent-soft) 60%, transparent);
    color: var(--accent-text);
}

/* Each quicklink's initial is bold only while the panel is open, because that
   is exactly when the bare letter fires it -- see the toggle rule above. The <b>
   stays in the markup either way: it is where the hotkeys are READ from, so it
   is structure, and only its weight is state.

   `a` and `button` both, since the Debug logs switch is a button and carries a
   live D. A rule that named only `a` would have left its letter unbolded while
   its hotkey worked -- the bold is the page saying the key is live, so the two
   have to move together. */
.landing-widget-top-bar-link a b,
.landing-widget-top-bar-link button b {
    font-weight: inherit;
}

.landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link a b,
.landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link button b {
    font-weight: 700;
}

/* Letter pressed, not yet released: this is what the reader is about to open.
   The same paint :hover and :focus-visible give the link (navigation.css)
   rather than a look of its own, because it is the same statement -- "this one"
   -- and the class is here because a programmatic focus is not guaranteed to
   count as :focus-visible. */
.landing-widget-top-bar-link a.is-hotkey-armed,
.landing-widget-top-bar-link button.is-hotkey-armed {
    color: var(--accent-strong);
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* The rule under the row: short, and fading out to the right rather than
   ending, so a stub of a line does not read as a broken one. */
.landing-quicklinks-rule {
    display: block;
    height: 1px;
    width: min(16rem, 38%);
    /* Also the open row's breathing room against the widget below it, so the
       gap opens and closes WITH the box instead of jumping on a margin. */
    margin: 0.55rem 0 0.9rem;
    background: linear-gradient(to right,
        color-mix(in srgb, var(--border-strong) 70%, transparent),
        transparent);
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0;
    transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.3, 1),
                opacity 0.26s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* The contents arrive as the box opens: the rule wipes left to right, the links
   land behind it in a short stagger.
   TRANSITIONS, not the animations these used to be, and for the same reason the
   box itself uses one -- Q toggles, so the reader can tap faster than either
   direction finishes. An animation bound to [data-open="true"] restarts from its
   FIRST FRAME every time the attribute comes back, so a press landing mid-close
   snapped the links to opacity 0 and replayed the whole stagger over a box that
   was already half open: the box moved like butter and the contents strobed. A
   transition just reverses from wherever it is, which is what makes a run of
   presses land on the last one smoothly instead of restarting on each.
   The stagger is transition-delay on the OPEN rules only. Opening is a sequence;
   closing is not, and a delay left on the closed state would hold each link in
   place after the box around it had already gone. */
.landing-widget-top-bar[data-open="true"] .landing-quicklinks-rule {
    transform: none;
    opacity: 1;
}

.landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link {
    opacity: 1;
    transform: none;
}

.landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(1) { transition-delay: 0.03s; }
.landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(2) { transition-delay: 0.085s; }
.landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(3) { transition-delay: 0.14s; }
.landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(4) { transition-delay: 0.195s; }

@media (prefers-reduced-motion: reduce) {
    .landing-quicklinks-body,
    .landing-widget-top-bar[data-open="true"] .landing-quicklinks-body,
    .landing-quicklinks-rule,
    .landing-quicklinks-toggle-text,
    .landing-widget-top-bar-link {
        transition: none;
    }

    /* The delays go too. With no transition to carry them they would still hold
       the reveal back by their own length. */
    .landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(1),
    .landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(2),
    .landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(3),
    .landing-widget-top-bar[data-open="true"] .landing-widget-top-bar-link:nth-child(4) {
        transition-delay: 0s;
    }
}

/* Narrow: the links stack under the button instead of squeezing beside it. */
@media (max-width: 899px) {
    .landing-widget-top-bar-links {
        flex: 1 1 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
    }

    .landing-widget-top-bar-link {
        flex: 0 0 auto;
    }
}

/* The caption's padding-top above is what used to clear the absolute Q on a
   phone; the caption has since left the markup, so the first link opened 13px
   up INTO the toggle (overlapping it at 500px and under). The row takes the
   clearance instead. Under 768 only: from there the panel's own spacing
   already clears it. Padding on the row, not the clipped box, so a closed
   panel still collapses to nothing (see .landing-quicklinks-inner). */
@media (max-width: 767px) {
    .landing-quicklinks-row {
        padding-top: 1.85rem;
    }
}

.landing-widget-mount {
    margin: 2.3rem 0;
    /* Matches WIDGET_TRIGGER_SIZE_REM (lib/widget-constants.js). This was 96px
       against a 128px widget, so the page shifted 32px on every load — and in
       px, which would have broken again on any root font-size but 16. The
       widget now logs a mismatch here in debug builds rather than leaving the
       next wrong number to be found by eye. */
    min-height: 8rem;
    /* The loading placeholder's size, and it has to be a length rather than the
       100% the logo slots use: a percentage height resolves against the parent's
       HEIGHT, and this box has only a MIN-height, so it would compute to auto
       and stretch the art to the width of the panel. Same constant as the line
       above, for the same reason it is written there. */
    --pa-ph-size: 8rem;
}

/* The size slider goes to 24rem (384px), and a 320px phone's mount is ~244px.
   A trigger wider than the page -- or its glow, which reaches 30% past it on
   each side -- made the phone zoom the WHOLE landing page out to fit it, every
   visit after the size was saved. Under 768px the demo is drawn at the saved
   size or 45vw, whichever is smaller (45vw plus the glow fits the mount at
   every phone width); the saved size itself is untouched, and so is the
   desktop. The slider's value arrives as --landing-trigger-size (written beside
   the widget's own property by applyLandingSize and lib/trigger-boot.js),
   because a property cannot read itself. !important beats the inline write. */
@media (max-width: 767px) {
    .landing-widget-mount {
        --pa-widget-trigger-size: min(var(--landing-trigger-size, 8rem), 45vw) !important;
        --pa-ph-size: min(var(--landing-trigger-size, 8rem), 45vw) !important;
    }
}

/* Localhost only, and only while the demo widget is actually connected to LIVE
   Auth (the backend:live dev toggle, or ?live=true). Loud on purpose: a page
   quietly pointed at production auth is the one state worth interrupting. */
.landing-widget-backend-indicator {
    margin: 0 0 -1.4rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--warning);
    background: color-mix(in srgb, var(--warning-soft) 55%, var(--surface));
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.45;
}

/* Shown by renderWidgetMountFailure() in landing-page-tabs.js when the widget
   could not be mounted. Without it the reserved 8rem above is just an
   unexplained gap,
   and on this page the widget is the sign-in path. Page tokens only — the widget
   module is exactly what failed, so none of its styling exists here. */
.landing-widget-mount-error {
    border: 1px solid var(--danger);
    border-radius: 14px;
    background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface));
    padding: 1.1rem 1.25rem;
    color: var(--text);
}

.landing-widget-mount-error-title {
    margin: 0 0 0.4rem;
    font-weight: 600;
    color: var(--danger-text);
}

.landing-widget-mount-error-copy {
    margin: 0 0 0.9rem;
    color: var(--text-muted);
}

.landing-widget-mount-error-reload {
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-strong);
    padding: 0.5rem 1rem;
    font: inherit;
    cursor: pointer;
}

.landing-widget-mount-error-reload:hover {
    border-color: var(--danger);
    color: var(--danger-text);
}

/* Focus split out of the shared :hover rule, same pattern as the rest of this
 * file (see the comment above .landing-tab-button:focus-visible): without
 * this, a keyboard reader tabbing to Reload gets only the browser's default
 * ring instead of the themed one every other control here gets. */
.landing-widget-mount-error-reload:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

.landing-widget-mount-error-details {
    margin-top: 0.9rem;
    color: var(--text-faint);
}

.landing-widget-mount-error-details summary {
    cursor: pointer;
}

.landing-widget-mount-error-details pre {
    margin: 0.5rem 0 0;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: var(--code-bg);
    color: var(--code-text);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.landing-widget-ai-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--accent-2) 18%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent-2) 6%, var(--surface));
}

/* The whole line is the copy control — a button drawn as text. */
.landing-widget-ai-line {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    text-align: left;
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 0.9rem;
    /* 23px tall at desktop width: one pixel under the 24px a pointer target
       needs. It wraps taller on a phone, so this only matters where it is a
       single line. */
    min-height: 24px;
    cursor: pointer;
}

.landing-widget-ai-sentence {
    color: var(--text);
    font-weight: 600;
    /* The copy selects this sentence to show what was taken. Firefox makes a
       button's text unselectable by default, so there the selection existed
       and painted nothing. */
    -webkit-user-select: text;
    user-select: text;
}

.landing-widget-ai-line:hover .landing-widget-ai-sentence,
.landing-widget-ai-line:focus-visible .landing-widget-ai-sentence {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.landing-widget-ai-line:focus-visible {
    /* --accent-text, not raw --accent: see .landing-tab-button above. */
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
    border-radius: 6px;
}

.landing-widget-ai-guide-open {
    font-size: 0.88rem;
    white-space: nowrap;
    /* WCAG 2.5.8 minimum target: 23px tall before. */
    display: inline-flex;
    align-items: center;
    min-height: 24px;
}

/* The copied confirmation, floated over the row's right edge. */
.landing-widget-ai-toast {
    position: absolute;
    right: 0.75rem;
    top: -0.9rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.landing-widget-ai-toast.is-shown {
    opacity: 1;
}

/* Idle, the status region is empty but still in the page (so a screen reader
   hears the text arriving); no padding leaves it no box at all. */
.landing-widget-ai-toast:empty {
    padding: 0;
}

.landing-widget-snippet-shell {
    margin-top: 1rem;
    border: 1px solid color-mix(in srgb, var(--accent-2) 22%, transparent);
    border-radius: 16px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--accent-soft) 35%, var(--surface)));
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.landing-widget-snippet-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
}

.landing-widget-snippet-toggle:hover,
.landing-widget-snippet-toggle:focus-visible {
    background: color-mix(in srgb, var(--accent-2) 8%, transparent);
}

/* Focus split out of the shared :hover rule — see .landing-tab-button above. */
.landing-widget-snippet-toggle:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* A block of text, not a flex row (2026-10-14). As inline-flex, the <small>
   hint became its own flex item, and on a phone it collapsed into a column one
   or two words wide beside "Snippet". As text it simply wraps under the label;
   on a wide screen the two still sit on one line exactly as before. */
.landing-widget-snippet-toggle-label {
    display: block;
    text-align: start;
}

.landing-widget-snippet-toggle-label small {
    margin-inline-start: 0.65rem;
}

.landing-widget-snippet-caret {
    transition: transform 0.18s ease;
    font-size: 1.05rem;
    line-height: 1;
}

.landing-widget-snippet-shell[data-open="true"] .landing-widget-snippet-caret {
    transform: rotate(90deg);
}

/* Pressing Quickstart's "Add widget" opens the snippet somewhere down the page,
   so both things it just revealed announce themselves once and fade.
   box-shadow only: the shell's background is a gradient, so an animated
   background-color would be invisible under it -- `inset 0 0 0 100vmax` paints
   a tint over it instead. Same decay shape as threatPillClosedHighlight in
   threat-catalog.css, the page's other one-shot pulse. */
.landing-widget-snippet-shell.is-quickstart-flash {
    animation: landingQuickstartFlash 1.6s ease-out;
}

.landing-widget-ai-row.is-quickstart-flash-soft {
    animation: landingQuickstartFlashSoft 1.6s ease-out;
}

@keyframes landingQuickstartFlash {
    0% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 42%, transparent),
                    inset 0 0 0 100vmax color-mix(in srgb, var(--accent-soft) 55%, transparent),
                    0 14px 40px rgba(15, 23, 42, 0.08);
    }

    100% {
        box-shadow: 0 0 0 0 transparent,
                    inset 0 0 0 100vmax transparent,
                    0 14px 40px rgba(15, 23, 42, 0.08);
    }
}

/* Same shape, roughly half the weight -- the Tell AI row is the lighter half of
   the pair, because the snippet is what the press was actually asking for. */
@keyframes landingQuickstartFlashSoft {
    0% {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent),
                    inset 0 0 0 100vmax color-mix(in srgb, var(--accent-soft) 28%, transparent);
    }

    100% {
        box-shadow: 0 0 0 0 transparent,
                    inset 0 0 0 100vmax transparent;
    }
}

/* Hold the static end-state rather than dropping the cue, the way the widget's
   own reduced-motion fallbacks do. The class is stripped after 1.7s either way,
   so the ring still leaves on its own. */
@media (prefers-reduced-motion: reduce) {
    .landing-widget-snippet-shell.is-quickstart-flash {
        animation: none;
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent),
                    0 14px 40px rgba(15, 23, 42, 0.08);
    }

    .landing-widget-ai-row.is-quickstart-flash-soft {
        animation: none;
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
    }
}

.landing-widget-snippet-panel {
    border-top: 1px solid color-mix(in srgb, var(--accent-2) 18%, transparent);
    padding: 1rem;
}

.landing-widget-snippet-tools {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.landing-widget-snippet-type-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.landing-widget-snippet-type-label {
    color: var(--accent-text);
    font-size: 0.88rem;
    font-weight: 700;
}

.landing-widget-snippet-type {
    border: 1px solid color-mix(in srgb, var(--accent-2) 22%, transparent);
    background: var(--surface);
    color: var(--accent-strong);
    border-radius: 999px;
    padding: 0.48rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
    max-width: 100%;
}

.landing-widget-snippet-type:hover,
.landing-widget-snippet-type:focus-visible {
    background: color-mix(in srgb, var(--accent-2) 6%, var(--surface));
}

/* Focus split out of the shared :hover rule — see .landing-tab-button above. */
.landing-widget-snippet-type:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

.landing-widget-snippet-copy {
    border: 1px solid color-mix(in srgb, var(--accent-2) 22%, transparent);
    background: var(--surface);
    color: var(--accent-text);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.landing-widget-snippet-copy:hover,
.landing-widget-snippet-copy:focus-visible {
    background: color-mix(in srgb, var(--accent-2) 6%, var(--surface));
}

/* Focus split out of the shared :hover rule — see .landing-tab-button above. */
.landing-widget-snippet-copy:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

.landing-widget-snippet-copy.is-copied {
    background: var(--accent);
    color: var(--text-on-accent);
    border-color: var(--accent);
}

.landing-widget-snippet-code {
    margin: 0;
    padding: 1rem;
    border-radius: 14px;
    background: var(--code-bg);
    color: var(--code-text);
    /* Without its own border, the base `pre` rule in auth-and-code.css (a
       literal #e0e0e0, not a theme token) wins the cascade for this property
       and rings a dark themed box in a light border. */
    border: 1px solid color-mix(in srgb, var(--border-strong) 45%, transparent);
    overflow-x: auto;
    font-size: 0.88rem;
    line-height: 1.6;
}

.landing-widget-snippet-code code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.landing-widget-theme-palette-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
    border-radius: 14px;
    background: var(--surface);
    color: var(--accent-text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.landing-widget-theme-palette-toggle:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* Split out of the :hover rule above — see .landing-tab-button. */
.landing-widget-theme-palette-toggle:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* aria-expanded is the state, so the pressed look reads off it rather than a
   class nobody else maintains. */
.landing-widget-theme-palette-toggle[aria-expanded="true"] {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.landing-widget-theme-palette-icon {
    display: block;
    color: var(--accent-text);
    /* An <svg> with no fill of its own computes to black, which is a paint that
       cannot follow the theme -- theme-recolor-sweep catches exactly that. The
       glyph's own path carries fill="none", and a presentation attribute still
       beats an INHERITED value, so the outline stays an outline. */
    fill: currentColor;
}

.landing-widget-theme-swatch {
    flex: 0 0 2.1rem;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    /* The ring separates one circle from the next, so it has to be the SURFACE
     * it sits on, not white: an opaque white ring around every swatch is a grid
     * of white rings on every dark theme. */
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--theme-swatch);
    box-shadow: 0 3px 9px rgba(15, 23, 42, 0.18), inset 0 0 0 1px rgba(15, 23, 42, 0.14);
    /* The signed-in preview below paints two layers inside this circle. */
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.landing-widget-theme-swatch:hover,
.landing-widget-theme-swatch:focus-visible {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.2), 0 0 0 3px color-mix(in srgb, var(--accent-2) 18%, transparent);
}

/* Hovering a swatch previews the SIGNED-IN trigger for that theme.
 *
 * The circle already shows the signed-out look — it is painted with the theme's
 * own triggerBg. What a reader cannot see from that is what the authenticated
 * state does to it, and the answer is theme-dependent: the widget keeps its
 * trigger background and lays the auth wash over it at half opacity with the
 * check on top (.pa-widget-trigger.is-authenticated, lib/widget-styles/base.js).
 * These two pseudo-elements are that same stack, built from the same three
 * per-theme values the swatch itself is, so the preview cannot drift from the
 * thing it previews.
 *
 * Hover AND focus-visible: this is information, not decoration, so it must not
 * be mouse-only. */
.landing-widget-theme-swatch::before,
.landing-widget-theme-swatch::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.landing-widget-theme-swatch::before {
    /* The signed-in ICE, the same facets the live round trigger freezes into
       (lib/widget-styles/base.js), mixed from this swatch's own accent and accent2.
       It replaced the flat --theme-swatch-auth wash, which ignored the theme; that
       property is still set on every swatch so nothing that reads it breaks. */
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.55), transparent 48%),
        linear-gradient(135deg,
            color-mix(in srgb, var(--theme-swatch-b) 14%, #fff) 0%,
            color-mix(in srgb, var(--theme-swatch-a) 42%, #9fbccb) 26%,
            color-mix(in srgb, var(--theme-swatch-a) 36%, #3b5a6b) 58%,
            color-mix(in srgb, var(--theme-swatch-b) 26%, #cdeaf2) 78%,
            color-mix(in srgb, var(--theme-swatch-a) 34%, #52707f) 100%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-swatch-b) 40%, #fff);
}

/* Signed OUT is what the circle shows at rest, and on the real trigger that
   state is the PA key. Same trade the widget makes: the logo is what you see
   until you are authenticated, and it steps aside for the check when you are
   (.pa-widget-trigger.is-authenticated hides [data-role="trigger-logo"]). */
.landing-widget-theme-swatch-logo {
    /* Same reason as the palette icon above, the other way round: this key IS
       an outline, so it says so here rather than leaving the default black
       behind. The letters get their fill from the rule below. */
    fill: none;
    position: absolute;
    inset: 0;
    width: 74%;
    height: 74%;
    margin: auto;
    color: var(--theme-swatch-ink);
    opacity: 0.92;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

/* Scoped to the letters, exactly as [data-role="trigger-logo"] text is. A `fill`
   on the <svg> itself overrides the markup's own fill="none" -- presentation
   attributes lose to any rule -- and filled the key's head into a solid disc
   with the PA hidden inside it. */
.landing-widget-theme-swatch-logo text {
    fill: var(--theme-swatch-ink);
    stroke: none;
}

.landing-widget-theme-swatch:hover .landing-widget-theme-swatch-logo,
.landing-widget-theme-swatch:focus-visible .landing-widget-theme-swatch-logo {
    opacity: 0;
}

.landing-widget-theme-swatch::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-swatch-ink);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
}

.landing-widget-theme-swatch:hover::before,
.landing-widget-theme-swatch:focus-visible::before {
    /* The widget's own figure for the ice, which the Ice slider sets. */
    opacity: var(--theme-swatch-ice, 0.72);
}

.landing-widget-theme-swatch:hover::after,
.landing-widget-theme-swatch:focus-visible::after {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .landing-widget-theme-swatch::before,
    .landing-widget-theme-swatch::after,
    .landing-widget-theme-swatch-logo {
        transition: none;
    }
}

/* Shape: Shield. When the Shape toggle says Shield, every swatch is that theme's
 * SHIELD trigger instead of its round one, so the palette previews the thing the
 * reader will actually get. The round key and the shield are both in each swatch
 * (landing-page-tabs.js); the grid's data-trigger-shape says which is shown.
 *
 * The shield is painted from --theme-swatch-a / -b (the theme's accent and
 * accent2, the same two tokens the live trigger is mixed from) with flat fills:
 * no gradients, because a gradient id shared by every swatch would paint all of
 * them in the first one's colours. Hover still previews SIGNED IN: the shield
 * freezes over and the key gives way to the check, as on the real trigger. */
.landing-widget-theme-swatch-shield {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.3));
}

.landing-widget-theme-swatch-shield .sw-face {
    fill: color-mix(in srgb, var(--theme-swatch-a) 18%, #000);
    stroke: color-mix(in srgb, var(--theme-swatch-a) 70%, #fff);
    stroke-width: 9;
    stroke-linejoin: round;
}

.landing-widget-theme-swatch-shield .sw-ice {
    fill: color-mix(in srgb, var(--theme-swatch-a) 24%, #7f9fb0);
    stroke: color-mix(in srgb, var(--theme-swatch-b) 14%, #cfeaf2);
    stroke-width: 9;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.landing-widget-theme-swatch-shield .sw-line {
    fill: none;
    stroke: color-mix(in srgb, var(--theme-swatch-b) 75%, transparent);
    stroke-width: 5;
}

.landing-widget-theme-swatch-shield .sw-key {
    transition: opacity 0.18s ease;
}

.landing-widget-theme-swatch-shield .sw-key-body {
    fill: var(--theme-swatch-b);
    stroke: color-mix(in srgb, var(--theme-swatch-a) 28%, #000);
    stroke-width: 3;
    stroke-linejoin: round;
}

.landing-widget-theme-swatch-shield .sw-key-disc {
    fill: color-mix(in srgb, var(--theme-swatch-a) 14%, #000);
    stroke: none;
}

.landing-widget-theme-swatch-shield .sw-key-ink {
    fill: color-mix(in srgb, var(--theme-swatch-b) 30%, #fff);
    stroke: none;
}

.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch {
    /* The disc is gone, so the ring, fill and shadow that made it a circle go
       with it. What stays is a square hit target, rounded so the selected and
       focus outlines hug the shield rather than cutting corners. */
    background: transparent;
    border-color: transparent;
    border-radius: 28%;
    box-shadow: none;
    overflow: visible;
}

.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch:hover,
.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch:focus-visible {
    box-shadow: none;
}

.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch-logo,
.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch::before {
    display: none;
}

.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch-shield {
    display: block;
}

.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch::after {
    z-index: 1;
    color: #fff;
    text-shadow: 0 1px 2px rgba(10, 30, 40, 0.6);
}

.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch:hover .sw-ice,
.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch:focus-visible .sw-ice {
    opacity: var(--theme-swatch-ice, 0.72);
}

.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch:hover .sw-key,
.landing-widget-theme-swatch-grid[data-trigger-shape="shield"] .landing-widget-theme-swatch:focus-visible .sw-key {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .landing-widget-theme-swatch-shield .sw-ice,
    .landing-widget-theme-swatch-shield .sw-key {
        transition: none;
    }
}

/* Theme PREVIEW (hover or keyboard focus, landing-page-tabs.js): for the first
   ~650ms the swatch flashes the theme's page background (--theme-swatch-page) and
   its key spins, like the widget's loading key; the page swaps theme at the peak.
   Then the class drops and the swatch shows the signed-in look above (ice +
   check) for as long as it is hovered or focused. !important because the hover
   rules it holds back sit on longer, grid-scoped selectors. */
.landing-widget-theme-swatch.is-previewing {
    animation: landing-swatch-flash 650ms ease-in-out;
}

.landing-widget-theme-swatch.is-previewing::before,
.landing-widget-theme-swatch.is-previewing::after,
.landing-widget-theme-swatch.is-previewing .sw-ice {
    opacity: 0 !important;
}

.landing-widget-theme-swatch.is-previewing .landing-widget-theme-swatch-logo,
.landing-widget-theme-swatch.is-previewing .sw-key {
    opacity: 1 !important;
}

.landing-widget-theme-swatch.is-previewing .landing-widget-theme-swatch-logo {
    animation: landing-swatch-spin 0.21s linear infinite;
}

.landing-widget-theme-swatch-shield .sw-spin {
    transform-box: fill-box;
    transform-origin: center;
}

.landing-widget-theme-swatch.is-previewing .sw-spin {
    scale: 0.7;
    animation: landing-swatch-spin 0.21s linear infinite;
}

@keyframes landing-swatch-spin {
    to { rotate: 360deg; }
}

/* Only the peak: the ends fall back to whatever the swatch already wears
   (the round disc colour, or the shield's transparent box). */
@keyframes landing-swatch-flash {
    50% {
        background-color: var(--theme-swatch-page, var(--theme-swatch));
        box-shadow: 0 0 0 3px var(--theme-swatch-page, transparent), 0 0 16px 4px var(--theme-swatch-page, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-widget-theme-swatch.is-previewing,
    .landing-widget-theme-swatch.is-previewing .landing-widget-theme-swatch-logo,
    .landing-widget-theme-swatch.is-previewing .sw-spin {
        animation: none;
    }
}

/* Base: White | Black. Only an EXPLICIT pick reaches the grid (data-trigger-base),
 * plus the shield's default White when nothing is picked; with none on the round
 * disc, every swatch keeps its own theme's look. Round: the key and its
 * letters. Shield: the face, mixed into white instead of black, as the live
 * shield does (shieldBaseCss in lib/widget-shield-trigger.js). The rules name the
 * elements, not --theme-swatch-ink, because that property is set inline per swatch. */
.landing-widget-theme-swatch-grid[data-trigger-base="white"] .landing-widget-theme-swatch-logo {
    color: #ffffff;
}

.landing-widget-theme-swatch-grid[data-trigger-base="white"] .landing-widget-theme-swatch-logo text {
    fill: #ffffff;
}

/* The preview check follows the base too, as the real widget's does (the round
 * trigger's base rules set --pa-widget-trigger-text-color, which the check reads).
 * Not for the shield swatches: their check is forced white by the shape rule above. */
.landing-widget-theme-swatch-grid[data-trigger-base="white"]:not([data-trigger-shape="shield"]) .landing-widget-theme-swatch::after {
    color: #ffffff;
}

.landing-widget-theme-swatch-grid[data-trigger-base="black"]:not([data-trigger-shape="shield"]) .landing-widget-theme-swatch::after {
    color: #0f172a;
}

.landing-widget-theme-swatch-grid[data-trigger-base="black"] .landing-widget-theme-swatch-logo {
    color: #0f172a;
}

.landing-widget-theme-swatch-grid[data-trigger-base="black"] .landing-widget-theme-swatch-logo text {
    fill: #0f172a;
}

.landing-widget-theme-swatch-grid[data-trigger-base="white"] .landing-widget-theme-swatch-shield .sw-face {
    fill: color-mix(in srgb, var(--theme-swatch-a) 12%, #fff);
    stroke: color-mix(in srgb, var(--theme-swatch-a) 40%, #fff);
}

.landing-widget-theme-swatch-grid[data-trigger-base="white"] .landing-widget-theme-swatch-shield .sw-line {
    stroke: color-mix(in srgb, var(--theme-swatch-a) 55%, transparent);
}

/* The key's disc takes the pale face's tint, with dark letters, instead of staying
 * a black dot on it (the live shield does the same: shieldBaseCss). */
.landing-widget-theme-swatch-grid[data-trigger-base="white"] .landing-widget-theme-swatch-shield .sw-key-disc {
    fill: color-mix(in srgb, var(--theme-swatch-a) 9%, #fff);
}

.landing-widget-theme-swatch-grid[data-trigger-base="white"] .landing-widget-theme-swatch-shield .sw-key-ink {
    fill: color-mix(in srgb, var(--theme-swatch-a) 75%, #000);
}

/* The Ice slider's preview: while it is being moved (data-ice-preview, set and
 * cleared by landing-page-tabs.js) every swatch wears its signed-in look, which
 * normally needs a hover. Same state the hover rules above produce, forced. */
.landing-widget-theme-swatch-grid[data-ice-preview] .landing-widget-theme-swatch::before {
    opacity: var(--theme-swatch-ice, 0.72);
}

.landing-widget-theme-swatch-grid[data-ice-preview] .landing-widget-theme-swatch::after {
    opacity: 1;
}

.landing-widget-theme-swatch-grid[data-ice-preview] .landing-widget-theme-swatch-logo {
    opacity: 0;
}

.landing-widget-theme-swatch-grid[data-ice-preview][data-trigger-shape="shield"] .sw-ice {
    opacity: var(--theme-swatch-ice, 0.72);
}

.landing-widget-theme-swatch-grid[data-ice-preview][data-trigger-shape="shield"] .sw-key {
    opacity: 0;
}

/* The Base toggle's two dots: what each side is, drawn in the page's own ink. */
.landing-base-dot {
    flex: none;
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    border: 1.5px solid currentColor;
}

.landing-base-dot--white {
    background: #ffffff;
}

.landing-base-dot--black {
    background: #0f172a;
}

.landing-widget-theme-swatch.selected {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* AFTER .selected on purpose: both are (0,2,0), so source order decides, and on
 * a swatch that is both selected and focused the reader needs to be told where
 * they ARE before what they picked — the selection stays legible in the widget
 * itself. The hover rule's 18% --accent-2 ring is a hover treatment; it is not
 * something a reader can navigate every swatch by. */
.landing-widget-theme-swatch:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* Registry-rendered swatch grid: LEFT column light themes, RIGHT column dark.
 * The shell owns the split; each column keeps the auto-fill flow the whole grid
 * used to have, so the circles still reflow rather than being pinned to a fixed
 * column count. */
.landing-widget-theme-swatch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 0.9rem;
    width: 100%;
    max-width: 30rem;
    margin: 0 auto 0.6rem;
}

.landing-widget-theme-swatch-col {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.1rem, 1fr));
    justify-items: center;
    gap: 0.6rem;
    min-width: 0;
}

/* The divider goes on the dark column's leading edge, so it exists exactly once
 * and needs no extra element. */
.landing-widget-theme-swatch-col[data-swatch-mode="dark"] {
    padding-inline-start: 0.9rem;
    border-inline-start: 1px solid var(--border);
}

/* The narrow-width stacking lives HERE, not in responsive.css, and that is not a
 * matter of taste: index.html loads responsive.css at line 27 and this file at
 * line 31, so a media query over there loses to these plain rules on source
 * order alone. The palette went to 1-and-2 circles a row before it was moved.
 *
 * Below this width two columns of circles would be two 1.5-circle tracks, so
 * the halves stack instead — light block above dark block, the layout the
 * palette had before the split — and the divider moves to the seam. */
@media (max-width: 560px) {
    .landing-widget-theme-swatch-grid,
    .landing-theme-float-swatches {
        grid-template-columns: 1fr;
    }

    .landing-widget-theme-swatch-col[data-swatch-mode="dark"] {
        padding-inline-start: 0;
        border-inline-start: 0;
        padding-block-start: 0.7rem;
        border-block-start: 1px solid var(--border);
    }
}

.landing-theme-float-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.landing-widget-theme-action {
    min-height: 2.1rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent-text);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}


.landing-widget-theme-action:disabled {
    opacity: 0.45;
    cursor: default;
}

.landing-widget-theme-action:hover:not(:disabled),
.landing-widget-theme-action:focus-visible {
    background: color-mix(in srgb, var(--accent-2) 6%, var(--surface));
    box-shadow: 0 5px 12px color-mix(in srgb, var(--accent) 12%, transparent);
    transform: translateY(-1px);
}

/* Focus split out of the shared :hover rule — see .landing-tab-button above. */
.landing-widget-theme-action:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

.landing-theme-float {
    position: fixed;
    top: 120px;
    /* 24px in, 272px wide -- until the window is too narrow for both (under
       ~304px: a fold's cover screen, a phone at large page zoom), where the
       docked corner put the x past the right edge. It slides left to the same
       8px the drag clamp keeps (clampThemeFloatToViewport), then narrows. */
    left: clamp(8px, calc(100vw - 280px), 24px);
    z-index: 2147483647;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-2) 28%, transparent);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.28);
    -webkit-backdrop-filter: blur(6px); /* Safari 17 and earlier */
    backdrop-filter: blur(6px);
    overflow: hidden;
    width: min(272px, calc(100vw - 16px));
    /* The handle stays; the body below it scrolls when the palette is taller than
       the room under the float's top edge.
       128px is the 120px default top plus the 8px margin; once the float is
       dragged, JS replaces this with the same rule for wherever it is
       (placeThemeFloat in landing-page-tabs.js). */
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 128px);
}

/* Opened from the header's palette button (top right): docked on the right
   instead, same inset. Dropped by a drag or a dismissal (landing-page-tabs.js). */
.landing-theme-float.landing-theme-float--right {
    left: auto;
    right: clamp(8px, calc(100vw - 280px), 24px);
}

.landing-theme-float[hidden] {
    /* display:flex above beats the [hidden] attribute. */
    display: none;
}

.landing-theme-float-handle {
    flex: none;
}

.landing-theme-float-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    /* One tail for the whole list, whichever row ends it (Matrix, or Speed with rain on). */
    padding-bottom: 0.6rem;
}

.landing-theme-float-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.35rem 0.35rem 0.35rem 0.5rem;
    background: color-mix(in srgb, var(--accent-2) 12%, transparent);
    cursor: grab;
    /* touch-action: none keeps the browser from claiming touch drags for page
       scrolling (which fires pointercancel and kills the drag). Scoped to the
       handle so touches on the swatches below still scroll normally. */
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.landing-theme-float-handle:active {
    cursor: grabbing;
}

.landing-theme-float-title {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--accent-text);
    letter-spacing: 0.02em;
}

/* Names the live theme beside the two "Theme" labels. The separator lives on
   ::before so it disappears with the name: on 'default' the span is [hidden]
   and the label reads plain "Theme" again, with no orphan dash. */
.landing-theme-name {
    font-weight: 600;
    text-transform: none;
    /* No opacity here. The label this sits in is repaired to AA, and a further
       15% fade took forest and mint from 4.5:1 to 4.44:1. Weight already sets
       the name apart from the label. */
}

.landing-theme-name::before {
    content: " - ";
    opacity: 0.7;
}

.landing-theme-float-close {
    border: 0;
    background: transparent;
    color: var(--accent-text);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.2rem;
}

.landing-theme-float-close:hover {
    opacity: 0.7;
}

/* Had no focus rule at all, so it rode on the browser default — the one control
 * here that was visible by accident rather than by decision. */
.landing-theme-float-close:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

/* The float palette is the same two-column shell in a narrower shell — 3 circles
 * a side rather than 6 across. */
.landing-theme-float-swatches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 0.6rem;
    padding: 0.7rem 0.5rem 0.3rem;
}

.landing-theme-float-swatches .landing-widget-theme-swatch-col {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.landing-theme-float-swatches .landing-widget-theme-swatch-col[data-swatch-mode="dark"] {
    padding-inline-start: 0.6rem;
    /* The float does not stack on the viewport's 560px rule (its own 1fr 1fr
     * wins on order; it stacks by container below), but that rule still matched
     * its dark column on phones: a seam line over it, 11px lower than the light
     * column, and no divider. Restated. */
    padding-block-start: 0;
    border-block-start: 0;
    border-inline-start: 1px solid var(--border);
}

/* Large text (Chrome's font size, Android text scaling): the circles are rem
 * and the float is px, so at 150% two columns of three outgrew its 272px and
 * the palette scrolled sideways. A rem container query matches only once the
 * body is narrower than 15rem, which default text never is (270px is ~17rem),
 * and stacks the halves the way the 560px rule does for the in-page grid. */
.landing-theme-float-body {
    container-type: inline-size;
}

@container (max-width: 15rem) {
    .landing-theme-float-swatches {
        grid-template-columns: 1fr;
    }

    .landing-theme-float-swatches .landing-widget-theme-swatch-col[data-swatch-mode="dark"] {
        padding-inline-start: 0;
        border-inline-start: 0;
        padding-block-start: 0.7rem;
        border-block-start: 1px solid var(--border);
    }
}

.landing-theme-float .landing-theme-float-actions {
    padding: 0 0.5rem 0.6rem;
    margin-top: 0.3rem;
}

/* Shape: Round | Shield. A segmented control built from two native radios, so
 * the keyboard and assistive-tech behavior is the browser's. The input covers its
 * segment invisibly (it is the hit target); the face underneath is what is seen
 * and is told how to look by :checked / :focus-visible / :disabled. */
.landing-theme-float-shape {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.7rem 0.45rem;
}

.landing-theme-float-shape-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--accent-text);
    letter-spacing: 0.02em;
}

.landing-trigger-toggle {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.2rem;
    padding: 0.18rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}

.landing-trigger-option {
    position: relative;
    display: block;
    min-width: 0;
}

.landing-trigger-option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.landing-trigger-option-face {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--accent-text);
    pointer-events: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.landing-trigger-option-icon {
    flex: none;
    height: 1rem;
    width: auto;
    fill: currentColor;
}

.landing-trigger-option input:checked + .landing-trigger-option-face {
    background: var(--accent);
    color: var(--text-on-accent);
    box-shadow: 0 1px 5px color-mix(in srgb, var(--accent) 45%, transparent);
}

.landing-trigger-option input:not(:checked):not(:disabled):hover + .landing-trigger-option-face {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.landing-trigger-option input:focus-visible + .landing-trigger-option-face {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.landing-trigger-option input:disabled {
    cursor: default;
}

.landing-trigger-option input:disabled + .landing-trigger-option-face {
    opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
    .landing-trigger-option-face {
        transition: none;
    }
}

.landing-theme-float-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.7rem 0.45rem;
}

.landing-theme-float-matrix[hidden],
.landing-theme-float-matrix-look[hidden] {
    /* The rows are display:flex above, which beats the [hidden] attribute. */
    display: none;
}

.landing-matrix-chars-select {
    flex: 1 1 auto;
    min-width: 0;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-text);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-2) 28%, transparent);
    border-radius: 8px;
    padding: 0.25rem 0.4rem;
}

.landing-matrix-chars-select:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.landing-matrix-chars-select:disabled {
    opacity: 0.55;
}

/* iOS Safari zooms the whole page when a control under 16px takes focus, and
   leaves it zoomed: the page is cut off and scrolls sideways. Both selects sit
   at ~11px. Touch screens only, as the widget does for its own fields
   (lib/widget-styles/forms.js); a desktop keeps the compact size. */
@media (pointer: coarse) {
    .landing-widget-snippet-type,
    .landing-matrix-chars-select {
        font-size: max(16px, 1em);
    }
}

.landing-theme-float-size-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--accent-text);
    letter-spacing: 0.02em;
}

.landing-theme-float-size-slider {
    flex: 1 1 auto;
    min-width: 0;
    accent-color: var(--accent);
}

/* A finger needs more than the native 16px to grab: the density and speed rows
   sat 16px tall and within 12px of each other. Taller box, same thin track (the
   browser still draws it, centred). Touch screens only. */
@media (pointer: coarse) {
    .landing-theme-float-size-slider {
        height: 1.75rem;
    }
}

.landing-theme-float-size-value {
    /* Fixed width: a growing readout ("8rem" -> "12.5rem") would shrink the
       flex slider under the thumb and shift the value being dragged. */
    flex: 0 0 4.8em;
    width: 4.8em;
    white-space: nowrap;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-text);
    opacity: 0.85;
}

.landing-rant-shell {
    margin-top: 1rem;
    border: 1px solid color-mix(in srgb, var(--accent-2) 22%, transparent);
    border-radius: 16px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--accent-soft) 35%, var(--surface)));
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.landing-rant-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    text-align: left;
}

.landing-rant-toggle:hover,
.landing-rant-toggle:focus-visible {
    background: color-mix(in srgb, var(--accent-2) 8%, transparent);
}

/* Focus split out of the shared :hover rule — see .landing-tab-button above. */
.landing-rant-toggle:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 3px;
}

.landing-rant-caret {
    transition: transform 0.18s ease;
    font-size: 1.05rem;
    line-height: 1;
}

.landing-rant-shell[data-open="true"] > .landing-rant-toggle .landing-rant-caret {
    transform: rotate(90deg);
}

.landing-rant-panel {
    border-top: 1px solid color-mix(in srgb, var(--accent-2) 18%, transparent);
    padding: 1rem;
}

.landing-rant-panel p:last-child {
    margin-bottom: 0;
}

.landing-rant-panel .landing-rant-shell {
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    box-shadow: none;
}


/* ==========================================================================
   Pre-paint layout restore

   The CSS half of lib/layout-boot.js. That file runs in <head>, before <body>
   exists, so it cannot touch any of these elements -- it stamps attributes and
   custom properties on <html> and these rules do the work. Read its header for
   why the mechanism exists and what it measured.

   ALL of it lives here, including the Knowledge-capital dropdown (topically
   security-matrix.css) and the Summary panels (which have no rules of their own
   at all -- they are shown and hidden by the `hidden` attribute). One mechanism
   in one block on purpose: the failure mode is somebody changing one half of it,
   and these selectors are id- and attribute-weighted, so nothing in another
   sheet can outrank them wherever this sits in the cascade.

   Every one of these has to beat the UA's `[hidden] { display: none }`, which
   is what all six of these boxes ship with. They do, comfortably.

   lib/layout-boot-record.js drops the attributes once the modules' own restore
   has painted, so none of this survives into normal use.
   ========================================================================== */

html[data-boot-tab] .landing-tab-panel {
    display: none;
}

html[data-boot-tab="widget"] #panel-widget,
html[data-boot-tab="endpoint"] #panel-endpoint,
html[data-boot-tab="guest"] #panel-guest,
html[data-boot-tab="migrate"] #panel-migrate,
html[data-boot-tab="about"] #panel-about {
    display: block;
}

html[data-boot-snippet="open"] #landing-widget-snippet-panel,
html[data-boot-rant="open"] #landing-rant-panel,
html[data-boot-ps="open"] #landing-ps-panel,
html[data-boot-summary-users="open"] #users-panel,
html[data-boot-summary-developers="open"] #developers-panel,
html[data-boot-summary-bigtech="open"] #big-tech-panel {
    display: block;
}

/* Showing the panel is not the whole of "open" for a Summary card.
   demo-card.css gives a CLOSED card's toggle a negative bottom margin and a
   matching bottom padding, so the header swallows the card's own padding and
   the whole card becomes the hit target -- and the two cancel exactly, because
   when it is closed there is nothing underneath for the negative margin to pull
   on. Reveal the panel with data-open still "false" and there is: the panel
   comes up into the header by a whole pad-y, 11.2px a card and 34px across the
   three, which is exactly what this suite measured before this rule existed.

   The open geometry by NAME rather than by value -- --why-summary-gap is
   declared beside the two paddings this file's own comments say were named for
   the same reason. A literal here would be a second copy of a number that lives
   in demo-card.css. */
html[data-boot-summary-users="open"] #users-block > .why-summary-toggle,
html[data-boot-summary-developers="open"] #developers-block > .why-summary-toggle,
html[data-boot-summary-bigtech="open"] #big-tech-block > .why-summary-toggle {
    margin-bottom: var(--why-summary-gap);
    padding-bottom: var(--why-summary-gap);
}

/* A <tr>, so `display: block` would take it out of the table it belongs to.
   And `!important`, which is not a shortcut here: the collapsed state of this
   one row is itself enforced with `!important` (responsive.css, "Last word on
   collapsed state") because the responsive `display:` rules for it outrank the
   UA `[hidden]` rule and it has to stay hidden anyway. A normal declaration
   cannot answer that -- measured, and it is why this was the one contributor
   the first pass did not move. It wins on specificity, an id against none, so
   the two importants are not a tie being broken by source order.

   Every other box in this block is plain `[hidden]` and needs none of this. */
html[data-boot-kc="open"] #kc-matrix-dropdown {
    display: table-row !important;
}

/* The indexed matrix's room, in Safari only (lib/layout-boot.js says why
   Chromium and Firefox do not get it). A property rather than a boot attribute:
   clearLayoutBoot drops it right after renderThreatGroupMatrix() has filled the
   box, and with nothing set this is min-height: 0. */
#threat-group-matrix {
    min-height: var(--boot-kc-height, 0px);
}

/* The reveal is a 0fr -> 1fr grid track with a 0.26s transition, and restoring
   it from JavaScript is what made the Quicklinks the one contributor that
   shifted the page CONTINUOUSLY -- six separate layout-shift entries between
   108ms and 186ms, CLS 0.0506 on its own. Painted from the start there is no
   transition to run: the module's own setQuicklinksOpen writes a value that is
   already the computed one, and a transition needs a change. */
/* By ID, not by class. `.landing-quicklinks-body` is worn by BOTH top-bar
   drawers now (Tools reuses the quicklinks classes on purpose), so the class
   form pre-painted the TOOLS panel open too -- on a visit that remembered the
   Quicklinks open, the page painted 81px taller than it settled and shed the
   difference in six shifts between 107ms and 193ms. This accelerator exists to
   remove layout shift; matching a panel it knows nothing about created it. */
html[data-boot-quicklinks="open"] #landing-quicklinks-panel {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
}

/* ==================== THE ENDPOINT TAB ====================
   The host half of the integration. It borrows the Widget tab's AI row and
   snippet shell wholesale -- same classes, same behaviour -- so what is written
   here is only what has no twin over there: the intro, and the depth toggle
   that sits beside the type select. */

.landing-endpoint-intro {
    margin: 0 0 1.1rem;
}

.landing-endpoint-lead {
    margin: 0 0 0.7rem;
    color: var(--text);
    font-size: 1.02rem;
}

/* The lead's bold first sentence is the panel's <h2> (2026-10-18, for the
   outline and for search), set inline so the lead still reads as one
   paragraph, exactly as when it was a <strong>. Outranks sections.css's
   `section h2 { display: none }`. */
.landing-endpoint-lead > .landing-panel-heading,
.landing-endpoint-lead > p {
    display: inline;
    margin: 0;
    font: inherit;
    color: inherit;
}

.landing-endpoint-lead > .landing-panel-heading {
    font-weight: 700;
}

/* A heading kept for the outline, screen readers and search, and not drawn.
   `display: block` outranks `section h2 { display: none }`, which would hide
   it from screen readers too. */
.visually-hidden {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The two-column flow diagram. It is pre-formatted text and its alignment is
   the whole point, so it scrolls inside its own box rather than wrapping --
   a wrapped column here reads as a different diagram. */
.landing-endpoint-flow {
    margin: 0 0 0.9rem;
    padding: 0.85rem 1rem;
    overflow-x: auto;
    border: 1px solid color-mix(in srgb, var(--border-strong) 45%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.landing-endpoint-flow code {
    font: inherit;
    color: inherit;
    background: none;
}

/* The five load-bearing rules, as a scannable numbered list rather than one
   undifferentiated wall of bullets. Each mark is a plain ordinal, not a step
   count with any meaning beyond reading order -- there is no "step 3 depends
   on step 2" relationship between them. */
.landing-endpoint-rules {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 0 0 0.9rem;
}

.landing-endpoint-rule {
    display: grid;
    grid-template-columns: 1.6rem 1fr;
    gap: 0.65rem;
    align-items: baseline;
}

.landing-endpoint-rule p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.landing-endpoint-rule strong {
    color: var(--text);
}

.landing-endpoint-rule-mark {
    color: var(--accent-text);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

/* The license/signature verification path is real but optional, and reads
   as an aside rather than a sixth item in the same list -- separating it is
   what keeps the five rules above feeling short. */
.landing-endpoint-optional {
    position: relative;
    margin: 0 0 0.9rem;
    padding: 0.8rem 1rem 0.8rem 1.1rem;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-left-width: 3px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--accent-soft) 35%, transparent);
}

.landing-endpoint-optional p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.landing-endpoint-optional strong {
    color: var(--text);
}

.landing-endpoint-optional-badge {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
    color: var(--accent-text);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.landing-endpoint-checker {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.landing-endpoint-checker strong {
    color: var(--text);
}

/* 2026-11-28: the "can my site do this" answer and the failure list on the
   Endpoint tab. Both reuse the checker paragraph's type; these only space them.
   Nothing was added to the Widget tab. Two lines tried there (one under the
   shield, one under the snippet) each moved #summary by a fraction of a pixel,
   and site-reload-cls "does not walk the position" parks the reader exactly on
   that edge, where Chrome's anchor restore only holds on a whole pixel (a
   40px block above passes, a 40.4px one lands ~280px off, and parking one pixel
   inside the section passes either way). Until that test parks inside the
   section, "step 1 of 2" lives in the snippet toggle's own label. */

.landing-endpoint-fit {
    margin: 0 0 0.9rem;
}

.landing-endpoint-fails {
    margin: 0.9rem 0 0;
}

/* The four prose links on the Endpoint and Migrate tabs are bare <a>, so they
   wore the browser's own #0000ee: dark blue on every dark theme. The same ink
   as the threat pages' bare links (threat-pages.css). */
.landing-endpoint-checker a,
.landing-endpoint-optional a {
    color: var(--accent-text);
}

.landing-endpoint-checker a:hover,
.landing-endpoint-optional a:hover {
    color: var(--accent-strong);
}

/* Inline code in the Endpoint prose may break anywhere. It holds one unbroken
   token longer than a phone is wide ("connect-src wss://wss.souporcereal.com:6543"
   is 31 characters of monospace with no break opportunity), and at 320px that
   token pushed the whole PAGE to 330px: a sideways scroll on this tab alone. A
   code block (<pre>) keeps its own horizontal scroll; this is only the inline
   spans inside sentences. */
.landing-endpoint-intro :not(pre) > code {
    overflow-wrap: anywhere;
}

/* Depth: two buttons rather than a second <select>, because there are only ever
   two and the reader should be able to see which one they are on without
   opening anything. A segmented pair, so it reads as one control with a
   position rather than as two independent buttons. */
.landing-endpoint-depth {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid color-mix(in srgb, var(--border-strong) 45%, transparent);
    border-radius: 999px;
    overflow: hidden;
}

.landing-endpoint-depth-button,
.landing-endpoint-comments-button {
    margin: 0;
    padding: 0.28rem 0.7rem;
    border: 0;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.landing-endpoint-depth-button + .landing-endpoint-depth-button,
.landing-endpoint-comments-button + .landing-endpoint-comments-button {
    border-left: 1px solid color-mix(in srgb, var(--border-strong) 45%, transparent);
}

.landing-endpoint-depth-button:hover,
.landing-endpoint-comments-button:hover {
    color: var(--accent-text);
    background: color-mix(in srgb, var(--accent-soft) 40%, transparent);
}

/* `aria-pressed` is the state, so it is also the selector -- the paint cannot
   drift from what a screen reader is told. */
.landing-endpoint-depth-button[aria-pressed="true"],
.landing-endpoint-comments-button[aria-pressed="true"] {
    color: var(--accent-text);
    background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
    font-weight: 600;
}

.landing-endpoint-depth-button:focus-visible,
.landing-endpoint-comments-button:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: -2px;
}

/* The "this URL does not answer yet" line under the copy-paste snippet.
   Built by landing-page-tabs.js only while RELEASE_ORIGIN_IS_PUBLISHED is
   false, so this rule is dormant on the published apex rather than wrong. */
.landing-widget-snippet-note {
    margin: 0.6rem 0 0;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
    background: color-mix(in srgb, var(--accent-2) 12%, transparent);
    color: var(--text-strong);
    font-size: 0.85rem;
    line-height: 1.45;
}

/* The Migrate tab is a path: each step carries its own tools, so a reader sees
   which tool is for which step and in what order. The cards sit under the
   step's sentence, lined up past its number (the rule's 1.6rem mark + 0.65rem
   gap). */
.landing-migrate-path {
    display: grid;
    gap: 1.1rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.landing-migrate-step .landing-migrate-tools {
    margin: 0.55rem 0 0 2.25rem;
}

.landing-migrate-outro .landing-endpoint-checker + .landing-endpoint-checker {
    margin-top: 0.6rem;
}

.landing-migrate-outro .landing-migrate-tools {
    margin-top: 0.55rem;
}

/* Inline code may break anywhere, as in the Endpoint intro: one unbroken
   token must not widen a phone page. */
#panel-migrate :not(pre) > code,
#panel-guest :not(pre) > code {
    overflow-wrap: anywhere;
}

/* On a phone the indent costs a card a third of its width; the cards span. */
@media (max-width: 480px) {
    .landing-migrate-step .landing-migrate-tools {
        margin-left: 0;
    }
}

/* The Migrate tab's tool grid: one card per tool, each opening the one tool
   modal (#migrate_<tool>). minmax(min(100%, ...)) so a 320px screen gets one
   column instead of overflowing. */
.landing-migrate-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.landing-migrate-tool {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text-strong);
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.landing-migrate-tool span {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.45;
}

.landing-migrate-tool:hover {
    border-color: var(--accent);
}

.landing-migrate-tool:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

/* Forced colours (Windows High Contrast) drop the accent fill, and these choices
   were marked by nothing else: the theme float's Shape / Base / Matrix segments
   and the Endpoint tab's depth and comment-level buttons all looked unselected,
   and so did the selected main tab. */
@media (forced-colors: active) {
    .landing-tab-button[aria-selected="true"],
    .landing-trigger-option input:checked + .landing-trigger-option-face,
    .landing-endpoint-depth-button[aria-pressed="true"],
    .landing-endpoint-comments-button[aria-pressed="true"] {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
    }
}

/* Phones (2026-10-20): the Widget tab's code sat inside six nested boxes, each
   padding both sides, so a 390px screen gave the snippet 172px (118px at 320,
   48px with larger text) and every line ran out of view. Two of the layers were
   accidents: #overview and its .container padded the same edge twice, and a
   tab panel is a <section>, so it also took responsive.css's page-section
   padding. Those two go; the boxes that are boxes keep a little each. */
@media (max-width: 480px) {
    #overview {
        padding-inline: 0;
    }

    .landing-tabs-shell {
        padding-inline: 0.5rem;
    }

    .landing-tab-panels {
        padding: 1rem 0.75rem;
    }

    .landing-tab-panel {
        padding-inline: 0;
    }

    .landing-widget-snippet-panel {
        padding-inline: 0.75rem;
    }
}

/* The note names two full origins; a URL is one long word and ran out of the box. */
.landing-widget-snippet-note {
    overflow-wrap: anywhere;
}

/* Four tabs on one row (2026-10-20). The 2026-10-14 sizes above fit three; with
   Migrate, a 375px phone (bar 310px, tabs 320px) and a 320px one (255 vs 273)
   dropped About to a second row. Only the side padding and the gaps give way:
   the labels keep their size. */
@media (max-width: 420px) {
    .landing-tabs-bar {
        gap: 0.2rem;
    }

    .landing-tab-button {
        padding-inline: 0.5rem;
    }
}

@media (max-width: 360px) {
    .landing-tabs-bar {
        gap: 0.125rem;
    }

    .landing-tab-button {
        padding-inline: 0.35rem;
    }
}

/* Five tabs (2026-11-16). Guest Kit made the strip wrap on every phone, 320 up
   to ~620px, as a ragged 3 + 2 with the second row's last tab hanging short.
   Five labels cannot fit one row below ~560px at a readable size, so there
   they lay out as two full rows, always 3 + 2 (a 30% basis allows three per
   row). Above that, the compact size reaches 640px so the strip stays one row. */
@media (max-width: 560px) {
    .landing-tab-button {
        flex: 1 1 30%;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .landing-tab-button {
        padding: 0.7rem 0.72rem 0.85rem;
        font-size: 0.86rem;
    }
}

/* A screen control: fixed, so print stamped it over the page (and Chrome
   repeats a fixed box on every printed page). */
@media print {
    #landing-theme-float {
        display: none !important;
    }
}

/* The Endpoint tab opens with the Tell AI row, above the heading, so it
   needs air below it rather than above. */
#landing-endpoint-ai-row {
    margin-top: 0;
    margin-bottom: 1.1rem;
}
