/* ==========================================================================
   AJ-Group — design system
   Mobile-first. System fonts only (no third-party requests, GDPR-friendly).
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  /* Light-theme values are pinned to >= 4.6:1 on --surface-2, the darkest
     surface they appear on, so they pass WCAG AA as body text everywhere. */
  --brand:        #1d75a0;
  --brand-strong: #14607f;
  --brand-soft:   #81bddb;
  --accent:       #2aa79b;

  --ink:      #0d1f2b;
  --ink-2:    #3c5666;
  --ink-3:    #5a7180;
  --bg:       #f4f8fb;
  --surface:  #ffffff;
  --surface-2:#eef4f9;
  --line:     #dbe6ee;
  --line-2:   #c6d7e3;

  --ok:       #157c66;
  --warn:     #b4531a;
  --err:      #c0392f;

  --shadow-sm: 0 1px 2px rgba(13, 31, 43, .06), 0 2px 8px -4px rgba(13, 31, 43, .10);
  --shadow:    0 4px 12px -4px rgba(13, 31, 43, .10), 0 18px 40px -22px rgba(13, 31, 43, .35);
  --shadow-lg: 0 30px 70px -30px rgba(13, 31, 43, .45);

  --r-sm: .5rem;
  --r:    .875rem;
  --r-lg: 1.25rem;
  --r-xl: 1.75rem;

  --wrap: 74rem;
  --gap:  clamp(1rem, 3vw, 2rem);
  --sect: clamp(3.5rem, 9vw, 7rem);

  /* readable text on a brand-filled surface; flips with the theme */
  --on-brand: #ffffff;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

html[data-theme="dark"] {
  --brand:        #52a9d4;
  --brand-strong: #81bddb;
  --brand-soft:   #a9d6ec;
  --accent:       #4fd0be;

  --ink:      #e9f2f8;
  --ink-2:    #a9c2d2;
  --ink-3:    #7e9aac;
  --bg:       #08151e;
  --surface:  #0e2130;
  --surface-2:#132b3c;
  --line:     #1e3a4d;
  --line-2:   #2a5068;

  --ok:       #4fd0be;
  --warn:     #eca85e;
  --err:      #ff8f84;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 10px 30px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 80px -35px rgba(0, 0, 0, .85);

  --on-brand: #04141d;

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --brand: #52a9d4; --brand-strong: #81bddb; --brand-soft: #a9d6ec; --accent: #4fd0be;
    --ink: #e9f2f8; --ink-2: #a9c2d2; --ink-3: #7e9aac;
    --bg: #08151e; --surface: #0e2130; --surface-2: #132b3c;
    --line: #1e3a4d; --line-2: #2a5068;
    --ok: #4fd0be; --warn: #eca85e; --err: #ff8f84;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .7);
    --shadow-lg: 0 40px 80px -35px rgba(0, 0, 0, .85);
    --on-brand: #04141d;
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  font-family: var(--font);
  font-size: clamp(1rem, .97rem + .15vw, 1.075rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }

h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -.02em; font-weight: 750; text-wrap: balance; }

/* Finnish builds words like "dokumenttienhallintajärjestelmästä", which at
   heading size is wider than a phone. Hyphenate where the language allows it
   (the <html lang> attribute is what selects the dictionary) and break as a
   last resort, so one long compound can never push the page sideways. */
h1, h2, h3, h4, .app__lead, .app__text, .card__body p, .chips li, .unfold__title {
  overflow-wrap: break-word;
  hyphens: auto;
}
h2 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
p  { text-wrap: pretty; }

:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 50%; top: -4rem; transform: translateX(-50%);
  z-index: 200; padding: .7rem 1.2rem; border-radius: 0 0 var(--r) var(--r);
  background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none;
  transition: top .2s ease;
}
.skip:focus { top: 0; color: var(--on-brand); }

.wrap { width: min(100% - 2.25rem, var(--wrap)); margin-inline: auto; }
@media (min-width: 48rem) { .wrap { width: min(100% - 4rem, var(--wrap)); } }

.muted { color: var(--ink-2); }
.small { font-size: .875rem; }

/* ------------------------------------------------------------------- icons */
.icon { width: 1.35em; height: 1.35em; flex: none; }
.icon--sm { width: 1.05em; height: 1.05em; }
.icon--xs { width: .9em; height: .9em; display: inline-block; vertical-align: -.1em; }
.icon--up { transform: rotate(-90deg); }
.icon--ok { color: var(--ok); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.25rem;
  font-weight: 620; font-size: .95rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease,
              border-color .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: .5rem .95rem; font-size: .875rem; }
.btn--lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: var(--on-brand); box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  color: var(--on-brand); transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 70%, transparent);
}

.btn--ghost {
  background: var(--surface); color: var(--ink);
  border-color: var(--line-2); box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--brand); transform: translateY(-2px); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 2.6rem; height: 2.6rem; padding: 0;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); background: var(--surface-2); }
/* Both glyphs occupy the same cell; exactly one is ever displayed. */
.icon-btn .icon { grid-area: 1 / 1; }

/* theme toggle — show the theme you would switch TO */
.icon--sun { display: none; }
.icon--moon { display: block; }
html[data-theme="dark"] .icon--sun { display: block; }
html[data-theme="dark"] .icon--moon { display: none; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .icon--sun { display: block; }
  html[data-theme="auto"] .icon--moon { display: none; }
}

/* menu toggle */
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

.linklike {
  padding: 0; background: none; border: 0; cursor: pointer;
  color: inherit; font: inherit; text-align: left; text-decoration: underline;
  text-underline-offset: .18em;
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 4.25rem;
}
.brand { flex: none; display: block; line-height: 0; }
.brand__mark { width: 172px; height: auto; }
.brand__mark--dark { display: none; }
html[data-theme="dark"] .brand__mark--light { display: none; }
html[data-theme="dark"] .brand__mark--dark  { display: block; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .brand__mark--light { display: none; }
  html[data-theme="auto"] .brand__mark--dark  { display: block; }
}

.site-header__actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.nav-cta { display: none; }

.nav {
  position: fixed; inset: 4.25rem 0 auto; z-index: 99;
  padding: .5rem 1.25rem 1.5rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-120%); visibility: hidden;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), visibility .28s;
}
.nav.is-open { transform: translateY(0); visibility: visible; }
.nav__list { list-style: none; padding: 0; margin: 0; }
.nav__list a {
  display: block; padding: .8rem .25rem;
  color: var(--ink); font-weight: 580; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav__list li:last-child a { border-bottom: 0; }
.nav__list a:hover { color: var(--brand); }

@media (min-width: 60rem) {
  .nav-toggle { display: none; }
  .nav-cta { display: inline-flex; }
  .nav {
    position: static; padding: 0; margin-left: auto;
    background: none; border: 0; box-shadow: none;
    transform: none; visibility: visible;
  }
  .nav__list { display: flex; gap: .25rem; }
  .nav__list a {
    padding: .5rem .8rem; border: 0; border-radius: 999px;
    font-size: .95rem; color: var(--ink-2);
  }
  .nav__list a:hover { background: var(--surface-2); color: var(--ink); }
  .site-header__actions { margin-left: .75rem; }
}

/* ------------------------------------------------------- language switcher */
/* Three links, always visible: a visitor who landed in the wrong language has
   to be able to leave it without hunting through a menu. */
.langs { display: flex; align-items: center; gap: .15rem; }
.langs__item {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .5rem; border-radius: 999px;
  color: var(--ink-2); font-size: .85rem; font-weight: 600; line-height: 1;
  text-decoration: none; border: 1px solid transparent;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}
.langs__item:hover { color: var(--ink); background: var(--surface-2); }
.langs__item.is-on {
  color: var(--ink); background: var(--surface-2); border-color: var(--line);
}
.langs .flag {
  display: block; width: 1.3rem; height: auto; border-radius: 2px;
  /* A white flag on a white header needs an edge to read as a flag. */
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent);
}
/* The code is a hint next to the flag; on narrow screens the flag carries it. */
.langs__code { display: none; }

/* In the mobile menu the switcher gets room to breathe and shows its codes. */
.nav__langs {
  margin-top: .9rem; padding-top: .9rem;
  border-top: 1px solid var(--line);
}
.nav__langs .langs { gap: .35rem; }
.nav__langs .langs__code { display: inline; }
.nav__langs .langs__item { padding: .5rem .7rem; border: 1px solid var(--line); }

.site-header__langs { display: none; }

@media (min-width: 60rem) {
  .site-header__langs { display: block; }
  .nav__langs { display: none; }
  .langs__code { display: inline; }
}

/* -------------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 9vw, 6rem) 0 0; }
.hero__bg {
  position: absolute; inset: -30% -10% auto; height: 130%;
  background:
    radial-gradient(38rem 26rem at 18% 8%,  color-mix(in srgb, var(--brand) 26%, transparent), transparent 65%),
    radial-gradient(34rem 24rem at 88% 32%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 62%);
  filter: blur(6px);
  pointer-events: none;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 50% at 50% 35%, #000 20%, transparent 75%);
}
.hero__inner { position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: 1.1rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2);
}
.dot {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.hero__title {
  font-size: clamp(2.15rem, 1.2rem + 4.6vw, 4.25rem);
  font-weight: 800; letter-spacing: -.035em;
  margin-bottom: 1.25rem;
}
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator__item {
  grid-area: 1 / 1;
  background: linear-gradient(100deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; transform: translateY(.35em);
  transition: opacity .45s ease, transform .45s ease;
}
.rotator__item.is-on { opacity: 1; transform: none; }

.hero__lead {
  max-width: 44ch; margin-bottom: 2rem;
  font-size: clamp(1.05rem, 1rem + .45vw, 1.28rem);
  color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 3rem; }

.hero__stats {
  display: grid; gap: 1.25rem;
  padding: 1.5rem 0 clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
}
.hero__stats dt { font-size: 1.35rem; font-weight: 750; letter-spacing: -.02em; }
.hero__stats dd { margin: 0; color: var(--ink-2); font-size: .95rem; }
@media (min-width: 40rem) { .hero__stats { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

.hero__marquee {
  position: relative; padding: .85rem 0;
  border-block: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hero__marquee-track {
  display: flex; align-items: center; gap: 1.5rem;
  width: max-content;
  animation: slide 46s linear infinite;
  font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  color: var(--ink-3); white-space: nowrap;
}
.hero__marquee-track i { color: var(--brand-soft); font-style: normal; }
@keyframes slide { to { transform: translateX(-50%); } }
/* WCAG 2.2.2 — moving content that runs longer than five seconds needs a way
   to stop it. Hovering or tabbing into the strip pauses it. */
.hero__marquee:hover .hero__marquee-track,
.hero__marquee:focus-within .hero__marquee-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .hero__marquee-track { animation: none; } }

/* ---------------------------------------------------------------- sections */
.section { padding: var(--sect) 0; }
.section--tint { background: var(--surface-2); }
/* The kiosk band and the footer share one "band" palette. In light mode it is a
   soft blue panel rather than a dark hole punched through the page; in dark mode
   it deepens. Everything inside uses these tokens, never hard-coded colours. */
.section--dark, .site-footer {
  --band-bg:      linear-gradient(170deg, #dbe9f4, #c9e0ef 55%, #d9e8f3);
  --band-fg:      #12303f;
  --band-fg-2:    #3f5f73;
  --band-head:    #0b1f2c;
  --band-link:    var(--brand-strong);
  --band-surface: rgba(255, 255, 255, .55);
  --band-line:    rgba(11, 31, 44, .14);
  --band-hover:   rgba(255, 255, 255, .8);
  --band-chip:    rgba(31, 127, 174, .12);
}
html[data-theme="dark"] .section--dark, html[data-theme="dark"] .site-footer {
  --band-bg:      linear-gradient(170deg, #0b1a26, #12304a 60%, #0b1a26);
  --band-fg:      #e6f1f8;
  --band-fg-2:    #a9c6d8;
  --band-head:    #ffffff;
  --band-link:    var(--brand-soft);
  --band-surface: rgba(255, 255, 255, .05);
  --band-line:    rgba(255, 255, 255, .14);
  --band-hover:   rgba(255, 255, 255, .09);
  --band-chip:    rgba(255, 255, 255, .12);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .section--dark, html[data-theme="auto"] .site-footer {
    --band-bg:      linear-gradient(170deg, #0b1a26, #12304a 60%, #0b1a26);
    --band-fg:      #e6f1f8;
    --band-fg-2:    #a9c6d8;
    --band-head:    #ffffff;
    --band-link:    var(--brand-soft);
    --band-surface: rgba(255, 255, 255, .05);
    --band-line:    rgba(255, 255, 255, .14);
    --band-hover:   rgba(255, 255, 255, .09);
    --band-chip:    rgba(255, 255, 255, .12);
  }
}

.section--dark { background: var(--band-bg); color: var(--band-fg); }
.section--dark h2, .section--dark h3 { color: var(--band-head); }
.section--dark .section__lead,
.section--dark .eyebrow { color: var(--band-fg-2); }
/* :not(.btn) — buttons keep their own colour, which this would otherwise
   override on specificity and leave unreadable on the button fill */
.section--dark a:not(.btn) { color: var(--band-link); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section__lead { margin-top: .9rem; font-size: clamp(1rem, .97rem + .35vw, 1.15rem); color: var(--ink-2); }
.section__foot { margin-top: 2.25rem; color: var(--ink-2); }

.note {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1.25rem; padding: .5rem .9rem;
  font-size: .9rem; font-weight: 560;
  color: var(--band-fg);
  background: var(--band-surface);
  border: 1px solid var(--band-line);
  border-radius: 999px;
}

/* ------------------------------------------------------------ service cards */
.cards { display: grid; gap: var(--gap); }
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 66rem) { .cards { grid-template-columns: repeat(4, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }

.card__media { position: relative; aspect-ratio: 3 / 2; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__icon {
  position: absolute; left: .85rem; bottom: -1.1rem;
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border: 3px solid var(--surface);
  border-radius: .8rem;
  box-shadow: var(--shadow-sm);
}
.card__badge {
  position: absolute; top: .7rem; right: .7rem;
  padding: .25rem .6rem;
  font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  color: #04141d; background: var(--accent);
  border-radius: 999px;
}

.card__body { display: flex; flex-direction: column; gap: .7rem; padding: 1.9rem 1.15rem 1.15rem; flex: 1; }
.card__body p { color: var(--ink-2); font-size: .95rem; }
.card__more {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: auto; padding: 0;
  color: var(--brand); font-weight: 650; font-size: .92rem;
  background: none; border: 0; cursor: pointer;
}
.card__more .icon { transition: transform .18s ease; }
.card__more:hover .icon { transform: translateX(3px); }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; margin: 0; }
.chips li {
  padding: .22rem .6rem;
  font-size: .76rem; font-weight: 580; color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.chips--lg { gap: .5rem; margin-bottom: 2.5rem; }
.chips--lg li { padding: .4rem .85rem; font-size: .85rem; background: var(--surface); }

/* ---------------------------------------------------------- capability row */
.capabilities {
  display: grid; gap: 1.5rem;
  margin-top: clamp(2rem, 5vw, 3rem); padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}
@media (min-width: 40rem) { .capabilities { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 66rem) { .capabilities { grid-template-columns: repeat(4, 1fr); } }
.capability__icon { display: block; color: var(--brand); margin-bottom: .6rem; }
.capability__icon .icon { width: 1.6rem; height: 1.6rem; }
.capability h3 { font-size: 1.02rem; margin-bottom: .3rem; }
.capability p { color: var(--ink-2); font-size: .92rem; }

/* ---------------------------------------------------------- hosting blocks */
.highlights { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 40rem) { .highlights { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .highlights { grid-template-columns: repeat(3, 1fr); } }
.highlight {
  display: flex; gap: .9rem;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.highlight__icon {
  display: grid; place-items: center; flex: none;
  width: 2.4rem; height: 2.4rem;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-radius: .65rem;
}
.highlight h3 { font-size: 1rem; margin-bottom: .2rem; }
.highlight p { color: var(--ink-2); font-size: .9rem; }

/* ----------------------------------------------------------------- pricing */
.pricing__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem;
}
.toggle {
  display: inline-flex; gap: .2rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.toggle__btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .95rem;
  font-size: .875rem; font-weight: 620; color: var(--ink-2);
  background: none; border: 0; border-radius: 999px; cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.toggle__btn:hover { color: var(--ink); }
.toggle__btn.is-on {
  color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}
.toggle__note {
  padding: .1rem .4rem; font-size: .68rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: .05em;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
}
.toggle__btn.is-on .toggle__note { background: rgba(255, 255, 255, .25); }

.plans { display: grid; gap: var(--gap); }
@media (min-width: 44rem) { .plans { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.plan {
  position: relative;
  display: flex; flex-direction: column; gap: .55rem;
  padding: 1.6rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.plan--featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow);
}
.plan__flag {
  position: absolute; top: -.75rem; left: 50%; transform: translateX(-50%);
  padding: .25rem .8rem; white-space: nowrap;
  font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: 999px;
}
.plan__name { font-size: 1.25rem; }
.plan__blurb { color: var(--ink-2); font-size: .9rem; }
.plan__price { display: flex; align-items: baseline; gap: .15rem; margin-top: .4rem; }
.plan__currency { font-size: 1.4rem; font-weight: 650; color: var(--ink-2); }
.plan__amount {
  font-size: clamp(2.4rem, 2rem + 2vw, 3.1rem); font-weight: 800; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  transition: opacity .18s ease;
}
.plan__amount.is-swapping { opacity: .25; }
.plan__per { color: var(--ink-2); font-size: .95rem; font-weight: 560; }
.plan__billed { font-size: .8rem; color: var(--ink-3); margin-bottom: .5rem; }

.plan__features { list-style: none; padding: 0; margin: .35rem 0 1.35rem; display: grid; gap: .55rem; }
.plan__features li {
  display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: .45rem;
  font-size: .92rem; color: var(--ink-2);
}
.plan__features strong { color: var(--ink); font-weight: 680; }
.plan__features .icon { align-self: center; }
.plan .btn { margin-top: auto; }

.addons { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 44rem) { .addons { grid-template-columns: repeat(2, 1fr); } }
.addon {
  display: flex; gap: .9rem; padding: 1.15rem;
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
}
.addon__icon { color: var(--brand); flex: none; }
.addon h4 { font-size: 1rem; margin-bottom: .2rem; }
.addon p { font-size: .9rem; color: var(--ink-2); }
.addon__cta {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .6rem; padding: 0;
  color: var(--brand); font-weight: 650; font-size: .9rem;
  background: none; border: 0; cursor: pointer;
}
.addon__cta .icon { transition: transform .18s ease; }
.addon__cta:hover .icon { transform: translateX(3px); }

.pricing__foot { margin-top: 1.75rem; font-size: .92rem; color: var(--ink-2); }
/* the disclosure that follows the pricing block needs air above it */
.pricing + .unfold { margin-top: 2.5rem; }

/* --------------------------------------------------- unfolding disclosures */
.unfold {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.unfold[open] { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.unfold:not(:last-child) { margin-bottom: .7rem; }

.unfold summary {
  display: flex; align-items: center; gap: .85rem;
  padding: 1.05rem 1.15rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  transition: background .16s ease;
}
.unfold summary::-webkit-details-marker { display: none; }
/* hover only where there is a real pointer — on touch it sticks after a tap
   and leaves the summary looking like a different panel from its body */
@media (hover: hover) {
  .unfold summary:hover { background: var(--surface-2); }
}
.unfold__ico { display: grid; place-items: center; flex: none; color: var(--brand); }
.unfold__stack { display: grid; gap: .15rem; min-width: 0; flex: 1 1 auto; }
/* the title keeps its own line; only the hint below it may wrap */
.unfold__title { font-size: 1.02rem; line-height: 1.3; }
.unfold__hint {
  font-size: .85rem; font-weight: 460; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.unfold__year {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--brand);
}
.unfold__price {
  margin-left: auto; padding: .25rem .7rem; white-space: nowrap;
  font-size: .82rem; font-weight: 700;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-radius: 999px;
}
.unfold__chev { margin-left: auto; color: var(--ink-3); transition: transform .25s ease; }
.unfold__price + .unfold__chev { margin-left: 0; }
.unfold__chev .icon { transform: rotate(90deg); }
.unfold[open] .unfold__chev { transform: rotate(180deg); }

.unfold__body {
  padding: 1.05rem 1.15rem 1.25rem;
  border-top: 1px solid var(--line);
}
.section--dark .unfold__body { border-top-color: var(--band-line); }
.unfold__body > :not(:last-child) { margin-bottom: .85rem; }
.unfold__body p, .unfold__body li { color: var(--ink-2); font-size: .95rem; }

.section--dark .unfold {
  background: var(--band-surface);
  border-color: var(--band-line);
}
.section--dark .unfold summary { color: var(--band-head); }
@media (hover: hover) {
  .section--dark .unfold summary:hover { background: var(--band-hover); }
}
.section--dark .unfold__body p, .section--dark .unfold__body li { color: var(--band-fg-2); }
.section--dark .unfold__ico { color: var(--band-link); }
.section--dark .unfold__body strong { color: var(--band-head); }
/* these default to the page greys, which do not read on the band */
.section--dark .unfold__hint { color: var(--band-fg-2); }
.section--dark .unfold__chev { color: var(--band-fg-2); }
.section--dark .unfold__price { color: var(--band-fg); background: var(--band-chip); }
.section--dark .ticks li::before { background: var(--band-link); }

.unfolds { margin-top: 1.75rem; }
.unfold--card summary { padding: 1.15rem; }
.timeline { display: grid; }
.worklist { margin: 0; padding-left: 1.15rem; display: grid; gap: .5rem; }
.worklist li { color: var(--ink-2); font-size: .95rem; }
.worklist em { color: var(--ink); font-style: italic; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.ticks li { position: relative; padding-left: 1.5rem; }
.ticks li::before {
  content: ""; position: absolute; left: .15rem; top: .58em;
  width: .42rem; height: .42rem; border-radius: 50%;
  background: var(--accent);
}

.quicklinks { display: grid; gap: .6rem; }
@media (min-width: 44rem) { .quicklinks { grid-template-columns: repeat(3, 1fr); } }
.quicklink {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .9rem 1rem;
  text-decoration: none; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color .16s ease, transform .16s ease;
}
.quicklink:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--ink); }
.quicklink span { display: grid; gap: .1rem; }
.quicklink em { font-style: normal; font-size: .82rem; color: var(--ink-2); }
.quicklink .icon { color: var(--brand); flex: none; }

/* ------------------------------------------------------------- kiosk block */
.kiosk { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 62rem) { .kiosk { grid-template-columns: 5fr 7fr; align-items: start; } }

.kiosk__visual { position: relative; display: grid; }
.kiosk__shot {
  margin: 0; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--band-line);
  box-shadow: var(--shadow-lg);
}
/* Both sit in the same grid cell and are pinned to opposite edges, so the pair
   can never total more than 100% and spill out of the page. */
.kiosk__shot--a { grid-area: 1 / 1; width: 72%; justify-self: start; }
.kiosk__shot--b {
  grid-area: 1 / 1; width: 50%; justify-self: end;
  margin-top: 26%;
}
.kiosk__body > :not(:last-child) { margin-bottom: 1.5rem; }
.kiosk__body > p { color: var(--band-fg-2); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; counter-reset: s; }
.step { display: flex; gap: .9rem; align-items: flex-start; }
.step__n {
  display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem;
  font-size: .9rem; font-weight: 750;
  color: #04141d; background: var(--brand-soft);
  border-radius: 50%;
}
.step h3 { font-size: 1rem; margin-bottom: .1rem; }
.step p { color: var(--band-fg-2); font-size: .92rem; }

/* ---------------------------------------------------------------- contact */
.section--contact { background: var(--surface-2); }
.contact { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 62rem) { .contact { grid-template-columns: 4fr 6fr; align-items: start; } }

.contact__facts { list-style: none; padding: 0; margin: 1.75rem 0; display: grid; gap: .7rem; }
.contact__facts li { display: flex; align-items: center; gap: .65rem; font-weight: 560; }
.contact__facts .icon { color: var(--brand); }

.contact__forms { display: grid; gap: 1.25rem; }
.form {
  display: grid; gap: 1rem;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.form__title { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.form__title .icon { color: var(--brand); }
.form__lead { color: var(--ink-2); font-size: .92rem; margin-top: -.5rem; }
.form--news { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }

.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 620; color: var(--ink-2); }
.req { color: var(--err); }
.field input, .field textarea {
  width: 100%; padding: .75rem .9rem;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field textarea:focus {
  outline: 0; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); }
.field--captcha input { max-width: 7rem; font-variant-numeric: tabular-nums; }

.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .88rem; color: var(--ink-2); }
.check input { margin-top: .28em; width: 1.05rem; height: 1.05rem; flex: none; accent-color: var(--brand); }

.fieldset {
  display: grid; gap: .6rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.fieldset legend {
  padding: 0 .4rem;
  font-size: .88rem; font-weight: 620; color: var(--ink-2);
}

/* honeypot — off-screen rather than display:none, which some bots skip */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { font-size: .9rem; font-weight: 560; min-height: 0; }
.form__status:empty { display: none; }
.form__status.is-ok  { color: var(--ok); }
.form__status.is-err { color: var(--err); }

/* ------------------------------------------------------------------ popups */
.modal {
  /* centre on the viewport regardless of scroll position */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(100% - 1.5rem, 44rem);
  max-height: min(88dvh, 52rem);
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal::backdrop { background: rgba(6, 18, 27, .62); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(1rem) scale(.97); } }

.modal__inner { display: flex; flex-direction: column; max-height: inherit; }
.modal__head {
  display: flex; align-items: center; gap: .8rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.modal__head h2 { font-size: 1.25rem; flex: 1; }
.modal__icon {
  display: grid; place-items: center; flex: none;
  width: 2.4rem; height: 2.4rem;
  color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: .65rem;
}
.modal__close { flex: none; }
.modal__body { padding: 1.25rem; overflow-y: auto; overscroll-behavior: contain; }
.modal__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.prose > :not(:last-child) { margin-bottom: 1rem; }
.prose .lead { font-size: 1.075rem; color: var(--ink); }
.prose p, .prose li { color: var(--ink-2); }
.prose h3 {
  font-size: .8rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 1.35rem;
}
.prose strong { color: var(--ink); }

/* --------------------------------------------------------------- web apps */
.apps { display: grid; gap: var(--gap); }
.app {
  padding: clamp(1.25rem, 3.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.app__intro { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: .85rem; }
.app__icon {
  display: grid; place-items: center; flex: none;
  width: 2.6rem; height: 2.6rem;
  color: var(--on-brand); background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: .7rem;
}
.app__lead { color: var(--ink-2); font-size: .95rem; }
.app__text { color: var(--ink-2); font-size: .95rem; max-width: 62ch; margin-bottom: .9rem; }
.app .chips { margin-bottom: 1.25rem; }

/* Three tiles in a row on desktop; a phone shows only the first, since the rest
   are one tap away in the lightbox. Every tile opens the same gallery. */
.shots { display: grid; gap: .6rem; }
/* Always three columns, however many tiles an app has, so a one- or two-shot
   app keeps the same tile size as the rest and the row stays on the grid */
@media (min-width: 48rem) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shots__tile {
  position: relative; display: block; padding: 0;
  aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: zoom-in;
  transition: border-color .18s ease, transform .18s ease;
}
.shots__tile:nth-child(n + 2) { display: none; }
@media (min-width: 48rem) { .shots__tile:nth-child(n + 2) { display: block; } }
.shots__tile img { width: 100%; height: 100%; object-fit: cover; }
.shots__tile:hover { border-color: var(--brand); transform: translateY(-2px); }

/* The stacked-cards badge, borrowed from the KiosAI project cards and repainted
   in our brand ramp so it reads on both themes. It marks the tile that opens
   the gallery: the only visible tile on a phone, the last one on desktop. */
.shots__badge {
  position: absolute; left: .55rem; bottom: .55rem;
  display: none; align-items: center; gap: .45rem;
  padding: .4rem .6rem .4rem .5rem;
  font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border-radius: .7rem;
  box-shadow: 0 2px 10px rgba(8, 21, 30, .35);
}
.shots__tile:first-child .shots__badge { display: inline-flex; }
@media (min-width: 48rem) {
  .shots__tile:first-child .shots__badge { display: none; }
  .shots__tile:last-child .shots__badge { display: inline-flex; }
}
.shots__stack { position: relative; display: block; width: 1.15rem; height: .95rem; }
.shots__stack i {
  position: absolute; inset: 0;
  border: 1px solid rgba(4, 16, 24, .5);
  border-radius: .2rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .6));
  transition: transform .22s ease;
}
.shots__stack i:first-child { transform: translate(-2px, -2px); opacity: .6; }
.shots__stack i:last-child  { transform: translate(2px, 2px); }
/* the pair fans apart as the tile lifts */
.shots__tile:hover .shots__stack i:first-child,
.shots__tile:focus-visible .shots__stack i:first-child { transform: translate(-3.5px, -3.5px); }
.shots__tile:hover .shots__stack i:last-child,
.shots__tile:focus-visible .shots__stack i:last-child { transform: translate(3.5px, 3.5px); }

/* The screenshots are portrait, so the viewer is sized by height rather than
   width: the figure fills the dialog and the image takes whatever the caption
   leaves. On a phone that is nearly the whole screen. */
.lightbox {
  position: fixed; inset: 0; margin: auto;
  width: min(100% - 1rem, 66rem);
  height: 96dvh;
  padding: 0;
  background: transparent; border: 0;
  overflow: visible;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgba(4, 12, 18, .85); }
.lightbox__figure {
  margin: 0; flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
}
.lightbox__frame {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__frame img {
  width: auto; max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
}
.lightbox__figure figcaption {
  flex: none;
  margin-top: .75rem; text-align: center;
  font-size: .9rem; color: #cfe0ec;
}
.lightbox__count {
  margin-left: .6rem; color: #8fa8b8; font-variant-numeric: tabular-nums;
}
/* the frame hugs the image, so the arrows centre on it and not on the caption */
.lightbox__frame { position: relative; display: flex; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  color: #fff;
  background: rgba(8, 21, 30, .72);
  border-color: rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px);
}
.lightbox__nav:hover { color: #fff; background: rgba(8, 21, 30, .9); }
.lightbox__nav--prev { left: .6rem; }
.lightbox__nav--prev .icon { transform: rotate(180deg); }
.lightbox__nav--next { right: .6rem; }
/* inside the frame, so it is reachable however short the viewport is */
.lightbox__close {
  position: absolute; top: .6rem; right: .6rem; z-index: 1;
  color: #fff;
  background: rgba(8, 21, 30, .72);
  border-color: rgba(255, 255, 255, .3);
  backdrop-filter: blur(6px);
}
.lightbox__close:hover { color: #fff; background: rgba(8, 21, 30, .9); }

/* ------------------------------------------------------------- project list */
.projects__title { margin-bottom: .25rem; }
.projects__note { color: var(--ink-3); font-size: .9rem; margin-bottom: 1.5rem; }
.projects {
  border-top: 1px solid var(--line);
}
.project {
  display: grid; gap: .15rem .9rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
}
.project__year {
  font-size: .82rem; font-weight: 750; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; color: var(--brand);
}
.project__what { color: var(--ink-2); font-size: .95rem; }
.project__what em { color: var(--ink); font-style: italic; }
@media (min-width: 40rem) {
  .project { grid-template-columns: 4rem 1fr; align-items: baseline; }
  .project__year { text-align: right; }
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
  color: var(--band-fg-2);
  background: var(--band-bg);
  border-top: 1px solid var(--band-line);
}
.site-footer__inner { display: grid; gap: 2rem; }
@media (min-width: 44rem) { .site-footer__inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .site-footer__inner { grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 2.5rem; } }

.site-footer__brand img { width: 176px; margin-bottom: 1rem; }
.site-footer__brand p { font-size: .92rem; max-width: 32ch; }
.site-footer__meta { margin-top: .75rem; font-size: .85rem; opacity: .8; }

.site-footer__col h2 {
  font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  color: var(--band-fg-2); opacity: .8; margin-bottom: .85rem;
}
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer__col a, .site-footer .linklike {
  color: var(--band-fg-2); text-decoration: none; font-size: .92rem;
}
.site-footer__col a:hover, .site-footer .linklike:hover {
  color: var(--band-head); text-decoration: underline;
}

.site-footer__legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--band-line);
  font-size: .82rem; opacity: .85;
}

/* -------------------------------------------------------------- back to top */
/* Slides in from the right once the reader is a full viewport down. */
.to-top {
  position: fixed; right: 1rem; z-index: 120;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; padding: 0;
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  border: 0; border-radius: 50%;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0; transform: translateX(150%);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .3, 1.1),
              filter .16s ease;
}
.to-top[hidden] { display: none; }
.to-top.is-in { opacity: 1; transform: translateX(0); }
.to-top:hover { filter: brightness(1.1); }
.to-top:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; }
@media (min-width: 48rem) {
  .to-top { right: 1.5rem; bottom: 1.5rem; width: 3rem; height: 3rem; }
}
/* keep clear of the cookie notice while it is showing */
body:has(.cookie:not([hidden])) .to-top { bottom: calc(7.5rem + env(safe-area-inset-bottom)); }

/* ----------------------------------------------------------- cookie notice */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  padding: .75rem;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
}
.cookie[hidden] { display: none; }
.cookie__inner {
  display: grid; gap: 1rem;
  width: min(100%, 60rem); margin-inline: auto;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: rise .35s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes rise { from { opacity: 0; transform: translateY(1.5rem); } }
.cookie h2 { font-size: 1rem; margin-bottom: .3rem; }
.cookie p { font-size: .87rem; color: var(--ink-2); }
.cookie__actions { display: flex; gap: .5rem; }
@media (min-width: 44rem) {
  .cookie__inner { grid-template-columns: 1fr auto; align-items: center; }
}

/* ------------------------------------------------------------ scroll reveal */
.reveal { opacity: 0; transform: translateY(1.25rem); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
}
.no-js .reveal, html:not(.js) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* -------------------------------------------------------------- legal pages */
.page { padding: clamp(2.5rem, 7vw, 4.5rem) 0 var(--sect); }
.page__head { max-width: 44rem; margin-bottom: 2.5rem; }
.page__updated { margin-top: .75rem; font-size: .9rem; color: var(--ink-3); }
.legal { max-width: 48rem; }
.legal h2 {
  font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem);
  margin: 2.5rem 0 .75rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
/* Only a heading that genuinely opens the block loses its spacing. When a
   callout precedes it, drop the rule but keep the margin. */
.legal > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.legal > .callout + h2 { border-top: 0; padding-top: 0; }
.legal h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: .85rem; }
.legal ul { padding-left: 1.15rem; display: grid; gap: .35rem; }
.legal .callout {
  padding: 1.15rem;
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-sm);
}
.legal .callout p { color: var(--ink); }

.table-scroll { overflow-x: auto; margin: 1rem 0; }
/* No min-width on small screens: short cells wrap and the table fits, which
   beats a horizontal scroller that hides the first column. */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
@media (min-width: 34rem) { .table { min-width: 30rem; } }
.table th, .table td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-weight: 700; color: var(--ink); background: var(--surface-2); }
.table td { color: var(--ink-2); }
.table code { font-family: var(--mono); font-size: .88em; }
