/* tabichat.dev — palette and site rules. Single source for index.html, humans.html and
   pricing.html: link this file, do not paste these rules back into a page.
   Sumi.css supplies the layout and components; this only carries the ruled palette and the
   few rules Sumi does not provide. */
        /* The owner's ruled palette — the venya-media :root token block, copied verbatim from
           /tabith/VENYA-WEBSITE-COLORS.md §2 (tabichat.dev uses the same color scheme as venya.ai).
           Accents carry meaning; --brand is emphasis/good outcomes and stays OFF human-actor
           elements (marketing/AGENTS.md:20-24).
           In this version those colors are carried THROUGH Sumi's token names, so the palette is
           unchanged and Sumi does the layout. The page is dark by ruling, so data-theme is pinned. */
        :root,
        :root[data-theme="dark"] {
            --s-bg:            #282828;   /* was --bg */
            --s-surface:       #2d2d2d;   /* was --panel */
            --s-card:          #343434;   /* was --card */
            --s-card-section:  #343434;
            --s-code-bg:       #343434;
            --s-border:        #494949;   /* was --border */
            --s-border-strong: #545454;   /* was --line */
            --s-text:          #eeeeee;   /* was --text, --core */
            --s-muted:         #b9b9b9;   /* was --text-2 */
            --s-primary:       #73cef4;   /* was --brand — emphasis and GOOD OUTCOMES only */
            --s-on-primary:    #282828;
            --s-success:       #9faa00;   /* was --ok */
            --s-danger:        #f43753;   /* was --danger */

            /* Faces: same stacks as the ruled page, resolved against Sumi's own token names.
               No webfont is fetched — both names fall back to the local system stack offline. */
            --s-font-body: "Inter", system-ui, sans-serif;
            --s-font-mono: "JetBrains Mono", ui-monospace, monospace;

            /* Actor colours are tabichat's own vocabulary, not Sumi's, so they stay as themselves.
               --human is deliberately NOT mapped to an emphasis token: brand stays off it. */
            --human:  #b3deef;   /* Tender pale — the human actor */
            --agent:  #c9d05c;   /* the agent actor */
            --core:   #eeeeee;   /* neutral white = core component */
            --secret: #ffc24b;   /* a secret */
        }

        /* ---- Additions Sumi does not provide. `.card` is NOT a Sumi class (checked against
           sumi.css before use), so nothing here shadows or is shadowed by the library. ---- */
        main > section { padding-block: 1.25rem; border-bottom: 1px solid var(--s-border); }
        main > section:last-of-type { border-bottom: none; }

        .hero { padding-block-start: 0; display: flex; flex-direction: column;
                align-items: flex-start; gap: var(--s-space); }
        /* The separator under a hero, gone, and the blank under it halved. `main > section` puts a
           1px rule and a 3rem bottom margin at the foot of every section; on the demo page that read
           as an underline on a one-word heading, and then 116 px of nothing before the next block.
           Measured after this rule: 54 px at 1280 px wide, 49 at 700, 47 at 420 — half of what it
           was, and the halving is what was asked for, not a number tuned to a viewport. Keyed on a class rather
           than on `#what`, because index.html carries that same id and keeps its rule and its margin. */
        .hero-bare { border-bottom: none; margin-block-end: 0; padding-block-end: calc(var(--s-flow) / 2); }
        .hero img { width: 200px; height: auto; margin-inline: auto;
                    border-radius: var(--s-radius); }
        /* The release line under the wordmark. Quiet on purpose: the same muted/.9rem
           treatment `.asof` and `footer` already use, so a version number never
           outshouts the wordmark above it. Owner's ruling 2026-11-09 -- the line sits
           between "tabichat(tm)" and the GitHub button on the main page. */
        .hero .release { color: var(--s-muted); font-size: .9rem; margin: 0; }

        .card {
            background: var(--s-surface);
            border: 1px solid var(--s-border);
            border-radius: var(--s-radius);
            padding: 1.25rem;
        }
        .card > :last-child { margin-bottom: 0; }
        .actor-human { color: var(--human); }
        .actor-agent { color: var(--agent); }

        /* The one-line architecture diagram: three nodes, two arrows, mono face. */
        .flow { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
                margin-block: var(--s-space) 0; font-family: var(--s-font-mono); font-size: .9rem; }
        .node { background: var(--s-card); border: 1px solid var(--s-border);
                border-radius: calc(var(--s-radius) / 1.33); padding: .3rem .7rem; }
        .node-broker { border-color: var(--s-border-strong); color: var(--core); }
        .arrow { color: var(--s-muted); }

        /* Start-it-up block. Kept as a styled <p> with the same line breaks as index.html. */
        .term { font-family: var(--s-font-mono); background: var(--s-surface);
                border: 1px solid var(--s-border); border-radius: var(--s-radius);
                padding: 1rem 1.25rem; color: var(--s-text); overflow-x: auto; }
        .term .c { color: var(--s-muted); }

        .lead-word { color: var(--s-primary); font-weight: 600; }
        .asof { color: var(--s-muted); font-size: .9rem; margin-top: 1.25rem; }
        footer { text-align: center; }
        main section h3 { margin-block: 0 .35rem; }

        /* ---- Page head: the logo, then the menu bar pinned under it. Sumi already styles nav,
           nav ul, nav a and [aria-current]; this adds the brand block and the pinning. ---- */
        .brand { display: block; text-align: center; padding-block-start: 1rem; }
        .brand img { width: 200px; height: auto; border-radius: var(--s-radius); }
        nav.spa-bar { position: sticky; top: 0; z-index: 10; background: var(--s-bg);
                      border-bottom: 1px solid var(--s-border); padding-block: .6rem;
                      margin-block-start: .75rem; }
        #overview h3, #why h3 { margin-block: 0 .35rem; }
        footer { color: var(--s-muted); font-size: .9rem; }

        /* ---- The footer mark, sized down from its own 128px source and never up. Measured against
           this page's dark field (#282828): the mark holds a median 3.54:1 contrast, with 15% of its
           own ink under 1.5:1 -- those are the mark's darkest strokes, and on a dark face they sink
           into the background. A cream plate behind it trades that for the pale strokes sinking, so
           no plate is used; the mark ships on its own alpha. ---- */
        .footer-mark { margin-block: 0 .9rem; }
        .footer-mark a { display: inline-block; }
        .footer-mark img { width: 96px; height: auto; }

        /* ---- demo.html: four terminal panes, one transport.
           Every pane paints one seat's OWN recorded session, converted from its terminal by
           pi2cast-pi.mjs and replayed by reel.js -- the same engine the single-cast player runs
           and vt-test.mjs validates, so what a visitor watches is the tested thing.
           Rules live here, not in the page: site.css is the single source for this site and no
           other dev/ page carries a <style> block (measured: 0 in all five). Nothing of the
           palette below is invented -- borders, surfaces and muted text are the ruled tokens, and
           each terminal's own field colour is written into its cast by pi at record time and set
           at run time, so a pane shows pi's theme rather than a designer's guess of it. */
        .reel-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
                    margin-block: var(--s-space) .75rem; }
        .reel-track { flex: 1 1 220px; height: 26px; position: relative; cursor: pointer;
                      background: var(--s-surface); border: 1px solid var(--s-border);
                      border-radius: calc(var(--s-radius) / 1.33); overflow: hidden; }
        /* One row: the play button, the speed picker, the scrub line, the elapsed time. The scrub
           takes whatever width the controls leave and the play button sits at its left hand, because
           the bar is the thing that moves while the take plays. `sumi.min.css` gives every `select`
           `width:100%; display:block; margin-bottom` — right in a form, wrong in a control row, and
           measured on this bar as three stacked full-width rows 249 px tall. `:where()` carries no
           specificity, so an ordinary class selector is all the override this needs. */
        .reel-bar select { width: auto; margin: 0; flex: 0 0 auto; }
        .reel-bar button { flex: 0 0 auto; }
        .reel-prog { position: absolute; inset: 0 auto 0 0; width: 0;
                     background: color-mix(in srgb, var(--s-primary) 26%, transparent); }
        .reel-ticks { position: absolute; inset: 0; pointer-events: none; }
        .reel-ticks i { position: absolute; top: 3px; bottom: 3px; width: 2px;
                        background: var(--s-muted); opacity: .6; }
        .reel-time { font-family: var(--s-font-mono); font-size: .8rem; color: var(--s-muted);
                     min-width: 88px; text-align: right; }
        .reel-grid { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
        /* The blank under the closing line equals the blank above it, on the owner's word. Above the
           line is the routing row plus one flow margin; below it were the section's bottom padding,
           its 3rem bottom margin and main's bottom padding, which measured 44 px more than the gap
           above. So this page's last section loses its own padding and gives back part of its bottom
           margin — keyed on `#reel`, which exists on the demo page alone, so no other page moves. A
           browser without `:has()` simply keeps the wider gap. */
        #reel { padding-block-end: 0; }
        main > section:has(#reel) { margin-block-end: 0; }
        body > main:has(#reel) { padding-block-end: .625rem; }
        /* Slot order is the owner's ruling of 2026-11-09 and is fixed in markup, not CSS:
              <lead-agent> <engineer-1>
              <courier>    <engineer-2>
           Two columns until 980px; below that a 100-column terminal squeezed into a quarter
           of a phone is unreadable, so the panes stack instead of shrinking further. */
        @media (max-width: 980px) { .reel-grid { grid-template-columns: 1fr; } }
        .reel-pane { background: var(--s-surface); border: 1px solid var(--s-border);
                     border-radius: var(--s-radius); overflow: hidden;
                     transition: border-color .25s, box-shadow .25s; }
        .reel-pane.reel-live { border-color: var(--s-primary);
                               box-shadow: 0 0 0 1px var(--s-primary); }
        .reel-head { display: flex; justify-content: space-between; align-items: baseline;
                     padding: .3rem .6rem; background: var(--s-card);
                     border-bottom: 1px solid var(--s-border);
                     font-family: var(--s-font-mono); font-size: .78rem; color: var(--s-muted); }
        .reel-head b { color: var(--s-text); font-weight: 600; }
        .reel-state { color: var(--s-primary); opacity: 0; transition: opacity .25s; }
        .reel-pane.reel-live .reel-state { opacity: 1; }
        /* Eighty columns by twenty-four rows, four at a time: the size is what fits two
           panes across a laptop, measured at 0.95vw per pane edge, clamped so it never
           drops under 6.5px where the mono faces stop resolving. */
        .reel-screen { font-family: var(--s-font-mono); font-size: clamp(6.5px, .95vw, 11px);
                       line-height: 1.3; padding: .4rem .5rem; white-space: pre;
                       overflow: hidden; min-height: 1em; font-variant-ligatures: none;
                       tab-size: 8; }
        .reel-screen .cr { min-height: 1.3em; }
        .reel-screen span.b { font-weight: 700; }
        .reel-screen span.d { opacity: .62; }
        .reel-screen span.i { font-style: italic; }
        .reel-screen span.u { text-decoration: underline; }
        .reel-screen span.inv { filter: invert(1); }
        .reel-screen .cursor { box-shadow: inset 0 0 0 1px var(--s-primary); }
        .reel-screen .cursor.solid { background: var(--s-primary); color: var(--s-on-primary); }
        .reel-empty { color: var(--s-muted); font-size: .78rem; padding: .4rem .2rem; }
        .reel-wire { font-family: var(--s-font-mono); font-size: .85rem;
                     margin-block: .75rem 0; min-height: 3.2em; }
        .reel-wire .who { color: var(--agent); }
        .reel-wire .none { color: var(--s-muted); }
        .reel-badge { display: inline-block; margin-inline-start: .5rem; padding: 0 .5rem;
                      border: 1px solid var(--secret); border-radius: 999px;
                      color: var(--secret); font-size: .72rem; vertical-align: 2px; }
    