/* ============================================================
   321.do - public website
   Terminal-inspired: the dark palette of 123.do's terminal page,
   monospace headings and navigation, pane-like panels with
   hairline borders, a square focus. Nothing blinks, nothing
   pretends to execute; the only animation is none.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
    --paper: #0c0c0d;          /* the screen */
    --ink: #f4f2eb;            /* phosphor-warm text */
    --muted: #9a968e;          /* 7.6:1 on paper */
    --hairline: #26262a;
    --panel: #121214;
    --panel-2: #17171a;

    --focus: #7aa7f0;          /* brand blue for dark ground */
    --focus-deep: #4f7fd1;
    --focus-light: #9bb8ff;
    --focus-soft: rgba(122, 167, 240, 0.14);
    --accent: var(--focus);

    --ok: #a6c97f;
    --warn: #e0a96d;

    --term-bg: #000000;
    --term-text: #e8e6df;
    --term-muted: #8a877f;

    --radius: 4px;
    --max-width: 1080px;
    --reading-width: 660px;
    --hero-width: 800px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

body {
    font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 400;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mono, .brand, code, pre, kbd,
h1, h2, h3, .site-nav a, .nav-toggle, .cta, .action-link, .card-link, .agent-card-role, th {
    font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

a { color: var(--focus); }

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

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    background: var(--focus);
    color: #0c0c0d;
    padding: 10px 16px;
    border-radius: var(--radius);
    z-index: 100;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 24px 48px;
}

/* ---- preview / development banner -------------------------- */

.mode-banner {
    background: #1b160c;
    color: #e6c98a;
    border-bottom: 1px solid #4a3a16;
    font-size: 0.88rem;
    padding: 8px 24px;
    text-align: center;
}
.mode-banner-label {
    font-family: 'Geist Mono', monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    margin-right: 10px;
    padding: 2px 6px;
    border: 1px solid #8a6a2a;
    border-radius: 3px;
}

/* ---- header ------------------------------------------------- */

.site-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0 44px;
    flex-wrap: wrap;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    line-height: 1;
}
.logo-device { display: block; height: 28px; width: auto; }
.logo-mark--small .logo-device { height: 20px; }

.logo-focus-ring, .logo-focus-dot { color: var(--focus); }

.header-brand .brand {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: color 0.15s ease, background 0.15s ease;
}
.site-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.site-nav a.nav-active { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.site-nav a.nav-active::before { content: "> "; color: var(--focus); }
.site-nav .nav-cta { display: none; color: var(--focus); font-weight: 600; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--hairline);
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: var(--radius);
    cursor: pointer;
}

/* ---- splash hero (home): 3, 2, 1, launch over the 123 sea ------ */
/* Full-bleed out of the container, like 123.do's photo hero. The
   illustration is an SVG (vector, dark, no photo); the WebP is the
   fallback for browsers that prefer a raster. The scrim keeps the text
   legible on the left while the countdown runs on the right.

   Fitting rule (2026-09-12): the artwork is 2400x1044 (aspect 2.299)
   with the three rockets in its right 40% and the horizon at 53% of its
   height. `cover` on a fixed height cropped rocket 3's base and rocket
   1's nose on anything wider than ~1380px. So the box follows the
   artwork's aspect (height = width / 2.3) between a floor and a cap, and
   the image is fitted by HEIGHT and anchored right - the whole
   composition is always visible. Past the cap (~1930px wide) the left
   edge gains a strip of plain sky/sea gradient, painted below the image
   from the SVG's own stops, under the darkest part of the scrim. */

.hero.hero--splash {
    position: relative;
    max-width: none;
    margin: -8px calc(50% - 50vw) 56px;
    min-height: clamp(560px, 43.5vw, 840px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #070b18;
    background-image:
        url('/img/launch-hero.webp'),
        linear-gradient(180deg, #040408 0%, #070b18 29%, #0d1a36 53%, #0e1d3c 53.2%, #0a1428 70%, #04060c 100%);
    background-image:
        url('/img/launch-hero.svg'),
        linear-gradient(180deg, #040408 0%, #070b18 29%, #0d1a36 53%, #0e1d3c 53.2%, #0a1428 70%, #04060c 100%);
    background-size: auto 100%, 100% 100%;
    background-position: right center, center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--hairline);
}
.hero.hero--splash::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 8, 14, 0.82) 0%, rgba(6, 8, 14, 0.55) 45%, rgba(6, 8, 14, 0) 72%),
        linear-gradient(0deg, rgba(6, 8, 14, 0.55) 0%, rgba(6, 8, 14, 0) 40%);
    pointer-events: none;
}
.hero--splash .hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 24px;
}
.hero--splash .hero-content { max-width: 620px; }
.hero--splash .subheadline { color: #cfcbc2; }
.hero--splash .command-note { color: #b5b1a8; }

/* Tablet / narrow laptop: the box is taller than the aspect would give,
   so a height-fitted image is wider than the viewport and rocket 3 lands
   under the text column. Shrink the art to 88% of the box, anchor it
   bottom-right, and narrow the text column so the three rockets stay
   clear of the copy. */
@media (max-width: 1100px) {
    .hero.hero--splash {
        background-size: auto 88%, 100% 100%;
        background-position: right bottom, center;
    }
    .hero--splash .hero-content { max-width: 52%; }
    .hero.hero--splash::before {
        background:
            linear-gradient(90deg, rgba(6, 8, 14, 0.86) 0%, rgba(6, 8, 14, 0.6) 50%, rgba(6, 8, 14, 0.1) 100%),
            linear-gradient(0deg, rgba(6, 8, 14, 0.45) 0%, rgba(6, 8, 14, 0) 35%);
    }
}

/* Phone and tablet portrait (to 900px): stack instead of overlap. The
   copy sits on a dark scrim at the top; the artwork fills a band below
   it, anchored bottom-right. The band is the artwork at full viewport
   width (height = width / 2.3), but never narrower than 644px so the
   rockets stay legible on a phone - there the art overflows the left
   edge (empty sky) rather than showing a hard edge inside the box. The
   scrim fades out just above the band. */
@media (max-width: 900px) {
    .hero.hero--splash {
        --band: calc(max(100vw, 644px) / 2.3);
        min-height: 0;
        margin-bottom: 40px;
        background-size: max(100vw, 644px) auto, 100% 100%;
        background-position: right bottom, center;
    }
    .hero--splash .hero-inner { padding: 40px 24px calc(var(--band) - 24px); }
    .hero--splash .hero-content { max-width: none; }
    .hero.hero--splash::before {
        background:
            linear-gradient(180deg,
                rgba(6, 8, 14, 0.9) 0,
                rgba(6, 8, 14, 0.85) calc(100% - var(--band) - 40px),
                rgba(6, 8, 14, 0.25) calc(100% - var(--band) + 60px),
                rgba(6, 8, 14, 0) calc(100% - var(--band) + 140px));
    }
}

/* ---- type ---------------------------------------------------- */

.page-content { padding: 8px 0; min-width: 0; }
.docs-body, .section, .hero { min-width: 0; }

.hero {
    max-width: var(--hero-width);
    margin: 56px 0 56px;
}

.hero h1 {
    font-size: 2.6rem;
    line-height: 1.12;
    letter-spacing: -0.03em;
    font-weight: 500;
    margin-bottom: 20px;
}

/* a static block cursor closes the headline; it never blinks. The h1
   reserves the cursor's width as padding and the cursor's negative
   right margin cancels it, so the cursor can never wrap onto its own line. */
.hero h1 { padding-right: 0.7em; }
.hero h1::after {
    content: "";
    display: inline-block;
    width: 0.5em;
    height: 0.9em;
    margin-left: 0.18em;
    margin-right: -0.7em;
    vertical-align: -0.1em;
    background: var(--focus);
}

.hero h2 {
    font-size: 1.8rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 500;
    margin-bottom: 16px;
}

.subheadline {
    font-size: 1.18rem;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 24px;
    max-width: 600px;
}
.subheadline a { color: var(--focus); }

.eyebrow {
    font-family: 'Geist Mono', monospace;
    font-size: 0.76rem;
    padding-left: 1.1em;
    position: relative;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--focus);
    margin-bottom: 16px;
}
.eyebrow::before { content: "#"; position: absolute; left: 0; color: var(--muted); }

.section {
    max-width: var(--max-width);
    margin: 64px 0;
}

.section h2 {
    font-size: 1.35rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    font-weight: 500;
    margin-bottom: 16px;
    max-width: var(--reading-width);
}

.section h3 {
    font-size: 1.08rem;
    font-weight: 500;
    margin: 28px 0 8px;
    letter-spacing: -0.01em;
}

.section p, .section li {
    max-width: var(--reading-width);
    line-height: 1.6;
}
.section > p { margin-bottom: 14px; }

.intro {
    font-size: 1.06rem;
    color: var(--muted);
    margin-bottom: 16px;
    max-width: var(--reading-width);
}

.section a:not(.cta):not(.action-link):not(.card-link) {
    color: var(--focus);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--focus-soft);
    padding-bottom: 1px;
}
.section a:not(.cta):not(.action-link):not(.card-link):hover { border-bottom-color: var(--focus); color: var(--focus-deep); }

.section ul, .section ol { margin: 0 0 16px 22px; }
.section li { margin-bottom: 6px; }

.section code:not(pre code) {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}

/* ---- ctas ------------------------------------------------------ */

.cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: var(--radius);
    background: var(--focus);
    color: #0c0c0d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    border: 1.5px solid var(--focus);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.cta:hover { background: var(--focus-light); border-color: var(--focus-light); }
.cta::after { content: "\2192"; font-family: 'Geist Mono', monospace; }

.cta-secondary {
    background: transparent;
    color: var(--focus);
    border-color: var(--focus);
}
.cta-secondary:hover { background: var(--focus-soft); color: var(--focus-light); }

.header-cta { padding: 9px 16px; font-size: 0.92rem; }

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--focus);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--focus-soft);
    padding-bottom: 1px;
}
.action-link::after { content: "\2192"; font-family: 'Geist Mono', monospace; }
.action-link:hover { border-bottom-color: var(--focus); }

/* ---- command examples ------------------------------------------ */

.command { margin: 18px 0; max-width: 760px; min-width: 0; }

.command-row {
    display: flex;
    align-items: stretch;
    background: var(--term-bg);
    color: var(--term-text);
    border-radius: var(--radius);
    border: 1px solid #2c2c31;
    overflow: hidden;
}

.command-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 14px 18px;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}
.command-text code { font: inherit; }
.command-text::before { content: "$ "; color: var(--focus); }

.copy-button {
    flex: 0 0 auto;
    background: #141417;
    color: var(--term-text);
    border: 0;
    border-left: 1px solid #2c2c31;
    padding: 0 16px;
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}
.copy-button:hover { background: #222226; color: var(--focus-light); }
.copy-button:focus-visible { outline-offset: -4px; outline-color: #9bb8ff; }
.copy-button.is-copied { color: var(--ok); }

.command-note {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 8px;
    max-width: var(--reading-width);
}

.command-list { display: grid; gap: 4px; margin: 20px 0; min-width: 0; max-width: 760px; }
.command-list > .command { min-width: 0; }
.command-list .command { margin: 6px 0; }

/* A quiet block of text output (never pretends to be live) */
.output {
    background: var(--panel);
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 16px 18px;
    font-size: 0.88rem;
    line-height: 1.6;
    overflow-x: auto;
    max-width: 760px;
    margin: 12px 0 18px;
    white-space: pre;
}

/* ---- status badges ------------------------------------------------ */

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Geist Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 4px;
    border: 1px solid var(--hairline);
    background: var(--panel);
    color: var(--muted);
    white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.status--verified { color: var(--ok); border-color: rgba(166, 201, 127, 0.45); background: rgba(166, 201, 127, 0.08); }
.status--preview  { color: var(--warn); border-color: rgba(224, 169, 109, 0.45); background: rgba(224, 169, 109, 0.08); }
.status--planned  { color: var(--muted); }

.provenance {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--muted);
    border: 1px solid var(--hairline);
    border-left: 4px solid var(--focus);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 0 0 28px;
    max-width: 900px;
}
.provenance-note { flex-basis: 100%; }

/* ---- grids and cards -------------------------------------------- */

.grid {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.tile {
    padding: 22px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--panel);
}
.tile:hover { border-color: #3a3a40; }
.tile strong { display: block; font-weight: 500; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: 0.96rem; margin: 0; }
.tile .tile-number {
    font-family: 'Geist Mono', monospace;
    font-size: 0.78rem;
    color: var(--focus);
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

/* ---- benefits list (home) ------------------------------------------ */

.benefits {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
    max-width: 760px;
}
.benefits li {
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--panel);
    position: relative;
    max-width: none;
    margin: 0;
    line-height: 1.5;
}
.benefits li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 19px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--focus);
}
.benefits strong { font-weight: 600; }

/* ---- mission control lifecycle (home) --------------------------------- */

.mission {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    max-width: 1000px;
}
.mission-step {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 16px 16px 16px 60px;
    position: relative;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mission-step strong { font-weight: 600; }
.mission-step > span:not(.mission-count) { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.mission-count {
    position: absolute;
    left: 16px;
    top: 14px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--focus);
    border-radius: var(--radius);
    color: var(--focus);
    font-weight: 600;
    font-size: 1rem;
}
.mission-step--abort .mission-count { border-color: var(--warn); color: var(--warn); }
.mission-step--done .mission-count { border-color: var(--ok); color: var(--ok); }

@media (min-width: 768px) {
    .mission { grid-template-columns: repeat(5, 1fr); }
    .mission-step { padding: 56px 16px 16px; }
}

/* ---- systems diagram (home) ---------------------------------------- */
/* Five rows: label | boxes | ownership note. Rows stack on phones. */

.sys { margin: 28px 0 16px; max-width: 1000px; }
.sys-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 16px;
    align-items: stretch;
}
.sys-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 12px;
}
.sys-label em { font-style: normal; color: var(--focus); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.sys-boxes { display: grid; gap: 8px; grid-template-columns: 1fr; min-width: 0; }
.sys-box {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.9rem;
    min-width: 0;
}
.sys-box strong { font-weight: 600; color: var(--ink); overflow-wrap: break-word; }
.sys-box > span:not(.sys-kicker) { color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.sys-kicker {
    font-family: 'Geist Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.sys-box--official { border-color: rgba(122, 167, 240, 0.45); }
.sys-box--official .sys-kicker { color: var(--focus); }
.sys-box--planned { border-style: dashed; background: transparent; }
.sys-box--meta {
    border: 1px solid var(--focus);
    box-shadow: 0 0 0 1px var(--focus) inset;
    background: var(--panel-2);
}
.sys-box--meta .sys-kicker { color: var(--focus); }
.sys-list { margin: 6px 0 0; padding: 0 0 0 18px; color: var(--muted); font-size: 0.86rem; columns: 1; }
.sys-list li { margin: 0 0 2px; max-width: none; }
.sys-side {
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.45;
    padding: 10px 0 0 12px;
    border-left: 2px solid var(--hairline);
}
.sys-side span { display: block; font-family: 'Geist Mono', monospace; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.sys-side--123 { border-left-color: #c9a86a; }
.sys-side--123 span { color: #c9a86a; }
.sys-side--321 { border-left-color: var(--focus); }
.sys-side--321 span { color: var(--focus); }
.sys-side--you { border-left-color: var(--ok); }
.sys-side--you span { color: var(--ok); }
.sys-arrow {
    text-align: center;
    color: var(--focus);
    font-family: 'Geist Mono', monospace;
    line-height: 1;
    padding: 6px 0;
}

@media (min-width: 768px) {
    .sys-row { grid-template-columns: 130px 1fr 200px; }
    .sys-boxes--2 { grid-template-columns: repeat(2, 1fr); }
    .sys-boxes--3 { grid-template-columns: repeat(3, 1fr); }
    .sys-boxes--4 { grid-template-columns: repeat(4, 1fr); }
    .sys-list { columns: 2; column-gap: 24px; }
    .sys-arrow { padding-left: 146px; padding-right: 216px; }
    .sys-side { padding-top: 6px; }
}

/* ---- architecture illustration ------------------------------------- */

.arch {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 28px 0 12px;
    max-width: 900px;
}
.arch-box {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 18px;
    position: relative;
}
.arch-box--runtime { border: 1px solid var(--focus); box-shadow: 0 0 0 1px var(--focus) inset; }
.arch-label {
    font-family: 'Geist Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--focus);
    margin-bottom: 6px;
}
.arch-box strong { display: block; font-weight: 500; margin-bottom: 4px; }
.arch-box p { font-size: 0.92rem; color: var(--muted); margin: 0; }
.arch-box ul { margin: 8px 0 0 18px; font-size: 0.9rem; color: var(--muted); }
.arch-box li { margin-bottom: 2px; }
.arch-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-family: 'Geist Mono', monospace;
    transform: rotate(90deg);
}

/* ---- agent catalogue ------------------------------------------ */

.agent-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
    min-width: 0;
}

.agent-card {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--panel);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.agent-card--planned { background: transparent; border-style: dashed; border-color: #3a3a40; }

.agent-card img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--hairline); }

.agent-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.agent-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.agent-card-name { font-weight: 600; font-size: 1.1rem; }
.agent-card-id { color: var(--muted); font-size: 0.82rem; }
.agent-card-role { color: var(--ink); font-weight: 500; }
.agent-card p { color: var(--muted); font-size: 0.94rem; margin: 0; }
.agent-card-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.card-link { color: var(--focus); text-decoration: none; font-weight: 500; }
.card-link:hover { text-decoration: underline; }

.agent-hero {
    max-width: 440px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 8px 0 0;
}
.agent-hero img { display: block; width: 100%; height: auto; }

.agent-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px 24px;
    margin: 24px 0 0;
    max-width: 760px;
}
.agent-meta dt {
    font-family: 'Geist Mono', monospace;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}
.agent-meta dd { margin: 0 0 6px; }
.agent-meta dd .mono { font-size: 0.95em; }

.crumb { font-size: 0.9rem; margin: 0 0 18px; color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--focus); text-decoration: underline; }
.crumb-sep { margin: 0 6px; }

.personality { color: var(--muted); font-style: italic; margin-top: -8px; }

/* agent names are trade marks: the tm rides the h1 quietly, as on 123.do */
.tm { font-size: 0.4em; vertical-align: super; margin-left: 2px; color: var(--muted); font-family: 'Geist', system-ui, sans-serif; font-weight: 400; }

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

.table-wrap { overflow-x: auto; margin: 16px 0 24px; max-width: 900px; }
table { border-collapse: collapse; width: 100%; font-size: 0.94rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 0.86rem; }
td .mono { font-size: 0.9em; }

/* ---- downloads -------------------------------------------------- */

.release {
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 20px 22px;
    margin: 18px 0;
    max-width: 900px;
}
.release-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.release-version { font-weight: 600; font-size: 1.15rem; }
.release-meta { color: var(--muted); font-size: 0.9rem; }
.artifact-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.artifact { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 0; border-top: 1px solid var(--hairline); font-size: 0.92rem; }
.artifact .mono { word-break: break-all; color: var(--muted); font-size: 0.84rem; }
.artifact-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.notice {
    border: 1px solid var(--hairline);
    border-left: 4px solid var(--warn);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 16px 18px;
    margin: 20px 0;
    max-width: 760px;
}
.notice p { margin: 0 0 8px; }
.notice p:last-child { margin: 0; }
.notice--ok { border-left-color: var(--ok); }
.notice--info { border-left-color: var(--focus); }

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

.docs-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
.docs-nav { font-size: 0.94rem; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.docs-nav a { display: block; color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); }
.docs-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.docs-nav a.is-current { color: var(--ink); background: rgba(255, 255, 255, 0.08); font-weight: 500; }
.docs-nav a.is-current::before { content: "> "; color: var(--focus); }
.docs-body { min-width: 0; }
.docs-body .hero { margin-top: 0; margin-bottom: 24px; }
.docs-body .section { margin: 40px 0; }
.docs-body h2 { font-size: 1.4rem; }

.doc-card { display: block; text-decoration: none; color: inherit; }
.doc-card:hover { border-color: var(--focus); }
.doc-card strong { color: var(--ink); }

/* ---- footer -------------------------------------------------------- */

.site-footer {
    margin-top: 96px;
    padding: 36px 0 8px;
    border-top: 1px solid var(--hairline);
    color: var(--muted);
    font-size: 0.92rem;
}
.site-footer > * { margin: 8px 0; }
.site-footer-strapline { color: var(--ink); margin-bottom: 16px; }
.site-footer-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer-nav a { color: var(--muted); text-decoration: none; }
.site-footer-nav a:hover { color: var(--ink); }
.site-footer a { color: var(--muted); }
.footer-brand-wrap { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand { color: var(--muted); font-size: 0.85rem; }

/* registered mark: sized down without growing the line box; used only for
   the registered marks 123.do and 321.do, never for agent names */
.reg-mark { font-size: 0.62em; vertical-align: 0.42em; line-height: 1; margin-left: 1px; }

/* ---- responsive ------------------------------------------------------ */

@media (max-width: 767px) {
    .hero { margin: 36px 0 40px; }
    .hero h2 { font-size: 1.45rem; }
    .section { margin: 44px 0; }
    .section h2 { font-size: 1.2rem; }

    .site-header { padding-bottom: 24px; }
    .nav-toggle { display: inline-flex; order: 2; margin-left: auto; }
    .header-cta { display: none; }
    .site-nav .nav-cta { display: block; }
    .site-nav {
        display: none;
        order: 4;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 12px 0 0;
        padding-top: 12px;
        border-top: 1px solid var(--hairline);
    }
    .site-nav.nav-open { display: flex; }
    .site-nav a { padding: 12px; }
    .hero h1 { font-size: 2rem; }

    .cta { width: 100%; justify-content: center; }
    .header-cta { width: auto; }
    .command-text { font-size: 0.86rem; padding: 12px 14px; }
    .copy-button { padding: 0 12px; }
}

@media (min-width: 768px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .agent-grid { grid-template-columns: repeat(2, 1fr); }
    .agent-meta { grid-template-columns: repeat(2, 1fr); }
    .artifact { grid-template-columns: 1fr auto; align-items: center; }
    .arch { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; }
    .arch-arrow { transform: none; }
    .docs-layout { grid-template-columns: 200px 1fr; }
    .docs-nav ul { flex-direction: column; position: sticky; top: 24px; }
}

@media (min-width: 960px) {
    .hero h1 { font-size: 3rem; }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
    .agent-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
}

/* Admin stats tables (operator page only). */
.table-wrap { overflow-x: auto; }
table.stats { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.stats th, table.stats td { text-align: right; padding: 8px 12px; border-bottom: 1px solid #2a2a30; }
table.stats th:first-child, table.stats td:first-child { text-align: left; }
table.stats th { color: var(--muted); font-weight: 500; }
