/* Millwright, the Main Street edition.
   Butter-cream paper, bottle green, brick, mustard and ink.
   Fraunces for the signwriting, Figtree for everything you read. */

:root {
  --paper: #f7f0df;
  --paper-2: #efe4c9;
  --white: #fffbf1;
  --ink: #22322c;
  --ink-soft: #4a5a53;
  --green: #2f6650;
  --green-deep: #244d3d;
  --green-wash: #d5e3d0;
  --brick: #b3432b;
  --brick-deep: #9a3520; /* brick for small text on blush or mustard-wash */
  --mustard: #e3a72f;
  --mustard-wash: #f8e2a6;
  --sky: #bfd9d2;
  --blush: #f1c7ac;
  --lit: #ffd873;
  --on-green-soft: #d9e6dc; /* quiet text on the green band */
  --on-ink-soft: #c9d3c8; /* quiet text on the ink footer */

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Figtree", "Gill Sans", "Trebuchet MS", "Segoe UI", sans-serif;

  --line: 2.5px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --wrap: 1180px;
  --gut: clamp(16px, 4vw, 40px);

  /*
    Motion, for every page. Strong custom curves, never the weak CSS defaults:
    --ease-out for things entering or answering the visitor,
    --ease-in-out for things moving across the screen,
    --ease-snap for things that settle firmly (doors, markers, steppers),
    --ease-drawer for panels that slide open.
  */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-snap: cubic-bezier(0.2, 0, 0, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.5rem); line-height: 1; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.2; }
h4 { font-size: 1rem; font-weight: 700; line-height: 1.3; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; max-width: 38em; }
.measure { max-width: 40em; }
.soft { color: var(--ink-soft); }

/* The green line above a title, the same on every page. */
.ms-kind, .home-kicker, .dh-kind, .biz-kind, .wf-kind { font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: 0; line-height: 1.4; color: var(--green); margin-bottom: 10px; }
/* Small capital labels, the same size and spacing everywhere. */
.ms-label, .hww-label, .home-recognize-label, .pt-k-t, .wf-eyebrow, .mw-mini, .mw-ch-k, .wc-card-foot { font-family: var(--sans); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
/* Anything pressable answers the press. (.btn keeps its own push-down.) */
.ms-press { transition: transform 160ms var(--ease-out); }
.ms-press:active { transform: scale(0.97); }
/* The small pills and chips answer it too. (scale, so it never fights a transform they already use.) */
.switch-b:active, .street-pause:active, .jump a:active, .chip:active span { scale: 0.97; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 999px; z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- Illustration rules (shared by every drawing) ---------- */

.bld, .ico, .van-svg, .walker-svg, .art { overflow: visible; }
.bld :where(rect, path, circle, ellipse, line, polygon),
.ico :where(rect, path, circle, ellipse, line),
.van-svg :where(rect, path, circle),
.walker-svg :where(path, circle),
.art :where(rect, path, circle, ellipse, line) {
  stroke: var(--ink);
  stroke-width: var(--line);
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: none;
  vector-effect: none;
}
.bld { width: 100%; height: auto; }
.f-cream { fill: var(--paper) !important; }
.f-white { fill: var(--white) !important; }
.f-green { fill: var(--green) !important; }
.f-brick { fill: var(--brick) !important; }
.f-mustard { fill: var(--mustard) !important; }
.f-sky { fill: var(--sky) !important; }
.f-blush { fill: var(--blush) !important; }
.f-ink { fill: var(--ink) !important; }
.cream-line { stroke: var(--paper) !important; }
.win { fill: var(--sky) !important; transition: fill 0.3s ease; }
.lit .win { fill: var(--lit) !important; }
.opensign { fill: var(--ink) !important; transform-box: fill-box; transform-origin: center; }
.lit .opensign { fill: var(--white) !important; animation: flip 0.5s ease both; }
.sign-t { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: 15px; font-weight: 600; fill: var(--ink); letter-spacing: 0.02em; }
.sign-t.light { fill: var(--paper); }
.nofill { fill: none !important; }
.smoke { opacity: 0; }
.lit .smoke { opacity: 1; }
.ico { width: 100%; height: auto; }

@keyframes flip { 0% { transform: scaleX(1); fill: var(--ink); } 50% { transform: scaleX(0); } 51% { fill: var(--white); } 100% { transform: scaleX(1); } }
@keyframes twinkle { 0%, 86% { fill: var(--sky); } 88%, 98% { fill: var(--lit); } 100% { fill: var(--sky); } }
@keyframes drive { from { transform: translateX(-160px); } to { transform: translateX(calc(100vw + 40px)); } }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(110vw); } }
@keyframes puff { 0% { transform: translateY(4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-10px); opacity: 0; } }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }
@keyframes bounce { 0%, 100% { transform: none; } 30% { transform: translateY(-6px); } 55% { transform: none; } 75% { transform: translateY(-2px); } }
@keyframes sway { 0%, 62%, 100% { transform: none; } 72% { transform: rotate(1.8deg); } 82% { transform: rotate(-1.3deg); } 91% { transform: rotate(0.6deg); } }
@keyframes ride { 0% { transform: translateX(calc(100vw + 20px)); } 30% { transform: translateX(-80px); } 100% { transform: translateX(-80px); } }
@keyframes stride { from { transform: rotate(16deg); } to { transform: rotate(-16deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes trace { from { background-color: transparent; } 35% { background-color: var(--mustard); } }
@keyframes flyin { from { opacity: 0; transform: translate(-48px, -14px) rotate(-6deg); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes narrow { from { opacity: 1; filter: none; transform: none; border-style: solid; } }
@keyframes stamp-in { from { transform: scale(1.6) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes stamp { from { transform: rotate(-9deg) scale(1.5); opacity: 0; } to { transform: rotate(-9deg) scale(1); opacity: 1; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 24px;
  border: var(--line) solid var(--ink); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease;
}
/* The lift is for a real pointer only: on touch, a tap would leave the button stuck in its hover state. */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
  .btn-ink:hover { box-shadow: 0 5px 0 var(--green); }
  .btn-quiet:hover { box-shadow: none; transform: none; background: var(--paper-2); }
  .back-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--brick); color: var(--white); }
.btn-ink { background: var(--ink); color: var(--white); box-shadow: 0 4px 0 var(--green); }
.btn-ink:active { box-shadow: 0 1px 0 var(--green); }
.btn-quiet { box-shadow: none; background: transparent; }
.btn-quiet:active { box-shadow: none; transform: none; background: var(--paper-2); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn[aria-disabled="true"] { background: var(--paper-2); color: var(--ink-soft); box-shadow: 0 4px 0 var(--ink-soft); border-color: var(--ink-soft); cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.text-link { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--brick); }
.text-link:hover { color: var(--brick); }

/* ---------- Header ---------- */

.site-head { position: relative; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; flex-wrap: wrap; }
/* The Millwright wordmark: supplied artwork (see DESIGN.md, Logo). Ink version in the header, cream version in the footer. */
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; line-height: 0; }
.brand img { display: block; width: auto; height: clamp(26px, 2.6vw, 34px); }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.site-nav a:not(.btn) { display: block; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { background: var(--paper-2); }
.site-nav a[aria-current="page"]:not(.btn) { background: var(--green-wash); }
.site-nav .btn { min-height: 44px; margin-left: 8px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .js .nav-toggle { display: inline-flex; min-height: 44px; padding: 8px 18px; box-shadow: none; }
  .js .site-nav { display: none; width: 100%; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--r-md); padding: 10px; }
  .site-nav .btn { margin: 8px 0 0; }
}

/* ---------- Hero ---------- */

.hero { padding-block: clamp(24px, 4vw, 52px) clamp(16px, 2vw, 24px); }
.hero h1 { max-width: 13.5em; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; margin-top: clamp(20px, 3vw, 36px); }
.hero .lead { max-width: 30em; }
.hero-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
@media (max-width: 820px) { .hero-row { grid-template-columns: 1fr; } }

.page-hero { padding-block: clamp(32px, 6vw, 80px) clamp(28px, 4vw, 56px); }
/* One page-title size for every inner page. */
.page-hero h1, .dh-hero h1 { font-size: clamp(2.4rem, 5vw, 4.3rem); }
.page-hero h1 { max-width: 14em; }
.page-hero .lead { margin-top: 22px; }

/* ---------- The street ---------- */

.street { position: relative; scroll-margin-top: 8px; }
.street-view { position: relative; overflow: hidden; padding-bottom: clamp(32px, 5vw, 64px); }
.street-cam { position: relative; }
.street-view.is-leaving { position: absolute; top: 0; left: 0; right: 0; z-index: 5; pointer-events: none; }
.veil { position: absolute; inset: 0; z-index: 6; background: var(--paper); opacity: 0; pointer-events: none; }
.street-sky { position: absolute; inset: 0 0 auto 0; height: 60%; pointer-events: none; overflow: hidden; }
.sun { position: absolute; right: 2.5%; top: 2%; width: clamp(54px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%; background: var(--mustard); border: var(--line) solid var(--ink); }
.cloud { position: absolute; left: 0; top: 9%; width: clamp(90px, 11vw, 150px); animation: drift 210s linear infinite; animation-delay: -80s; }

.street-scroll::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 100px; background: var(--paper-2); border-top: var(--line) solid var(--ink); }
.street-scroll { position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
.street-row { display: flex; align-items: flex-end; position: relative; max-width: 1480px; min-width: 1060px; margin-inline: auto; padding-inline: var(--gut); padding-top: 12px; }
.street-prop { flex: 1 1 0; min-width: 0; align-self: flex-end; display: block; }
.street-prop::after { content: ""; display: block; height: 100px; background: var(--paper-2); border-top: var(--line) solid var(--ink); }

.street-b {
  text-decoration: none; color: inherit;
  flex: 1 1 0; min-width: 0; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; text-align: center;
  border-radius: 12px; -webkit-tap-highlight-color: transparent;
}
.street-label {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  height: 100px; padding: 10px 6px 0; background: var(--paper-2); border-top: var(--line) solid var(--ink);
}
.street-name { display: inline-block; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: clamp(0.95rem, 1.1vw, 1.05rem); line-height: 1.2; padding: 3px 10px; border-radius: 999px; border: 2px solid transparent; transition: background-color 0.2s ease, border-color 0.2s ease; }
.street-kind { font-size: 0.78rem; line-height: 1.25; color: var(--ink-soft); max-width: 16em; }
.street-b:focus-visible { outline-offset: -3px; }

/* Storefront moving parts: lit windows, a door that swings open, a sign that bounces. */
.door-swing { overflow: visible; }
.door { transition: transform 0.45s var(--ease-snap); }
.door-face { transform: none; }
.door-in { fill: var(--lit) !important; }
.door-recess { opacity: var(--door-light, 0); transition: opacity 0.32s ease; }
.door-jamb { fill: var(--mustard); stroke: none !important; }
.door-floor { fill: var(--mustard-wash); stroke-width: 1 !important; }
.door-floor-line { stroke-width: 1 !important; }
.door-spill { fill: var(--lit); stroke: none !important; opacity: calc(var(--door-light, 0) * 0.45); transition: opacity 0.45s var(--ease-snap); pointer-events: none; }
.door .opensign, .door .door-handle { stroke-width: 1 !important; }
/* Clinic: automatic glass leaves slide into the fixed sidelights. The same
   door-light state drives hover, arrival, keyboard, entry and scene changes. */
.clinic-entrance .door { width: auto; height: auto; transform-box: view-box; transform-origin: 0 0; }
.clinic-entrance .clinic-slide-left { transform: translateX(calc(var(--door-light, 0) * -18px)); }
.clinic-entrance .clinic-slide-right { transform: translateX(calc(var(--door-light, 0) * 18px)); }
.clinic-entrance :where(rect, path) { stroke-width: 1.25; }
.clinic-entrance .clinic-frost { fill: var(--white); stroke: none; opacity: 0.75; }
.clinic-entrance .clinic-decal { stroke: none; }
.clinic-entrance .clinic-hours, .clinic-entrance .clinic-reflection { stroke-width: 1; }
.clinic-entrance .clinic-reflection { stroke: var(--white); }
.clinic-entrance .clinic-handle { stroke-width: 2; }
.clinic-entrance .clinic-sensor { stroke: var(--ink); stroke-width: 2; }
.sign { transform-box: fill-box; transform-origin: 50% 100%; }
@media (hover: hover) {
  .street-b:hover .win { fill: var(--lit) !important; }
  .street-b:hover { --door-angle: 62deg; --door-light: 1; }
  .street-b:hover .sign { animation: bounce 0.55s ease; }
  .street-b:hover .street-name { background: var(--white); border-color: var(--ink); }
}
.street-b:focus-visible .win, .street-b.is-pressed .win { fill: var(--lit) !important; }
.street-b:focus-visible, .street-b.is-pressed, .door-open { --door-angle: 62deg; --door-light: 1; }
.street-b:focus-visible .sign, .street-b.is-pressed .sign { animation: bounce 0.55s ease; }
.street-b:focus-visible .street-name, .street-b.is-pressed .street-name { background: var(--mustard); border-color: var(--ink); }
.is-pressed .opensign, .door-open .opensign { fill: var(--white) !important; }

/* Crossing a threshold clears the panel, then lets it shut behind the visitor.
   These explicit states take precedence over the walk's current-stop hover. */
#street .street-b.is-entering-door { --door-angle: 86deg; --door-light: 1; }
#street .street-b.door-returned { --door-angle: 0deg; --door-light: 0; }
#street .street-row.door-camera-flat { transform: translateX(var(--door-pan)) !important; will-change: auto; }
#street:is(.is-zooming, .is-door-exiting) .street-cam { contain: paint; will-change: transform; }
/* Only a live (unsnapshotted) camera needs the street held still while it scales. */
#street.door-live .street-cam * { animation-play-state: paused !important; transition-property: transform, opacity !important; }
#street .street-b.is-entering-door .door { transition-duration: 100ms; }
#street.is-door-exiting .street-b.is-entering-door :is(.door, .door-recess) { transition: none; }
.inside.door-ready { opacity: 0.004; pointer-events: none; will-change: opacity; }
.inside.door-room { will-change: opacity; }
.inside:is(.door-ready, .door-room) .inside-bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
#street:is(.is-zooming, .is-inside, .is-door-exiting) :is(.walk-intro, .walk-caption) { opacity: 0; transition: none; pointer-events: none; }
/* Stepping in, the card clears while the door opens, before the camera moves. */
#street.is-zooming:not(.is-door-exiting) :is(.walk-caption, .walk-hud, .walk-progress) { transition: opacity 100ms var(--ease-snap); }
#street:is(.is-zooming, .is-inside) :is(.walk-hud, .walk-progress) { opacity: 0; pointer-events: none; }
#street.is-door-exiting :is(.walk-hud, .walk-progress) { pointer-events: none; }
#street.door-ui-in .walk-caption { opacity: 1; transition: none; }
#street .street-b.door-pointer-return:focus { outline: none; }

.tw { animation: twinkle 11s steps(1, end) infinite; }
.is-paused .tw, .is-pressed .tw { animation: none; }

.crown { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 10s ease-in-out infinite; }
.street-prop:nth-child(7) .crown { animation-delay: -5.5s; }

.road { position: relative; height: 70px; background: var(--ink); overflow: hidden; }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: 3px dashed rgba(247, 240, 223, 0.45); }
.van { position: absolute; left: 0; bottom: 9px; width: 104px; animation: drive 34s linear infinite; }
.van .van-svg, .bike .van-svg { width: 100%; height: auto; }
.bike { position: absolute; left: 0; bottom: 6px; width: 44px; animation: ride 52s linear infinite; animation-delay: -6s; }
.bike .van-svg :where(path, circle) { stroke: var(--paper); stroke-width: 3; }
.bike .van-svg .f-brick, .bike .van-svg .f-blush { stroke: var(--paper); }
.is-paused .van, .is-paused .cloud, .is-paused .bike, .is-paused .crown { animation-play-state: paused; }

.walker { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; }
.walker svg { width: 100%; height: 100%; }
.walker.from-right svg { transform: scaleX(-1); }
.walker .leg { transform-box: fill-box; transform-origin: 50% 0; animation: stride 0.5s ease-in-out infinite alternate; }
.walker .leg-b { animation-direction: alternate-reverse; }

.street-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 12px 0; font-size: 0.92rem; color: var(--ink-soft); }
.street-hint-touch { display: none; }
@media (max-width: 1000px) { .street-hint-touch { display: inline; } .street-hint-wide { display: none; } }
.street-pause { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.street-pause:hover { background: var(--paper-2); }
.pause-i { width: 10px; height: 12px; border-inline: 3px solid var(--ink); }
.is-paused .street-pause .pause-i { width: 0; height: 0; border: 0; border-block: 6px solid transparent; border-left: 10px solid var(--ink); }

/* ---------- Inside a business ---------- */

.inside { padding-block: 4px clamp(48px, 7vw, 96px); }
.inside:focus { outline: none; }
.inside-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 8px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 18px 8px 12px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--white); font-weight: 600; cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.back-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.back-btn .tiny { width: 16px; height: 16px; }
.back-btn .tiny path { stroke-width: 2.4; }
.switch { display: flex; flex-wrap: wrap; gap: 6px; }
.switch-b { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 2px solid rgba(34, 50, 44, 0.22); border-radius: 999px; background: transparent; font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.switch-b:hover { border-color: var(--ink); }
.switch-b[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.swatch { flex: none; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--ink); }
.sw-law { background: var(--brick); }
.sw-accounting { background: var(--green); }
.sw-clinic { background: var(--sky); }
.sw-realty { background: var(--mustard); }
.sw-insurance { background: var(--blush); }
.switch-b[aria-pressed="true"] .swatch { border-color: var(--white); }

/* ---------- The worked example ---------- */

/* The storefront stays beside the example and changes with it. */
.inside-grid { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; margin-top: clamp(24px, 4vw, 44px); }
.inside-main { min-width: 0; max-width: 820px; }
.inside-intro { max-width: 40em; }
.inside-kind { font-weight: 600; color: var(--green); margin-bottom: 10px; }
.inside-h { font-size: clamp(1.8rem, 3.6vw, 2.9rem); }
.inside-h:focus { outline: none; }
.inside-scene { position: sticky; top: 24px; padding-top: 8px; }
.scene-art { position: relative; border-bottom: var(--line) solid var(--ink); padding-inline: 6px; }
.scene-art::after { content: ""; position: absolute; left: -12px; right: -12px; bottom: calc(-1 * var(--line)); border-bottom: var(--line) solid var(--ink); }
.inside-scene .win, .inside-scene .door, .inside-scene .opensign { transition: fill 0.45s ease, transform 0.45s var(--ease-snap); }
.inside-scene .door-in { fill: var(--paper-2) !important; transition: fill 0.45s ease; }
.post { position: absolute; left: 50%; bottom: 2px; width: 34px; margin-left: -17px; transform: rotate(-8deg); }
.s1 .post { animation: post-in 0.6s cubic-bezier(0.2, 0.8, 0.3, 1.2) 0.25s backwards; }
.s2 .post, .s3 .post { opacity: 0; transform: translateY(-14px) scale(0.6); transition: opacity 0.3s ease, transform 0.3s ease; }
.s2 .win, .s3 .win { fill: var(--lit) !important; }
.s2 .door-in, .s3 .door-in { fill: var(--lit) !important; }
.s2 { --door-angle: 62deg; --door-light: 1; }
.s2.is-working .win { animation: busy 1.2s ease-in-out infinite alternate; }
.s2.is-working .win:nth-of-type(2n) { animation-delay: -0.6s; }
.s3 .opensign { fill: var(--white) !important; animation: flip 0.5s ease 0.15s both; }
.s3 .sign { animation: bounce 0.55s ease 0.1s; }
@keyframes busy { from { fill: var(--lit); } to { fill: #fff4cf; } }
@keyframes post-in { from { opacity: 0; transform: translate(-30px, -40px) rotate(-30deg); } }

.demo { margin-top: clamp(20px, 3vw, 30px); }
/* No panel around the whole example: the page is the surface, and the prepared card is the one frame. */
.demo-surface { --dpad: 0px; }

/* Three stages. Finished ones can be revisited. */
.progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; padding-bottom: 14px; border-bottom: 2px solid rgba(34, 50, 44, 0.08); }
.progress li { display: flex; align-items: center; }
.progress li + li::before { content: ""; width: 18px; margin-right: 4px; border-top: 2px dotted rgba(34, 50, 44, 0.35); }
.pstep { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 4px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font-weight: 600; font-size: 0.92rem; }
button.pstep { cursor: pointer; }
button.pstep:hover { background: var(--paper); color: var(--ink); }
.pn { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(34, 50, 44, 0.3); background: var(--white); font-family: var(--serif); font-weight: 600; font-size: 0.95rem; }
.pn .tiny { width: 15px; height: 15px; }
.pn .tiny path { stroke-width: 2.4; }
.is-done .pstep { color: var(--ink); }
.is-done .pn { background: var(--green-wash); border-color: var(--green); }
.is-done .pn .tiny path { stroke: var(--green-deep); }
.is-current .pstep { background: var(--ink); color: var(--white); }
.is-current .pn { background: var(--mustard); border-color: var(--ink); color: var(--ink); }
.is-current:last-child .pstep { background: var(--green); }
.is-current:last-child .pn { background: var(--white); }
.is-current:last-child .pn .tiny path { stroke: var(--green-deep); }
.is-person.is-next .pn { border-color: var(--brick); }

.task { display: grid; gap: 14px; margin-top: 18px; }
.task-act { display: flex; justify-content: flex-end; }

/* The request, as it arrived */
.req { border: var(--line) solid var(--ink); border-radius: var(--r-md); padding: 16px 18px; background: var(--white); box-shadow: 4px 5px 0 var(--sky); }
.req header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px dotted rgba(34, 50, 44, 0.3); }
.req-from { font-weight: 700; }
.req-meta { color: var(--ink-soft); font-size: 0.9rem; }
.req p { font-size: 1.06rem; line-height: 1.75; }
mark { background-color: transparent; color: inherit; border-radius: 4px; padding: 1px 1px; transition: background-color 0.18s ease; }
.done mark { background-color: var(--mustard-wash); }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.att { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--paper); font-size: 0.86rem; font-weight: 600; overflow-wrap: anywhere; transition: background-color 0.18s ease; }
.done .att { background: var(--mustard-wash); }
mark.hot, .att.hot { background-color: var(--mustard) !important; }
.arrive .req { animation: rise 0.42s var(--ease-out) backwards; }

.tiny { flex: none; width: 14px; height: 14px; }
.tiny :where(path, circle, rect) { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* A finished stage, folded to one line */
.done { border-bottom: 1px solid rgba(34, 50, 44, 0.14); }
.done > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 4px; cursor: pointer; list-style: none; border-radius: var(--r-sm); }
.done > summary::-webkit-details-marker { display: none; }
.done > summary:hover { background: var(--paper-2); }
.done-ck { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--green); background: var(--green-wash); }
.done-ck .tiny path { stroke: var(--green-deep); stroke-width: 2.4; }
.done-t { flex: 1; min-width: 0; font-weight: 600; line-height: 1.35; }
.done-more { flex: none; font-size: 0.86rem; font-weight: 700; color: var(--green-deep); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--green); }
.done[open] .done-more { font-size: 0; }
.done[open] .done-more::after { content: "Hide"; font-size: 0.86rem; }
.done-body { padding: 4px 0 16px; }
.done-body > .pack { box-shadow: none; }

/* The prepared work, to review */
.pack { position: relative; border: var(--line) solid var(--ink); border-radius: var(--r-md); padding: 14px 20px 16px; background: var(--white); transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.pack.is-approved { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-wash); }
.pack-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding-bottom: 10px; border-bottom: 2px dotted rgba(34, 50, 44, 0.3); }
.pack-head h4 { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.2rem; }
.pack-head h4:focus { outline: none; }
.state-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); font-size: 0.78rem; font-weight: 700; }
.state-tag.is-review { background: var(--mustard); }
.state-tag.is-ok { background: var(--green); color: var(--white); }
.state-tag.is-ok .tiny path { stroke: var(--white); stroke-width: 2.4; }
.pack h5, .more-body h5 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 8px; margin: 14px 0 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.h5-note { font-size: 0.88rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--green); }

.glance { display: grid; margin-top: 6px; }
.fields li + li { margin-top: 4px; }
.field { width: 100%; display: grid; grid-template-columns: 7.6em minmax(0, 1fr); gap: 10px; text-align: left; padding: 9px 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; line-height: 1.35; }
.glance li + li, .fields li + li { border-top: 1px solid rgba(34, 50, 44, 0.12); }
button.field:hover, button.field:focus-visible, .field.hot { border-color: var(--ink); background: var(--mustard-wash); }
.field-l { color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; }
.field-v { font-weight: 600; }

.flag-line, .person-note { margin-top: 12px; padding: 2px 0 2px 14px; border-left: 4px solid var(--mustard); font-size: 0.97rem; line-height: 1.5; transition: background-color 0.18s ease; }
.person-note { border-left-color: var(--brick); }
.flag-line.hot, .person-note.hot { background: var(--mustard-wash); }

/* Details on demand */
.mores { margin-top: 14px; border-top: 2px dotted rgba(34, 50, 44, 0.3); }
.more { border-bottom: 1px solid rgba(34, 50, 44, 0.12); }
.more:last-child { border-bottom: 0; }
.more > summary { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 4px; cursor: pointer; list-style: none; border-radius: var(--r-sm); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: ""; flex: none; width: 8px; height: 8px; margin: 0 4px 0 2px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(-45deg); transition: transform 0.18s ease; }
.more[open] > summary::before { transform: rotate(45deg); }
.more > summary:hover { background: var(--paper); }
.more-t { flex: 1; font-weight: 700; }
.more-m { font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); text-align: right; }
.more-body { padding: 2px 4px 16px; }
.more-body > :first-child { margin-top: 4px; }

.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 6px; border-top: 1px solid rgba(34, 50, 44, 0.12); border-radius: 6px; line-height: 1.35; transition: background-color 0.18s ease; }
.checklist li:first-child { border-top: 0; }
.ck-box { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; border: 2px solid var(--ink); background: var(--white); }
.ck-box .tiny path { stroke-width: 2.4; }
.ck-have .ck-box { background: var(--green-wash); }
.ck-mentioned .ck-box, .ck-confirm .ck-box, .ck-listed .ck-box { border-style: dashed; }
.ck-missing .ck-box { background: var(--mustard); }
.ck-l { font-weight: 600; }
.ck-n { font-size: 0.86rem; color: var(--ink-soft); text-align: right; }
.ck-missing .ck-n { color: var(--brick); font-weight: 700; }
.checklist li.hot, .checklist li:focus-visible { background: var(--mustard-wash); }

/* A drafted message, on paper */
.letter { position: relative; border-left: 3px solid rgba(34, 50, 44, 0.3); padding: 10px 16px; background: var(--paper); font-size: 0.97rem; line-height: 1.6; }
.letter p + p, .letter ul + p { margin-top: 8px; }
.letter-to { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px dotted rgba(34, 50, 44, 0.3); font-size: 0.88rem; font-weight: 700; }
.letter-to span { color: var(--ink-soft); margin-right: 4px; }
.letter-subject { font-weight: 700; }
.letter.is-approved { border-left-color: var(--green); }

/* The short working moment before the prepared card */
.working { border: 0; padding: 6px 2px; background: transparent; }
.work-steps { display: grid; gap: 8px; padding-block: 4px; }
.work-steps li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink-soft); animation: work-on 0.25s ease backwards; animation-delay: calc(var(--w) * 300ms); }
.work-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); animation: work-dot 0.3s ease forwards; animation-delay: calc(var(--w) * 300ms + 260ms); }
@keyframes work-on { from { opacity: 0; transform: translateY(6px); } }
@keyframes work-dot { to { background: var(--green); border-color: var(--green-deep); } }

/* Where a person decides */
.gate { padding: 16px 18px; border-radius: var(--r-md); background: var(--blush); border: var(--line) solid var(--ink); }
.gate-kicker { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.08rem; line-height: 1.3; }
.review-dot { flex: none; width: 12px; height: 12px; border-radius: 3px; background: var(--brick); border: 2px solid var(--ink); }
.gate-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 12px; }
.check { flex: 1 1 18em; display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; cursor: pointer; font-weight: 600; line-height: 1.4; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--green); }
.approve-hint:empty { display: none; }
.approve-hint { margin-top: 8px; font-size: 0.92rem; font-weight: 700; color: var(--brick-deep); }
.approve-hint.nudge { animation: nudge 0.3s ease; }

/* The settled end: the result, what stays with people, one next step */
.outcome { position: relative; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-md); background: var(--green); color: var(--white); }
.outcome:focus, .working:focus { outline: none; }
.outcome h4 { max-width: 15em; margin-top: 12px; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 500; font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.12; }
.outcome-text { margin-top: 10px; max-width: 34em; font-size: 1.08rem; line-height: 1.5; }
.outcome-still { margin-top: 8px; max-width: 34em; font-size: 0.95rem; color: var(--on-green-soft); }
.outcome .btn { margin-top: 20px; border-color: var(--ink); box-shadow: 0 4px 0 var(--green-deep); }
.outcome :focus-visible { outline-color: var(--mustard); }
.stamp { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 8px; border-radius: 999px; background: var(--white); color: var(--green-deep); font-size: 0.88rem; font-weight: 700; }
.stamp .tiny path { stroke: var(--green-deep); stroke-width: 2.4; }
.anim .outcome .stamp { animation: badge-in 0.3s ease-out 0.15s backwards; }
@keyframes badge-in { from { opacity: 0; transform: scale(0.85); } }

/* Motion: only moving forward, quick enough never to wait for. New items rise 12px in sequence. */
.anim .reveal { animation: rise 0.4s var(--ease-out) backwards; animation-delay: calc(min(var(--i, 0), 10) * 70ms + 60ms); }
.anim mark.trace, .anim .att.trace { animation: trace 0.8s ease backwards; animation-delay: calc(min(var(--i, 0), 10) * 70ms); }
.more.anim .more-body { animation: rise 0.32s var(--ease-out) backwards; }

@media (max-width: 900px) {
  .inside-grid { grid-template-columns: 1fr; }
  .inside-scene { display: none; }
}
@media (max-width: 600px) {
  .demo-surface { --dpad: 0px; background: transparent; border: 0; border-radius: 0; padding: 0; }
  .progress { flex-wrap: nowrap; gap: 4px; }
  .progress li + li::before { width: 8px; }
  .progress li:not(.is-current) .pl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .progress li:not(.is-current) .pstep { padding: 4px; }
  .progress .is-current { min-width: 0; flex: 0 1 auto; }
  .progress .is-current .pstep { min-width: 0; padding-right: 12px; border-radius: 22px; }
  .progress .is-current .pl { line-height: 1.15; }
  .req, .pack, .letter { padding: 14px; }
  .field { grid-template-columns: 1fr; gap: 0; }
  .checklist li { grid-template-columns: 22px minmax(0, 1fr); }
  .ck-n { grid-column: 2; text-align: left; }
  .task-act .btn, .gate-row .btn { flex: 1 1 auto; width: 100%; }
  .more-m { display: none; }
}

/* A workflow written as a row of stages (industries page) */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.flow li { display: inline-flex; align-items: center; gap: 8px; }
.flow li + li::before { content: "→"; color: var(--ink-soft); font-weight: 700; }
.flow span { padding: 4px 12px; border-radius: 999px; background: var(--paper-2); font-size: 0.92rem; font-weight: 600; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(48px, 8vw, 108px); }
.section-tight { padding-block: clamp(32px, 5vw, 64px); }
.band-green { background: var(--green); color: var(--white); }
.band-green .soft { color: var(--on-green-soft); }
.band-deep { background: var(--paper-2); }
.section-head { max-width: 44em; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head p { margin-top: 16px; }

/* How we work, in one line (home) */
.how-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; }
.how-strip h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.how-strip p { margin-top: 8px; }
.band-green .btn { border-color: var(--ink); box-shadow: 0 4px 0 var(--green-deep); }

/* Route (process) */
.route { position: relative; display: grid; gap: 0; counter-reset: stop; }
.route > li { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 clamp(16px, 3vw, 36px); padding-bottom: clamp(28px, 4vw, 48px); counter-increment: stop; }
.route > li::before { content: counter(stop); grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--mustard); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 1.5rem; position: relative; z-index: 1; }
.route > li::after { content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; border-left: 3px dashed var(--ink); }
.route > li:last-child { padding-bottom: 0; }
.route > li:last-child::after { display: none; }
.route h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); grid-column: 2; padding-top: 8px; }
.route p { grid-column: 2; margin-top: 10px; max-width: 42em; }
.route p.route-line { margin-top: 6px; line-height: 1.5; }
.route p.route-line:first-of-type { margin-top: 14px; }
.route-line strong { color: var(--green); }
.band-green .route > li::after { border-color: var(--paper); }
.band-green .route > li::before { color: var(--ink); border-color: var(--ink); }

/* Two columns of prose + aside */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; } }
.prose p + p { margin-top: 1em; }
.prose h2 + p, .prose h3 + p { margin-top: 14px; }
.prose h3 { margin-top: 1.6em; }
.prose ul { margin-top: 12px; }
.prose ul li { position: relative; padding-left: 26px; margin-top: 8px; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 11px; height: 11px; border-radius: 50%; background: var(--mustard); border: 2px solid var(--ink); }

/* Measures */
.measures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.measures li { padding-top: 16px; border-top: var(--line) solid currentColor; }
.measures h3 { font-size: 1.25rem; margin-bottom: 8px; }
.measures p { font-size: 0.98rem; line-height: 1.5; }
.band-green .measures p { color: var(--on-green-soft); }
@media (max-width: 900px) { .measures { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .measures { grid-template-columns: 1fr; } }

/* Solutions page */
.area { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 72px); padding-block: clamp(36px, 6vw, 72px); border-top: var(--line) solid var(--ink); scroll-margin-top: 20px; }
.area-ico { width: 72px; margin-bottom: 18px; }
.area h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.area-intro p { margin-top: 14px; max-width: 30em; }
.area-measure { margin-top: 20px; font-size: 0.98rem; padding: 2px 0 2px 14px; border-left: 4px solid var(--mustard); }
.cases li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 14px; padding-block: 14px; border-top: 2px dotted rgba(34, 50, 44, 0.3); line-height: 1.5; }
.cases li:first-child { border-top: 0; padding-top: 0; }
.cases strong { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.1rem; }
.area .split { grid-template-columns: 1fr 1fr; margin-top: 22px; }
.area .split h3 { font-size: 1.1rem; }
.area .split li { font-size: 0.98rem; }
@media (max-width: 820px) { .area { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .area .split { grid-template-columns: 1fr; gap: 14px; }
  .area .split > div { background: none; border-radius: 0; padding: 0 0 0 14px; border-left: 4px solid var(--green); }
  .area .split > .split-you { border-left-color: var(--brick); margin-top: 14px; }
  .area .split h3 { margin-bottom: 4px; font-family: var(--sans); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
  .area .split li { margin-top: 4px; padding-left: 0; }
  .area .split li::before { display: none; }
  .cases li { grid-template-columns: 1fr; gap: 2px; }
}
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.jump a { padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 0.95rem; background: var(--white); }
.jump a:hover { background: var(--mustard-wash); }

/* Industries page */
.biz { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: clamp(20px, 5vw, 64px); align-items: start; padding-block: clamp(32px, 5vw, 64px); border-top: var(--line) solid var(--ink); scroll-margin-top: 20px; }
.biz-illo { padding: 0 8px; border-bottom: var(--line) solid var(--ink); }
.biz h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.biz-body > p { margin-top: 14px; max-width: 40em; }
.biz-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; margin-top: 22px; }
.biz-cols h3 { font-size: 1.1rem; margin-bottom: 6px; }
.biz-cols li { position: relative; padding-left: 24px; margin-top: 6px; line-height: 1.45; font-size: 0.99rem; }
.biz-cols li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); background: var(--green); }
.biz-cols div + div li::before { background: var(--brick); border-radius: 3px; }
.biz .btn-row { margin-top: 24px; }
/* Tablet story columns need the full measure beside their time labels. */
@media (min-width: 701px) and (max-width: 900px) { .biz { grid-template-columns: 1fr; } .biz-illo { max-width: 200px; } }
@media (max-width: 700px) { .biz { grid-template-columns: 1fr; } .biz-illo { max-width: 200px; } .biz-cols { grid-template-columns: 1fr; } }
.elsewhere { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.elsewhere li { background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--r-md); padding: 20px; }
.elsewhere h3 { font-size: 1.2rem; margin-bottom: 6px; }
.elsewhere p { font-size: 0.98rem; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 820px) { .elsewhere { grid-template-columns: 1fr; } }

.biz-lead { margin-top: 14px; max-width: 40em; }
.biz-times li { display: grid; grid-template-columns: 6.4em minmax(0, 1fr); gap: 10px; padding-block: 7px; border-top: 1px solid rgba(34, 50, 44, 0.14); line-height: 1.45; font-size: 0.97rem; }
.biz-times li:first-child { border-top: 0; padding-top: 0; }
.biz-cols .biz-times li { padding-left: 0; margin-top: 0; }
.biz-cols .biz-times li::before { display: none; }
.biz-t { font-weight: 700; color: var(--ink-soft); font-size: 0.9rem; }
.biz-hand .biz-t { color: var(--brick); }
.biz-split { padding-top: 18px; border-top: 2px dotted rgba(34, 50, 44, 0.3); }
.also { margin-top: 18px; font-weight: 600; line-height: 1.7; color: var(--ink-soft); }
@media (max-width: 460px) { .biz-times li { grid-template-columns: 1fr; gap: 0; } }

/* About: the work sample gets the room */
.sample-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px clamp(24px, 4vw, 48px); counter-reset: pt; }
.sample-points li { counter-increment: pt; padding-top: 16px; border-top: var(--line) solid var(--ink); }
.sample-points li::before { content: counter(pt); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 50%; border: var(--line) solid var(--ink); background: var(--mustard); font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.sample-points h3 { margin-bottom: 8px; }
.sample-points p { color: var(--ink-soft); }
.sample-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 24px; margin-top: clamp(28px, 4vw, 44px); }
.sample-links a { display: flex; gap: 10px; align-items: flex-start; height: 100%; padding: 14px 0 16px; border-top: var(--line) solid var(--ink); text-decoration: none; line-height: 1.35; }
.sample-links a:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--brick); }
.sample-links .swatch { margin-top: 4px; }
.sample-links strong { display: block; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.05rem; margin-bottom: 2px; }
.sample-links span span, .sample-links a > span:last-child { font-size: 0.92rem; color: var(--ink-soft); }
.sample-links strong { color: var(--ink); }
@media (max-width: 1000px) { .sample-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sample-points { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .sample-links { grid-template-columns: 1fr; } }
.monos { display: flex; gap: 10px; margin-bottom: 18px; }
.mono { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; border: var(--line) solid var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.6rem; }
.mono-s { background: var(--mustard); }
.mono-h { background: var(--sky); }
.principles li { margin-top: 10px; line-height: 1.5; }
.principles li::before { display: none; }
.prose .principles li { padding-left: 0; }

/* FAQ */
.faq { border-top: var(--line) solid var(--ink); }
.faq details { border-bottom: var(--line) solid var(--ink); }
/* Answers slide open and closed where the browser supports it; elsewhere they open instantly. */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.35s var(--ease-out), content-visibility 0.35s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) { .faq details::details-content { transition: none; } }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 4px; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white) linear-gradient(var(--ink), var(--ink)) center / 14px 2.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2.5px 14px no-repeat; background-color: var(--white); background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink)); background-size: 14px 2.5px, 2.5px 14px; background-position: center; background-repeat: no-repeat; transition: background-size 0.2s ease, background-color 0.2s ease; }
.faq details[open] summary::after { background-size: 14px 2.5px, 2.5px 0; background-color: var(--mustard); }
.faq summary:hover { color: var(--green); }
.faq .answer { padding: 0 4px 24px; max-width: 44em; }
.faq .answer p + p { margin-top: 0.8em; }

/* About */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 32px); }
.person { border-top: var(--line) solid var(--ink); padding-top: 20px; display: grid; grid-template-columns: 110px 1fr; gap: 20px 24px; align-items: start; }
.person .art { width: 110px; height: auto; }
.person h3 { font-size: 1.9rem; }
.person p { margin-top: 10px; line-height: 1.55; }
.person .todo { font-size: 0.92rem; color: var(--ink-soft); }
@media (max-width: 820px) { .people { grid-template-columns: 1fr; } }
@media (max-width: 440px) { .person { grid-template-columns: 1fr; } .person .art { width: 84px; } }
.beliefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 5vw, 72px); }
.beliefs li { padding-block: 22px; border-top: var(--line) solid currentColor; }
.beliefs h3 { margin-bottom: 8px; }
@media (max-width: 760px) { .beliefs { grid-template-columns: 1fr; } }

/* Contact */
.brief-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .brief-layout { grid-template-columns: 1fr; } }
.q { border: 0; padding: 0; margin: 0 0 clamp(28px, 4vw, 44px); min-width: 0; }
.q legend, .q > label.q-title { display: block; padding: 0; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.2; margin-bottom: 6px; }
.q .help { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
/* The real input sits invisibly over the pill, but taps must land on the label, not on it:
   Safari on iPhone passes over a tap on a fully transparent input, so the chip never
   changes. With the input out of the way the tap reaches the label, which ticks it.
   Keyboard focus and screen readers still reach the input itself. */
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 46px; padding: 8px 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font-weight: 600; line-height: 1.25; transition: background-color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .chip:hover input + span { background: var(--mustard-wash); } }
.chip input:checked + span { background: var(--green); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--brick); outline-offset: 3px; }
.field-text { display: block; width: 100%; padding: 12px 16px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--white); min-height: 48px; }
textarea.field-text { min-height: 140px; resize: vertical; line-height: 1.5; }
.field-text:focus-visible { outline-offset: 2px; }
.field-error { margin-top: 8px; color: var(--brick); font-weight: 600; }
.field-text[aria-invalid="true"] { border-color: var(--brick); box-shadow: 0 0 0 2px rgba(179, 67, 43, 0.18); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.lbl { display: block; font-weight: 600; margin-bottom: 6px; }
.lbl small { font-weight: 400; color: var(--ink-soft); }
.sub { margin-top: 14px; }

.brief-card { position: sticky; top: 20px; background: var(--white); border: var(--line) solid var(--ink); border-radius: var(--r-lg); padding: clamp(18px, 2.6vw, 30px); box-shadow: 0 8px 0 var(--ink); }
@media (max-width: 900px) { .brief-card { position: static; } }
.brief-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.brief-top h2 { font-size: 1.7rem; }
.brief-top .soft { margin-top: 4px; font-size: 0.95rem; }
.brief-illo { width: 84px; flex: none; }
.brief-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--sans); font-size: 0.98rem; line-height: 1.55; background: var(--paper); border-radius: var(--r-sm); padding: 16px; margin: 0; max-height: 440px; overflow: auto; }
.brief-card .btn-row { margin-top: 18px; }
.brief-status { margin-top: 14px; font-size: 0.97rem; font-weight: 600; min-height: 1.5em; }
.brief-status[data-kind="warn"] { color: var(--brick); }
.brief-status[data-kind="ok"] { color: var(--green); }
.brief-fine { margin-top: 10px; font-size: 0.9rem; color: var(--ink-soft); }
.expect { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; }
.expect h3 { margin-bottom: 8px; }
@media (max-width: 760px) { .expect { grid-template-columns: 1fr; } }

/* Closing call + footer */
.closing { text-align: left; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.closing h2 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); max-width: 14em; }
.closing p { margin-top: 16px; max-width: 34em; }
@media (max-width: 760px) { .closing { grid-template-columns: 1fr; } }

.site-foot { background: var(--ink); color: var(--paper); padding-block: clamp(36px, 5vw, 64px) 28px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.site-foot p { color: var(--on-ink-soft); margin-top: 12px; max-width: 26em; font-size: 0.98rem; }
.site-foot h2 { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; letter-spacing: 0; margin-bottom: 10px; color: var(--mustard); }
.site-foot li a { display: inline-block; padding: 5px 0; text-decoration: none; }
.site-foot li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-foot :focus-visible { outline-color: var(--mustard); }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

.noscript-note { background: var(--mustard-wash); border: 2px dashed var(--ink); border-radius: var(--r-md); padding: 16px 20px; margin-block: 20px; }
/* Without JavaScript: let the street's note fit the screen, and hide controls and empty drawing slots that only work with it. */
html:not(.js) .street-row { min-width: 0; }
html:not(.js) .street-tools,
html:not(.js) .biz-illo,
html:not(.js) .biz a[href*="#street"],
html:not(.js) #brief-form > :not(noscript),
html:not(.js) .brief-card { display: none; }
html:not(.js) .brief-layout { display: block; }

/* ---------- Pinned steps ----------
   One step on screen at a time, handing over to the next as the page
   scrolls: the workflow chapters and the stages on How we work. js/steps.js
   adds these classes, sets the track's height and each step's opacity and
   position, and is not started with reduced motion. A page sets --pin-top
   (how far below the top of the screen the step sits) and its own spacing. */
.pin-track { --pin-head: 48px; position: relative; margin-top: calc(var(--pin-head) * -1); pointer-events: none; }
.pin-track > .pin-view {
  --pin-edge: 10px; /* room for card shadows and focus rings inside the clipped view */
  position: sticky; top: calc(var(--pin-top, 14px) - var(--pin-head)); display: block;
  height: calc(100vh - var(--pin-top, 14px) + var(--pin-head)); height: calc(100svh - var(--pin-top, 14px) + var(--pin-head));
  margin-inline: calc(var(--pin-edge) * -1); padding-top: var(--pin-head);
  overflow: hidden; overflow: clip;
  /* --pin-head is clear space above a resting step, so one lifting away is not cut off. A tall step that has panned fades out under the top edge. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent var(--pin-cut, 0px), #000 calc(var(--pin-cut, 0px) + var(--pin-fade, 0px)), #000 calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, transparent var(--pin-cut, 0px), #000 calc(var(--pin-cut, 0px) + var(--pin-fade, 0px)), #000 calc(100% - 36px), transparent 100%);
}
.pin-view > .pin-step { position: absolute; left: var(--pin-edge); right: var(--pin-edge); top: var(--pin-head); margin: 0; opacity: 0; transition: none; }
.pin-view > .pin-step.pin-on { z-index: 1; pointer-events: auto; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .van { transform: translateX(min(62vw, 760px)); }
  .bike { transform: translateX(min(24vw, 300px)); }
  .cloud { transform: translateX(18vw); }
}

/* A history restore waits on the page's paper while the street paints.
   Just under opaque, so the street beneath keeps its painted tiles. */
.door-paper { position: fixed; inset: 0; z-index: 10000; display: none; background: var(--paper); opacity: 0.999; pointer-events: none; }
html.door-return-pending .door-paper { display: block; }

/* Only the camera is captured. Rooms and controls retain their live layers. */
html.door-snapshot { view-transition-name: none; }
html.door-snapshot::view-transition { pointer-events: none; }
html.door-snapshot::view-transition-group(door-camera) { animation: none; }
html.door-snapshot::view-transition-new(door-camera) { display: none; }
html.door-snapshot::view-transition-old(door-camera) {
  animation: door-camera-move var(--door-ms, 460ms) linear both, door-camera-light var(--door-snapshot-fade-duration) cubic-bezier(0.4, 0, 0.2, 1) var(--door-snapshot-fade-delay) both, door-snapshot-hold 30s linear both;
  animation-play-state: paused;
  mix-blend-mode: normal;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transform-origin: var(--door-snapshot-origin);
  transform: var(--door-snapshot-transform);
  opacity: var(--door-snapshot-opacity);
}
html.door-snapshot-running::view-transition-old(door-camera) { animation-play-state: running; }
@keyframes door-snapshot-hold { from, to {} }

/* Leaving, the stop's controls are live captures above the camera. They
   arrive over the last stretch of the pull-back, as the street settles. */
html.door-snapshot::view-transition-group(door-ui-hud),
html.door-snapshot::view-transition-group(door-ui-progress),
html.door-snapshot::view-transition-group(door-ui-caption) { animation: none; z-index: 2; }
html.door-snapshot::view-transition-old(door-ui-hud),
html.door-snapshot::view-transition-old(door-ui-progress),
html.door-snapshot::view-transition-old(door-ui-caption) { display: none; }
html.door-snapshot::view-transition-new(door-ui-hud),
html.door-snapshot::view-transition-new(door-ui-progress),
html.door-snapshot::view-transition-new(door-ui-caption) { animation: door-ui-in var(--door-ms, 460ms) linear both, door-snapshot-hold 30s linear both; animation-play-state: paused; mix-blend-mode: normal; }
html.door-snapshot-running::view-transition-new(door-ui-hud),
html.door-snapshot-running::view-transition-new(door-ui-progress),
html.door-snapshot-running::view-transition-new(door-ui-caption) { animation-play-state: running; }
@keyframes door-ui-in { 0%, 60% { opacity: 0; } 100% { opacity: 1; } }
