/* Kinolap site, shared base: tokens, fonts, header, footer, language switch, legal pages, 404. Static, no scripts.
   Dark by default (brand: ink / chalk / volt). Landing-only styles live in landing.css (owned by the landing page).
   Class list and header/footer snippets: README-site.md.
   Tokens follow docs/knowledge/14-mobile-design.md §9 and docs/design/mobile/mockups.html.
   Assets under /assets/ are cached for a year (see /_headers): bump the ?v= query in every page when this file,
   a font or an image changes. */

@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-600.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700i.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0B0C0A;
  --pit: #141612;
  --deck: #1C1F19;
  --deck2: #23271F;
  --rim: #2C3027;
  --rim2: #3A3F33;
  --chalk: #F2F4EC;
  --fog: #A7AB9E;
  --tert: #8D9184;
  --volt: #D4FF3A;
  --volt-soft: rgba(212, 255, 58, 0.12);
  --warning: #FFB800;
  --warning-soft: rgba(255, 184, 0, 0.12);
  --hair: rgba(242, 244, 236, 0.08);

  --f-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --f-cond: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --radius: 18px;
}

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--chalk);
  font: 400 17px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }

a { color: var(--chalk); text-decoration-color: var(--volt); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--volt); }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 6px; }

::selection { background: var(--volt); color: var(--ink); }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: 10px;
  background: var(--volt); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

.site-head { border-bottom: 1px solid var(--hair); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; padding: 6px 0; }
.brand img { height: 24px; width: auto; }
.brand:hover { color: inherit; }

.lang {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--rim); border-radius: 999px; background: var(--pit);
  font: 600 13px/1 var(--f-body); letter-spacing: 0.06em;
}
.lang a, .lang span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 36px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--fog);
}
.lang a:hover { color: var(--chalk); background: var(--deck); }
.lang [aria-current] { background: var(--volt); color: var(--ink); }

/* ---------- Type ---------- */

.eyebrow {
  margin: 0 0 14px;
  font: 600 13px/1.3 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fog);
}
.display {
  margin: 0;
  font: italic 700 clamp(52px, 13.5vw, 112px)/0.9 var(--f-cond);
  letter-spacing: -0.005em; text-transform: uppercase; text-wrap: balance;
}
.display em { font-style: inherit; color: var(--volt); }
.h2 {
  margin: 0 0 12px;
  font: italic 700 clamp(34px, 7vw, 54px)/0.95 var(--f-cond);
  text-transform: uppercase; text-wrap: balance;
}
.lead { margin: 22px 0 0; max-width: 34em; font-size: clamp(18px, 2.4vw, 20px); color: var(--fog); }
.lead strong { color: var(--chalk); font-weight: 600; }

/* ---------- Generic sections and buttons (usable by any page) ---------- */

.section { padding-block: clamp(56px, 9vw, 104px); border-top: 1px solid var(--hair); }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 5vw, 48px); }
.section-head p { margin: 0; color: var(--fog); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--rim2); background: var(--pit);
  font: 600 15px/1.2 var(--f-body);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px;
  background: var(--volt); color: var(--ink); text-decoration: none;
  font: 600 17px/1 var(--f-body);
}
.btn:hover { color: var(--ink); background: #E2FF72; }
.btn-ghost { background: transparent; color: var(--chalk); border: 1px solid var(--rim2); }
.btn-ghost:hover { background: var(--deck); color: var(--chalk); }

/* ---------- Footer ---------- */

.site-foot { border-top: 1px solid var(--hair); padding-block: 32px 40px; font-size: 15px; color: var(--fog); }
.site-foot .wrap { display: grid; gap: 18px; }
@media (min-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr auto; align-items: start; } }
.site-foot nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.site-foot nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--chalk); text-decoration: none; }
.site-foot nav a:hover { color: var(--volt); text-decoration: underline; }
.site-foot p { margin: 0; }
.site-foot .small { font-size: 14px; color: var(--tert); max-width: 52em; }

/* ---------- Legal pages ---------- */

.draft {
  background: var(--warning-soft); border-bottom: 1px solid rgba(255, 184, 0, 0.35);
  color: var(--chalk); font-size: 15px;
}
.draft .wrap { padding-block: 12px; line-height: 1.45; }
.draft strong { color: var(--warning); font-weight: 600; margin-right: 8px; }

.legal { padding-block: clamp(36px, 7vw, 72px) 80px; }
.legal h1 { margin: 0 0 18px; font: italic 700 clamp(44px, 10vw, 76px)/1 var(--f-cond); text-transform: uppercase; text-wrap: balance; }
.meta { margin: 0 0 28px; color: var(--fog); font-size: 15px; }
.legal h2 {
  margin: 48px 0 12px; padding-top: 20px; border-top: 1px solid var(--hair);
  font: italic 700 30px/1.05 var(--f-cond); text-transform: uppercase;
  scroll-margin-top: 16px;
}
.legal h3 { margin: 26px 0 8px; font: 600 18px/1.35 var(--f-body); }
.legal p, .legal li { color: #DADDD3; }
.legal p { margin: 0 0 14px; }
.legal ul, .legal ol { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--volt); }
.legal strong { color: var(--chalk); font-weight: 600; }
.legal code { font: 0.88em/1 var(--f-mono); color: var(--chalk); background: var(--deck); padding: 2px 5px; border-radius: 5px; }

.summary {
  margin: 0 0 12px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--pit); border: 1px solid var(--rim); border-left: 4px solid var(--volt);
}
.summary h2 { margin: 0 0 12px; padding: 0; border: 0; font-size: 24px; }
.summary ul { margin-bottom: 0; }

.toc { margin: 24px 0 8px; padding: 18px 22px; border-radius: var(--radius); border: 1px solid var(--rim); }
.toc p { margin: 0 0 8px; font: 600 13px/1.3 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--fog); }
.toc ol { margin: 0; padding-left: 22px; columns: 1; }
@media (min-width: 700px) { .toc ol { columns: 2; column-gap: 32px; } }
.toc li { margin-bottom: 4px; break-inside: avoid; }

.table-scroll { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--rim); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rim); }
th { font-weight: 600; color: var(--chalk); background: var(--pit); }
td { color: #DADDD3; }
tr:last-child td { border-bottom: 0; }

.ph {
  background: var(--warning-soft); color: var(--warning);
  padding: 0 4px; border-radius: 4px; font-weight: 600;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.prevails { padding: 14px 18px; border-radius: 12px; background: var(--deck); color: var(--chalk); font-size: 15px; }

/* ---------- 404 ---------- */

.lost { padding-block: clamp(64px, 14vw, 140px); }
.lost .code { margin: 0 0 8px; font: 500 15px/1 var(--f-mono); color: var(--volt); }
.lost p { color: var(--fog); max-width: 34em; }
.lost .links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; align-items: center; }
.lost-vi { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--hair); }
.lost-vi .lead { margin-top: 0; }

@media print {
  body { background: #fff; color: #000; }
  .site-head, .site-foot, .draft, .toc, .skip { display: none; }
  .legal p, .legal li, td { color: #000; }
  a { color: #000; }
  .ph { background: none; color: #000; outline: 1px dashed #000; }
}

/* Retention table: stacked rows on phones (labels from data-label) */
@media (max-width: 599px) {
  .table-scroll { overflow: visible; border: 0; border-radius: 0; }
  .table-scroll table { min-width: 0; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-scroll table, .table-scroll tbody, .table-scroll tr, .table-scroll td { display: block; }
  .table-scroll tr { margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--rim); border-radius: 12px; background: var(--pit); }
  .table-scroll td { padding: 3px 0; border: 0; }
  .table-scroll td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fog); }
  .table-scroll td:first-child { color: var(--chalk); font-weight: 600; }
  .table-scroll td:first-child::before { display: none; }
}
