/* Rewirely. Built on the PatternOS design language (navi-chat/DESIGN.md, Night Desk):
   monochrome rooms and ink, hairlines, Inter, mono for measurements.
   Pure monochrome, no accent colour: emphasis is weight, size and solid fills. The only exception is the
   red used for an error message. Light by default; follows the visitor's system in dark mode the same way
   patternsystems.ai does (Haydn, 3 Nov; replaces "no dark mode", 30 Oct). Every colour is a token below, so
   dark mode is the one override block after :root. */
:root {
  --room-0: oklch(0.965 0.002 250);
  --room-1: oklch(1 0 0);
  --room-2: oklch(0.955 0.002 250);
  --room-3: oklch(0.935 0.003 250);
  --ink: oklch(0.17 0.004 250);
  --ink-2: oklch(0.40 0.004 250);
  --ink-3: oklch(0.50 0.003 250);
  --ink-muted: oklch(0.52 0.003 250);
  --line: oklch(0 0 0 / 0.10);
  --line-soft: oklch(0 0 0 / 0.06);
  --line-strong: oklch(0 0 0 / 0.18);
  --money-ink: var(--ink);
  --bad: #C8352E;
  --r-chip: 4px; --r-control: 6px; --r-card: 10px; --r-sheet: 14px;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

/* Dark mode: whatever the visitor's system is set to (Haydn, 3 Nov). Same greys as the site's
   dark palette (paper 10 10 11, ink 244 244 246), expressed in the rooms-and-ink tokens. */
@media (prefers-color-scheme: dark) {
  :root {
    --room-0: oklch(0.155 0.004 250);
    --room-1: oklch(0.20 0.004 250);
    --room-2: oklch(0.24 0.004 250);
    --room-3: oklch(0.29 0.004 250);
    --ink: oklch(0.965 0.002 250);
    --ink-2: oklch(0.78 0.003 250);
    --ink-3: oklch(0.68 0.003 250);
    --ink-muted: oklch(0.62 0.003 250);
    --line: oklch(1 0 0 / 0.12);
    --line-soft: oklch(1 0 0 / 0.07);
    --line-strong: oklch(1 0 0 / 0.22);
    --bad: #FF786E;
    color-scheme: dark;
  }
  /* The Pattern Systems wordmark is a black SVG; invert it rather than ship a second file. */
  .foot img { filter: invert(1); }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--room-0); color: var(--ink); font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
::selection { background: var(--room-3); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-control); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.num, .money { font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.money { color: var(--money-ink); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }

/* Shared bar */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 20px; background: color-mix(in oklch, var(--room-0) 88%, transparent); backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px); border-bottom: 1px solid var(--line-soft); }
.mark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; text-decoration: none; }
.wm { font: 600 21px/1 var(--sans); letter-spacing: -0.045em; color: var(--ink); }
.wm-i { position: relative; display: inline-block; }
.wm-dot { position: absolute; left: 50%; top: 0; width: 0.22em; height: 0.22em; margin-left: -0.11em; border-radius: 50%; background: var(--ink); }
.bar-right { display: flex; align-items: center; gap: 12px; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-control); border: 1px solid transparent; font: 500 14px var(--sans); cursor: pointer; background: var(--room-2); color: var(--ink); text-decoration: none; transition: background .15s, color .15s, border-color .15s, transform .15s var(--ease); white-space: nowrap; }
.btn:hover { background: var(--room-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--room-1); }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 32px; font-size: 13px; padding: 0 12px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; }
input, textarea { font: 400 16px/1.45 var(--sans); color: var(--ink); background: var(--room-1); border: 1px solid var(--line); border-radius: var(--r-control); padding: 11px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; caret-color: var(--ink); }
input:focus, textarea:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--line-soft); }
input::placeholder, textarea::placeholder { color: var(--ink-muted); }
.label { display: block; font: 500 13px var(--sans); color: var(--ink-2); margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }
.error { color: var(--bad); font-size: 13px; margin: 8px 0 0; }
.muted { color: var(--ink-3); }

h1, h2, h3 { text-wrap: balance; }

/* ═══ Marketing page ═══ */
.site main { width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; padding-block: 56px 80px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.02; letter-spacing: -0.04em; font-weight: 600; margin: 0 0 20px; }
.hero .lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); max-width: 30em; margin: 0 0 16px; }
.hero .lede-for { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 30em; margin: 0 0 28px; }
/* Cookie consent (ga.js): same wording and choice as the Pattern Systems site */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 20px; background: var(--room-1); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -30px rgba(0,0,0,.45); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.consent p { flex: 1 1 320px; margin: 0; }
.consent a { color: inherit; text-decoration: underline; }
.consent-acts { display: flex; gap: 10px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.perks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 15px; }
.perks svg { flex: none; width: 20px; height: 20px; color: var(--ink); }

/* The preview: the real map component with example data */
.preview { margin: 0; position: relative; background: var(--room-1); border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: 0 24px 48px -28px oklch(0 0 0 / .25), 0 2px 6px -2px oklch(0 0 0 / .06); overflow: hidden; }
.preview-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-3); }
.preview-tag { font: 500 11px var(--sans); padding: 2px 7px; border-radius: var(--r-chip); background: var(--room-2); color: var(--ink-3); }
/* Hero demo: tabs, a chat that grows the box, then the result in its place */
.preview-head { gap: 12px; }
.d-tabs { display: flex; gap: 2px; padding: 2px; border-radius: var(--r-control); background: var(--room-2); overflow-x: auto; scrollbar-width: none; }
.d-tab { font: 500 12px var(--sans); color: var(--ink-3); background: none; border: 0; border-radius: 4px; padding: 5px 10px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.d-tab:hover { color: var(--ink); }
.d-tab[aria-selected="true"] { background: var(--room-1); color: var(--ink); box-shadow: 0 1px 2px oklch(0 0 0 / .08); }
.demo-body { overflow: hidden; transition: height .5s var(--ease); }
.demo-chat { display: flex; flex-direction: column; gap: 9px; padding: 16px; max-height: 360px; overflow: hidden; transition: opacity .2s; -webkit-mask-image: linear-gradient(transparent, #000 36px); mask-image: linear-gradient(transparent, #000 36px); }
.demo-chat.out { opacity: 0; }
.d-msg { margin: 0; max-width: 86%; font-size: 13.5px; line-height: 1.45; animation: rise .35s var(--ease) both; }
.d-msg.bot { align-self: flex-start; color: var(--ink); }
.d-msg.me { align-self: flex-end; background: var(--room-2); padding: 7px 11px; border-radius: var(--r-card) var(--r-card) 3px var(--r-card); }
.d-typing { display: flex; gap: 4px; padding: 6px 0; }
.d-typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite both; }
.d-typing span:nth-child(2) { animation-delay: .15s } .d-typing span:nth-child(3) { animation-delay: .3s }
.d-working { display: flex; align-items: center; gap: 10px; margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); animation: rise .3s var(--ease) both; }
.d-run { width: 48px; height: 3px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.d-run::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--ink); animation: run 1.1s var(--ease) infinite; }

.demo-result { padding: 18px 20px 16px; }
.demo-result.in > * { animation: rise .45s var(--ease) both; }
.demo-result.in > :nth-child(2) { animation-delay: .06s } .demo-result.in > :nth-child(3) { animation-delay: .2s }
.demo-result.in .lk { animation: rise .45s var(--ease) both; }
.demo-result.in .lk:nth-child(1) { animation-delay: .28s } .demo-result.in .lk:nth-child(2) { animation-delay: .38s } .demo-result.in .lk:nth-child(3) { animation-delay: .48s }
.demo-result.in > .rs-foot { animation-delay: .6s }
.r-badge { display: inline-block; margin: 0; padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--room-1); font-size: 12px; font-weight: 600; }
.rs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rs-who { font-size: 12.5px; color: var(--ink-3); text-align: right; }
/* The focal point: two figures, nothing else at this size */
.rs-stats { display: flex; gap: 36px; margin: 16px 0 18px; }
.rs-stats p { margin: 0; display: grid; gap: 2px; }
.rs-num { font-size: 30px; line-height: 1.05; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--ink); }
.rs-stats p:first-child .rs-num { width: max-content; }
.rs-lbl { font-size: 12.5px; color: var(--ink-3); }
.rs-cons { margin: -6px 0 14px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.rs-cons strong { color: var(--ink); font-weight: 600; }
/* Leak, fix, saves: a plain table, grouped by space and hairlines, no boxes */
.lk-head, .lk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 88px; gap: 16px; }
.lk-head { padding: 0 0 6px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.lk-head span:last-child { text-align: right; }
.lk-list { list-style: none; margin: 0; padding: 0; }
.lk { padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: start; }
.lk-leak, .lk-fix { display: grid; gap: 2px; font-size: 13px; line-height: 1.35; }
.lk-leak strong { font-weight: 600; color: var(--ink); }
.lk-leak span { color: var(--ink-3); }
.lk-fix span { color: var(--ink-2); }
.lk-tool { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink); }
.lk-tool.lk-custom { justify-self: start; padding: 1px 7px; border-radius: 4px; background: var(--ink); color: var(--room-1); font-weight: 500; }
.lk-save small { display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); }
.lk-save { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--money-ink); text-align: right; }
.rs-foot { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }
.rs-custom { display: flex; align-items: center; gap: 14px; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-card); background: var(--room-0); }
.rs-custom p { margin: 0; flex: 1; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.rs-custom strong { color: var(--ink); font-weight: 600; }
.rs-custom .btn { flex: none; }
.demo-result.in > .rs-custom { animation-delay: .6s }
.verdict .r-badge { margin: 0 0 10px; }
.r-who { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-3); }
.r-title { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.nw { white-space: nowrap; }
.r-hl { color: inherit; font-variant-numeric: tabular-nums; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.r-sub { margin: 6px 0 14px; font-size: 13px; color: var(--ink-2); }
.r-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.r-item { padding: 12px 14px; border-radius: var(--r-card); background: var(--room-0); border: 1px solid var(--line-soft); }
.r-top { display: flex; align-items: baseline; gap: 10px; }
.r-n { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--room-1); font-size: 11px; font-weight: 600; align-self: center; }
.r-problem { flex: 1; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.r-cost { flex: none; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--money-ink); }
.r-cost small { font-size: 11.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.r-how { margin: 5px 0 9px 30px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.r-tool { display: inline-flex; align-items: center; gap: 6px; margin-left: 30px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink); background: var(--room-1); border: 1px solid var(--line); }
.r-tool svg { width: 13px; height: 13px; }
.r-tool em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.r-tool.r-free svg { color: var(--ink); }
.r-tool.r-custom { background: var(--ink); color: var(--room-1); border-color: var(--ink); }
.r-tool.r-custom em { color: var(--room-1); opacity: .7; }
.r-foot { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); }

.band { padding: 88px 0; border-top: 1px solid var(--line-soft); }
.band h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 14px; max-width: 18em; }
.band .intro { color: var(--ink-2); font-size: 17px; max-width: 34em; margin: 0 0 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 22px 24px 0 0; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line-soft); }
.step h3 { font-size: 17px; letter-spacing: -0.01em; margin: 0 0 8px; font-weight: 600; }
.step p { margin: 0; color: var(--ink-2); }
.step .wire { display: block; height: 2px; width: 28px; background: var(--ink); margin-bottom: 18px; }
.step:last-child .wire { background: var(--ink); }

/* What it covers: icon, name, one plain line. No boxes */
.parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 32px; }
.parts h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; letter-spacing: -0.01em; font-weight: 600; margin: 0 0 6px; }
.parts h3 svg { flex: none; width: 20px; height: 20px; color: var(--ink); }
.parts p { margin: 0 0 0 30px; color: var(--ink-2); font-size: 14.5px; }

.honest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.honest ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.honest li { padding-left: 22px; position: relative; color: var(--ink-2); }
.honest li::before { content: ""; position: absolute; left: 0; top: .68em; width: 10px; height: 2px; background: var(--ink); }
.honest li strong { color: var(--ink); font-weight: 600; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; flex: none; margin-top: 6px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 10px; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); max-width: 40em; }

.closer { padding: 96px 0; text-align: center; border-top: 1px solid var(--line-soft); }
.closer h2 { margin: 0 auto 14px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.035em; font-weight: 600; line-height: 1.08; max-width: 16em; }
.closer p { color: var(--ink-2); margin: 0 0 28px; }
/* Footer: black on white in light mode, the Pattern Systems logo as it is (Haydn, 23 Oct); follows the
   scheme in dark mode like the rest of the page, logo inverted (Haydn, 3 Nov) */
.foot { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--ink); background: var(--room-1); padding: 28px 20px 36px; border-top: 1px solid var(--line-soft); }
.foot .ps { display: inline-flex; }
.foot img { display: block; width: 132px; height: auto; }
.foot .foot-link { color: var(--ink); margin-left: 12px; text-decoration: underline; text-underline-offset: 2px; }
.ps-dark { display: none !important; }
.foot { flex-wrap: wrap; }
.foot .foot-regions { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 6px; }
.foot .foot-regions a { color: var(--ink); text-underline-offset: 2px; }
.foot .foot-regions a[aria-current] { font-weight: 600; text-decoration: none; }
.app .foot { display: none; }

/* ═══ The business map (shared by the preview, the workspace and the report) ═══ */
.map-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.map-total .lbl { font-size: 13px; color: var(--ink-3); display: grid; gap: 2px; }
.map-total .lbl em { font-style: normal; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.map-total .money { font-size: 28px; font-weight: 600; line-height: 1; }
.map-total .per { font-size: 12px; color: var(--ink-3); margin-left: 4px; font-family: var(--sans); letter-spacing: 0; }
.map-list { list-style: none; margin: 0; padding: 0; }
.map-row { position: relative; padding: 9px 0 9px 22px; }
.map-row::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.map-row.done::before { background: var(--ink); }
.map-row.now::before { background: linear-gradient(var(--ink) 16px, var(--line) 16px); }
.map-row:first-child::before { top: 16px; } .map-row:last-child::before { bottom: calc(100% - 16px); }
.map-node { position: absolute; left: 0; top: 11px; width: 11px; height: 11px; border-radius: 50%; background: var(--room-1); border: 1.5px solid var(--line-strong); transition: background .3s, border-color .3s, box-shadow .3s; }
.map-row.done .map-node { background: var(--ink); border-color: var(--ink); }
.map-row.now .map-node { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 3px var(--room-3); }
.map-tag { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-3); margin-left: 8px; letter-spacing: 0.03em; text-transform: uppercase; }
.map-name { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.map-row.done .map-name, .map-row.now .map-name { color: var(--ink); }
.map-row.now .map-name > span { font-weight: 600; }
.map-name .money { font-size: 13px; font-weight: 600; }
.map-leaks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; }
.map-leaks li { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 10px; }
.map-leaks .num { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translateY(3px) } to { opacity: 1; transform: none } }

/* ═══ Workspace ═══ */
.app main { flex: 1; width: 100%; }
.desk { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: minmax(0, 680px) 320px; justify-content: center; gap: 56px; align-items: start; }
.desk-main { min-width: 0; }
.desk-side { position: sticky; top: 76px; padding-top: 20px; }
.side-card { background: var(--room-1); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.side-note { font-size: 12px; color: var(--ink-3); margin: 10px 2px 0; }
.stage-now { font: 500 13px var(--sans); color: var(--ink-3); }

.gate { max-width: 460px; margin: 10vh auto 0; }
.gate h1 { font-size: 28px; letter-spacing: -0.03em; font-weight: 600; line-height: 1.15; margin: 0 0 10px; }
.gate p { color: var(--ink-2); margin: 0 0 22px; }
.gate .row { display: flex; gap: 8px; }
.gate .small { margin-top: 16px; }

.chat { display: flex; flex-direction: column; min-height: calc(100dvh - 56px); }
.thread { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 24px 0 20px; max-width: 680px; }
.msg { max-width: 88%; font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; animation: rise .3s var(--ease) both; }
.msg.bot { align-self: flex-start; color: var(--ink); padding: 2px 0; }
.msg.me { align-self: flex-end; background: var(--room-2); padding: 10px 14px; border-radius: var(--r-card) var(--r-card) 3px var(--r-card); }
.msg.typing .dots span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite both; }
.msg.typing .dots span:nth-child(2) { animation-delay: .2s } .msg.typing .dots span:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
.composer { position: sticky; bottom: 0; padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--room-0) 75%, transparent); max-width: 680px; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; background: var(--room-1); border: 1px solid var(--line); border-radius: var(--r-card); padding: 6px; transition: border-color .15s; }
.composer-row:focus-within { border-color: var(--line-strong); }
.composer textarea { border: 0; resize: none; max-height: 168px; background: transparent; box-shadow: none; padding: 9px 8px; }
.composer .btn { flex: none; }
.mic { border-color: transparent; padding: 0 12px; }
.mic svg { width: 18px; height: 18px; }
.mic.rec { background: var(--ink); color: var(--room-1); border-color: var(--ink); }
.mic.rec svg { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45 } }
@media (max-width: 520px) { .mic .mic-label { display: none; } }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; min-height: 32px; }
.composer-foot .hint { margin: 0; }
.early { display: grid; gap: 10px; background: var(--room-1); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; margin-bottom: 10px; animation: rise .25s var(--ease) both; }
.early p { margin: 0; color: var(--ink-2); font-size: 14px; }
.early .acts { display: flex; gap: 8px; justify-content: flex-end; }

.working { min-height: 60dvh; display: grid; place-content: center; text-align: center; gap: 6px; }
.working h2 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; margin: 0; }
.working .wire-run { width: 140px; height: 2px; margin: 0 auto 18px; background: var(--line); position: relative; overflow: hidden; border-radius: 2px; }
.working .wire-run::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--ink); animation: run 1.4s var(--ease) infinite; }
.work-steps { list-style: none; margin: 22px auto 0; padding: 0; display: grid; gap: 10px; text-align: left; width: max-content; max-width: 100%; }
.work-steps li { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink-3); transition: color .3s; }
.work-steps li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background .3s, border-color .3s; }
.work-steps li.now { color: var(--ink); }
.work-steps li.now::before { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 0 3px var(--room-3); }
.work-steps li.done { color: var(--ink-2); }
.work-steps li.done::before { background: var(--ink); border-color: var(--ink); }
@keyframes run { from { transform: translateX(-100%) } to { transform: translateX(260%) } }

/* Report */
.report { padding: 28px 0 48px; display: grid; gap: 14px; max-width: 720px; }
.report .card { background: var(--room-1); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.report h2 { font-size: 18px; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 8px; }
.report h3 { font-size: 16px; letter-spacing: -0.01em; font-weight: 600; margin: 0; }
.verdict .who { color: var(--ink-3); font-size: 14px; margin: 0 0 12px; }
.verdict .big { font-size: clamp(34px, 7vw, 52px); font-weight: 600; line-height: 1; margin: 0 0 12px; }
.verdict .big .per { font-size: 16px; color: var(--ink-3); font-family: var(--sans); letter-spacing: 0; margin-left: 6px; font-weight: 500; }
.verdict p { margin: 0; color: var(--ink-2); }
.verdict .big.money { color: var(--money-ink); }
.verdict .note { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.working-list ul { margin: 4px 0 0; padding-left: 18px; color: var(--ink-2); }
.section-title { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 14px 2px 0; }
.leak-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.leak-top .money { font-size: 15px; font-weight: 600; white-space: nowrap; }
.leak p { margin: 10px 0 0; color: var(--ink-2); }
.leak .sum { font-size: 13.5px; background: var(--room-2); border-radius: var(--r-control); padding: 10px 12px; color: var(--ink-2); }
.leak .fix { color: var(--ink); font-weight: 500; }
.tools { display: grid; gap: 8px; margin-top: 14px; }
.tool { border: 1px solid var(--line-soft); border-radius: var(--r-control); padding: 12px 14px; }
.tool-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tool-name { font-weight: 600; }
.chip { font: 500 11px var(--sans); padding: 2px 7px; border-radius: var(--r-chip); background: var(--room-2); color: var(--ink-2); white-space: nowrap; }
.tool p { font-size: 13.5px; margin: 5px 0 0; }
.tool .meta { font: 500 12px var(--sans); color: var(--ink-3); }
.order ol { margin: 6px 0 0; padding-left: 20px; color: var(--ink-2); }
.next { border-color: var(--line-strong) !important; }
.next p { color: var(--ink-2); margin: 0 0 16px; }
.next .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rate-row { display: flex; gap: 6px; margin: 12px 0; }
.rate-row button { width: 44px; height: 40px; font-variant-numeric: tabular-nums; }
.rate-row button.on { background: var(--ink); color: var(--room-1); }
.small { font-size: 12.5px; color: var(--ink-3); }

/* Report: same language as the hero demo */
.verdict .r-who { margin: 12px 0 0; color: var(--ink-3); font-size: 13px; }
.verdict .rs-stats { margin: 10px 0 12px; }
.verdict .rs-num { font-size: clamp(30px, 5vw, 40px); }
.verdict .rs-lbl { color: var(--ink-3); }
.verdict .r-sub { margin-bottom: 18px; }
.verdict .lk-list { margin-bottom: 4px; }
.r-report { gap: 10px; }
.r-report .r-item { background: var(--room-1); border-color: var(--line); padding: 18px 20px; }
.r-report .r-problem { margin: 0; font-size: 16px; }
.r-report .r-cost { font-size: 17px; }
.r-said { margin: 6px 0 0 30px; font-size: 13.5px; color: var(--ink-3); }
.r-label { margin: 14px 0 2px 30px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.02em; }
.r-report .r-how { font-size: 14.5px; color: var(--ink); margin-bottom: 0; }
.r-tools { display: grid; gap: 10px; margin: 12px 0 0 30px; }
.r-tools .r-tool { margin-left: 0; justify-self: start; }
.r-toolrow { display: grid; gap: 4px; }
.r-tooldo { margin: 0; font-size: 13px; color: var(--ink-2); }
.r-meta { display: block; color: var(--ink-3); }
.r-build { margin: 8px 0 0 30px; font-size: 13.5px; color: var(--ink-2); }
.r-workings { margin: 12px 0 0 30px; font-size: 13px; color: var(--ink-3); }
.r-workings summary { cursor: pointer; width: max-content; }
.r-workings p { margin: 6px 0 0; color: var(--ink-2); }
.report .r-foot { margin: 0 2px; }
.r-custom-cta { margin: 12px 0 0 30px; }

/* The verdict and the constraint, before anything else */
.cons { border-color: var(--ink) !important; }
.cons-lbl { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.cons h2 { font-size: 22px !important; line-height: 1.25; letter-spacing: -0.025em; margin: 0 0 10px !important; }
.cons-why { margin: 0; color: var(--ink); line-height: 1.6; }
.cons .deep-lbl { margin-top: 16px !important; }
.cons-obs { margin: 4px 0 0; padding-left: 18px; color: var(--ink); line-height: 1.55; display: grid; gap: 6px; }
.cons-foot { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-2); }
.lk-fc { display: block; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-top: 3px; }
.deep-later { margin: 10px 0 0 30px !important; font-size: 13.5px; color: var(--ink-2) !important; }
.deep-later strong { color: var(--ink); }

/* Report, part by part: one section per area, each leak walked through in plain blocks */
.parts-title { margin: 22px 2px 0; font-size: 20px; letter-spacing: -0.02em; font-weight: 600; }
.part { background: var(--room-1); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; }
.part-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.part-head h3 { margin: 0; font-size: 18px; letter-spacing: -0.02em; font-weight: 600; }
.part-cost { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--money-ink); white-space: nowrap; }
.part-cost small, .deep-cost small { font-size: 12px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.part-ok { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--room-2); color: var(--ink-2); }
.part-note { margin: 12px 0 0; color: var(--ink-2); }
.deep { padding: 18px 0 2px; }
.deep + .deep { border-top: 1px solid var(--line-soft); margin-top: 16px; }
.deep-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.deep-top h4 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.deep-cost { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--money-ink); white-space: nowrap; }
.deep-block { margin-top: 14px; }
.deep-block p, .deep-first p { margin: 0; color: var(--ink); line-height: 1.6; }
.deep-lbl { font-size: 11.5px !important; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3) !important; margin-bottom: 4px !important; }
.deep-said { color: var(--ink-2) !important; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.deep-steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 8px; }
.deep-steps li { counter-increment: step; position: relative; padding-left: 30px; line-height: 1.55; }
.deep-steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--room-1); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
.deep .r-tools { margin: 12px 0 0; }
.deep-build { margin-top: 8px !important; color: var(--ink-2) !important; }
.deep-cta { margin-top: 10px; }
.deep-sum { margin-top: 6px !important; font-size: 14px; color: var(--ink-2) !important; font-variant-numeric: tabular-nums; }
.deep-pricing { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-control); }
.deep-price { margin: 0 0 10px !important; }
.deep-factors { margin: 2px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); display: grid; gap: 2px; }
.deep-pnote { margin-top: 10px !important; font-size: 14px; color: var(--ink-2) !important; }
.deep-pnote strong { color: var(--ink); }
.deep-price span { color: var(--ink-3); font-size: 13px; }
.deep-first { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-control); background: var(--room-2); border-left: 3px solid var(--ink); }
.deep-first .deep-lbl { color: var(--ink-2) !important; }

/* Tools and what they cost */
.tools-line { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); }
.tools-cost p.muted { margin: 0 0 12px; font-size: 13.5px; }
.tc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tc-table td { padding: 10px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tc-table td span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.tc-cost { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 16px !important; }
.tc-note { color: var(--ink-2) !important; }
.tc-total td { border-bottom: 0; padding-top: 12px; }

/* Phone: the map becomes a strip under the bar */
.strip { display: none; }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 48px 64px; }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .step, .step + .step { padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .honest { grid-template-columns: 1fr; }
  .parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .honest { gap: 28px; }
  .band { padding: 64px 0; }
  .desk { grid-template-columns: 1fr; gap: 0; }
  .desk-side { display: none; position: static; padding-top: 0; }
  .desk-side.open { display: block; padding: 12px 0 4px; }
  .strip { display: flex; position: sticky; top: 56px; z-index: 8; align-items: center; gap: 12px; width: 100%; padding: 10px 20px; background: var(--room-0); border: 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
  .strip .segs { flex: 1; display: flex; gap: 3px; }
  .strip .seg { flex: 1; height: 4px; border-radius: 2px; background: var(--room-3); }
  .strip .seg.done { background: var(--ink); } .strip .seg.now { background: var(--ink-3); }
  .strip .money { font-size: 14px; font-weight: 600; }
  .thread, .composer, .report { max-width: none; }
}
@media (max-width: 520px) {
  .lk-head { display: none; }
  .demo .preview-tag { display: none; }
  .d-tab { padding: 5px 8px; }
  .demo-result { padding: 16px; }
  .lk { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .lk-fix { grid-column: 1 / -1; grid-row: 2; }
  .lk-save { grid-column: 2; grid-row: 1; }
  .rs-stats { gap: 24px; }
  .r-top { flex-wrap: wrap; row-gap: 2px; }
  .r-cost { flex-basis: 100%; margin-left: 30px; }
  .r-report .r-item { padding: 16px; }
  .part { padding: 16px; }
  .deep-top, .part-head { flex-wrap: wrap; row-gap: 2px; }
  .parts { grid-template-columns: 1fr; gap: 24px; }
  .gate .row { flex-direction: column; }
  .msg { max-width: 94%; }
  .hero-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Proof (Haydn, 4 Nov 2026): one line under the hero button, a client video beside the report's call button */
.hero .proof { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; max-width: 30em; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.hero .proof img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.hero .proof strong { color: var(--ink); font-weight: 600; }
.vt { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.vt video { width: 120px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: #000; }
.vt blockquote { margin: 0 0 8px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.vt cite { font-style: normal; font-size: 13px; color: var(--ink-3); }
@media (max-width: 480px) { .vt { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; } .vt video { width: 96px; } .vt blockquote { font-size: 14px; } }

/* Pattern Systems' core offer on the ICP Book a call (Haydn, 11 Nov 2026) */
.next .offer-h { font-size: clamp(22px, 3.2vw, 28px); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 8px; }
.next .offer-sub { color: var(--ink-2); margin: 0 0 14px; }
.guar { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 10px; }
.guar li { display: flex; gap: 10px; color: var(--ink); line-height: 1.4; text-wrap: pretty; }
.g-tick { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 999px; background: var(--ink); color: var(--room-1); }
.guar-note { margin: 0 0 16px; }
.guar-note summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-left: 30px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.guar-note summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .guar-note summary:hover { color: var(--ink); text-decoration-color: var(--ink); } }
.guar-note summary svg { transition: transform .2s var(--ease); }
.guar-note[open] summary svg { transform: rotate(180deg); }
.guar-note > div { padding-left: 30px; font-size: 14px; line-height: 1.6; }
.next .guar-note > div p { color: var(--ink-3); margin: 0 0 8px; }
