/* site.css — base styles + shared chrome. Consumes tokens.css only; no color
   literals here (the token-discipline rule, PHASE-CONTRACT W1). */

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background:
    radial-gradient(1100px 620px at 50% -240px, var(--glow) 0%, transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 26px 26px 72px;
  flex: 1;
}

/* ── Shared chrome: header ─────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* nowrap, deliberately: the stacked layout is owned by the breakpoint below, not
     by flex wrapping. When both could stack, the header wrapped from ~481-530px
     while the nav's optical correction was keyed to 480px, leaving a 12px indent
     inconsistency in a ~50px band (round 4). One condition, not two. */
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 56px;
}

.brand { display: flex; align-items: baseline; gap: 14px; }

.mark {
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink-max);
  font-weight: 650;
  text-decoration: none;
}
.mark .k { color: var(--accent); }

.tagline {
  color: var(--ink-dim);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  margin-top: 6px;
}

.site-nav { display: flex; gap: 8px; align-items: center; }

.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.site-nav a:hover {
  color: var(--ink-max);
  border-color: var(--line-bright);
}
.site-nav a[aria-current="page"] {
  color: var(--ink-max);
  background: var(--well);
  border-color: var(--line);
}

/* ── Shared chrome: footer ─────────────────────────────────────────── */

/* The footer sits outside .wrap, so a border-top on the element itself spans the
   viewport while the header's border-bottom spans the content column — the two rules
   never aligned. Matching them is a decision, not a residue (round 4): the rule is
   drawn by a pseudo-element inside the same max-width and padding the header lives
   in, so both hairlines are the same width at every viewport. */
.site-footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 30px auto 0;
  padding: 0 26px 30px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.9;
}
.site-footer::before {
  content: "";
  display: block;
  border-top: 1px solid var(--line);
  margin-bottom: 22px;
}
.site-footer .maker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
}

/* ── Prose & structure ─────────────────────────────────────────────── */

h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink-max);
  margin: 0 0 0.4em;
  max-width: 18ch;
}

h2 {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

p { margin: 0 0 1em; max-width: var(--measure); }

/* Every link ships a hover state; without this, keyboard users get no equivalent.
   W1 is the phase everything reuses, so the rule belongs here rather than at W4
   with the first form. */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--ink-max);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-dim);
  max-width: var(--measure);
}

section { margin-bottom: 72px; }

.hero { margin: 40px 0 88px; }

.principle {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 20px;
  margin: 0 0 1em;
  max-width: var(--measure);
  color: var(--ink);
}

/* ── Panels (the app's idiom, reused) ──────────────────────────────── */

/* The hairlines are drawn BY THE PANELS, not by a container background showing
   through 1px gaps. That earlier idiom is only invisible when the item count is an
   exact multiple of the resolved column count: with 4 panels, auto-fit gives 4 or 2
   columns at wide and narrow widths (both divisors) but 3 in the ~823-1077px band,
   and the two leftover cells painted as a solid --line block. Found at round 3.
   Borders on the items are count-agnostic, which matters because W6 reuses this grid
   with a different number of panels. */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.panel {
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 22px 26px;
}
.panel h3 {
  font-size: 0.95rem;
  color: var(--ink-max);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.panel p { font-size: 0.94rem; color: var(--ink-dim); margin-bottom: 0; }

/* ── Homepage: W13 cutline direction ───────────────────────────────── */

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

.home-page {
  background: var(--bg);
}

.home-page .wrap,
.home-page .site-footer {
  max-width: 1280px;
}

.home-page .wrap {
  padding-bottom: 0;
}

.home-page .site-header {
  margin-bottom: 0;
}

.home-main {
  --home-rail: 152px;
}

.home-hero {
  display: grid;
  grid-template-columns: var(--home-rail) minmax(0, 1fr);
  margin: 0;
  position: relative;
}

.home-hero::before {
  background: var(--accent);
  content: "";
  height: 100%;
  left: calc(var(--home-rail) - 20px);
  position: absolute;
  top: 0;
  width: 3px;
}

.hero-aside {
  align-self: start;
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 1.55;
  margin: 70px 0 0;
  text-transform: uppercase;
}

.hero-copy {
  padding: 62px 0 38px 34px;
}

.home-hero h1 {
  font-size: clamp(4.6rem, 9.3vw, 8.2rem);
  font-weight: 750;
  letter-spacing: -0.075em;
  line-height: 0.82;
  margin-bottom: 30px;
  max-width: 8.2ch;
}

.home-hero h1 span {
  color: var(--accent);
  display: inline-block;
  margin-left: 1.35ch;
}

.hero-promise {
  color: var(--ink);
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  line-height: 1.35;
  margin-bottom: 24px;
  max-width: 34rem;
}

.hero-actions,
.close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.action {
  align-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 0;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 750;
  justify-content: center;
  letter-spacing: 0.13em;
  min-height: 48px;
  min-width: 190px;
  padding: 12px 22px;
  text-decoration: none;
  text-transform: uppercase;
}

.action-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.action-primary:hover,
.action-primary:focus-visible {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: var(--bg);
}

.action-secondary {
  background: var(--bg);
  color: var(--ink-max);
}

.action-secondary:hover,
.action-secondary:focus-visible {
  border-color: var(--ink-max);
  color: var(--ink-max);
}

.hero-note {
  color: var(--ink-dim);
  font-size: 0.8rem;
  margin: 14px 0 0;
  max-width: none;
}

.plan-proof {
  border: 1px solid var(--line);
  margin: 0 0 0;
}

.proof-kicker {
  color: var(--ink-faint);
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.19em;
  margin: 0;
  max-width: none;
  padding: 13px 20px;
  text-transform: uppercase;
}

.proof-kicker code {
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 0;
}

.proof-grid {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
}

.proof-model {
  min-width: 0;
}

.proof-model img {
  aspect-ratio: 4 / 3;
  background: var(--bg);
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.proof-caption {
  align-items: end;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 15px 20px 17px;
}

.proof-caption span,
.proof-list-head span {
  color: var(--ink-faint);
  display: block;
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.proof-caption strong {
  color: var(--ink-max);
  display: block;
  font-size: 1.05rem;
}

.proof-caption a,
.proof-list a {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  text-transform: uppercase;
}

.proof-list {
  background: var(--panel);
  border-left: 1px solid var(--line);
  min-width: 0;
  padding: 28px 24px;
}

.proof-list-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.proof-list-head strong {
  color: var(--ink-max);
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
}

.proof-columns,
.proof-list dl > div {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 0.9fr);
}

.proof-columns {
  color: var(--ink-faint);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  padding: 0 0 8px;
  text-transform: uppercase;
}

.proof-list dl {
  border-top: 1px solid var(--line);
  margin: 0;
}

.proof-list dl > div {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.proof-list dt,
.proof-list dd {
  color: var(--ink);
  font-size: 0.78rem;
  margin: 0;
  min-width: 0;
}

.proof-list dd {
  color: var(--ink-dim);
  text-align: right;
}

.proof-list > p {
  color: var(--ink-dim);
  font-size: 0.76rem;
  margin: 16px 0 0;
}

.build-story {
  margin: 0;
  position: relative;
}

.build-story::before {
  background: var(--accent);
  content: "";
  height: 100%;
  left: calc(var(--home-rail) - 20px);
  position: absolute;
  top: 0;
  width: 3px;
}

.story-step {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 34px;
  grid-template-columns: calc(var(--home-rail) - 34px) minmax(240px, 0.78fr) minmax(0, 1.45fr);
  min-height: 280px;
  padding: 44px 0;
}

.step-index {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-index > span {
  color: var(--accent);
  font-size: clamp(3.2rem, 5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.step-index strong {
  color: var(--ink-max);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  margin-top: 12px;
  text-transform: uppercase;
}

.step-index small {
  color: var(--ink-faint);
  font-size: 0.57rem;
  letter-spacing: 0.16em;
  line-height: 1.5;
  margin-top: 12px;
  max-width: 8rem;
  text-transform: uppercase;
}

.step-copy {
  padding-left: 0;
}

.step-copy h3 {
  color: var(--ink-max);
  font-size: clamp(1.45rem, 2.7vw, 2rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 14px;
}

.step-copy p {
  color: var(--ink-dim);
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 0;
}

.story-step img {
  aspect-ratio: 12 / 5.2;
  background: var(--bg);
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.home-close {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  padding: 50px 0;
}

.home-close h2 {
  color: var(--ink-max);
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.08;
  margin: 0 0 14px;
  text-transform: none;
}

.home-close h2::after { display: none; }
.home-close h2 span { color: var(--accent); }

.home-close p {
  color: var(--ink-dim);
  margin: 0;
}

.close-actions {
  max-width: 420px;
}

.close-actions small {
  color: var(--ink-faint);
  font-size: 0.68rem;
  line-height: 1.5;
  width: 100%;
}

.home-page .site-footer {
  margin-top: 0;
  padding-top: 28px;
}

.home-page .site-footer::before { display: none; }

/* ── Waitlist (W4) ─────────────────────────────────────────────────── */

/* §3.2(c)'s zero-JS failure messages: every message is in the DOM, hidden by
   default, revealed by the redirect fragment via :target. The two rules below ARE
   the mechanism; everything after them is appearance. */
.msg { display: none; }
.msg:target { display: block; }

.msg {
  background: var(--panel-2);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px 6px;
  margin: 0 0 26px;
  max-width: var(--measure);
}
.msg strong { color: var(--ink-max); }
.msg p { margin: 6px 0 10px; font-size: 0.94rem; }

.waitlist-form { max-width: var(--measure); }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.field input[type="email"] {
  width: 100%;
  max-width: 26rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-max);
  font: inherit;
  padding: 11px 14px;
}
.field input[type="email"]:hover { border-color: var(--line-bright); }
.field input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--line-bright);
}

.field-note { font-size: 0.85rem; color: var(--ink-dim); margin: 10px 0 0; }

.cf-turnstile { margin: 22px 0; }

.submit-row { margin-top: 8px; }

button.primary {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 12px 24px;
  cursor: pointer;
}
button.primary:hover { background: var(--accent-bright); }
button.primary:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.stored-cols {
  margin: 0 0 1em;
  padding-left: 1.2em;
  max-width: var(--measure);
}
.stored-cols li { margin-bottom: 4px; }

/* ── Curated demo: W15 Cutline refresh ────────────────────────────── */

.wrap:has(> main[data-kerfsense-demo="curated"]),
body:has(main[data-kerfsense-demo="curated"]) .site-footer {
  max-width: 1280px;
}

.wrap:has(> main[data-kerfsense-demo="curated"]) {
  padding-bottom: 0;
}

main[data-kerfsense-demo="curated"] .eyebrow {
  color: var(--accent);
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

main[data-kerfsense-demo="curated"] .demo-hero {
  background-image:
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 34%, transparent 78%),
    linear-gradient(0deg, var(--bg) 0%, transparent 38%),
    url("/assets/cutline/simple-chest.jpg");
  background-position: center, center, center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 0 96px;
  min-height: 34rem;
  overflow: hidden;
  padding: clamp(64px, 8vw, 112px) clamp(34px, 7vw, 88px);
  position: relative;
}

main[data-kerfsense-demo="curated"] .demo-hero::before {
  background: var(--accent);
  content: "";
  height: calc(100% - 64px);
  left: 0;
  position: absolute;
  top: 32px;
  width: 4px;
}

main[data-kerfsense-demo="curated"] .demo-hero > * {
  position: relative;
  z-index: 1;
}

main[data-kerfsense-demo="curated"] .demo-hero h1 {
  font-size: clamp(4.2rem, 7.4vw, 6.6rem);
  line-height: 0.92;
  max-width: 8ch;
}

main[data-kerfsense-demo="curated"] .demo-hero .lede {
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  max-width: 35rem;
}

main[data-kerfsense-demo="curated"] > section[aria-labelledby="demo-heading"] {
  margin-bottom: 96px;
}

main[data-kerfsense-demo="curated"] .viewer-shell {
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-panel);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
}

main[data-kerfsense-demo="curated"] .viewer-stage,
main[data-kerfsense-demo="curated"] .cut-list-wrap {
  min-width: 0;
}

main[data-kerfsense-demo="curated"] .viewer-stage {
  column-gap: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 18px 15px;
}

#kerf-canvas {
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow-panel);
  display: block;
  grid-column: 1 / -1;
  touch-action: none;
  width: 100%;
}

/* [P6.42] W6-R1-C1: the author `display: block` above outranks the user-agent
   `[hidden] { display: none }`, so showFailure()'s `canvas.hidden = true` alone left the
   last drawn frame visible under the failure status. The hidden state needs its own rule. */
#kerf-canvas[hidden] {
  display: none;
}

#kerf-canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

main[data-kerfsense-demo="curated"] .viewer-instructions,
main[data-kerfsense-demo="curated"] .viewer-status,
main[data-kerfsense-demo="curated"] .cut-list-note {
  color: var(--ink-dim);
  font-size: 0.86rem;
}

main[data-kerfsense-demo="curated"] .viewer-instructions {
  margin: 13px 0 0;
  max-width: none;
}

main[data-kerfsense-demo="curated"] .viewer-status {
  margin: 13px 0 0;
  min-height: 1.5em;
  text-align: right;
}

.viewer-status[data-state="error"] { color: var(--bad); }

button.secondary {
  background: var(--panel-2);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  color: var(--ink-max);
  cursor: pointer;
  font: inherit;
  margin-top: 12px;
  padding: 9px 14px;
}
button.secondary:hover { border-color: var(--accent); }
button.secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

main[data-kerfsense-demo="curated"] .viewer-stage button.secondary {
  grid-column: 2;
  justify-self: end;
}

main[data-kerfsense-demo="curated"] .cut-list-wrap {
  background: var(--bg);
  border-radius: 0;
  border-top: 1px solid var(--line);
  padding: 28px 28px 30px;
}

main[data-kerfsense-demo="curated"] .cut-list-wrap h3 {
  color: var(--ink-max);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 0 0 3px;
}

main[data-kerfsense-demo="curated"] .cut-list-note {
  margin-bottom: 20px;
  max-width: none;
}

main[data-kerfsense-demo="curated"] .table-scroll {
  border-top: 1px solid var(--line-bright);
  max-height: 31rem;
  overflow: auto;
}

#cut-list {
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.45;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

#cut-list th:nth-child(1) { width: 28%; }
#cut-list th:nth-child(2) { width: 24%; }
#cut-list th:nth-child(3) { width: 30%; }
#cut-list th:nth-child(4) { width: 18%; }

#cut-list caption {
  color: var(--ink-dim);
  font-size: 0.78rem;
  padding-bottom: 10px;
  text-align: left;
}

#cut-list th,
#cut-list td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

#cut-list th {
  background: var(--bg);
  color: var(--ink-faint);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
}

#cut-list tbody tr:hover { background: var(--panel-2); }

main[data-kerfsense-demo="curated"] > section:last-child {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 30px;
}

main[data-kerfsense-demo="curated"] > section:last-child h2 {
  grid-column: 1 / -1;
}

main[data-kerfsense-demo="curated"] > section:last-child .principle {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 3px 0 0 var(--accent) inset;
  margin: 0;
  max-width: none;
  padding: 28px 30px 30px;
}

main[data-kerfsense-demo="curated"] > section:last-child .principle + .principle {
  border-left: 0;
  box-shadow: none;
  color: var(--ink-dim);
}

main[data-kerfsense-demo="curated"] > section:last-child a {
  color: var(--ink-max);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

/* ── Small screens ─────────────────────────────────────────────────── */

/* 720px keeps all four navigation items inside the same header-stack condition as the
   nav's -12px optical correction, so no intermediate wrap band exists. */
@media (max-width: 720px) {
  .wrap { padding: 18px 18px 48px; }
  .site-footer { padding: 0 18px 30px; }
  .site-header { align-items: flex-start; flex-direction: column; gap: 14px; }
  .site-nav { margin-left: -12px; }
  .hero { margin: 24px 0 56px; }
  section { margin-bottom: 56px; }
}

@media (max-width: 880px) {
  .viewer-shell { grid-template-columns: minmax(0, 1fr); }
  .table-scroll { max-height: 26rem; }
}

@media (max-width: 720px) {
  .home-page .wrap { padding-bottom: 0; }
  .home-main { --home-rail: 28px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .proof-grid { grid-template-columns: minmax(0, 1fr); }
  .proof-list { border-left: 0; border-top: 1px solid var(--line); }
  .home-hero::before,
  .build-story::before { left: 0; }
  .hero-aside {
    margin: 32px 0 0 20px;
  }
  .hero-copy { padding: 28px 0 34px 20px; }
  .home-hero h1 {
    font-size: clamp(3.5rem, 17vw, 5.2rem);
    max-width: 7.6ch;
  }
  .home-hero h1 span { margin-left: 0.72ch; }
  .hero-actions,
  .close-actions { align-items: stretch; flex-direction: column; }
  .action { min-width: 0; width: 100%; }
  .proof-kicker { line-height: 1.65; }
  .proof-caption { align-items: start; flex-direction: column; }
  .proof-columns,
  .proof-list dl > div { grid-template-columns: minmax(0, 1fr) minmax(7.4rem, 0.8fr); }
  .story-step {
    gap: 22px;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 40px 0 40px 20px;
  }
  .step-index { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; justify-content: start; }
  .step-index > span { grid-row: 1 / 3; }
  .step-index strong { margin-top: 2px; }
  .step-index small { margin-top: 6px; max-width: none; }
  .story-step img { aspect-ratio: 12 / 6.5; }
  .home-close { grid-template-columns: minmax(0, 1fr); padding: 42px 0 42px 20px; }

  .wrap:has(> main[data-kerfsense-demo="curated"]) { padding-bottom: 0; }

  main[data-kerfsense-demo="curated"] .demo-hero {
    background-image:
      linear-gradient(0deg, var(--bg) 0%, var(--bg) 34%, transparent 82%),
      url("/assets/cutline/simple-chest.jpg");
    justify-content: end;
    margin-bottom: 68px;
    min-height: 34rem;
    padding: 220px 22px 36px;
  }

  main[data-kerfsense-demo="curated"] .demo-hero::before {
    height: calc(100% - 32px);
    top: 16px;
  }

  main[data-kerfsense-demo="curated"] .demo-hero h1 {
    font-size: clamp(3.35rem, 16vw, 4.6rem);
  }

  main[data-kerfsense-demo="curated"] > section[aria-labelledby="demo-heading"] {
    margin-bottom: 68px;
  }

  main[data-kerfsense-demo="curated"] .viewer-stage {
    display: grid;
    gap: 0;
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 10px 15px;
  }

  main[data-kerfsense-demo="curated"] #kerf-canvas {
    aspect-ratio: 4 / 3;
  }

  main[data-kerfsense-demo="curated"] .viewer-status {
    margin-top: 5px;
    text-align: left;
  }

  main[data-kerfsense-demo="curated"] .viewer-stage button.secondary {
    grid-column: 1;
    justify-self: start;
  }

  main[data-kerfsense-demo="curated"] .cut-list-wrap {
    padding: 22px 14px 24px;
  }

  main[data-kerfsense-demo="curated"] #cut-list {
    min-width: 38rem;
    table-layout: auto;
  }

  main[data-kerfsense-demo="curated"] > section:last-child {
    grid-template-columns: minmax(0, 1fr);
  }

  main[data-kerfsense-demo="curated"] > section:last-child .principle + .principle {
    border-left: 1px solid var(--line);
    border-top: 0;
  }
}
