/* WarmTouch marketing site
   Order: brand tokens (brand guide §11, verbatim) → extra tokens → fonts → base →
   components → header/footer → sections → product mockups → motion. */

/* ==== Brand guide §11: drop-in tokens (verbatim) ==== */
:root {
  --bg: #F6F1EA;
  --surface: #FBF7F1;
  --surface-alt: #F1EADF;
  --border: #E4DACB;
  --ink: #2B2520;
  --ink-soft: #6B5F53;
  --ink-muted: #9C8F81;
  --accent: #B0553A;
  --accent-soft: #E8C9B8;
  --on-accent: #FFFFFF;
  --amber: #C8862E;
  --amber-soft: #F2E2C6;
  --success: #5B7A4B;
  --danger: #9A3B2E;

  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-bubble: 14px;
  --radius-pill: 999px;

  --shadow-float: 0 8px 24px rgba(43, 37, 32, 0.08);

  --motion-fast: 180ms;
  --motion-base: 220ms;
  --motion-slow: 240ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A1613;
    --surface: #221C18;
    --surface-alt: #2A231E;
    --border: #3A312A;
    --ink: #F2EADF;
    --ink-soft: #B7A797;
    --ink-muted: #7E7063;
    --accent: #D97757;
    --accent-soft: #3A2620;
    --on-accent: #1A1613;
    --amber: #E0A85A;
    --amber-soft: #2E2518;
    --success: #5B7A4B;
    --danger: #9A3B2E;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  font-synthesis: none;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }

/* ==== Extra tokens (spec §2.1) ==== */
:root {
  --container: 1160px;
  --gutter: 20px;
  --section-y: 72px;
  --header-h: 64px;
  --terracotta-fixed: #B0553A;
  --on-terracotta: #FBF7F1;
  /* Link text: the accent 2% darker, because #B0553A on --bg is 4.44:1, just under
     WCAG AA's 4.5. Dark mode uses the accent as is (below). */
  --link: #AC5339;
  /* presence colours, light values: mockups are always light */
  --presence-available: #3FA34D;
  --presence-busy: #C0392B;
  --presence-away: #E0A85A;
  --presence-oncall: #C8862E;
  --presence-offline: #9C8F81;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --link: var(--accent); }
}
@media (min-width: 960px) {
  :root { --gutter: 32px; --section-y: 96px; }
}

/* ==== Fonts (self-hosted, Latin subset, SIL OFL: see assets/fonts/OFL.txt) ==== */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-tight-latin-var.woff2') format('woff2');
}

/* ==== Base ==== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body { margin: 0; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
@media (min-width: 960px) { body { font-size: 18px; } }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; }
code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.9em; background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
html:not(.js) .js-only { display: none !important; }
.js .nojs-only { display: none !important; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-pill);
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-alt); }
.section--surface { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: 20px; }

/* Type */
.h1 { font-size: clamp(44px, 7vw, 80px); line-height: 1.05; letter-spacing: -0.01em; max-width: 16ch; }
h2 { font-size: clamp(34px, 4.5vw, 48px); line-height: 1.1; }
h3 { font-size: 24px; line-height: 30px; }
@media (min-width: 640px) { h3 { font-size: 30px; line-height: 36px; } }
.card-title { font-family: var(--font-display); font-size: 20px; line-height: 28px; letter-spacing: 0; }
.lead { font-size: 20px; line-height: 30px; color: var(--ink-soft); }
.caption { font-size: 13px; line-height: 20px; color: var(--ink-soft); }
.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: 12px; line-height: 16px;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 16px;
}
.em-accent { font-family: var(--font-display); font-style: italic; color: var(--accent); }
.prose { max-width: 64ch; }
.prose > * + * { margin-top: 1em; }

/* ==== Components ==== */
.icon {
  width: 24px; height: 24px; flex: none; color: var(--ink-soft);
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon--accent { color: var(--accent); }
.icon--sm { width: 20px; height: 20px; }

.btn {
  --btn-h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--btn-h); padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  font: 500 15px/1.2 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: opacity var(--motion-fast) var(--ease), background-color var(--motion-fast) var(--ease);
}
.btn:hover, .btn:active { opacity: 0.8; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn .icon { color: inherit; width: 18px; height: 18px; }
.btn--lg { --btn-h: 48px; }
.btn--sm { padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--accent { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-alt); opacity: 1; }
.btn--ghost:active { opacity: 0.8; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; font-size: 16px; }
.card > .icon { margin-bottom: 16px; }
.card-title + p { margin-top: 8px; }

.input {
  background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-md);
  height: 44px; padding: 0 16px; font: 400 17px var(--font-body);
}
.label { display: block; font: 600 13px/20px var(--font-body); margin-bottom: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--ink);
  font: 600 12px/16px var(--font-body);
}
.float { box-shadow: var(--shadow-float); }

.text-link { font-weight: 500; }

/* ==== Header ==== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface); border-bottom: 1px solid var(--border);
  transition: box-shadow var(--motion-fast) var(--ease);
}
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
  .site-header {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.site-header.is-scrolled { box-shadow: var(--shadow-float); }
.site-header__inner { display: flex; align-items: center; gap: 12px; height: calc(var(--header-h) - 1px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand img { width: 36px; height: 36px; border-radius: var(--radius-md); }
.brand__name { font-family: var(--font-display); font-size: 24px; line-height: 1; }
.nav { display: none; }
.nav a, .header-signin {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink-soft); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color var(--motion-fast) var(--ease);
}
.nav a:hover, .header-signin:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-signin, .header-actions .btn { display: none; }
.menu-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--ink); cursor: pointer;
}
.menu-btn .icon { color: inherit; grid-area: 1 / 1; }
.menu-btn .icon--x, .menu-btn[aria-expanded="true"] .icon--menu { display: none; }
.menu-btn[aria-expanded="true"] .icon--x { display: block; }
html:not(.js) .menu-btn { display: none; }
.mobile-menu { background: var(--surface); border-top: 1px solid var(--border); }
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; padding: 8px 0 20px; }
.mobile-menu li + li { border-top: 1px solid var(--border); }
.mobile-menu a:not(.btn) { display: flex; align-items: center; min-height: 48px; color: var(--ink); text-decoration: none; font-weight: 500; }
.mobile-menu .btn { margin-top: 12px; width: 100%; }
@media (min-width: 640px) {
  .header-actions .btn { display: inline-flex; }
}
@media (min-width: 960px) {
  .nav { display: flex; margin-inline: auto; }
  .header-actions { margin-left: 0; }
  .header-signin { display: inline-flex; }
  .menu-btn, .mobile-menu { display: none; }
}

/* ==== Footer ==== */
.site-footer { background: var(--surface-alt); border-top: 1px solid var(--border); padding-block: 56px 32px; font-size: 15px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } .footer-about { grid-column: 1 / -1; } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer-about { grid-column: auto; } }
.footer-tagline { font-family: var(--font-display); font-style: italic; font-size: 20px; line-height: 28px; color: var(--ink-soft); margin-top: 12px; max-width: 26ch; }
.footer-col .eyebrow { margin-bottom: 8px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ==== Home: hero ==== */
.hero { position: relative; padding-block: 48px var(--section-y); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.45;
  background: radial-gradient(ellipse 70% 60% at 100% 0%, var(--accent-soft), transparent 70%);
}
.hero__grid { position: relative; display: grid; gap: 56px; align-items: center; }
.hero-tagline {
  font-family: var(--font-display); font-style: italic; color: var(--accent);
  font-size: clamp(24px, 2.4vw, 30px); line-height: 1.2; margin-bottom: 20px;
}
.hero .lead { margin-top: 24px; max-width: 34em; }
.hero .btn-row { margin-top: 32px; }
.hero .caption { margin-top: 16px; }
@media (min-width: 960px) {
  .hero { padding-top: 72px; }
  .hero__grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}
@media (min-width: 1200px) { .hero { padding-block: 96px 128px; } }

.hero-visual { display: grid; width: 100%; max-width: 600px; margin-inline: auto; }
.hero-visual > * { grid-area: 1 / 1; }
.hero-visual .frame--desk { width: 88%; justify-self: end; align-self: start; }
.hero-visual .frame--phone { width: clamp(132px, 38%, 240px); justify-self: start; align-self: start; margin-top: 24%; }

/* ==== Home: belief, quote, letter ==== */
.split { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: 64px; }
}
.quote { text-align: center; max-width: 760px; margin-inline: auto; }
.quote blockquote p {
  font-family: var(--font-display); font-style: italic; font-size: clamp(28px, 3.5vw, 40px); line-height: 1.2;
  max-width: 28ch; margin-inline: auto; color: var(--ink);
}
.quote blockquote::before { content: ""; display: block; width: 48px; height: 1px; background: var(--accent); margin: 0 auto 32px; }
.quote .caption { margin: 24px auto 0; max-width: 52ch; font-size: 15px; line-height: 24px; }
.letter { max-width: 640px; margin-inline: auto; }
.letter h2 { margin-bottom: 28px; }
.letter__sign { font-family: var(--font-display); font-style: italic; font-size: 22px; margin-top: 28px; }

/* ==== Home: grids ==== */
.pillars, .who-grid { list-style: none; padding: 0; display: grid; gap: 20px; }
@media (min-width: 640px) { .pillars, .who-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .pillars { grid-template-columns: repeat(6, 1fr); }
  .pillars > li { grid-column: span 2; }
  .pillars > li:nth-child(4) { grid-column: 2 / span 2; }
  .pillars > li:nth-child(5) { grid-column: 4 / span 2; }
}
.pillars .card, .who-grid .card { height: 100%; }
.not-for { margin-top: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.not-for p:last-child { max-width: 72ch; }
.not-for .eyebrow { margin-bottom: 8px; }

.essentials, .security-list { list-style: none; padding: 0; display: grid; gap: 28px 40px; }
.essentials li, .security-list li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; font-size: 16px; }
.essentials strong { font-weight: 600; }
@media (min-width: 640px) { .essentials, .security-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .essentials { grid-template-columns: repeat(3, 1fr); } }
.essentials-more { margin-top: 40px; }

/* ==== Home: see it happen ==== */
.demo-rows { display: grid; gap: 88px; }
.demo-row { display: grid; gap: 32px; align-items: center; }
.demo-row__text h3 { margin-bottom: 16px; }
.demo-row__text p { max-width: 52ch; }
.demo-row__visual { min-width: 0; display: grid; justify-items: center; gap: 16px; }
@media (min-width: 960px) {
  .demo-rows { gap: 128px; }
  .demo-row { grid-template-columns: 5fr 7fr; gap: 64px; }
  .demo-row--flip { grid-template-columns: 7fr 5fr; }
  .demo-row--flip .demo-row__text { order: 2; }
}

/* ==== Home: pricing ==== */
.price-card { max-width: 560px; margin-inline: auto; padding: 32px; border-radius: 16px; }
@media (min-width: 640px) { .price-card { padding: 40px; } }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.price__amount { font-family: var(--font-display); font-size: 64px; line-height: 1; }
.price__per { color: var(--ink-soft); font-size: 17px; }
.price__first { font-weight: 500; margin-top: 12px; }
.price__extra { color: var(--ink-soft); }
.price-card hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.price-card .eyebrow { margin-bottom: 12px; }
.checks { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 16px; margin-bottom: 32px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; }
.checks .icon { width: 20px; height: 20px; color: var(--success); margin-top: 2px; }

.calc { max-width: 560px; margin: 40px auto 0; text-align: center; }
.calc .label { font-size: 15px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper__btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: background-color var(--motion-fast) var(--ease);
}
.stepper__btn:hover { background: var(--surface-alt); }
.stepper__btn .icon { color: inherit; width: 18px; height: 18px; }
.stepper .input { width: 96px; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc__total { display: block; font-family: var(--font-display); font-size: 32px; line-height: 40px; margin-top: 16px; }
.price-table { margin: 40px auto 0; border-collapse: collapse; font-size: 16px; min-width: 240px; }
.price-table th, .price-table td { padding: 8px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.price-table th { font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.fine-print { margin-top: 32px; text-align: center; }

/* ==== Home: FAQ ==== */
.faq { max-width: 820px; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px; padding: 20px 0; cursor: pointer; list-style: none;
  font: 600 18px/1.4 var(--font-body);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--motion-fast) var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .answer { padding-bottom: 24px; max-width: 64ch; }

/* ==== Terracotta band (one per page) ==== */
.band { background: var(--terracotta-fixed); color: var(--on-terracotta); padding-block: 96px; text-align: center; }
@media (min-width: 1200px) { .band { padding-block: 128px; } }
.band__inner { max-width: 640px; margin-inline: auto; }
.band h2 { color: inherit; }
.band h2 em { font-style: italic; color: inherit; }
.band .lead { color: var(--on-terracotta); margin-top: 20px; }
.band .btn { margin-top: 32px; }
.band .btn--primary { background: #2B2520; color: #FBF7F1; }
.band .caption { color: var(--on-terracotta); margin-top: 20px; }
.band a:not(.btn) { color: var(--on-terracotta); text-decoration: underline; }
.band :focus-visible { outline-color: var(--on-terracotta); }

/* ==== Features page ==== */
.page-hero { padding-block: 56px 48px; }
.page-hero .lead { margin-top: 24px; max-width: 40em; }
@media (min-width: 960px) { .page-hero { padding-block: 88px 64px; } }
.f-nav { position: sticky; top: calc(var(--header-h) - 1px); z-index: 20; background: var(--surface); border-block: 1px solid var(--border); }
.f-nav ul { display: flex; gap: 6px; overflow-x: auto; list-style: none; margin: 0; padding: 10px var(--gutter); scrollbar-width: none; }
.f-nav ul::-webkit-scrollbar { display: none; }
.f-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; white-space: nowrap;
  border: 1px solid var(--border); border-radius: var(--radius-pill); color: var(--ink-soft);
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.f-nav a.is-active { color: var(--accent); border-color: currentColor; text-decoration: underline; }
.f-section { padding-block: 56px; scroll-margin-top: calc(var(--header-h) + 72px); }
.f-section--alt { background: var(--surface-alt); border-image: conic-gradient(var(--surface-alt) 0 0) fill 0 / / 0 100vmax; }
.f-inner { padding-inline: var(--gutter); }
.f-section .lead { margin-top: 12px; font-family: var(--font-display); font-style: italic; }
.flist { list-style: none; padding: 0; display: grid; gap: 14px 40px; margin-top: 32px; font-size: 16px; }
.flist li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; }
.flist .icon { width: 20px; height: 20px; color: var(--success); margin-top: 2px; }
.f-section .security-list { margin-top: 32px; }
@media (min-width: 640px) { .flist { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .f-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 56px; width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
  .f-nav { position: static; background: none; border: 0; }
  .f-nav ul { position: sticky; top: calc(var(--header-h) + 32px); flex-direction: column; overflow: visible; padding: 56px 0; gap: 2px; }
  .f-nav a { border: 0; border-radius: var(--radius-md); min-height: 40px; padding: 0 12px; font-size: 15px; }
  .f-nav a:hover { color: var(--ink); }
  .f-nav a.is-active { color: var(--accent); }
  .f-section { padding-block: 72px; scroll-margin-top: calc(var(--header-h) + 16px); }
  .f-inner { padding-inline: 0; }
}

/* ==== Legal and 404 ==== */
.article { max-width: 720px; margin-inline: auto; padding-block: var(--section-y); }
.article .badge { margin-bottom: 24px; }
.article h1 { font-size: clamp(40px, 6vw, 56px); line-height: 1.1; margin-bottom: 24px; }
/* Legal pages: generated by scripts/legal/build.py */
.legal > h2 { font-size: clamp(26px, 3.5vw, 32px); line-height: 1.2; margin-top: 48px; }
.legal-updated { color: var(--ink-soft); font-size: 15px; }
.legal ul { padding-left: 1.25em; }
.legal li + li { margin-top: 0.5em; }
.legal a { overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal th { font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: var(--section-y); }
.notfound h1 { margin-inline: auto; }
.notfound p { margin-block: 20px 32px; }

/* ==== Product mockups (always light: spec §2.2, §4) ==== */
.mock {
  --bg: #F6F1EA; --surface: #FBF7F1; --surface-alt: #F1EADF; --border: #E4DACB;
  --ink: #2B2520; --ink-soft: #6B5F53; --ink-muted: #9C8F81;
  --accent: #B0553A; --accent-soft: #E8C9B8; --on-accent: #FFFFFF;
  --amber: #C8862E; --amber-soft: #F2E2C6; --success: #5B7A4B; --danger: #9A3B2E;
  color-scheme: light;
  position: relative; overflow: hidden;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-float);
  font-size: 13px; line-height: 1.4; text-align: left;
}
.mock .icon { width: 16px; height: 16px; }
.mock b { font-weight: 600; }
.frame { width: 100%; }
@media (prefers-color-scheme: dark) {
  .frame { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 8px; }
  .frame--phone { border-radius: 40px; }
}
.frame--desk .mock { border-radius: 24px; }

/* Shared mock parts */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--presence-offline); }
.dot--available { background: var(--presence-available); }
.dot--oncall { background: var(--presence-oncall); }
.dot--busy { background: var(--presence-busy); }
.dot--away { background: var(--presence-away); }
.pill { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.3em 0.75em; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.pill--oncall { background: var(--amber-soft); border-color: transparent; }
.tile { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.avatar { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font-size: 10px; font-weight: 600; flex: none; }
.chip { padding: 4px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft); font-weight: 500; font-size: 12px; white-space: nowrap; }
.chip.is-active { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.mbadge { display: inline-flex; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--accent-soft); font-size: 11px; font-weight: 600; white-space: nowrap; }
.mbadge--note { background: var(--amber); color: #2B2520; }
.bubble { max-width: 85%; padding: 0.6em 0.9em; border-radius: var(--radius-bubble); line-height: 1.35; }
.bubble--customer { background: var(--surface-alt); align-self: flex-start; border-bottom-left-radius: var(--radius-sm); }
.bubble--agent { background: var(--ink); color: var(--bg); align-self: flex-end; border-bottom-right-radius: var(--radius-sm); }
.chat { display: flex; flex-direction: column; gap: 0.6em; }
.fake-input { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0.7em 0.9em; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: #7A7065; /* --ink-muted darkened to 4.5:1 (mockups are always light) */ }
.fake-input .icon { color: var(--accent); }
.fake-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.55em 1.1em; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-weight: 600; }

/* Desktop ticket list (hero) */
.desk { container-type: inline-size; }
.desk__bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.desk__body { background: var(--bg); padding: 14px; }
.desk__title { font-family: var(--font-display); font-size: 20px; margin-bottom: 10px; }
.chips { display: flex; gap: 6px; margin-bottom: 12px; }
.tlist { list-style: none; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.trow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; }
.trow + .trow { border-top: 1px solid var(--border); }
.trow__main { display: flex; flex-direction: column; min-width: 0; }
.trow__main span { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow__chan, .trow .avatar { display: none; }
.trow__time { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@container (min-width: 400px) {
  .trow { grid-template-columns: auto minmax(0, 1fr) 52px 28px auto; }
  .trow__chan { display: block; color: var(--ink-soft); }
  .trow .avatar { display: grid; }
}

/* Phone */
.phone { container-type: inline-size; aspect-ratio: 9 / 19.5; border-radius: 32px; background: var(--surface); }
.phone__screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 0.8em;
  padding: 9cqi 6cqi 6cqi; font-size: clamp(8px, 5.4cqi, 13px);
}
.phone__top { display: flex; justify-content: center; }
.phone__head { display: flex; align-items: center; gap: 0.6em; padding-bottom: 0.7em; border-bottom: 1px solid var(--border); }
.phone__head span { color: var(--ink-soft); display: block; font-size: 0.9em; }
.phone .chat { flex: 1; }
.phone .fake-input { margin-top: auto; }

/* On-call demo */
.oncall { display: grid; gap: 20px; justify-items: center; width: 100%; }
.frame--widget { max-width: 340px; }
.oncall .frame--phone { width: min(240px, 100%); }
@media (min-width: 640px) {
  .oncall { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .oncall .frame--phone { width: 220px; }
}
.widget { display: flex; flex-direction: column; min-height: 340px; }
.widget__head { padding: 14px 16px; background: var(--accent); color: #FFFFFF; }
.widget__head b { display: block; font-size: 14px; }
.widget__status { display: grid; font-size: 12px; margin-top: 2px; }
.widget__status > * { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; }
.widget__status .dot { outline: 2px solid #FFFFFF; }
.widget__body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.widget .bubble--customer { align-self: flex-end; border-radius: var(--radius-bubble) var(--radius-bubble) var(--radius-sm) var(--radius-bubble); }
.widget .bubble--agent { align-self: flex-start; border-radius: var(--radius-bubble) var(--radius-bubble) var(--radius-bubble) var(--radius-sm); }
.widget__foot { padding: 0 12px 12px; }
.sys { background: var(--surface-alt); border-radius: var(--radius-md); padding: 12px; display: grid; gap: 10px; }
.sys .fake-btn { justify-self: end; }

.p-idle { display: flex; flex-direction: column; gap: 0.6em; }
.p-idle__title { font-family: var(--font-display); font-size: 1.5em; }
.p-row { background: var(--surface-alt); border-radius: var(--radius-md); padding: 0.7em 0.8em; }
.p-row span { display: block; color: var(--ink-soft); }
.p-banner {
  position: absolute; top: 18cqi; left: 4cqi; right: 4cqi; z-index: 2;
  display: grid; grid-template-columns: auto 1fr; gap: 0.5em 0.6em; align-items: start;
  padding: 0.9em; border-radius: var(--radius-bubble); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-float);
}
.p-banner .icon { color: var(--amber); width: 1.4em; height: 1.4em; }
.p-banner span { display: block; color: var(--ink-soft); font-size: 0.9em; }
.p-claim { grid-column: 1 / -1; justify-self: stretch; }
.p-chat { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; gap: 0.8em; padding: 9cqi 6cqi 6cqi; background: var(--surface); }

.oncall [data-anim] {
  transition: opacity var(--motion-base) var(--ease), transform var(--motion-base) var(--ease), visibility var(--motion-base);
}
.oncall[data-at="0"] .v-visitor,
.oncall[data-at="0"] .v-waiting,
.oncall[data-at="4"] .v-waiting,
.oncall:not([data-at="4"]) .v-online,
.oncall:not([data-at="4"]) .v-agent,
.oncall:not([data-at="4"]) .p-chat { opacity: 0; visibility: hidden; }
.oncall:not([data-at="4"]) .v-agent { transform: translateY(6px); }
.oncall:not([data-at="2"]):not([data-at="3"]) .p-banner { opacity: 0; visibility: hidden; transform: translateY(-120%); }
.oncall[data-at="3"] .p-claim { transform: scale(0.97); opacity: 0.8; }

/* Context: desktop ticket */
.ticket { container-type: inline-size; width: 100%; }
.ticket__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ticket__head .muted { color: var(--ink-soft); }
.ticket__grid { display: grid; background: var(--bg); }
.thread { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.update { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.update__meta { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; margin-bottom: 4px; }
.update__meta .icon { width: 14px; height: 14px; }
.update__meta b { color: var(--ink); }
.side { padding: 14px; display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--border); background: var(--surface-alt); }
.side__title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 6px; }
.side__name { font-family: var(--font-display); font-size: 17px; margin-bottom: 6px; }
.note { background: var(--amber-soft); border-radius: var(--radius-md); padding: 10px 12px; }
.corr + .corr { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.corr span { display: block; color: var(--ink-soft); }
.corr ul { margin: 4px 0 0; padding-left: 16px; color: var(--ink-soft); }
@container (min-width: 520px) {
  .ticket__grid { grid-template-columns: 1.35fr 1fr; }
  .side { border-top: 0; border-left: 1px solid var(--border); }
}

/* Mobile row: two phones */
.phones { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: 16px; justify-content: center; width: 100%; }
.lock { background: var(--surface-alt); }
.lock__time { font-family: var(--font-display); font-size: 4em; line-height: 1; text-align: center; margin-top: 0.6em; }
.lock__date { text-align: center; color: var(--ink-soft); margin-bottom: 1.2em; }
.notif { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-bubble); padding: 0.8em; }
.notif__app { display: flex; align-items: center; gap: 0.5em; color: var(--ink-soft); font-size: 0.9em; margin-bottom: 0.4em; }
.notif__app .tile { width: 1.4em; height: 1.4em; border-radius: 0.35em; }
.notif__app b { color: var(--ink); }
.notif__app span { margin-left: auto; }
.tcard { background: var(--surface-alt); border-radius: var(--radius-md); padding: 0.8em; }
.tcard__meta { display: flex; justify-content: space-between; gap: 0.5em; color: var(--ink-soft); font-size: 0.9em; }
.tcard__title { font-weight: 600; margin-top: 0.3em; }

/* Terminology */
.term-demo { width: 100%; display: grid; gap: 20px; justify-items: center; }
.segmented { display: inline-grid; grid-template-columns: repeat(4, auto); gap: 2px; padding: 4px; border: 1px solid var(--border); border-radius: 26px; background: var(--surface); }
.segmented label { position: relative; display: block; }
.segmented input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 11px; border-radius: var(--radius-pill); color: var(--ink-soft); font-size: 14px; font-weight: 500; transition: background-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease); }
.segmented input:checked + span { background: var(--ink); color: var(--bg); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 640px) { .segmented span { padding: 0 20px; font-size: 15px; } }
.app { container-type: inline-size; width: 100%; }
.app__layout { display: grid; }
.app__side { display: flex; gap: 2px; padding: 10px; background: var(--surface-alt); border-bottom: 1px solid var(--border); overflow: hidden; }
.app__nav { padding: 7px 10px; border-radius: var(--radius-md); color: var(--ink-soft); white-space: nowrap; }
.app__nav.is-active { background: var(--surface); color: var(--ink); font-weight: 600; }
.app__main { padding: 14px; background: var(--bg); min-width: 0; }
.app__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.app__title { font-family: var(--font-display); font-size: 20px; line-height: 1.2; }
.app__table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.app__tr { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 10px; padding: 9px 12px; }
.app__tr + .app__tr { border-top: 1px solid var(--border); }
.app__tr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app__th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); background: var(--surface-alt); }
.empty { margin-top: 12px; padding: 14px; border: 1px dashed var(--border); border-radius: var(--radius-md); text-align: center; color: var(--ink-soft); }
.mini-btn { padding: 6px 12px; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-weight: 500; font-size: 12px; white-space: nowrap; }
@container (min-width: 460px) {
  .app__layout { grid-template-columns: 140px minmax(0, 1fr); }
  .app__side { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--border); }
}
[data-term] { transition: opacity 120ms var(--ease); }
.is-swapping [data-term] { opacity: 0; }

/* ==== Motion ==== */
.reveal [data-reveal] { transition: opacity var(--motion-slow) var(--ease), transform var(--motion-slow) var(--ease); }
.reveal [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(12px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-property: opacity !important;
    transition-duration: var(--motion-fast) !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .reveal [data-reveal]:not(.is-visible) { transform: none; }
  .oncall [data-anim] { transform: none !important; }
}

/* ---- Cookie notice (built by assets/js/site.js: initCookieNotice). Says the site does not track.
   scripts/check-cookie-consent.sh flags any change that would need a real opt-in. ---- */
.cookie-notice {
  position: fixed;
  z-index: 30; /* above page content, below the header, menus and skip link */
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  max-width: 34rem;
  padding: 16px 18px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  font-size: 15px;
  line-height: 1.5;
}
.cookie-notice__text { flex: 1 1 16rem; margin: 0; }
.cookie-notice__text strong { font-weight: 600; }
.cookie-notice__text a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.cookie-notice__ok { flex: 0 0 auto; }
@media (max-width: 520px) {
  .cookie-notice__ok { flex: 1 1 100%; }
}
@media print {
  .cookie-notice { display: none; }
}
