/* Hallmark · shape: Map / Diagram · genre: modern-minimal · theme: Cobalt (deal 3/3, seed ruby-gem-bundles-rails-ac03·16ee12a2·2026-11-20·r0) · redesign: full · job: sign up · draw: 597270
 * hero: Banner (swap from Corridor: the site now carries docs, and the system map has to show above the fold) · nav: edge-aligned · footer: colophon block · imagery: the product, the user's screen recording and 4 stills, 3 screenshots of the live demo (puppeteer), no photographs · signature: the real request map, Browser to Rails to rspack serve, in three states
 * axes: light/grotesk-sans/cool · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V5 · weakest: P, a gem page argues little; argued it through the one thing only this gem does, two servers behind one origin, drawn as the map the page hangs from */
/* Hallmark · reworded "1.0 Create the app" to "Create the app", "2.0 Save, and the page follows" to "Save, and the page follows", "3.0 Ask the doctor" to "Ask the doctor" · the numbered stages belonged to the old Narrative Workflow shape, the map replaces them */
/* Hallmark · reworded "Start at stage one" to "Start a new app" · the stages it pointed back to are gone with the old shape */
/* Hallmark · reworded "4.0 Ship with Kamal" into the Production state of the map, its line and Dockerfile kept whole · shipping is the map's third state now */
/* Hallmark · dropped #create, #requirements · nav links only: the nav now carries How it works, Docs and GitHub, and both sections stay on the page */
/* Hallmark · dropped panel-controller, panel-view, tab-controller, tab-view, ship-title · the Controller and View tabs became the pinned steps, and Ship became the Production tab of the map; no script reads these ids */
/* Hallmark · dismissed 3 · .edge::after is the arrowhead on a diagram edge, a border triangle, not a stripe on a card */
@import url("./tokens.css");
@import url("./base.css");
@import url("./chrome.css");

:root {
  --hero-min: 560px;
  --stage-top: calc(var(--nav-height) + var(--space-xl));
}

/* Captures are product pictures: no duotone */
[data-slot][data-kind="product"] > img, [data-slot][data-kind="product"] > video { filter: none; mix-blend-mode: normal; }
[data-slot][data-kind="product"]::before { content: none; }

.head-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-lg) var(--gap-columns); align-items: end; margin-bottom: var(--space-2xl); }
.head-split h2 { grid-column: 1 / span 6; }
.head-split .lead { grid-column: 8 / -1; color: var(--color-ink-2); }

.frame { position: relative; overflow: hidden; border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper-2); box-shadow: var(--shadow-card); }
.frame > img, .frame > video { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* Hero: Banner over the ASCII field */

.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: min(58dvh, var(--hero-min)); padding-block: var(--space-2xl); border-bottom: var(--rule-hair) solid var(--color-rule); background-color: var(--color-paper); background-image: radial-gradient(var(--color-glyph-1) 1px, transparent 1.2px); background-size: var(--cell-w) var(--cell-h); }
.js .hero { background-image: none; }
.field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero__inner { display: grid; gap: var(--space-lg); justify-items: start; }
.hero h1 { max-width: 14ch; }
.hero .lead { color: var(--color-ink-2); }
.hero .command { margin-top: var(--space-xs); }

/* The map */

.map { padding-block: var(--section-gap-s) var(--section-gap); }
.tray { display: inline-flex; flex-wrap: wrap; gap: var(--space-2xs); padding: var(--space-2xs); border: var(--rule-hair) solid var(--color-rule); border-radius: calc(var(--radius-input) + 4px); background: var(--color-paper-3); }
.tray button { min-height: 44px; padding: 0 var(--space-md); border: var(--rule-hair) solid transparent; border-radius: var(--radius-input); background: transparent; color: var(--color-ink-2); font: 500 var(--text-sm)/1 var(--font-display); white-space: nowrap; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.tray button:hover { color: var(--color-ink); }
.tray button:active { box-shadow: var(--shadow-key-press); }
.tray button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tray button:disabled { opacity: 0.55; cursor: not-allowed; }
.tray button[aria-selected="true"] { border-color: var(--color-rule-2); background: var(--color-key-face); color: var(--color-ink); box-shadow: var(--shadow-key-press); }

.diagram { display: grid; gap: var(--space-xl); margin-top: var(--space-xl); padding: var(--space-2xl) var(--space-xl); border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); background-color: var(--color-paper); background-image: radial-gradient(var(--color-glyph-1) 1px, transparent 1.2px); background-size: var(--cell-w) var(--cell-h); }
.diagram + .diagram { margin-top: var(--space-xl); }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1fr); align-items: center; margin: 0; padding: 0; list-style: none; }
.node { display: grid; gap: var(--space-2xs); min-height: 120px; align-content: center; padding: var(--space-lg); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-paper); box-shadow: var(--shadow-card); }
@supports (corner-shape: bevel) { .node { border-radius: var(--cut-l) 4px var(--cut-l) 4px; corner-shape: bevel round bevel round; } }
.node__name { font: 600 var(--text-title)/1.1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); overflow-wrap: anywhere; }
.node__meta { font: 400 var(--text-sm)/1.4 var(--font-outlier); color: var(--color-muted); }
.node--live { border-color: var(--color-accent); background: var(--color-accent-wash); }
.node--live .node__meta { color: var(--color-accent-deep); }
.edge { position: relative; display: grid; justify-items: center; padding: 0 var(--space-sm); }
.edge::before { content: ""; position: absolute; left: 0; right: 10px; top: 50%; border-top: var(--rule-hair) solid var(--color-ink-2); }
.edge::after { content: ""; position: absolute; right: 2px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 8px solid var(--color-ink-2); }
.edge span { position: relative; padding: var(--space-2xs) var(--space-xs); background: var(--color-paper); font: 400 var(--text-sm)/1.3 var(--font-outlier); color: var(--color-ink-2); text-align: center; transform: translateY(-1.4em); }
.return { position: relative; display: flex; justify-content: center; margin: 0 10% 0 10%; padding-top: var(--space-lg); border: var(--rule-hair) dashed var(--color-accent); border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); height: var(--space-2xl); margin-top: calc(var(--space-xl) * -1); }
.return span { position: absolute; bottom: calc(var(--space-sm) * -1); padding: 0 var(--space-sm); background: var(--color-paper); font: 500 var(--text-sm)/1.4 var(--font-display); color: var(--color-accent-deep); white-space: nowrap; }
.diagram__note { max-width: 62ch; color: var(--color-ink-2); }
.ship { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-lg) var(--gap-columns); align-items: start; }
.ship .diagram__note { grid-column: 1 / span 4; }
.ship .code { grid-column: 5 / -1; }

/* Pinned: the recording held while the steps scroll */

.pinned { padding-block: var(--section-gap); background: var(--color-paper-2); border-block: var(--rule-hair) solid var(--color-rule); }
.pinned__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-columns); align-items: start; }
.pinned__stage { grid-column: 1 / span 7; position: sticky; top: var(--stage-top); display: grid; }
.pinned__stage > .frame { grid-area: 1 / 1; aspect-ratio: 6 / 5; opacity: 0; transition: opacity var(--dur-long) var(--ease-out); }
.pinned__stage > .frame.is-active { opacity: 1; }
.pinned__stage > .frame > img { object-fit: contain; background: var(--color-paper); }
.pinned__toggle { grid-area: 1 / 1; align-self: end; justify-self: end; margin: var(--space-md); z-index: var(--z-raised); }
.pinned__steps { grid-column: 9 / -1; }
.pinned__steps h2 { margin-bottom: var(--space-2xl); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { counter-increment: step; display: grid; gap: var(--space-sm); min-height: 34dvh; align-content: start; padding-block: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule-2); transition: opacity var(--dur-short) var(--ease-out); }
.step h3::before { content: counter(step) "  "; color: var(--color-accent); font-variant-numeric: tabular-nums; }
.js .step { opacity: 0.45; }
.js .step.is-active { opacity: 1; }
.step p { color: var(--color-ink-2); }
.step__media { display: none; margin: 0 0 var(--space-sm); }
.step__media img { border: var(--rule-hair) solid var(--color-rule); border-radius: var(--radius-card); }
html:not(.js) .pinned__stage > .frame:not([data-step-media="0"]) { display: none; }
html:not(.js) .pinned__stage > .frame[data-step-media="0"] { opacity: 1; }
html:not(.js) .step__media { display: block; }

/* Create: two graphite panes joined by elbows */

.create { padding-block: var(--section-gap-l) var(--section-gap); }
.mapping { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl); align-items: start; }
.mapping__wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: var(--z-raised); }
.mapping__wires path { fill: none; stroke: var(--color-accent-2); stroke-width: 1; }
.mapping__wires circle { fill: var(--color-accent-2); }
.mapping .code pre { min-height: 15.5em; }
[data-pair], [data-pair-to] { border-radius: 2px; }

/* Doctor: a ruled ledger */

.doctor { padding-block: var(--section-gap-s) var(--section-gap); }
.ledger { width: 100%; border-collapse: collapse; }
.ledger th, .ledger td { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); text-align: left; vertical-align: middle; }
.ledger thead th { padding-block: var(--space-sm); border-bottom-color: var(--color-ink); font: 500 var(--text-sm)/1.3 var(--font-display); color: var(--color-muted); white-space: nowrap; }
.ledger tbody th { width: 22%; font: 500 var(--text-lg)/1.3 var(--font-display); color: var(--color-ink); }
.ledger .status { width: 16%; font: 500 var(--text-md)/1 var(--font-display); color: var(--color-success); white-space: nowrap; }
.ledger .status svg { display: inline-block; width: 16px; height: 16px; margin-right: var(--space-xs); vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ledger .mono { font: 400 var(--text-sm)/1.5 var(--font-outlier); color: var(--color-ink-2); }
.ledger tr.is-warn { background: var(--color-accent-wash); }
.ledger tr.is-warn th { padding-left: var(--space-md); }
.ledger tr.is-warn .status { color: var(--color-accent-deep); }

/* Demo: showcase */

.demo { padding-block: var(--section-gap) var(--section-gap-s); }
.shot { margin: 0; }
.shot--lead .frame { aspect-ratio: 16 / 8; }
.shots { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap-columns); margin-top: var(--gap-columns); }
.frame--wide { aspect-ratio: 12 / 5.2; }
.shot figcaption { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-2); }

/* Requirements: a ruler, then rows */

.requirements { padding-block: var(--section-gap-l) var(--section-gap); }
.ruler { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-md); margin-block: var(--space-2xl) var(--space-xl); }
.ruler__end { font: 600 var(--text-2xl)/1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); white-space: nowrap; }
.ruler__line { position: relative; height: 16px; border-inline: var(--rule-hair) solid var(--color-ink-2); }
.ruler__line::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: var(--rule-hair) solid var(--color-ink-2); }
.ruler__label { grid-column: 1 / -1; justify-self: center; font-size: var(--text-sm); color: var(--color-muted); }
.rows { margin: 0; border-top: var(--rule-hair) solid var(--color-ink); }
.rows > div { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-columns); align-items: baseline; padding-block: var(--space-lg); border-bottom: var(--rule-hair) solid var(--color-rule); }
.rows dt { grid-column: 1 / span 4; font: 500 var(--text-title)/1.2 var(--font-display); color: var(--color-ink); }
.rows dd { grid-column: 5 / -1; margin: 0; font-size: var(--text-lg); color: var(--color-ink-2); }

/* Close: a band */

.close { padding-block: var(--section-gap-s); background: var(--color-paper-3); border-top: var(--rule-hair) solid var(--color-rule); }
.close__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-xl) var(--gap-columns); align-items: center; }
.close__grid > :first-child { grid-column: 1 / span 5; display: grid; gap: var(--space-md); }
.close__grid > .command { grid-column: 7 / -1; }
.close__alt { color: var(--color-ink-2); }

@media (prefers-reduced-motion: reduce) {
  .pinned__stage > .frame, .step, .tray button { transition: none; }
}

@media (max-width: 60rem) {
  .head-split h2, .head-split .lead { grid-column: 1 / -1; }
  .flow { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .edge { min-height: 72px; }
  .edge::before { left: 50%; right: auto; top: 0; bottom: 10px; border-top: 0; border-left: var(--rule-hair) solid var(--color-ink-2); }
  .edge::after { left: calc(50% - 5px); right: auto; top: auto; bottom: 0; border: 5px solid transparent; border-top: 8px solid var(--color-ink-2); }
  .edge span { transform: none; }
  .return { display: none; }
  .ship .diagram__note, .ship .code { grid-column: 1 / -1; }
  .diagram { padding: var(--space-xl) var(--space-lg); }
  .pinned__stage { position: static; margin-bottom: var(--space-xl); }
  .pinned__stage > .frame:not([data-step-media="0"]) { display: none; }
  .pinned__stage > .frame[data-step-media="0"] { opacity: 1; }
  .pinned__toggle { display: inline-flex; }
  .pinned__stage, .pinned__steps { grid-column: 1 / -1; }
  .js .step { opacity: 1; min-height: 0; }
  .step__media, html.js .step__media { display: block; }
  .mapping { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .mapping__wires { display: none; }
  .mapping .code pre { min-height: 0; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot--lead .frame { aspect-ratio: 4 / 3; }
  .rows dt, .rows dd { grid-column: 1 / -1; }
  .ledger thead { display: none; }
  .ledger tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding-block: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .ledger th, .ledger td { border: 0; padding: var(--space-2xs) var(--space-sm) var(--space-2xs) 0; width: auto; }
  .ledger .mono { grid-column: 1 / -1; }
  .close__grid > :first-child, .close__grid > .command { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .tray { display: flex; }
  .tray button { flex: 1 1 auto; }
  .ruler__end { font-size: var(--text-xl); }
}

/* The existing app runs one more line first: drop the new app's pane by that line, so each question meets its task on one row */
.mapping > .code:first-of-type { margin-top: calc(var(--text-sm) * 1.7); }
@media (max-width: 60rem) { .mapping > .code:first-of-type { margin-top: 0; } }
