/* The lander's layout. Colours, fonts, the wordmark, <mark> and the outcome stamps are in tokens.css (the brand kit).
   A --desk page with --paper sheets on it, 1px rules, no shadows or rounded corners. Yellow only where a person looks or decides. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; -webkit-font-smoothing: antialiased; font-synthesis: none; background: var(--desk); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
main, .bar, footer { max-width: 1040px; margin-inline: auto; }
main { display: grid; gap: 24px; padding-bottom: 48px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 800; line-height: 1.12; max-width: 30ch; }
h2 { font-size: 26px; font-weight: 800; }
h4 { font-size: 16px; font-weight: 600; }
p { margin: 0; max-width: 65ch; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 3px; }
code, pre, .label, .id, .rec { font-family: var(--mono); }
code { font-size: .88em; }
pre { margin: 0; background: var(--desk); border: 1px solid var(--rule); padding: 12px 14px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.label { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.note, .muted { color: var(--muted); font-size: 15px; }
q { font-family: var(--serif); quotes: "“" "”"; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 12px; }
.bar .wordmark { font-size: 22px; text-decoration: none; }
.bar nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 16px; }
.bar nav a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.bar nav a:hover { color: var(--ink); text-decoration: underline; }

.sheet { background: var(--paper); border: 1px solid var(--rule); padding: clamp(18px, 3vw, 32px); display: grid; gap: 14px; min-width: 0; }
.sheet > * { min-width: 0; }
.intro { gap: 16px; padding-block: clamp(28px, 5vw, 48px); }
.intro p { font-size: 16px; }
.intro .subhead { font-size: 22px; line-height: 1.3; color: var(--muted); margin-top: -8px; }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); margin-top: 8px; }
.ways a { display: grid; gap: 4px; padding: 16px 16px 4px 0; text-decoration: none; }
.ways a + a { border-left: 1px solid var(--rule); padding-left: 16px; }
.ways b { font-weight: 600; } .ways a:hover b { text-decoration: underline; }
.ways span { color: var(--muted); font-size: 16px; }
@media (max-width: 680px) { .ways { grid-template-columns: 1fr; } .ways a + a { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; } }

#try { display: grid; gap: 16px; }
.section-head { display: grid; gap: 8px; padding-top: 16px; }

button { font: inherit; color: inherit; cursor: pointer; }
.primary, .button { justify-self: start; display: inline-block; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: 9px 16px; font-weight: 600; font-size: 16px; text-decoration: none; }
.primary, .button { min-height: 40px; transition: background-color 150ms ease-out, color 150ms ease-out; }
.primary:hover, .button:hover { background: transparent; color: var(--ink); }
button:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } button:active { transform: none; } }
.quiet { background: none; border: 1px solid var(--rule); padding: 7px 12px; min-height: 40px; font-size: 13.5px; justify-self: start; transition: border-color 150ms ease-out; }
.quiet:hover { border-color: var(--ink); }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rec { font-size: 12px; color: var(--muted); border: 1px solid var(--rule); padding: 3px 8px; white-space: nowrap; margin-left: 8px; }

/* Cases: the list beside the open case's facts. */
.cases-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .cases-grid { grid-template-columns: 1fr; } }
.cases { display: grid; border-top: 1px solid var(--rule); }
.case { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 10px 8px; }
.case { transition: background-color 150ms ease-out; }
.case:hover { background: var(--desk); }
.case:active { transform: none; }
.case.open { background: var(--desk); box-shadow: inset 3px 0 0 var(--ink); }
.case .id { font-size: 12px; color: var(--muted); }
.case .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case .was { grid-column: 2; font-size: 12px; color: var(--muted); }
.case .was .stamp { color: var(--muted); }
.case > .stamp { grid-column: 3; grid-row: 1; }
.case .sub { grid-column: 2 / 4; font-size: 13.5px; color: var(--muted); }
.case-detail { display: grid; gap: 14px; min-width: 0; }
.case-head { display: grid; gap: 8px; }
.verdict { display: grid; gap: 8px; justify-items: start; }
.why { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
fieldset { border: 1px solid var(--rule); margin: 0; padding: 10px 12px 12px; display: grid; gap: 8px; min-width: 0; }
legend { font-weight: 600; font-size: 13.5px; padding: 0 4px; }
label { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; align-items: center; font-size: 13.5px; }
select, input { font: inherit; font-size: 15px; min-height: 40px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); padding: 4px 6px; width: 100%; min-width: 0; }
.own { margin: 0; padding-left: 16px; display: grid; gap: 6px; font-size: 13.5px; }
.own input { width: 76px; display: inline-block; }

/* The loop: versions, findings, the owner's options. */
.loop { display: grid; gap: 16px; }
.versions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; }
.ver { border: 1px solid var(--rule); padding: 3px 10px; color: var(--muted); }
.ver.now { color: var(--ink); background: var(--accent-soft); border-color: var(--accent); }
.arrow { color: var(--muted); }
.progress { font-family: var(--mono); font-size: 13.5px; display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.finding { border-top: 1px solid var(--rule); padding-top: 14px; display: grid; gap: 10px; }
.sop { font-family: var(--serif); font-size: 16px; display: grid; gap: 4px; }
.sop b { font-family: var(--sans); font-size: 13.5px; margin-right: 6px; }
.margin { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 12px; display: grid; gap: 4px; }
.margin b { font-size: 13.5px; }
.opts { display: grid; gap: 8px; }
.opt { border: 1px solid var(--rule); padding: 10px 12px; display: grid; gap: 6px; font-size: 16px; }
.opt.chosen { background: var(--accent-soft); border-color: var(--accent); }
.opt .t { font-weight: 600; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.opt .eff { color: var(--muted); }
.chosen-tag { font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.effect { display: grid; gap: 6px; border-top: 1px dashed var(--rule); padding-top: 8px; font-size: 13.5px; }
.effect ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); }
th { font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
td:first-child { width: 34%; font-weight: 600; }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--rule); padding-block: 18px 40px; }
@media (max-width: 680px) { .case .nm { white-space: normal; } select, input { font-size: 16px; min-height: 44px; } label { grid-template-columns: minmax(0, 1fr) 150px; } }

/* The model ladder. */
.table-wrap { overflow-x: auto; }
.ladder { min-width: 620px; }
.ladder .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ladder td:first-child { width: auto; font-weight: 400; }
.ladder tr.with td:first-child { font-weight: 400; }
.meter { display: inline-block; width: 80px; height: 6px; margin-right: 10px; vertical-align: middle; border: 0; padding: 0;
  background: linear-gradient(to right, var(--ink) var(--p), var(--rule) var(--p)); }

/* On a narrow screen the nav goes under the wordmark and wraps, so no link is cut off. */
@media (max-width: 680px) {
  .bar { flex-wrap: nowrap; flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 16px 8px; }
  .bar nav { gap: 0 18px; white-space: nowrap; }
}

/* The lander's pointer to the demo. */
.try-teaser { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 32px; }
.try-teaser > div { display: grid; gap: 8px; }
@media (max-width: 680px) { .try-teaser { grid-template-columns: 1fr; } }

/* The demo page: the rules beside the cases. */
body.app main, body.app .bar { max-width: 1320px; }
.app-intro { display: grid; gap: 8px; padding-block: 4px 8px; }
.app-intro h1 { font-size: clamp(26px, 3.4vw, 32px); }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .workspace { grid-template-columns: 1fr; } }
.sheet-head { display: grid; gap: 4px; }
.sheet-head h2 { font-size: 19px; }
.case-detail { border-top: 1px solid var(--rule); padding-top: 14px; }

/* Copy buttons on the command blocks. */
.code { position: relative; }
.code pre { padding-right: 84px; }
.copy { position: absolute; top: 6px; right: 6px; background: var(--paper); border: 1px solid var(--rule); font-size: 13.5px; padding: 0 12px; min-height: 40px; }
.copy:hover { border-color: var(--ink); }

/* The hero: the headline across the top (two lines), then the text on the left and the animation (site/hero.js) on the right;
   stacked on narrow screens. */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 32px; align-items: start; }
.intro-text { display: grid; gap: 16px; min-width: 0; }
/* The three ways in, listed under the text in the hero's left column. */
.intro-text .ways { grid-template-columns: 1fr; }
.intro-text .ways a { padding: 14px 0; }
.intro-text .ways a + a { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }
.ha { position: relative; margin: 0; border-left: 1px solid var(--rule); padding-left: 28px; display: grid; align-content: start; gap: 10px; font-size: 14px; }
@media (max-width: 860px) { .ha { border-left: 0; border-top: 1px solid var(--rule); padding: 24px 0 0; } }
.ha-label, .ha-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ha-tag { display: block; margin-bottom: 2px; }
.ha-sop { font-family: var(--serif); font-size: 15.5px; line-height: 1.5; }
.ha-sop b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--muted); margin-right: 6px; }
.ha-rule { font-family: var(--mono); font-size: 13px; line-height: 1.5; border: 1px solid var(--rule); padding: 8px 10px; background: var(--desk); }
.ha-rule .k { color: var(--muted); }
.ha-case { border: 1px solid var(--rule); padding: 10px 12px; display: grid; gap: 8px; }
.ha-case .nm { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ha-case .id { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; white-space: nowrap; }
/* The agent's tool calls, each followed by what came back. */
.ha-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; line-height: 1.45; }
.ha-log li { padding-left: 16px; position: relative; }
.ha-log li::before { content: "→"; position: absolute; left: 0; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.ha-log li.re { color: var(--muted); padding-left: 32px; margin-bottom: 5px; }
.ha-log li.re::before { content: "←"; left: 16px; }
.ha-log code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.ha-log u { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.ha-log .stamp { margin-right: 4px; font-size: 10.5px; padding: 1px 6px; }
.ha-pause { position: absolute; right: 0; top: -8px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: var(--muted); background: none; border: 0; padding: 6px 0; min-height: 32px; }
.ha-pause:hover { color: var(--ink); }
.ha-pause:active { transform: none; }
@media (max-width: 860px) { .ha-pause { top: 16px; } }
/* An ink underline drawn left to right: this phrase became that part of the rule. */
.ha .u { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0% 1.5px; padding-bottom: 1px; transition: background-size 700ms cubic-bezier(.3, .7, .2, 1); }
.ha .u.on { background-size: 100% 1.5px; }
/* Steps fade in; a reply's stamp lands. */
.ha [data-in] { opacity: 0; transform: translateY(4px); transition: opacity 420ms ease-out, transform 420ms ease-out; }
.ha [data-in].on { opacity: 1; transform: none; }
.ha [data-in] .stamp { display: inline-block; transform: scale(1.18); transition: transform 220ms cubic-bezier(.2, 1.4, .4, 1); }
.ha [data-in].on .stamp { transform: none; }
.ha.fading > :not(.ha-pause) { opacity: 0; transition: opacity 500ms ease-in; }
@media (prefers-reduced-motion: reduce) { .ha-pause { display: none; } }

