/* Py'otr: shared look for every page. The home story adds story.css on top of this. */
@font-face { font-family: "Red Hat Display"; src: url("/assets/fonts/red-hat-display.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }
/* stands in for the heading face until it has loaded: the same width and the same baseline, so nothing moves when it arrives */
@font-face { font-family: "Display Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("LiberationSans-Bold"), local("Helvetica Bold"), local("Helvetica-Bold"); font-style: normal; font-weight: 700; size-adjust: 97%; ascent-override: 104.95%; descent-override: 31.44%; line-gap-override: 0%; }
@font-face { font-family: "Schibsted Grotesk"; src: url("/assets/fonts/schibsted.woff2") format("woff2"); font-style: normal; font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("/assets/fonts/fragment-mono.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }

:root {
  --bg-hi: #c3c9bd;
  --bg: #b4bbaf;
  --bg-lo: #a6ada1;
  --ink: #1b201d;
  --ink-2: #2c332e;
  --ink-3: #3e463f;
  --line: rgba(27, 32, 29, .16);
  --line-2: rgba(27, 32, 29, .1);
  --paper: #f3f3ee;
  --card: #eef0e9;
  --card-hi: #f6f7f2;
  --panel: #1a1e1c;
  --panel-2: #232927;
  --panel-ink: #e8ebe4;
  --panel-mute: #a3aba3;
  --panel-line: rgba(232, 235, 228, .12);
  --gold: #7a5f17;
  --gold-bg: #ece2c2;
  --ok: #2f7a4b;
  --warn: #8c3b25;
  --display: "Red Hat Display", "Display Fallback", "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: clamp(16px, 3.2vw, 44px);
  --top-h: 64px;
  --max: 1200px;
  --r: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
:is(.dark, .chat, .term) :focus-visible { outline-color: var(--panel-ink); }   /* on the dark panels the ring is light, so the keyboard's place can be seen */
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 80; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--paper); text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

/* paper grain on inner pages: one static tile behind everything */
.page::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url("/assets/img/grain.png") repeat; background-size: 192px; opacity: .08; }

/* ---------- top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--pad);
  transition: transform .45s var(--ease);
}
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .35s var(--ease); }
.top.solid::before, .page .top::before { opacity: 1; }
.top.away { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 16px/1 var(--display); background: var(--ink); color: var(--paper); }
.brand-text { display: grid; line-height: 1.1; min-width: 0; }
.brand-text b { font: 600 14px/1.1 var(--sans); letter-spacing: -.01em; }
.brand-text span { font: 400 12px/1.3 var(--mono); color: var(--ink-3); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.top-nav a:not(.btn) { font: 500 14px/1 var(--sans); text-decoration: none; opacity: .78; transition: opacity .2s; padding: 8px 0; }
.top-nav a:not(.btn):hover, .top-nav a[aria-current="page"] { opacity: 1; }
.top-nav a:not(.btn)[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.menu-btn { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; place-items: center; }
.menu-btn i, .menu-btn i::before { display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; transition: transform .3s var(--ease); }
.menu-btn i::before { content: ""; position: absolute; top: 5px; left: 0; }
.menu-btn i { transform: translateY(-2.5px); }
.nav-open .menu-btn i { transform: translateY(0) rotate(45deg); }
.nav-open .menu-btn i::before { transform: translateY(-5px) rotate(-90deg); }
.navsheet { position: fixed; inset: var(--top-h) 0 auto 0; z-index: 39; padding: 10px var(--pad) 22px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
.nav-open .navsheet { display: grid; gap: 2px; }
.navsheet a { padding: 13px 2px; font: 700 24px/1.15 var(--display); letter-spacing: -.015em; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.navsheet a:last-child { border: 0; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  font: 500 14px/1 var(--sans); text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2a312d; }
.btn-line { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-sm { height: 36px; padding: 0 15px; font-size: 13.5px; }
.top .btn { height: 40px; padding: 0 18px; font-size: 13.5px; }
.arrow { display: inline-flex; align-items: center; gap: 6px; font: 500 14.5px/1.3 var(--sans); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .2s, gap .25s var(--ease); }
.arrow::after { content: "→"; }
.arrow:hover { border-color: var(--ink); gap: 9px; }
button.arrow { background: none; border-width: 0 0 1px; border-style: solid; padding: 0 0 2px; cursor: pointer; color: inherit; }
kbd { font: 400 12px/1 var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font: 400 12px/1 var(--mono); color: var(--ink-2); white-space: nowrap; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font: 400 11.5px/1 var(--mono); letter-spacing: .02em; background: var(--gold-bg); color: var(--gold); }
.kick { display: block; font: 400 12.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.page-head { padding: calc(var(--top-h) + clamp(48px, 9vw, 120px)) 0 clamp(36px, 6vw, 72px); }
.page-head h1 { margin: 14px 0 0; font: 700 clamp(40px, 6.2vw, 88px)/1 var(--display); letter-spacing: -.03em; max-width: 10.2em; }
.page-head h1.long { font-size: clamp(32px, 4.6vw, 62px); line-height: 1.05; letter-spacing: -.026em; max-width: 16.3em; }   /* a case study's title is a sentence, not a slogan */
.page-head .lede { margin-top: 22px; max-width: 58ch; font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.55; color: var(--ink-2); }
.page-head .actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.page-head > * { animation: rise-in .9s var(--ease) both; }      /* the heading of a page comes up as the page opens */
.page-head > :nth-child(2) { animation-delay: .07s; }
.page-head > :nth-child(3) { animation-delay: .14s; }
.page-head > :nth-child(4) { animation-delay: .21s; }
.sec { padding: clamp(56px, 9vw, 120px) 0; }
.sec + .sec { padding-top: 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 40px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head h2 { font: 700 clamp(34px, 4.4vw, 60px)/1.04 var(--display); letter-spacing: -.026em; max-width: 12.2em; }
.sec-head p { max-width: 48ch; color: var(--ink-2); font-size: 16.5px; }
.sec-head .kick { margin-bottom: 12px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { position: relative; background: var(--card); border-radius: var(--r); padding: clamp(20px, 2.2vw, 28px); }
.card-link { display: flex; flex-direction: column; text-decoration: none; isolation: isolate; transition: background-color .25s, transform .5s var(--ease), box-shadow .5s var(--ease); }
.card-link:hover { background: var(--card-hi); transform: translateY(-2px); }
@media (hover: hover) and (pointer: fine) {   /* the card leans toward the pointer, and a soft light follows it (ui.js sets --mx, --my) */
  .card-link::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
    background: radial-gradient(280px circle at calc(var(--mx, .5) * 100%) calc(var(--my, .5) * 100%), rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 70%); }
  .card-link.lit { transform: perspective(900px) rotateX(calc((.5 - var(--my, .5)) * 5deg)) rotateY(calc((var(--mx, .5) - .5) * 6deg)) translate3d(0, -3px, 0); box-shadow: 0 22px 44px rgba(20, 24, 22, .13); transition-duration: .25s, .16s, .5s; }
  .card-link.lit::after { opacity: 1; }
  .case-card .shot img { transition: transform .8s var(--ease); }
  .case-card.lit .shot img { transform: scale(1.045); }
}
.dark { background: var(--panel); color: var(--panel-ink); }
.dark .kick { color: var(--panel-mute); }
.prose p + p { margin-top: 1em; }
.prose p { max-width: 64ch; font-size: 17px; line-height: 1.65; color: var(--ink-2); }

/* proof strip */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof > div { padding: 22px 18px 22px 0; }
.proof > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.proof b { display: block; font: 700 clamp(25px, 2.6vw, 38px)/1.05 var(--display); letter-spacing: -.022em; }
.proof span { display: block; margin-top: 6px; font: 500 14px/1.35 var(--sans); }
.proof small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }

/* service overview cards */
.svc-card h3 { font: 700 27px/1.08 var(--display); letter-spacing: -.018em; margin: 14px 0 10px; }
.svc-card p { color: var(--ink-2); font-size: 15px; }
.svc-card .from { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; font: 400 12.5px/1 var(--mono); color: var(--ink-3); }
.svc-card .from b { font-weight: 400; color: var(--ink); }
.svc-num { font: 400 12px/1 var(--mono); color: var(--ink-3); }

/* case cards */
.case-card { min-height: 100%; }
.case-card .cat { font: 400 12px/1.3 var(--mono); letter-spacing: .04em; color: var(--ink-3); display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.case-card :is(h2, h3) { margin: 12px 0 8px; font: 700 24px/1.1 var(--display); letter-spacing: -.016em; }
.case-card .who { font: 400 12.5px/1.45 var(--mono); color: var(--ink-3); margin-bottom: 10px; }
.case-card p { font-size: 14.5px; color: var(--ink-2); }
.case-card .chips { margin-top: 16px; }
.case-card .go { margin-top: auto; padding-top: 18px; font: 500 14px/1 var(--sans); }
.case-card .go::after { content: " →"; }
.case-card .shot { margin: -4px -4px 16px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: #dfe2dc; }
.case-card .shot img { width: 100%; height: 100%; object-fit: cover; }

/* work filters */
.work-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 26px; }
.filters { order: 1; flex: 1 1 560px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font: 500 13.5px/1 var(--sans); transition: background-color .2s, color .2s, border-color .2s; }
.filters button span { font: 400 11.5px/1 var(--mono); opacity: .65; margin-left: 4px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.search-box { position: relative; order: 2; flex: 0 1 300px; margin-left: auto; }
.search { width: 100%; height: 40px; padding: 0 40px 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.search-box kbd { position: absolute; right: 11px; top: 9px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-3); pointer-events: none; transition: opacity .2s; }
.search-box:focus-within kbd, .search:not(:placeholder-shown) + kbd { opacity: 0; }   /* "/" jumps to the search (ui.js); the hint steps aside once you are in it */
@media (hover: none) { .search-box kbd { display: none; } }
.work-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; min-height: 22px; margin: -10px 0 18px; }
.work-bar p { font: 400 12.5px/1.4 var(--mono); color: var(--ink-3); }
.empty { padding: 40px 0; color: var(--ink-3); }
[data-case][hidden] { display: none; }

/* demos */
.demo h3 { font: 700 25px/1.08 var(--display); letter-spacing: -.016em; margin: 10px 0 8px; }
.demo p { font-size: 14.5px; color: var(--ink-2); }
.creds { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--paper); display: grid; gap: 6px; font: 400 13px/1.3 var(--mono); }
.creds div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.creds button { border: 0; background: transparent; cursor: pointer; font: 400 12px/1 var(--mono); color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.demo .btn { margin-top: 18px; align-self: flex-start; }

/* terminal */
.term { border-radius: var(--r); overflow: hidden; background: var(--panel); color: var(--panel-ink); box-shadow: 0 30px 70px rgba(20, 24, 22, .18); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--panel-line); font: 400 12px/1 var(--mono); color: var(--panel-mute); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a423d; }
.term-bar span { margin-left: 8px; }
.term-out { height: 360px; overflow-y: auto; padding: 16px 18px 6px; font: 400 13.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; overscroll-behavior: contain; }
.term-out .in { color: #b8d8a8; }
.term-out .err { color: #e8a090; }
.term-out a { color: var(--panel-ink); }
.term-in { display: flex; align-items: center; gap: 10px; padding: 12px 18px 16px; font: 400 13.5px/1 var(--mono); }
.term-in label { color: #b8d8a8; white-space: nowrap; }
.term-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--panel-ink); font: 400 14px/1 var(--mono); }
.term-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 18px; }
.term-chips button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--panel-line); background: var(--panel-2); color: var(--panel-ink); cursor: pointer; font: 400 12px/1 var(--mono); }
.term-chips button:hover { border-color: var(--panel-mute); }

/* process */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: s; }
.steps li::before { content: "0" counter(s); display: block; font: 400 12px/1 var(--mono); color: var(--ink-3); margin-bottom: 18px; }
.steps h3 { font: 700 23px/1.12 var(--display); letter-spacing: -.014em; margin-bottom: 10px; }
.steps p { font-size: 14.5px; color: var(--ink-2); }
.steps .tag { margin-top: 16px; }

/* protections */
.protect h3 { font: 600 16px/1.3 var(--sans); margin-bottom: 6px; }
.protect p { font-size: 14.5px; color: var(--ink-2); }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font: 500 clamp(17px, 1.6vw, 20px)/1.35 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 400 18px/1 var(--sans); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; max-width: 70ch; color: var(--ink-2); font-size: 16px; }
.faq summary:hover::after { border-color: var(--ink); }
@supports (interpolate-size: allow-keywords) {   /* an answer opens and closes smoothly where the browser can do it */
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size .45s var(--ease), opacity .35s var(--ease), content-visibility .45s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; opacity: 1; }
}

/* cta band */
.cta { border-radius: calc(var(--r) + 6px); padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 24px 40px; align-items: end; }
.cta h2 { font: 700 clamp(32px, 4.2vw, 56px)/1.04 var(--display); letter-spacing: -.026em; }
.cta p { margin-top: 14px; color: var(--panel-mute); max-width: 50ch; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn-line { border-color: var(--panel-line); color: var(--panel-ink); }
.cta .btn-line:hover { border-color: var(--panel-ink); }

/* ---------- services page ---------- */
.svc-top { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 48px); }
.svc-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-nav a span { margin-left: 6px; font: 400 11.5px/1 var(--mono); opacity: .65; }
.svc-nav a { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font: 500 13.5px/1 var(--sans); }
.svc-nav a:hover { border-color: var(--ink); }
.svc-group { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; }
.svc-group h2 { font: 700 clamp(30px, 3.4vw, 46px)/1.05 var(--display); letter-spacing: -.022em; margin: 10px 0 14px; }
.svc-group .intro { color: var(--ink-2); font-size: 15.5px; max-width: 40ch; }
.svc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.svc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; padding: 20px 22px; border-radius: 16px; background: var(--card); }
.svc-row h3 { font: 600 17px/1.3 var(--sans); letter-spacing: -.01em; }
.svc-row p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); max-width: 60ch; }
.svc-row .price { text-align: right; white-space: nowrap; }
.svc-row .price b { display: block; font: 700 20px/1.1 var(--display); letter-spacing: -.012em; }
.svc-row .price small { display: block; margin-top: 4px; font: 400 12px/1.3 var(--mono); color: var(--ink-3); }
.svc-row .more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.svc-row .proof-links { font-size: 13.5px; color: var(--ink-3); }
.svc-row .proof-links a { color: var(--ink-2); text-underline-offset: 3px; }
/* "What fits my budget?": the slider marks what starts within an amount (ui.js). Rows that do not are dimmed, never hidden. */
.fit { display: grid; grid-template-columns: auto minmax(200px, 1fr) minmax(0, 1.25fr); align-items: center; gap: 10px clamp(18px, 3vw, 36px); padding: 16px 22px; border-radius: 16px; background: var(--card); scroll-margin-top: calc(var(--top-h) + 16px); }
.fit > .kick { color: var(--ink-2); white-space: nowrap; }
.fit-slide { display: grid; gap: 1px; }
.fit-ends { display: flex; justify-content: space-between; font: 400 11.5px/1 var(--mono); color: var(--ink-3); }
.fit-say { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.fit.on .fit-say output { color: var(--ink); }
.fit-reset { padding: 0; border: 0; background: none; cursor: pointer; font: 500 13.5px/1.4 var(--sans); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.fit-reset:hover { text-decoration-color: var(--ink); }
.fit input { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; --p: 100%; }
.fit input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--ink) var(--p), var(--line) var(--p)); }
.fit input::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
.fit input::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink); }
.fit input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; border: 4px solid var(--card); background: var(--ink); box-shadow: 0 0 0 1px var(--ink); transition: transform .2s var(--ease); }
.fit input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--card); background: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.fit input:active::-webkit-slider-thumb { transform: scale(1.14); }
.svc-row { transition: opacity .35s var(--ease); }
.svc-row.out { opacity: .36; }
.svc-row.out:hover, .svc-row.out:focus-within { opacity: .85; }
.fit-n { margin-top: 14px; }
.addons { width: 100%; border-collapse: collapse; font-size: 15px; }
.addons th, .addons td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.addons th { font: 400 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.addons td:last-child, .addons th:last-child { text-align: right; white-space: nowrap; padding-right: 0; }
.addons small { display: block; color: var(--ink-3); font-size: 13.5px; }
.note { font: 400 13px/1.5 var(--mono); color: var(--ink-3); }

/* ---------- quote builder ---------- */
.qb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 28px; align-items: start; }
.qb-step { padding: 26px 0; border-top: 1px solid var(--line); }
.qb-step:first-child { border-top: 0; padding-top: 0; }
.qb-step > h2 { font: 700 28px/1.08 var(--display); letter-spacing: -.018em; margin-bottom: 6px; }
.qb-step > p { color: var(--ink-2); font-size: 15px; margin-bottom: 18px; }
.qb-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.qb-tabs button { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font: 500 13.5px/1 var(--sans); }
.qb-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { position: relative; display: grid; gap: 4px; padding: 16px 18px 16px 46px; border-radius: 14px; background: var(--card); cursor: pointer; border: 1.5px solid transparent; transition: border-color .2s, background-color .2s; }
.opt:hover { background: var(--card-hi); }
.opt input { position: absolute; left: 18px; top: 19px; width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.opt b { font: 600 15px/1.3 var(--sans); }
.opt .op { font: 400 13px/1.3 var(--mono); color: var(--ink-2); }
.opt small { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.opt:has(input:checked) { border-color: var(--ink); background: var(--card-hi); }
.opt[hidden] { display: none; }
.qb-panel { position: sticky; top: calc(var(--top-h) + 20px); border-radius: var(--r); padding: 26px; }
.qb-panel h2 { font: 400 13px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--panel-mute); }
.qb-pick { margin-top: 14px; font: 500 16px/1.35 var(--sans); min-height: 44px; }
.qb-pick small { display: block; margin-top: 4px; font: 400 13px/1.4 var(--sans); color: var(--panel-mute); }
.qb-est { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--panel-line); display: grid; gap: 14px; }
.qb-est b { display: block; font: 700 clamp(28px, 2.8vw, 37px)/1 var(--display); letter-spacing: -.022em; font-variant-numeric: tabular-nums; }
.qb-est span { display: block; margin-top: 4px; font: 400 12px/1.3 var(--mono); color: var(--panel-mute); }
.qb-incl { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--panel-ink); }
.qb-incl li::before { content: "✓"; margin-right: 8px; color: #b8d8a8; }
.qb-panel .btn { width: 100%; margin-top: 22px; }
.qb-panel .btn-paper:disabled { opacity: .45; cursor: not-allowed; }
.qb-fine { margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--panel-mute); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font: 500 14px/1.2 var(--sans); }
.field label em { font-style: normal; color: var(--ink-3); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-hi); font-size: 16px; transition: border-color .2s; }
.field textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--ink); }
.field ::placeholder, .search::placeholder { color: var(--ink-3); opacity: .82; }   /* (the browser's own grey is too faint on these fields) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { display: none; padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.status.ok { display: block; background: #dfe9dc; color: #1f4d30; }
.status.err { display: block; background: #efdcd4; color: #6b2a17; }
.status a { font-weight: 600; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.side-list { display: grid; gap: 12px; }
.side-list .card h2 { font: 600 15px/1.3 var(--sans); }
.side-list .card p { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
.side-list .card a { word-break: break-all; }
.side-list .card p.clock { margin-top: 8px; font: 400 12.5px/1.5 var(--mono); color: var(--ink-3); }

/* ---------- about ---------- */
.about-prose p { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.6; max-width: 56ch; color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.timeline .when { font: 400 13px/1.6 var(--mono); color: var(--ink-3); }
.timeline h3 { font: 700 25px/1.12 var(--display); letter-spacing: -.016em; text-wrap: wrap; }   /* (a job title with the company after it: left to break where it falls) */
.timeline h3 span { font: 400 15px/1.4 var(--sans); letter-spacing: 0; color: var(--ink-3); margin-left: 8px; }
.timeline p { margin-top: 8px; max-width: 64ch; color: var(--ink-2); font-size: 15.5px; }
/* with ui.js running the list becomes a rail with a dot per row: the rail fills, and each dot turns solid, as you read down it */
.timeline.live { position: relative; border-top: 0; }
.timeline.live li { position: relative; border-bottom: 0; }
.timeline.live::before, .timeline.live::after { content: ""; position: absolute; left: 175px; top: 35px; bottom: var(--end, 35px); width: 2px; border-radius: 2px; background: var(--line); }
.timeline.live::after { background: var(--ink); transform-origin: 50% 0; transform: scaleY(var(--tl, 0)); }
.timeline.live li::before { content: ""; position: absolute; z-index: 1; left: 171px; top: 30px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px rgba(27, 32, 29, .34); transition: background-color .3s, box-shadow .3s, transform .5s var(--ease); }
.timeline.live li.on::before { background: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 5px rgba(27, 32, 29, .1); transform: scale(1.12); }
.lesson h3 { font: 700 22px/1.18 var(--display); letter-spacing: -.012em; margin-bottom: 10px; }
.lesson p { font-size: 15px; color: var(--ink-2); }
.learn { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.learn li { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.learn b { font-weight: 600; }
.learn span { color: var(--ink-3); font: 400 13.5px/1.5 var(--mono); text-align: right; }
.types { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.types li { padding: 10px 14px; border-radius: 12px; background: var(--card); font-size: 14.5px; }

/* ---------- case study page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 400 12.5px/1.4 var(--mono); color: var(--ink-3); }
.crumbs a { text-underline-offset: 3px; }
.case-meta { margin-top: 28px; display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 12px 40px; }
.case-meta dt { font: 400 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.case-meta dd { margin: 4px 0 0; font-weight: 500; }
.case-body { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px 56px; align-items: start; }
.case-body h2 { font: 700 clamp(27px, 2.9vw, 36px)/1.08 var(--display); letter-spacing: -.02em; margin: 0 0 16px; }
.case-body section + section { margin-top: clamp(40px, 5vw, 60px); }
.case-body .prose p { font-size: 17px; }
.challenges { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: c; }
.challenges li { counter-increment: c; padding: 22px 24px; border-radius: 16px; background: var(--card); }
.challenges li::before { content: "0" counter(c); display: block; font: 400 12px/1 var(--mono); color: var(--ink-3); margin-bottom: 12px; }
.challenges b { display: block; font: 600 16.5px/1.4 var(--sans); }
.challenges p { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.result { padding: 26px 28px; border-radius: var(--r); }
.result p { font-size: 17px; line-height: 1.6; color: var(--panel-ink); }
.case-side { position: sticky; top: calc(var(--top-h) + 20px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.case-side .chip { height: auto; min-height: 26px; padding: 5px 10px; border-radius: 13px; line-height: 1.3; white-space: normal; }   /* a long tool name wraps inside its chip instead of pushing the page wider than the screen */
.case-side h3 { font: 400 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.case-side .btn { width: 100%; margin-top: 8px; }
.case-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.case-nav a { text-decoration: none; }
.case-nav small { display: block; font: 400 12px/1.3 var(--mono); color: var(--ink-3); margin-bottom: 8px; }
.case-nav b { font: 700 21px/1.3 var(--display); letter-spacing: -.012em; }
.case-nav a:last-child { text-align: right; }
.keys { margin-top: 14px; text-align: center; }
.keys kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; margin: 0 1px; border-radius: 6px; border: 1px solid var(--line); }
.read-line { position: fixed; inset: 0 0 auto 0; z-index: 45; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }   /* how far through the project you are (ui.js) */

/* ---------- footer ---------- */
.site-foot { position: relative; z-index: 2; margin-top: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); padding: 0 0 28px; background: var(--bg); }
.site-foot > .wrap { padding-top: clamp(20px, 3vw, 36px); }
.js-hero .has-hero .site-foot { margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 2fr)) minmax(0, 3fr); gap: 28px; }
.foot-grid h2 { font: 700 clamp(27px, 2.9vw, 38px)/1.08 var(--display); letter-spacing: -.02em; max-width: 9.5em; }
.foot-grid h3 { font: 400 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-grid a { text-decoration: none; font-size: 15px; }
.foot-grid a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-base { margin-top: 44px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font: 400 12px/1.4 var(--mono); color: var(--ink-3); }

/* ---------- AI chat ---------- */
.chat-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px 0 64px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ink); color: var(--paper); font: 500 14px/1 var(--sans); box-shadow: 0 14px 34px rgba(20, 24, 22, .28);
  transition: transform .3s var(--ease), opacity .3s, padding .35s var(--ease);
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab i { position: absolute; left: 42px; top: 33px; width: 9px; height: 9px; border-radius: 50%; background: #8fd19e; box-shadow: 0 0 0 2.5px var(--ink); }
.chat-open .chat-fab { opacity: 0; pointer-events: none; }
.page-quote .chat-fab { right: auto; left: max(16px, env(safe-area-inset-left)); } /* keeps clear of the estimate panel */

/* ---------- the little helper (buddy.js): a small Py'otr is the face of the chat button ---------- */
/* Every page ships a still picture of him in this seat. The script fades the living one in over it; without scripts the picture stays. */
.buddy-seat { position: absolute; left: -7px; top: 50%; width: 66px; height: 66px; margin-top: -33px; pointer-events: none; }
.buddy-seat img { width: 100%; height: 100%; transition: opacity .4s; }
.buddy-seat.live img { opacity: 0; }
.buddy { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; pointer-events: none; }
.buddy.on { opacity: 1; animation: buddy-breath 4.6s ease-in-out infinite alternate; }
.buddy.hold { animation-play-state: paused; }   /* while the page scrolls, and once he is asleep */
@keyframes buddy-breath { from { transform: translateY(.6px) scale(.985); } to { transform: translateY(-.6px) scale(1.015); } }
/* play (buddy.js): with a mouse he can be picked up from the button and put down anywhere; rubbed, he giggles */
@media (hover: hover) and (pointer: fine) { .buddy-seat.grab { pointer-events: auto; cursor: grab; } .chat-fab.away .buddy-seat { pointer-events: none; } }
.buddy-free { position: fixed; left: 0; top: 0; z-index: 62; width: 66px; height: 66px; display: none; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; transform-origin: 50% 14%; will-change: transform; filter: drop-shadow(0 8px 14px rgba(20, 24, 22, .3)); }
.buddy-free.on { display: block; }
.buddy-carry, .buddy-carry * { cursor: grabbing !important; -webkit-user-select: none !important; user-select: none !important; }
.buddy.on.giggle { animation: buddy-giggle .8s ease-in-out; }
@keyframes buddy-giggle { 0%, 100% { transform: none; } 15% { transform: rotate(-8deg) translateY(-2px); } 35% { transform: rotate(7deg); } 55% { transform: rotate(-5deg) translateY(-1px); } 75% { transform: rotate(4deg); } }
/* while he is somewhere else (on the contact form), the button is a plain pill again with its green dot.
   The quote page's button is always the plain one: there he only turns up on the estimate, once it has a price. */
.chat-fab.away, .chat-fab.plain { padding-left: 14px; }
:is(.chat-fab.away, .chat-fab.plain) i { position: static; width: 8px; height: 8px; box-shadow: 0 0 0 3px rgba(143, 209, 158, .25); }
.chat-fab.plain .buddy-seat { display: none; }
/* in an open chat he sits in its header */
.chat-head.has-face { justify-content: flex-start; }
.chat-head.has-face > div { flex: 1; min-width: 0; }
.chat-face { position: relative; flex: none; width: 50px; height: 50px; margin: -8px -2px -8px -6px; }
/* while he thinks he is three dots: drawn in the panel's own light ink, whatever colour his character is */
.chat-face .buddy svg > path[stroke="none"], .chat-face .buddy svg > g > path:last-child { fill: var(--panel-ink); }
.chat-face .buddy svg > path[fill="none"] { stroke: var(--panel-ink); }
/* a dock is his seat on one of the page's cards: the top edge of the contact form, a corner of the estimate in the quote builder */
.buddy-dock { position: absolute; pointer-events: none; z-index: 2; }
.buddy-dock > span { position: absolute; inset: 0; }
.form[data-contact] { position: relative; }
.form > .buddy-dock { right: clamp(14px, 3vw, 30px); top: -61px; width: 72px; height: 72px; }
.qb-panel > .buddy-dock { right: 14px; top: 6px; width: 52px; height: 52px; }
.qb-panel.has-buddy h2 { padding-right: 56px; }
/* what he says: one small bubble, above the button or beside the form */
.buddy-corner {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 66px); z-index: 61;
  width: min(304px, calc(100vw - 32px)); display: flex; justify-content: flex-end; pointer-events: none;
}
.page-quote .buddy-corner { right: auto; left: max(16px, env(safe-area-inset-left)); justify-content: flex-start; }
.chat-open .buddy-corner { display: none; }
.buddy-say {
  --tx: 50%;
  position: relative; max-width: 100%; padding: 13px 38px 13px 15px; border-radius: 16px; pointer-events: auto;
  background: var(--paper); color: var(--ink); font: 400 14px/1.45 var(--sans); text-align: left; box-shadow: 0 2px 6px rgba(20, 24, 22, .1), 0 16px 36px rgba(20, 24, 22, .22);
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(.96); transform-origin: var(--tx) 100%;
  transition: opacity .2s, transform .3s var(--ease), visibility 0s .3s;
}
.buddy-say.on { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .4s var(--ease); }
.buddy-say::after { content: ""; position: absolute; left: var(--tx); bottom: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 0 0 3px 0; background: inherit; transform: rotate(45deg); }
.buddy-say p { text-wrap: pretty; }
.buddy-act {
  display: inline-flex; align-items: center; height: 30px; margin-top: 10px; padding: 0 13px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--paper); font: 500 13px/1 var(--sans); transition: background .2s;
}
.buddy-act:hover { background: var(--ink-3); }
.buddy-x {
  position: absolute; right: 7px; top: 7px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--ink-3); font-size: 17px; line-height: 1; transition: background .2s, color .2s;
}
.buddy-x:hover { background: rgba(27, 32, 29, .08); color: var(--ink); }
/* beside the form the bubble stands to his left, with its tail pointing at him */
.buddy-dock .buddy-say { position: absolute; right: 78px; bottom: 12px; width: max-content; max-width: min(292px, calc(100vw - 2 * var(--pad) - 130px)); transform-origin: 100% 70%; transform: translateX(8px) scale(.96); }
.buddy-dock .buddy-say.on { transform: none; }
.buddy-dock .buddy-say::after { left: auto; right: -5px; bottom: 20px; margin: 0; border-radius: 0 3px 0 0; }
.chat {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70;
  width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100svh - 32px));
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: var(--panel); color: var(--panel-ink); box-shadow: 0 30px 80px rgba(10, 12, 11, .45);
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none; visibility: hidden;
  transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s .35s;
}
.chat-open .chat { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .3s var(--ease), transform .35s var(--ease); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--panel-line); }
.chat-head b { font: 600 15px/1.2 var(--sans); }
.chat-head small { display: block; margin-top: 3px; font: 400 12px/1.3 var(--mono); color: var(--panel-mute); }
.chat-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--panel-line); background: transparent; color: var(--panel-ink); cursor: pointer; font-size: 18px; line-height: 1; }
.chat-new { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--panel-line); background: transparent; color: var(--panel-mute); cursor: pointer; transition: color .2s, border-color .2s; }
.chat-new:hover { color: var(--panel-ink); border-color: var(--panel-mute); }
.chat-log { position: relative; flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: grid; align-content: start; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg a { color: inherit; text-underline-offset: 3px; }
.msg b { font-weight: 600; }
.msg .li { display: block; position: relative; padding-left: 15px; }                 /* a line that began with "- ": a list item with a hanging indent */
.msg .li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 6px; height: 1.5px; background: currentColor; opacity: .55; }
.msg .li + .li { margin-top: 4px; }
.msg.new { animation: msg-in .4s var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translate3d(0, 10px, 0); } }
.msg.bot { background: var(--panel-2); border-bottom-left-radius: 4px; }
.msg.me { justify-self: end; background: var(--panel-ink); color: var(--panel); border-bottom-right-radius: 4px; }
.msg.wait { color: var(--panel-mute); }
.msg.wait::after { content: "…"; animation: blink 1.2s steps(3) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.chat-sugs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.chat-more { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; animation: msg-in .45s var(--ease) .12s both; }   /* questions to ask next, under the latest answer */
:is(.chat-sugs, .chat-more) button { padding: 8px 11px; border-radius: 10px; border: 1px solid var(--panel-line); background: transparent; color: var(--panel-ink); cursor: pointer; font-size: 13px; line-height: 1.3; text-align: left; transition: border-color .2s, background-color .2s; }
:is(.chat-sugs, .chat-more) button:hover { border-color: var(--panel-mute); background: var(--panel-2); }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--panel-line); }
.chat-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--panel-line); background: var(--panel-2); color: var(--panel-ink); font-size: 16px; }
.chat-form input:focus { outline: 0; border-color: var(--panel-mute); }
.chat-form input::placeholder { color: var(--panel-mute); opacity: 1; }
.chat-form button { height: 44px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--panel-ink); color: var(--panel); cursor: pointer; font: 600 14px/1 var(--sans); }
.chat-form button:disabled { opacity: .5; }
.chat-fine { padding: 0 16px 12px; font-size: 11.5px; color: var(--panel-mute); }

/* ---------- the studio at the top of the inner pages (hero.js) ----------
   Without the script the heading is an ordinary page head. With it (.js-hero on <html>) the heading stands in the studio
   with him, the studio stays where it is, and the rest of the page slides up over it like a sheet of paper. */
.hero { position: relative; display: flex; flex-direction: column; }
.hero-film, .hero-hint, .hero .wing, .hero .look { display: none; }
.hero-bust { order: 1; margin: 0 var(--pad) clamp(28px, 4vw, 48px) max(var(--pad), calc((100% - var(--max)) / 2)); max-width: 560px; aspect-ratio: 4 / 3; border-radius: calc(var(--r) + 6px); overflow: hidden; background: #8f9486; }
.hero-face { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

.js-hero .hero {
  position: sticky; top: 0; z-index: 0; display: block; height: 100vh; height: 100svh; min-height: 480px; overflow: hidden; contain: layout paint;
  background: #8f9486; color: var(--ink); --vh: 1vh; --u: min(1vw, calc(1.75 * var(--vh)));
}
@supports (height: 100svh) { .js-hero .hero { --vh: 1svh; } }
.js-hero .hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url("/assets/img/grain.png") repeat; background-size: 192px; opacity: .07; }
.js-hero .hero-film { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .7s var(--ease); }
.js-hero .hero-film.on { opacity: 1; }
.js-hero .hero-bust { position: absolute; margin: 0; max-width: none; aspect-ratio: auto; border-radius: 0; overflow: visible; background: none; will-change: transform, opacity; animation: studio-in .9s var(--ease) both; }
.js-hero .hero-face { position: absolute; inset: 0; max-width: none; object-fit: fill; }
.js-hero .hero .wing { display: block; position: absolute; top: 0; height: 100%; width: 80vw; max-width: none; }
.js-hero .hero .wing-l { right: calc(100% - 1px); }
.js-hero .hero .wing-r { left: calc(100% - 1px); }
.js-hero .hero .look { display: block; position: absolute; opacity: 0; pointer-events: none; }   /* his head, turned to the pointer (look.js) */
.js-hero .hero .look.on { opacity: 1; }
.js-hero .hero .wrap {
  position: absolute; z-index: 2; left: 60vw; right: var(--pad); top: calc(var(--top-h) + 3 * var(--vh)); bottom: 72px;
  width: auto; max-width: 620px; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; will-change: transform, opacity;
}
.js-hero .hero .page-head { padding: 0; }
.js-hero .hero .page-head h1 { margin-top: calc(1 * var(--u)); font-size: clamp(34px, calc(4.3 * var(--u)), 72px); max-width: 8.8em; }
.js-hero .hero .page-head .lede { margin-top: calc(1.5 * var(--u)); max-width: 46ch; font-size: clamp(15px, calc(1.15 * var(--u)), 18px); color: var(--ink); }
.js-hero .hero .page-head .actions { margin-top: calc(1.9 * var(--u)); }
.js-hero .hero .kick { color: var(--ink); }
.js-hero .hero .btn-line { border-color: rgba(27, 32, 29, .4); }
.js-hero .hero .page-head > * { animation: rise-in .9s var(--ease) both; }
.js-hero .hero .page-head h1 { animation: none; }
.js-hero .hero .page-head h1 .w i { animation: word-up 1s var(--ease) both; animation-delay: calc(.18s + var(--i) * 55ms); }
@keyframes word-up { from { transform: translate3d(0, 112%, 0); } }
.js-hero .hero .page-head > :nth-child(1) { animation-delay: .12s; }
.js-hero .hero .page-head > :nth-child(2) { animation-delay: .2s; }
.js-hero .hero .page-head > :nth-child(3) { animation-delay: .3s; }
.js-hero .hero .page-head > :nth-child(4) { animation-delay: .4s; }
@keyframes rise-in { from { opacity: 0; transform: translate3d(0, 24px, 0); } }
@keyframes studio-in { from { opacity: 0; } }
.js-hero .hero-hint {
  position: absolute; z-index: 2; left: var(--pad); bottom: 30px; margin: 0; display: grid; justify-items: center; gap: 8px;
  font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.js-hero .hero-hint i { width: 1px; height: 34px; background: linear-gradient(var(--ink), rgba(27, 32, 29, 0)); transform-origin: top; animation: hint-drip 2.4s var(--ease) infinite; }
@keyframes hint-drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.js-hero .sheet-page { position: relative; z-index: 2; margin-top: 30vh; margin-top: 30svh; background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: 0 -22px 60px rgba(20, 24, 22, .2); padding-top: clamp(40px, 6vw, 84px); }
.js-hero .page-work .sheet-page, .js-hero .page-services .sheet-page { margin-top: 46vh; margin-top: 46svh; }      /* (his own scene on these pages: a little more room to play it) */
.js-hero .page-about .sheet-page { margin-top: 112vh; margin-top: 112svh; }      /* (the camera pulls back, he folds his arms, he walks up to you: all of it before the sheet) */
.js-hero .sheet-page::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: url("/assets/img/grain.png") repeat; background-size: 192px; opacity: .08; }
.js-hero .has-hero .top:not(.solid)::before { opacity: 0; }
.nav-open .top::before, .js-hero .has-hero.nav-open .top::before { opacity: 1; }   /* the open menu always gets a solid bar above it */
.js-hero .has-hero.page::before { display: none; }   /* (the sheet carries its own grain) */
.js-hero .page-quote .hero-hint { display: none; }    /* (the chat button sits in that corner on this page) */
@media (max-height: 640px) and (min-width: 900px) {
  .js-hero .hero .page-head .lede { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
}
@media (max-width: 899px) and (max-aspect-ratio: 1/1) {   /* phones and upright tablets: he stands above, the heading is a card below */
  .js-hero .hero .wrap { display: block; left: var(--pad); right: var(--pad); top: auto; bottom: 76px; max-width: none; padding: 15px 17px 17px; border-radius: 18px; background: rgba(243, 243, 238, .93); }
  .js-hero .hero .page-head h1 { margin-top: 8px; font-size: clamp(26px, 7.4vw, 40px); line-height: 1.02; max-width: none; }
  .js-hero .hero .page-head .lede { margin-top: 10px; max-width: none; font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
  .js-hero .hero .page-head .actions { margin-top: 13px; gap: 8px; }
  .js-hero .hero .page-head .actions .btn { height: 40px; padding: 0 15px; font-size: 13.5px; }
  .js-hero .hero .kick { font-size: 11.5px; }
  .js-hero .hero-hint { display: none; }
  .js-hero .sheet-page { border-radius: 22px 22px 0 0; }
}

/* ---------- motion on scroll (only when ui.js is running; it removes .rv again once a thing has arrived) ---------- */
.js .rv { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .7s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }
.js .svc-row.rv.in.out { opacity: .36; }
/* headings rise word by word: each word stands in a window just its own size */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em .05em .2em; margin: -.12em -.05em -.2em; }
.w i { display: inline-block; font-style: normal; }
.js .rv.words { opacity: 1; transform: none; }
.js .rv.words .w i { transform: translate3d(0, 112%, 0); transition: transform .95s var(--ease) calc(var(--d, 0ms) + var(--i) * 45ms); }
.js .rv.words.in .w i { transform: none; }
.proof b { font-variant-numeric: tabular-nums; }

/* ---------- the band of words above the footer (ui.js moves it with the scroll) ---------- */
.marq { overflow: hidden; padding: clamp(18px, 3vw, 40px) 0 clamp(26px, 4vw, 56px); -webkit-user-select: none; user-select: none; }
.marq-run { display: flex; width: max-content; will-change: transform; }
.marq span { flex: none; padding-right: .5em; font: 700 clamp(42px, 7.6vw, 116px)/1 var(--display); letter-spacing: -.022em; white-space: nowrap; color: var(--ink); }
.marq span::after { content: "✳"; margin-left: .5em; font: 400 .34em/1 var(--sans); vertical-align: .62em; color: var(--ink-3); }
.marq span:nth-child(even) { color: transparent; -webkit-text-stroke: 1.2px rgba(27, 32, 29, .55); }
.marq span:nth-child(even)::after { -webkit-text-stroke: 0; }

/* ---------- one page hands over to the next with a short cross-fade (browsers that can) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- 404 ---------- */
.nf { min-height: 80vh; display: grid; align-content: center; }

/* ---------- smaller screens ---------- */
@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 899px) {
  :root { --top-h: 58px; }
  .top-nav a:not(.btn) { display: none; }
  .menu-btn { display: grid; }
  .top .btn { height: 38px; padding: 0 14px; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .proof > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .svc-group { grid-template-columns: 1fr; }
  .qb { grid-template-columns: 1fr; }
  .qb-panel { position: sticky; top: auto; bottom: 0; z-index: 5; margin: 0 calc(var(--pad) * -1); padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(20, 24, 22, .25); }
  .qb-panel h2, .qb-incl, .qb-fine { display: none; }
  .qb-pick { margin-top: 0; min-height: 0; font-size: 14.5px; }
  .qb-pick small { display: inline; margin: 0 0 0 6px; }
  .qb-est { margin-top: 10px; padding-top: 10px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .qb-est b { font-size: 24px; }
  .qb-panel .btn { margin-top: 12px; height: 44px; }
  .page-quote .chat-fab { display: none; }
  .qb-panel > .buddy-dock { right: calc(var(--pad) - 4px); top: -43px; width: 52px; height: 52px; }   /* on a phone the estimate is a bar at the bottom: he sits on its top edge */
  .contact-grid, .case-body { grid-template-columns: minmax(0, 1fr); }
  .case-side { position: relative; top: 0; }
  .cta { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline.live li { padding-left: 28px; }
  .timeline.live::before, .timeline.live::after { left: 4px; }
  .timeline.live li::before { left: 0; }
  .fit { grid-template-columns: 1fr; padding: 16px 18px; }
}
@media (max-width: 640px) {
  .g2, .g3, .g4, .opts, .row2, .steps { grid-template-columns: 1fr; }
  .brand-text span { display: none; }
  .svc-row { grid-template-columns: 1fr; padding: 18px; }
  .svc-row .price { text-align: left; }
  .case-meta { grid-template-columns: 1fr 1fr; }
  .case-nav { grid-template-columns: 1fr; }
  .case-nav a:last-child { text-align: left; }
  .search-box { order: 0; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .work-tools { flex-wrap: wrap; }
  .filters { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 2px var(--pad) 6px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
  .addons td:first-child { width: 60%; }
  .term-out { height: 320px; font-size: 12.5px; }
  .chat { right: 0; bottom: 0; width: 100vw; height: 100svh; border-radius: 0; }
  .chat-fab { padding: 0 16px 0 58px; }
  .chat-fab.away, .chat-fab.plain { padding-left: 13px; }
  .buddy-seat { left: -5px; width: 60px; height: 60px; margin-top: -30px; }
  .chat-fab i { left: 38px; top: 31px; }
  .learn li { flex-direction: column; gap: 4px; }
  .learn span { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .buddy.on { animation: none; }
}
