/* Hallmark · shape: Long Document · genre: atmospheric · theme: Terminal (by request) · job: hire · draw: f324a3
 * hero: Banner (the portrait pinned beside the page) · nav: masthead (the man page header line) · footer: colophon block · imagery: the portrait printed in glyphs, three poses and a helmet (Gemini, disclosed in the colophon) · signature: the glyph portrait that turns toward the cursor and has a chrome helmet printed over it as the page scrolls, its visor running LED type, with a working shell under the hero
 * axes: dark/mono/chromatic-green · posture: committed · contrast: pass · fold: pass · copy: verbatim (hero lines chosen by Steven) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, the hero lines are generic; the page argues through the diff in ai-designer(7) and the shell, not the slogan */
/* Hallmark · waive 77 · one 70ch column, the Long Document measure · the manual reads at the width of man(1) itself, so the column stays narrow */
/* Hallmark · waive 78 · man section names at 25px over indented bodies · a man page sets its section names small and bold, as the Long Document shape does */
/* Hallmark · waive 79 · the shell well starts at y 610, inside the first screen · the Banner hands over to the working shell under the 120px section gap, so the fold is not empty */
/* Hallmark · dismissed 58 · the hero headline and sentence are the lines Steven chose, kept verbatim */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --measure: 70ch;
  --indent: 7ch;
  --header-h: 64px;
}

body { font-stretch: var(--stretch-body); font-variant-numeric: tabular-nums; line-height: 1.65; }
h1, h2, h3 { font-weight: var(--display-weight); font-stretch: var(--stretch-display); letter-spacing: var(--tracking-display); line-height: 1.12; }

.skip { position: absolute; left: var(--space-md); top: var(--space-md); z-index: var(--z-modal); padding: var(--space-xs) var(--space-md); background: var(--color-accent); color: var(--color-accent-ink); transform: translateY(-200%); }
.skip:focus-visible { transform: none; }

/* The man page header: name(1) on the left, the manual's title in the middle, the language on the right. */
.masthead { border-bottom: var(--rule-hair) solid var(--color-rule); }
.masthead .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: var(--header-h); gap: var(--space-md); }
.masthead__name { justify-self: start; font-weight: 700; text-decoration: none; padding: var(--space-xs) var(--space-sm); background: var(--color-accent); color: var(--color-accent-ink); white-space: nowrap; }
.masthead__title { color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.masthead__lang { justify-self: end; font-size: var(--text-sm); white-space: nowrap; }

a { color: var(--color-ink-2); text-decoration-style: dotted; transition: color var(--dur-micro) steps(1); }
a:hover { color: var(--color-accent); }
a:active { color: var(--color-ink); }
.masthead__name:hover, .masthead__name:active { color: var(--color-accent-ink); background: var(--color-ink); }

/* Banner hero: the slogan and one action, the shell shows above the fold. */
.hero { padding-block: var(--space-3xl) var(--section-gap-s); }
.hero { container-type: inline-size; }
/* The h1 names the page for search (who, what, where); the three-line slogan below carries the display size. */
.hero__name { font-size: var(--text-lead); font-weight: 500; font-stretch: var(--stretch-body); letter-spacing: 0; color: var(--color-ink-2); max-width: none; }
/* One sentence per line: the slogan scales with its column so the longest line, 34 characters, still fits. */
.slogan { margin-top: var(--space-md); font-family: var(--font-display); font-size: clamp(1.5rem, 4cqi, 3rem); font-weight: var(--display-weight); font-stretch: var(--stretch-display); letter-spacing: var(--tracking-display); line-height: 1.12; color: var(--color-ink); overflow-wrap: break-word; min-width: 0; }
.hero .lead { margin-top: var(--space-lg); max-width: 62ch; color: var(--color-ink-2); }
.hero__actions { margin-top: var(--space-xl); display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: var(--space-xs) var(--space-lg); font-weight: 500; text-decoration: none; white-space: nowrap; border: var(--rule-hair) solid transparent; transition: background-color var(--dur-micro) steps(1), color var(--dur-micro) steps(1); }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-ink); color: var(--color-accent-ink); }
.btn--primary:active { background: var(--color-ink-2); color: var(--color-accent-ink); }

/* The shell: a session well across the container, typed once, then the visitor's. */
.session { padding-bottom: var(--section-gap); }
.shell { background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-rule); }
.shell__bar { display: flex; justify-content: space-between; gap: var(--space-md); padding: var(--space-sm) var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); color: var(--color-muted); font-size: var(--text-sm); }
.shell__screen { height: 20rem; overflow-y: auto; padding: var(--space-lg); font-size: var(--text-md); scrollbar-color: var(--color-rule-2) var(--color-paper-2); }
.shell__screen pre { max-width: 80ch; margin: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.shell__line { display: flex; align-items: baseline; gap: 1ch; }
.prompt { color: var(--color-muted); white-space: nowrap; }
.shell__out { color: var(--color-ink-2); }
.shell__out .hl { color: var(--color-accent); }
.shell__out a { color: var(--color-ink); }
.shell__form { display: flex; align-items: baseline; gap: 1ch; padding: 0 var(--space-lg) var(--space-lg); }
.shell__input { flex: 1; min-width: 0; min-height: 44px; padding: var(--space-xs) var(--space-sm); border: var(--rule-hair) solid var(--color-muted); background: var(--color-paper); color: var(--color-ink); caret-color: var(--color-accent); }
.shell__input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.shell__input::placeholder { color: var(--color-muted); opacity: 1; }
.shell__input:disabled { opacity: 0.5; cursor: not-allowed; }
.shell__noscript { color: var(--color-muted); }
.shell__hint { margin-top: var(--space-sm); color: var(--color-muted); font-size: var(--text-sm); }
.js .shell__noscript { display: none; }
.shell__form { display: none; }
.js .shell__form { display: flex; }
.caret { display: inline-block; width: 0.6em; height: 1.1em; vertical-align: -0.15em; background: var(--color-accent); animation: blink 1s steps(1) 5; }
@keyframes blink { 50% { opacity: 0; } }

/* The manual: section names at the margin, text indented like man(1). */
.manual { padding-bottom: var(--section-gap-l); }
.man { border-top: var(--rule-hair) solid var(--color-rule); padding-top: var(--space-2xl); }
.man + .man { margin-top: var(--section-gap-s); }
.man h2 { font-size: var(--text-title); font-weight: 700; letter-spacing: 0; max-width: none; }
.man__body { margin-top: var(--space-lg); padding-left: var(--indent); max-width: calc(var(--measure) + var(--indent)); }
.man__body > * + * { margin-top: var(--space-lg); }
.man__body p { max-width: var(--measure); }
.synopsis { font-size: var(--text-lead); color: var(--color-ink); }
.synopsis .arg { color: var(--color-accent); }
.synopsis .nw { white-space: nowrap; }

.options { margin: var(--space-2xl) 0 0; padding: 0; }
.options > div + div { margin-top: var(--space-2xl); }
.options dt h3 { font-size: var(--text-title); color: var(--color-accent); max-width: none; }
.options dd { margin: var(--space-sm) 0 0 var(--indent); max-width: var(--measure); color: var(--color-ink-2); }

/* The page on seven columns, the portrait pinned on the other five for the whole read. */
.layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--space-3xl); align-items: start; }
.layout__main { min-width: 0; }
.layout__portrait { position: sticky; top: var(--space-xl); padding-top: var(--space-3xl); }

/* The portrait: a photograph printed in glyphs, turning toward the cursor and drifting toward the android as the page scrolls. */
.portrait { position: relative; margin: 0; aspect-ratio: 1 / 1; background: var(--color-paper); }
.portrait__fallback { margin: 0; height: 100%; display: grid; place-items: center; overflow: hidden; color: var(--glyph-4); font-size: 7px; line-height: 1.3; }
.portrait canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait__bar { margin-top: var(--space-md); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); }
.portrait__readout { min-width: 0; color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portrait__pause { min-height: 44px; padding: var(--space-xs) var(--space-md); border: var(--rule-hair) solid var(--color-ink-2); background: transparent; color: var(--color-ink-2); font-size: var(--text-sm); cursor: pointer; white-space: nowrap; transition: background-color var(--dur-micro) steps(1), color var(--dur-micro) steps(1); }
.portrait__pause:hover { background: var(--color-paper-3); color: var(--color-ink); }
.portrait__pause:active { background: var(--color-accent-wash); }
.portrait__pause[aria-pressed="true"] { border-color: var(--color-accent); color: var(--color-accent); }
.portrait__pause:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 60rem) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout__main { display: contents; }
  .hero { order: 1; }
  .layout__portrait { order: 2; position: static; padding-top: 0; margin-bottom: var(--section-gap-s); }
  .session { order: 3; }
  .manual { order: 4; }
  .portrait { max-width: 32rem; }
}

/* ai-designer(7): the comparison as a unified diff. */
.diff { border: var(--rule-hair) solid var(--color-rule); background: var(--color-paper-2); max-width: calc(var(--measure) + 8ch); }
.diff__head { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-2xl); padding: var(--space-sm) var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule-2); color: var(--color-muted); font-size: var(--text-sm); }
.diff ol { list-style: none; margin: 0; padding: var(--space-sm) 0; counter-reset: line; }
.diff li { counter-increment: line; display: grid; grid-template-columns: 4ch 2ch minmax(0, 1fr); gap: var(--space-xs); padding: var(--space-xs) var(--space-lg) var(--space-xs) 0; font-size: var(--text-lg); line-height: 1.4; }
.diff li::before { content: counter(line); text-align: right; color: var(--color-rule-2); font-size: var(--text-sm); align-self: center; }
.diff .sign { color: var(--color-muted); }
.diff .del { color: var(--color-muted); }
.diff .add { background: var(--color-accent-wash); color: var(--color-ink); }
.diff .add .sign { color: var(--color-accent); }

/* history: a table, like `last` would print it. */
.history { width: 100%; max-width: calc(var(--measure) + 8ch); border-collapse: collapse; }
.history th { text-align: left; font-weight: 400; font-size: var(--text-sm); color: var(--color-muted); padding: 0 var(--space-md) var(--space-sm) 0; border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.history td { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); vertical-align: top; }
.history td:first-child { white-space: nowrap; color: var(--color-muted); }
.history tr:first-child td:nth-child(2) { color: var(--color-accent); font-weight: 500; }

.see-also { list-style: none; margin: 0; padding: 0; }
.see-also li + li { margin-top: var(--space-sm); }


/* Colophon, closed by the man page footer line. */
.colophon { border-top: var(--rule-hair) solid var(--color-rule); padding-block: var(--space-2xl) var(--space-xl); color: var(--color-muted); font-size: var(--text-sm); }
.colophon p { max-width: var(--measure); }
.colophon__foot { margin-top: var(--space-xl); display: flex; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }

@media (max-width: 40rem) {
  :root { --indent: 2ch; }
  .masthead__title { display: none; }
  .masthead .container { grid-template-columns: 1fr auto; }
  .shell__screen { height: 18rem; font-size: var(--text-sm); }
  .shell__bar { padding-inline: var(--space-md); }
  .shell__screen, .shell__form { padding-inline: var(--space-md); }
  .diff li { font-size: var(--text-md); padding-right: var(--space-md); }
  .history thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .history tr { display: block; padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .history td { display: block; padding: 0; border: 0; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
}

/* The readout and the visor control belong to the running portrait; without script there is nothing to report. */
html:not(.js) .portrait__bar { display: none; }

/* The manual page ai-designer(7): a longer read, same chrome. */
.hero--page { padding-block: var(--space-3xl) var(--space-2xl); }
.crumbs { margin-bottom: var(--space-lg); color: var(--color-muted); font-size: var(--text-sm); }
.page-title { font-size: clamp(2rem, 6cqi, 3.5rem); max-width: none; }
.man__body .man__sub { margin-top: var(--space-2xl); font-size: var(--text-lg); color: var(--color-accent); max-width: none; }
.man__body .man__sub:first-child { margin-top: 0; }
.faq { margin: var(--space-2xl) 0 0; padding: 0; }
.faq > div + div { margin-top: var(--space-xl); }
.faq dt h3 { font-size: var(--text-lg); max-width: none; }
.faq dd { margin: var(--space-sm) 0 0 var(--indent); max-width: var(--measure); color: var(--color-ink-2); }
