/* The panel's look (app/src/index.css): Traces' sand #E0A96D on the logo's warm neutrals. Light or dark is
   data-theme on <html>, set before the first paint by the inline script in each page; the media query only covers a
   page where it did not run. Keep the tokens in step with the panel's. */
:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --sunken: #f1ede7;
  --fg: #111111;
  --muted: #69625a;
  --line: #e3ddd4;
  --accent: #8a5d28;
  --sand: #e0a96d;
  --on-sand: #1a1208;
  --night: #0b0b0a;
  --night-fg: #f4f4f2;
  --night-muted: #a39b91;
  --night-line: #2b2824;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b0b0a;
  --surface: #151412;
  --sunken: #1d1b18;
  --fg: #f4f4f2;
  --muted: #a39b91;
  --line: #2b2824;
  --accent: #e0a96d;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0b0b0a;
    --surface: #151412;
    --sunken: #1d1b18;
    --fg: #f4f4f2;
    --muted: #a39b91;
    --line: #2b2824;
    --accent: #e0a96d;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.section { padding: 88px 20px; display: flex; flex-direction: column; gap: 40px; }
.narrow { max-width: 760px; }
.band { background: var(--sunken); border-block: 1px solid var(--line); }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.head { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.head h2, .talk h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
.talk h2 { max-width: 22ch; } /* section headings run on; short ones stay on one line */
.lead { color: var(--muted); font-size: 18px; max-width: 52ch; }

/* The logo: dark ink on light, light ink on dark (as the panel's Logo). Header: centred on the header (no menu links
   beside it any more to line its small letters up with). Footer: the logo's bottom is on the text's baseline (.footer
   aligns baselines; an image's is its bottom edge). */
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* Buttons: sand for the main action, an outline for the rest. */
.btn, .btn-g {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 10px;
  font: 600 15px/1 var(--font-sans); text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.btn { background: var(--sand); color: var(--on-sand); border: 1px solid var(--sand); }
.btn:hover { background: #e8b97f; }
.btn:active, .btn-g:active { transform: translateY(1px); }
.btn-g { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn-g:hover { border-color: var(--muted); }
/* Header: Log in (outline) beside Request access (sand), the same small size. */
.btn.small, .btn-g.small { height: 38px; padding: 0 14px; font-size: 14px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 32px; height: 64px; }
.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-links a, .footer nav a, .legal { line-height: 1; }
.brand img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--fg); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
/* The theme switch: a quiet icon, no outline, until hovered. */
.theme-switch {
  display: grid; place-items: center; width: 32px; height: 32px; opacity: .6;
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  transition: opacity .15s, background-color .15s;
}
.theme-switch[hidden] { display: none; }
.theme-switch:hover { color: var(--fg); opacity: 1; background: var(--sunken); }
.theme-switch svg { width: 15px; height: 15px; }
.theme-switch .moon, [data-theme="dark"] .theme-switch .sun { display: none; }
[data-theme="dark"] .theme-switch .moon { display: block; }

/* Hero */
/* The words on the left, the film on the right, sharing a row (heading at its top, subline at its bottom); the buttons
   on the next row. Stacked on a phone: words, buttons, film. */
.hero {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; row-gap: 28px; align-items: stretch;
  padding-top: 72px; padding-bottom: 96px;
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; justify-content: space-between; }
.hero .film { align-self: center; }
.hero > .actions { grid-column: 1; }
.hero-head, .hero-side { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.hero h1 { font-size: clamp(40px, 4.6vw, 54px); font-weight: 650; letter-spacing: -0.03em; }
/* The heading's box starts at the top of its capitals, so the film beside it starts level with the "T" (Chrome, Edge,
   Safari; elsewhere it starts at the line's top, a few pixels higher). */
.hero h1 { text-box: trim-start cap alphabetic; }
.tagline { color: var(--accent); font-size: clamp(20px, 2.4vw, 24px); font-weight: 600; letter-spacing: -0.01em; margin-top: -4px; }
.hero-sub { color: var(--muted); font-size: 19px; max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* The film: always on dark, its still until it plays, and a pause and a sound button on it. */
.film {
  position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--night-line); background: var(--night);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / .45);
}
.film video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Beside the words (wide screens), the frame runs from the heading's top to the buttons' bottom (both hero rows): the
   film keeps its shape inside it, with the frame's dark padding above and below (or at the sides), never cropped. The
   video sits on top of the frame, so its own size doesn't set the rows' height; the words and buttons do. */
@media (min-width: 901px) {
  .hero .film { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; aspect-ratio: auto; min-height: 280px; }
  .hero .film video { position: absolute; inset: 0; object-fit: contain; }
}
/* Controls along the bottom: play, the seek bar with the time, sound; a shade behind them keeps them readable. */
.film-controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
  padding: 32px 16px 14px; background: linear-gradient(to top, rgb(11 11 10 / .65), transparent);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
/* Shown while the pointer is over the film (a mouse), after a tap until the next tap on the film (touch, site.js),
   while the film is paused, and while a control has the keyboard's focus. */
@media (hover: hover) { .film:hover .film-controls { opacity: 1; pointer-events: auto; } }
.film.controls-on .film-controls, .film.paused .film-controls, .film:has(:focus-visible) .film-controls {
  opacity: 1; pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) { .film-controls { transition: none; } }
.film-seek { flex: 1; min-width: 0; margin: 0; accent-color: var(--sand); cursor: pointer; }
.film-seek[hidden], .film-time[hidden] { display: none; }
.film-time { color: var(--night-fg); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.film-controls .film-btn:last-child { margin-left: auto; }
.film-btn {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
  color: var(--night-fg); background: rgb(11 11 10 / .6); border: 1px solid rgb(244 244 242 / .2); border-radius: 50%;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.film-btn:hover { background: rgb(11 11 10 / .8); }
.film-btn .i-play, .film-btn .i-sound { display: none; }
.film-btn[aria-pressed="true"] .i-pause, .film-btn[aria-pressed="true"] .i-muted { display: none; }
.film-btn[aria-pressed="true"] .i-play, .film-btn[aria-pressed="true"] .i-sound { display: block; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li, .card {
  display: flex; flex-direction: column; gap: 10px; padding: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.steps h3, .card h3 { font-size: 19px; font-weight: 650; }
.steps p, .card p { color: var(--muted); }
.num {
  display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 6px;
  border-radius: 50%; background: var(--sand); color: var(--on-sand); font-weight: 700; font-size: 15px;
}

/* Tasks */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px;
  border-radius: 10px; background: color-mix(in srgb, var(--sand) 18%, transparent); color: var(--accent);
}

/* For teams */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.split .head { gap: 16px; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 650; }
.facts dd { margin: 0; color: var(--muted); }
.facts strong { color: var(--fg); font-weight: 600; }

/* Privacy */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 720px; }
.ticks li { position: relative; padding-left: 32px; font-size: 17px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--sand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1208' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Where it's used: a short band of four places Traces fits, icon and one line each. */
.uses .section { padding-top: 56px; padding-bottom: 56px; gap: 28px; }
.use-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.use-grid li { display: flex; flex-direction: column; gap: 8px; }
.use-grid .icon { width: 44px; height: 44px; margin-bottom: 4px; }
.use-grid h3 { font-size: 17px; font-weight: 650; }
.use-grid p { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* For managers: the story on the left, an illustration of the platform's progress view on the right (sample names). */
:root { --ok: #2f8f5b; --bad: #c2453d; }
[data-theme="dark"] { --ok: #5cc38a; --bad: #ef7a70; }
.mgr { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.mgr .head { gap: 16px; }
.mgr-points { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 18px; }
.mgr-points li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.mgr-points .icon { width: 36px; height: 36px; margin: 0; }
.mgr-points b { display: block; font-weight: 650; }
.mgr-points span:not(.icon) { color: var(--muted); }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; font-size: 14px;
  box-shadow: 0 30px 60px -36px rgb(0 0 0 / .35);
}
.panel-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-top b { font-weight: 650; }
.panel-top small, .p-row small { color: var(--muted); font-size: 12.5px; }
.panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.panel-stats div { padding: 14px 20px; }
.panel-stats div + div { border-left: 1px solid var(--line); }
.panel-stats b { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; }
.panel-stats span { color: var(--muted); font-size: 12.5px; }
.panel-stats .s-ok b { color: var(--ok); }
.panel-stats .s-go b { color: var(--accent); }
.panel-stats .s-bad b { color: var(--bad); }
.p-row { display: grid; grid-template-columns: 30px 1fr 110px 92px; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.p-row:last-child { border-bottom: 0; }
.p-row .who { font-weight: 600; line-height: 1.3; }
.p-row .who small { display: block; font-weight: 400; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--muted); font-size: 11px; font-weight: 700; }
.bar { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--sand); transform-origin: left; }
.bar.ok i { background: var(--ok); }
.bar.bad i { background: var(--bad); }
.chip { justify-self: end; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.chip.go { color: var(--accent); background: color-mix(in srgb, var(--sand) 22%, transparent); }
.chip.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }
.flag-note {
  grid-column: 2 / -1; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--bad) 8%, transparent); font-size: 13px; line-height: 1.45;
}
.flag-note svg { flex: none; margin-top: 2px; color: var(--bad); }

/* FAQ: a compact list, the questions flush, one rule apart; all start closed. */
#faq .section { gap: 0; padding-top: 64px; padding-bottom: 64px; }
#faq .head { margin-bottom: 20px; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 0; font-size: 16px; font-weight: 600; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 400; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); padding: 0 0 14px; font-size: 15px; max-width: 64ch; }

/* A page of text (terms.html). */
.prose { display: grid; gap: 16px; max-width: 64ch; font-size: 17px; }

/* Talk to us: always dark */
.night { background: var(--night); color: var(--night-fg); }
.night .lead { color: var(--night-muted); }
.talk { flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.talk > div { display: flex; flex-direction: column; gap: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer { display: flex; align-items: baseline; gap: 32px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; }
.footer img { height: 24px; width: auto; }
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.footer nav a:hover { color: var(--fg); }
.legal { margin-left: auto; color: var(--muted); font-size: 14px; }
.legal a { color: inherit; text-decoration: none; }
.legal a:hover { color: var(--fg); }

/* Motion. site.js adds .js-anim to <html> (never for reduced motion, so without script or with less motion everything
   is simply there) and data-reveal to what rises into view; .in when it does. --i staggers siblings. Once shown,
   site.js removes data-reveal, so hover effects run without the reveal's delay. */
.js-anim [data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js-anim [data-reveal].in { opacity: 1; transform: none; }
/* Step numbers, card icons and privacy ticks pop in just after their box. */
.num, .icon, .ticks li::before { transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), opacity .3s ease; }
.js-anim [data-reveal] .num, .js-anim [data-reveal] .icon, .js-anim .ticks li[data-reveal]::before { opacity: 0; transform: scale(.4); }
.js-anim [data-reveal].in .num, .js-anim [data-reveal].in .icon, .js-anim .ticks li[data-reveal].in::before {
  opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 90ms + 250ms);
}
/* The managers' panel: its rows rise in turn (site.js) and each progress bar fills once its row is in. */
.js-anim .p-row[data-reveal] .bar i { transform: scaleX(0); }
.js-anim .p-row[data-reveal].in .bar i {
  transform: none; transition: transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms + 300ms);
}
/* Hover: only what can be clicked moves (the How it works steps are not links, so they stay still). */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn, .btn-g { transition: background-color .15s, border-color .15s, transform .2s ease, box-shadow .2s ease; }
  .btn:hover, .btn-g:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -12px rgb(0 0 0 / .35); }
  .btn:active, .btn-g:active { transform: translateY(0); box-shadow: none; }
  .btn svg { transition: transform .2s ease; }
  .btn:hover svg { transform: translateX(3px); }
  summary { transition: color .15s ease; }
  summary:hover { color: var(--accent); }
  summary:hover::after { transform: scale(1.2); }
  details[open] summary:hover::after { transform: rotate(180deg) scale(1.2); }
  .theme-switch:hover svg { transform: rotate(15deg); }
  .theme-switch svg { transition: transform .25s ease; }
  .film-btn { transition: transform .15s ease, background-color .15s; }
  .film-btn:hover { transform: scale(1.08); }
  .footer nav a, .legal a { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .2s ease, color .15s; padding-bottom: 2px; }
  .footer nav a:hover, .legal a:hover { background-size: 100% 1px; }
  .prose a, .ticks a { text-underline-offset: 2px; transition: text-underline-offset .15s ease; }
  .prose a:hover, .ticks a:hover { text-underline-offset: 4px; }
}
@media (prefers-reduced-motion: no-preference) {
  details[open] p { animation: faq-open .3s ease; }
  summary::after { transition: transform .25s ease; }
  details[open] summary::after { transform: rotate(180deg); }
  /* A slow sand glow drifting behind "Talk to us". */
  .night { position: relative; overflow: hidden; isolation: isolate; }
  .night::before {
    content: ""; position: absolute; z-index: -1; width: 70vmax; height: 70vmax; left: 40%; top: -30vmax;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--sand) 22%, transparent), transparent);
    animation: glow-drift 16s ease-in-out infinite alternate;
  }
}
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes glow-drift { from { transform: translate(-25%, 0); } to { transform: translate(15%, 12%); } }

/* Smaller screens */
@media (max-width: 900px) {
  .hero, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero { gap: 32px; padding-top: 48px; padding-bottom: 64px; }
  .hero > .actions { grid-column: auto; order: 1; }
  .hero .film { order: 2; }
  .steps, .cards { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .use-grid { grid-template-columns: repeat(2, 1fr); }
  .mgr { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  .section { padding: 64px 16px; }
  .nav { gap: 12px; }
  .nav-actions { gap: 8px; }
  .brand img { height: 26px; }
  .btn.small, .btn-g.small { padding: 0 12px; }
  .use-grid { grid-template-columns: 1fr; gap: 20px; }
  .p-row { grid-template-columns: 30px 1fr auto; padding: 12px 14px; }
  .p-row .bar { display: none; }
  .panel-top, .panel-stats div { padding-inline: 14px; }
  .btn.small svg { display: none; }
  .film { border-radius: 14px; }
  .film-controls { gap: 8px; padding: 24px 10px 10px; }
  .film-btn { width: 36px; height: 36px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .legal { margin-left: 0; }
}
