/* ==========================================================================
   Pixel Dale - site stylesheet
   No frameworks, no web fonts, no third-party requests.
   Colours live in the tokens below: swap the brand values to re-theme.
   ========================================================================== */

/* ---------- 1. Tokens -------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 26px;
  --container: 1120px;
  --header-h: 68px;

  /* surfaces + text (light). Neutrals come from the Pixel Dale logo: navy #111929, slate #525a67 */
  --bg: #fbfcfe;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --text: #111929;
  --muted: #525a67;
  --line: #e2e7ef;
  --line-strong: #c8d0dd;

  /* brand. --brand is the logo's blue (#2372fd): decorative fills and pixel motifs.
     Anything that carries text uses --action / --link, slightly deeper so white text passes WCAG AA. */
  --brand: #2372fd;
  --brand-2: #1a4fd0;
  --action: #1f66f0;
  --action-strong: #1856d4;
  --on-action: #ffffff;
  --link: #1a56d6;
  --brand-soft: #e8f0ff;
  --accent: #111929;
  --screen-a: #2372fd;
  --screen-b: #1a4fd0;

  /* status */
  --ok: #0b7a55;
  --ok-soft: #dcf5ea;
  --soon: #556070;
  --soon-soft: #edf0f6;

  /* effects */
  --glow: rgba(35, 114, 253, 0.16);
  --grid: rgba(35, 114, 253, 0.07);
  --tv-bezel: #111929;
  --tv-stand: #2b3648;
  --focus: #1a56d6;
  --shadow-s: 0 1px 2px rgba(17, 25, 41, 0.06);
  --shadow-m: 0 18px 40px -18px rgba(17, 25, 41, 0.28), 0 2px 8px rgba(17, 25, 41, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1c;
    --surface: #111a2e;
    --surface-2: #16213a;
    --text: #eaf0fb;
    --muted: #a3afc4;
    --line: #223049;
    --line-strong: #31425f;

    --brand: #4b8bff;
    --brand-2: #4d86f0;
    --action: #5b9bff;
    --action-strong: #7db1ff;
    --on-action: #0a0f1c;
    --link: #8fb8ff;
    --brand-soft: #14284d;
    --accent: #eaf0fb;
    --screen-a: #3f7df0;
    --screen-b: #1d3f9e;

    --ok: #4fd6a3;
    --ok-soft: #0f3a2e;
    --soon: #a9b4c8;
    --soon-soft: #1d2a45;

    --glow: rgba(75, 139, 255, 0.2);
    --grid: rgba(75, 139, 255, 0.09);
    --tv-bezel: #223049;
    --tv-stand: #31425f;
    --focus: #8fb8ff;
    --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-m: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* ---------- 2. Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 760;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }
li { margin: 0.3rem 0; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 700; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }

.container { width: min(100% - 2 * clamp(16px, 4vw, 32px), var(--container)); margin-inline: auto; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 16px;
  background: var(--action); color: var(--on-action); border-radius: 10px; font-weight: 650;
}
.skip-link:focus { top: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.7rem; margin: 0 0 1rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--link);
}
.eyebrow::before {
  content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--brand);
  box-shadow: 13px 0 0 0 var(--accent); margin-right: 13px;
}
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 58ch; line-height: 1.55; }

/* ---------- 3. Header -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@supports (background: color-mix(in srgb, red, blue)) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    backdrop-filter: saturate(1.5) blur(14px);
  }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; flex: none; line-height: 0; text-decoration: none; border-radius: 6px; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: auto; height: 28px; max-width: none; object-fit: contain; object-position: left center; }

.site-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 580; font-size: 0.98rem;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--link); }
.site-nav .nav-cta { background: var(--action); color: var(--on-action); font-weight: 650; margin-left: 6px; }
.site-nav .nav-cta:hover { background: var(--action-strong); color: var(--on-action); }
.site-nav .nav-cta[aria-current="page"] { background: var(--action-strong); color: var(--on-action); }
@media (max-width: 420px) {
  .brand-logo { height: 23px; }
  .site-nav a { padding: 0 9px; font-size: 0.94rem; }
  .site-nav .nav-cta { margin-left: 2px; }
}
/* very narrow phones: the square monogram replaces the wordmark (see the <picture> in the header) */
@media (max-width: 359px) {
  .site-header .brand-logo { height: 32px; width: 32px; }
  .site-nav a { padding: 0 9px; }
}

/* ---------- 4. Buttons, badges, chips --------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; min-height: 50px;
  padding: 0 1.5rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 650;
  font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--action); color: var(--on-action); box-shadow: 0 8px 20px -10px var(--action); }
.btn-primary:hover { background: var(--action-strong); color: var(--on-action); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-light { background: #ffffff; color: #1a4fd0; }
.btn-light:hover { background: #eef3ff; color: #1a4fd0; transform: translateY(-1px); }
.btn-pending { background: var(--soon-soft); color: var(--soon); border-style: dashed; border-color: var(--line-strong); cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 650; line-height: 1.3;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-soon { background: var(--soon-soft); color: var(--soon); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1.25rem; }
.chips li {
  display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 13px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); font-size: 0.9rem; color: var(--muted);
}
.chips .icon { color: var(--ok); width: 1.1em; height: 1.1em; }

/* ---------- 5. Hero ---------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(44px, 8vw, 104px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 38px 38px;
  -webkit-mask-image: radial-gradient(75% 85% at 72% 28%, #000 25%, transparent 78%);
  mask-image: radial-gradient(75% 85% at 72% 28%, #000 25%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; width: 720px; height: 720px; right: -200px; top: -260px; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy h1 { margin-bottom: 0.4em; }
.hero-points { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.hero-points .icon { color: var(--ok); }
.hero-visual { max-width: 560px; justify-self: end; width: 100%; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { justify-self: center; max-width: 480px; }
}

.hero-art { display: block; width: 100%; height: auto; overflow: visible; }
.a-glow { fill: var(--glow); }
.a-bezel { fill: var(--tv-bezel); }
.a-stand { fill: var(--tv-stand); }
.a-screen { fill: url(#heroScreen); }
.stop-a { stop-color: var(--screen-a); }
.stop-b { stop-color: var(--screen-b); }
.a-tile { fill: rgba(255, 255, 255, 0.18); }
.a-tile-strong { fill: rgba(255, 255, 255, 0.3); }
.a-play-bg { fill: #ffffff; }
.a-play { fill: #1a4fd0; }
.a-line { fill: rgba(255, 255, 255, 0.55); }
.px-a { fill: var(--accent); }
.px-b { fill: var(--brand); }
.px-c { fill: var(--ok); }
.px-d { fill: var(--brand-2); }
@media (prefers-reduced-motion: no-preference) {
  .float-a { animation: float 7s ease-in-out infinite; }
  .float-b { animation: float 9s ease-in-out -3s infinite; }
  .float-c { animation: float 8s ease-in-out -5s infinite; }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- 6. Sections ------------------------------------------------------ */
.section { padding-block: clamp(40px, 6vw, 80px); }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.section-head { max-width: 64ch; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head p:last-child { color: var(--muted); margin-bottom: 0; }
.page-hero { padding-block: clamp(36px, 6vw, 76px) clamp(8px, 2vw, 20px); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }

.crumbs { margin-bottom: 1.25rem; font-size: 0.92rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li { margin: 0; display: inline-flex; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); }

/* platforms */
.platforms { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.platform {
  margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
}
.platform-name { font-weight: 720; font-size: 1.05rem; letter-spacing: -0.01em; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--soon); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--soon); }
.platform.is-available { border-color: var(--ok); background: linear-gradient(180deg, var(--ok-soft), var(--surface) 80%); }
.platform.is-available .status { color: var(--ok); font-weight: 680; }
.platform.is-available .status::before { background: var(--ok); }
.fineprint { margin-top: 1rem; font-size: 0.86rem; color: var(--muted); }

/* cards */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { margin: 0; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s); }
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; color: var(--muted); }
/* five cards: 3 on the first row, 2 wider ones below (avoids a lonely orphan card) */
.cards-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cards-5 > .card { grid-column: span 2; }
.cards-5 > .card:nth-child(n + 4) { grid-column: span 3; }
@media (max-width: 900px) {
  .cards-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-5 > .card, .cards-5 > .card:nth-child(n + 4) { grid-column: auto; }
  .cards-5 > .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .cards-5 { grid-template-columns: 1fr; }
  .cards-5 > .card:last-child { grid-column: auto; }
}
.icon-wrap {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 13px;
  background: var(--brand-soft); color: var(--link);
}
.icon-wrap .icon { width: 24px; height: 24px; }

/* featured product card */
.feature-card {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(18px, 3vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-m);
}
.feature-art { border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); aspect-ratio: 4 / 3; }
.feature-art > svg, .feature-art > img { width: 100%; height: 100%; object-fit: cover; }
.feature-body h3 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0.6rem 0 0.4em; }
.feature-body p { color: var(--muted); }
@media (max-width: 760px) { .feature-card { grid-template-columns: 1fr; } }

.product-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-s); }
.product-card .product-art { aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.product-card .product-art > svg, .product-card .product-art > img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { margin: 0.6rem 0 0.35em; }
.product-body p { color: var(--muted); }
.product-body .actions { margin-top: auto; padding-top: 0.75rem; }
.product-card.is-placeholder { border-style: dashed; background: transparent; box-shadow: none; }
.product-card.is-placeholder .product-body { justify-content: center; text-align: left; }

.app-tile { display: block; width: 100%; height: 100%; }
.kd-sub { font: 700 12.5px var(--font); letter-spacing: 0.22em; fill: rgba(255, 255, 255, 0.9); }
.kd-a { stop-color: var(--screen-a); }
.kd-b { stop-color: var(--screen-b); }
.kd-circle { fill: rgba(255, 255, 255, 0.95); }
.kd-play { fill: #1a4fd0; }
.kd-text { font: 800 21px var(--font); letter-spacing: 0.12em; fill: #ffffff; }
.kd-px { fill: rgba(255, 255, 255, 0.35); }
.kd-px-b { fill: rgba(255, 255, 255, 0.6); }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-l); padding: clamp(28px, 5vw, 56px);
  background: linear-gradient(135deg, var(--brand-2), var(--action)); color: var(--on-action);
  display: grid; gap: 18px; justify-items: start;
}
.cta-band h2 { margin: 0; color: inherit; max-width: 22ch; }
.cta-band p { margin: 0; max-width: 52ch; opacity: 0.95; font-size: 1.1rem; }
.cta-band a:not(.btn) { color: inherit; font-weight: 700; }
.cta-band::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 28px; transform: rotate(14deg);
  background: rgba(255, 255, 255, 0.12); box-shadow: -120px 60px 0 -30px rgba(255, 255, 255, 0.1);
}

/* ---------- 7. Product page -------------------------------------------------- */
.product-hero { padding-block: clamp(32px, 5vw, 64px) clamp(16px, 3vw, 36px); }
.product-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.product-hero .feature-art { box-shadow: var(--shadow-m); }
@media (max-width: 820px) { .product-hero-grid { grid-template-columns: 1fr; } }

.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(88%, 540px); gap: 16px; list-style: none; margin: 0; padding: 4px 4px 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.gallery li { margin: 0; scroll-snap-align: start; }
.shot { margin: 0; }
.shot-frame { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 9; box-shadow: var(--shadow-s); }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
.shot-frame.is-placeholder { display: grid; place-items: center; border-style: dashed; color: var(--muted); font-weight: 600; text-align: center; padding: 12px; }
.shot figcaption { margin-top: 8px; font-size: 0.9rem; color: var(--muted); }

.two-col { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.plan { margin: 0; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.plan h3 { margin-bottom: 0.3em; }
.plan p:last-child { margin-bottom: 0; color: var(--muted); }
.plan.is-featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }

.check-list { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.check-list .icon { color: var(--ok); margin-top: 0.2em; }

details.note { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); padding: 0 20px; margin-bottom: 12px; }
details.note summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details.note summary::-webkit-details-marker { display: none; }
details.note summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--link); }
details.note[open] summary::after { content: "\2212"; }
details.note > :not(summary) { color: var(--muted); }
details.note p:last-child { margin-bottom: 18px; }

/* ---------- 8. About / contact ---------------------------------------------- */
.split { display: grid; gap: clamp(24px, 5vw, 64px); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.prose { max-width: 66ch; }
.prose p { color: var(--muted); }
.prose p:first-of-type { color: var(--text); font-size: 1.15rem; }
.stat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.stat-list li { margin: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.stat-list strong { display: block; font-size: 1.05rem; }
.stat-list span { color: var(--muted); font-size: 0.96rem; }

.contact-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: clamp(22px, 3vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-s); }
.email-big { display: inline-block; margin: 0.25rem 0 1rem; font-size: clamp(1.35rem, 3.4vw, 2rem); font-weight: 760; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.address { font-style: normal; color: var(--text); }
.address p { margin: 0 0 0.25rem; }
.topic-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 10px; }
.topic-list li { margin: 0; display: flex; gap: 12px; align-items: flex-start; }
.topic-list .icon { color: var(--link); margin-top: 0.25em; }
.topic-list strong { display: block; }
.topic-list span { color: var(--muted); font-size: 0.96rem; }

/* ---------- 9. Legal pages --------------------------------------------------- */
.legal-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-block: clamp(24px, 4vw, 56px); }
.legal-toc-desktop { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow: auto; font-size: 0.92rem; }
.toc-title { margin: 0 0 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.legal-toc-desktop ol, .toc-mobile ol { list-style: none; margin: 0; padding: 0; }
.legal-toc-desktop ol { border-left: 2px solid var(--line); }
.legal-toc-desktop li, .toc-mobile li { margin: 0; }
.legal-toc-desktop a { display: block; padding: 6px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.legal-toc-desktop a:hover { color: var(--text); border-left-color: var(--brand); }
.toc-mobile { display: none; margin-bottom: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); padding: 0 16px; }
.toc-mobile summary { cursor: pointer; padding: 14px 0; font-weight: 650; }
.toc-mobile ol { padding-bottom: 12px; }
.toc-mobile a { display: block; padding: 8px 0; text-decoration: none; }
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-toc-desktop { display: none; }
  .toc-mobile { display: block; }
}

.legal-main { max-width: 76ch; min-width: 0; }
.legal-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 0.25em; }
.legal-sub { font-size: 1.15rem; color: var(--muted); margin-bottom: 0.6rem; }
.legal-dates { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.92rem; color: var(--muted); margin: 0; }
.legal-dates .sep { color: var(--line-strong); }

.legal-meta { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin: 1.5rem 0 1.75rem; }
.legal-meta > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; background: var(--surface); padding: 13px 18px; }
.legal-meta dt { font-weight: 700; color: var(--link); font-size: 0.92rem; padding-top: 1px; }
.legal-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.legal-meta p { margin: 0; }
@media (max-width: 560px) { .legal-meta > div { grid-template-columns: 1fr; gap: 2px; } }

.legal-article h2 { margin: 2.4rem 0 0.7rem; font-size: 1.5rem; letter-spacing: -0.02em; }
.legal-article h2 .num, .legal-article h3 .num { color: var(--link); margin-right: 0.3em; }
.legal-article h3 { margin: 1.6rem 0 0.4rem; font-size: 1.1rem; letter-spacing: -0.01em; }
.legal-article p, .legal-article li { color: var(--text); }
.legal-article ul, .legal-article ol { padding-left: 1.3rem; }
.legal-article li::marker { color: var(--brand); }
.callout { border: 1px solid var(--line-strong); border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 16px 20px; border-radius: var(--radius-m); margin: 0 0 1.5rem; }
.callout p { margin: 0 0 0.5rem; }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 720; letter-spacing: -0.01em; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; margin: 1rem 0 1.25rem; }
.kv-label { margin: 0; padding: 14px 18px; background: var(--surface-2); font-weight: 700; color: var(--link); font-size: 0.92rem; }
.kv-body { padding: 12px 18px; background: var(--surface); overflow-wrap: anywhere; }
.kv-body p { margin: 0 0 0.45rem; }
.kv-body p:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv-label { padding-bottom: 6px; } }
.legal-closing { margin-top: 2.25rem; color: var(--muted); }
.legal-related { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.96rem; }
.legal-related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 0.4rem 0 0; }
.legal-related li { margin: 0; }

/* ---------- 10. Footer ------------------------------------------------------- */
.site-footer { margin-top: clamp(40px, 7vw, 88px); background: var(--surface-2); border-top: 1px solid var(--line); padding-block: 48px 28px; font-size: 0.96rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); }
.footer-brand p { color: var(--muted); max-width: 34ch; margin: 12px 0 10px; }
.footer-col h2 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 700; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-col li { margin: 0; }
.footer-col a { color: var(--text); text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-col a:hover { color: var(--link); text-decoration: underline; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); font-size: 0.88rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 11. 404 + utilities --------------------------------------------- */
.notfound { text-align: left; padding-block: clamp(56px, 10vw, 128px); }
.notfound h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
.notfound .code { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.14em; color: var(--link); text-transform: uppercase; }
.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; }

/* ---------- 12. Print -------------------------------------------------------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --muted: #333; --line: #bbb; --link: #000; }
  .site-header, .site-footer, .legal-toc-desktop, .toc-mobile, .skip-link, .actions, .legal-related { display: none !important; }
  body { font-size: 11pt; line-height: 1.5; background: #fff; }
  .legal-grid { display: block; padding: 0; }
  .legal-main { max-width: none; }
  a { text-decoration: none; color: #000; }
  .legal-article h2 { break-after: avoid; }
  .legal-article p, .legal-article li { break-inside: avoid; }
}
