/* next-convert design system
   Shape rule: controls (buttons, inputs, selects, tabs) 10px. Containers (panels, tiles, cards) 18px.
   Tags (format badges) 6px. A container nested in a container uses the control radius.
   Color rule: neutral greys, ink for primary actions, one accent (signal orange) for marks,
   focus, progress and drag states. No other hues except the error state.
   Z-index scale: header 20, mobile menu 30, drop overlay 40, skip link 50. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f6f6f6;
  --surface: #fdfdfd;
  --surface-2: #efefef;
  --surface-3: #e7e7e7;
  --line: #e1e1e1;
  --line-strong: #c9c9c9;
  --text: #171717;
  --text-2: #484848;
  --text-3: #686868;
  --ink: #171717;
  --ink-hover: #333333;
  --on-ink: #fafafa;
  --accent: #e8572a;
  --accent-strong: #b9431c;
  --accent-soft: rgb(232 87 42 / 0.08);
  --accent-line: rgb(232 87 42 / 0.4);
  --danger: #c4291f;
  --danger-soft: rgb(196 41 31 / 0.07);
  --shadow-panel: 0 1px 2px rgb(23 23 23 / 0.04), 0 18px 40px -22px rgb(23 23 23 / 0.22);
  --shadow-lift: 0 1px 2px rgb(23 23 23 / 0.06), 0 8px 20px -12px rgb(23 23 23 / 0.2);

  --r-ctl: 10px;
  --r-box: 18px;
  --r-tag: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
  --section: clamp(64px, 9vw, 112px);

  --z-header: 20;
  --z-menu: 30;
  --z-overlay: 40;
  --z-skip: 50;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: var(--z-skip);
  padding: 10px 16px; border-radius: var(--r-ctl);
  background: var(--ink); color: var(--on-ink); font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.i { width: 1.25em; height: 1.25em; flex: none; }
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.hero + .section, .page-hero + .section { padding-top: 0; }
.nw { white-space: nowrap; }
.section-head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 1.0625rem; max-width: 62ch; }

.h2 { font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem); letter-spacing: -0.035em; line-height: 1.08; }
.h3 { font-size: 1.125rem; letter-spacing: -0.015em; line-height: 1.3; }
.lead { font-size: clamp(1.05rem, 1rem + 0.25vw, 1.1875rem); color: var(--text-2); line-height: 1.55; }
.muted { color: var(--text-3); }
.mono { font-family: var(--font-mono); }
.eyebrow {
  display: inline-block;
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; text-decoration: none; color: var(--text);
}
.link-arrow .i { color: var(--accent); transition: transform 0.3s var(--ease); }
.link-arrow:hover .i { transform: translateX(3px); }
.link-arrow:hover span { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  --btn-h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-ctl);
  font-size: 0.9375rem; font-weight: 550; line-height: 1;
  white-space: nowrap; text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.15s var(--ease), box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn:disabled { cursor: not-allowed; opacity: 0.45; }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover:not(:disabled) { background: var(--ink-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-lg { --btn-h: 52px; padding: 0 26px; font-size: 1.0625rem; }
.btn-lg .i { width: 20px; height: 20px; }
.btn-sm { --btn-h: 34px; padding: 0 12px; font-size: 0.875rem; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-icon {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--text-3);
  transition: background-color 0.2s, color 0.2s;
}
.btn-icon:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-icon:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-icon .i { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.03em;
}
.logo-mark {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: #fff;
}
.logo-mark .i { width: 17px; height: 17px; }

.nav { flex: 1; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; height: 36px; padding: 0 12px;
  border-radius: var(--r-ctl);
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
  transition: background-color 0.2s, color 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.header-end { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-toggle { display: none; }

.mobile-menu {
  position: absolute; inset: var(--header-h) 0 auto 0; z-index: var(--z-menu);
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 24px;
}
.mobile-menu ul { display: grid; }
.mobile-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
  text-decoration: none; font-size: 1.0625rem; font-weight: 500;
}
.mobile-menu a .i { color: var(--text-3); }
.mobile-menu li:last-child a { border-bottom: 0; }
.mobile-menu-label {
  margin: 20px 4px 4px; font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}

@media (max-width: 899px) {
  .nav, .header-end .nav-link { display: none; }
  .nav-toggle { display: inline-grid; }
}
@media (min-width: 900px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(28px, 5vw, 64px) clamp(56px, 8vw, 104px); }
.hero-home {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, #fff 0%, #fff 78%, var(--bg) 100%);
}
.hero-grid { position: relative; z-index: 1; }
/* Fire photo with the black lifted out, so only the light sits on the white field. */
.hero-home::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  left: -14%;
  right: -14%;
  top: 2%;
  height: 52%;
  background: url("/assets/img/hero-fire.png") 46% 68% / 150% auto no-repeat;
  -webkit-mask-image: linear-gradient(transparent 0%, #000 16%, #000 72%, transparent 100%);
  mask-image: linear-gradient(transparent 0%, #000 16%, #000 72%, transparent 100%);
  animation: hero-fire 22s ease-in-out infinite alternate;
}
@keyframes hero-fire {
  from { background-position: 34% 72%; }
  to { background-position: 66% 58%; }
}
.hero-grid { display: grid; gap: 32px; }
.hero-copy { max-width: 560px; }
.hero h1 {
  font-size: clamp(2.375rem, 1.35rem + 2.9vw, 3.375rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}
.hero .lead { margin-top: 20px; max-width: 40ch; }
.crumbs { margin-bottom: 18px; font-size: 0.875rem; color: var(--text-3); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text-2); }

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
  }
  .hero-copy { padding-bottom: 24px; }
  /* With a long file list, keep the copy at the top instead of drifting to the middle. */
  .hero-grid:has(.cv.has-files) { align-items: start; }
  .hero-grid:has(.cv.has-files) .hero-copy { position: sticky; top: calc(var(--header-h) + 40px); padding-top: 32px; }
  /* Scales with the copy column so the headline stays on two lines. */
  .hero h1 { font-size: clamp(2.375rem, calc(5.1vw - 4px), 3.375rem); }
}

.page-hero { padding-block: clamp(28px, 5vw, 64px) clamp(36px, 5vw, 56px); }
.page-hero h1 { font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -0.045em; line-height: 1.04; max-width: 18ch; }
.page-hero .lead { margin-top: 18px; max-width: 58ch; }

/* ---------- Converter ---------- */
.cv {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  box-shadow: var(--shadow-panel);
  padding: 8px;
}
.cv-drop {
  position: relative;
  display: grid; place-items: center;
  min-height: 300px;
  padding: 36px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--bg);
  text-align: center;
  transition: border-color 0.25s, background-color 0.25s;
}
.cv-drop-inner { display: grid; justify-items: center; gap: 14px; }
.cv-drop-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: 4px;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  transition: transform 0.4s var(--ease);
}
.cv-drop-icon .i { width: 26px; height: 26px; }
.cv-drop-text { color: var(--text-2); font-size: 0.9375rem; }
.cv-hint { font: 450 0.78rem/1.5 var(--font-mono); color: var(--text-3); max-width: 38ch; }
.cv.is-dragging .cv-drop { border-color: var(--accent); background: var(--accent-soft); }
.cv.is-dragging .cv-drop-icon { transform: translateY(-4px); }

.cv.has-files .cv-drop { min-height: 0; padding: 12px; display: flex; justify-content: flex-start; }
.cv.has-files .cv-drop-inner { display: flex; align-items: center; gap: 12px; }
.cv.has-files .cv-drop-icon,
.cv.has-files .cv-hint,
.cv.has-files .cv-pick-main { display: none; }
.cv-pick-more { display: none; }
.cv.has-files .cv-pick-more { display: inline-flex; }
.cv.has-files .cv-drop-text { font-size: 0.875rem; color: var(--text-3); }

.cv-note {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 8px 6px;
  font-size: 0.8125rem; color: var(--text-3);
}
.cv-note .i { width: 16px; height: 16px; color: var(--text-2); }

.cv-list { margin-top: 8px; }
.cv-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "badge main to actions";
  align-items: center;
  gap: 10px 14px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.cv-row:last-child { border-bottom: 0; }
@media (prefers-reduced-motion: no-preference) {
  .cv-row { animation: row-in 0.45s var(--ease) both; }
}
@keyframes row-in { from { opacity: 0; transform: translateY(6px); } }

.cv-badge {
  grid-area: badge;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  font: 600 0.6875rem/1 var(--font-mono); letter-spacing: 0.02em;
  color: var(--text-2);
}
.cv-row[data-state="done"] .cv-badge { background: var(--accent-soft); color: var(--accent-strong); }
.cv-main { grid-area: main; min-width: 0; }
.cv-name { font-weight: 550; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font-size: 0.8125rem; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.cv-meta .i { width: 15px; height: 15px; }
.cv-meta.is-done { color: var(--text-2); }
.cv-meta.is-done .i { color: var(--accent); }
.cv-meta.is-error { color: var(--danger); }
.cv-to { grid-area: to; display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--text-3); }
.cv-actions { grid-area: actions; display: flex; align-items: center; gap: 4px; }

.select-wrap { position: relative; display: inline-flex; }
.select {
  appearance: none; -webkit-appearance: none;
  height: 36px; min-width: 96px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--surface);
  font: 600 0.8125rem/1 var(--font-mono);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
}
.select:hover { border-color: var(--text-3); }
.select:disabled { opacity: 0.55; cursor: not-allowed; }
.select-wrap .i {
  position: absolute; right: 10px; top: 50%; translate: 0 -50%;
  width: 14px; height: 14px; pointer-events: none; color: var(--text-3);
}

.cv-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  opacity: 0; transition: opacity 0.3s;
}
.cv-progress span {
  display: block; height: 100%; background: var(--accent);
  transform-origin: left; transform: scaleX(var(--p, 0));
  transition: transform 0.25s linear;
}
.cv-row[data-state="working"] .cv-progress { opacity: 1; }
.cv-row.is-indeterminate .cv-progress span {
  width: 30%;
  transform: none;
  animation: indeterminate 1.1s var(--ease) infinite;
}
@keyframes indeterminate {
  from { translate: -100% 0; }
  to { translate: 340% 0; }
}

.cv-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 8px; padding: 10px 8px 4px;
  border-top: 1px solid var(--line);
}
.cv-count { font-size: 0.875rem; color: var(--text-3); margin-right: auto; }
.cv-bar-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.cv-options {
  margin-top: 8px; padding: 16px;
  border-radius: var(--r-ctl);
  background: var(--bg);
  border: 1px solid var(--line);
}
.cv-options-grid { display: grid; gap: 16px 20px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.opt { display: grid; gap: 6px; align-content: start; }
.opt-label { font-size: 0.8125rem; font-weight: 550; color: var(--text-2); }
.opt-help { font-size: 0.75rem; color: var(--text-3); }
.opt .select { width: 100%; font-family: var(--font-sans); font-weight: 500; }
.opt-range { display: flex; align-items: center; gap: 10px; }
.opt-range output { min-width: 3ch; font: 600 0.8125rem/1 var(--font-mono); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="color"] {
  width: 100%; height: 36px; padding: 3px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctl);
  background: var(--surface); cursor: pointer;
}
.check { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.cv-combined {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 8px; padding: 14px 12px;
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.cv-combined p { margin-right: auto; font-size: 0.9375rem; font-weight: 550; }
.cv-combined small { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--text-2); }

@media (max-width: 639px) {
  .cv-drop { min-height: 260px; padding: 28px 16px; }
  .cv-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "badge main main" "to to actions";
    padding: 12px 6px;
  }
  .cv-bar-end { width: 100%; }
  .cv-bar-end .btn { flex: 1; }
}

/* Page-wide drop overlay */
.drop-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: grid; place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.drop-overlay.is-on { opacity: 1; }
.drop-overlay-box {
  display: grid; justify-items: center; gap: 12px;
  width: min(560px, 100%); padding: 56px 24px;
  border: 2px dashed var(--accent);
  border-radius: var(--r-box);
  background: var(--surface);
  text-align: center;
  font-size: 1.25rem; font-weight: 600;
}
.drop-overlay-box .i { width: 36px; height: 36px; color: var(--accent); }

/* ---------- Popular conversion tiles ---------- */
.pairs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  overflow: hidden;
}
@media (min-width: 768px) { .pairs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pairs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pair {
  display: grid; gap: 8px; align-content: start;
  padding: 22px 22px 24px;
  background: var(--surface);
  text-decoration: none;
  transition: background-color 0.2s;
}
.pair:hover { background: var(--surface-2); }
.pair-formats { display: flex; align-items: center; gap: 8px; font: 600 0.9375rem/1 var(--font-mono); letter-spacing: 0.01em; }
.pair-formats .i { width: 16px; height: 16px; color: var(--accent); transition: transform 0.3s var(--ease); }
.pair:hover .pair-formats .i { transform: translateX(3px); }
.pair-desc { font-size: 0.875rem; color: var(--text-3); line-height: 1.45; }
@media (max-width: 479px) {
  .pair { padding: 18px 16px 20px; }
  .pair-formats { font-size: 0.875rem; }
}

/* ---------- Privacy flow ---------- */
.privacy { display: grid; gap: clamp(28px, 4vw, 44px); }
.privacy-copy { max-width: 720px; }
.privacy-copy p { margin-top: 16px; }
.flow { display: grid; gap: 12px; }
.flow-row {
  display: grid; gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}
.flow-row.is-muted { background: transparent; border-style: dashed; }
.flow-row.is-ours { border-color: var(--accent-line); background: var(--accent-soft); }
.flow-label { font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.flow-row.is-ours .flow-label { color: var(--accent-strong); }
.flow-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.flow-step {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  font-size: 0.9375rem; font-weight: 500;
}
.flow-row.is-ours .flow-step { background: var(--surface); }
.flow-step .i { width: 18px; height: 18px; color: var(--text-3); }
.flow-row.is-ours .flow-step .i { color: var(--accent); }
.flow-row.is-muted .flow-step { color: var(--text-3); }
.flow-sep { width: 16px; height: 16px; color: var(--line-strong); }
.flow-row.is-ours .flow-sep { color: var(--accent); }
@media (min-width: 900px) {
  .flow-row { grid-template-columns: 220px minmax(0, 1fr); align-items: center; padding: 18px 22px; }
}

/* ---------- Bento ---------- */
.bento { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile-demo { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile-demo { grid-column: span 2; grid-row: span 2; }
}
.tile {
  position: relative;
  display: grid; align-content: start; gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
  overflow: hidden;
}
.tile p { color: var(--text-2); font-size: 0.9375rem; }
.tile-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 6px;
  border-radius: var(--r-ctl);
  background: var(--surface-2); color: var(--text);
}
.tile-icon .i { width: 20px; height: 20px; }
.tile-dots {
  background-color: var(--surface);
  background-image: radial-gradient(circle at 1px 1px, var(--line-strong) 1px, transparent 0);
  background-size: 14px 14px;
}
.tile-dots .tile-icon { background: var(--surface); border: 1px solid var(--line); }
.tile-accent { background: var(--accent-soft); border-color: var(--accent-line); }
.tile-accent .tile-icon { background: var(--surface); color: var(--accent); }
.tile-plain { background: var(--surface-2); border-color: transparent; }
.tile-plain .tile-icon { background: var(--surface); }
.tile-devices { display: flex; gap: 6px; margin-bottom: 6px; }
.tile-devices span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-ctl); background: var(--surface); }
.tile-devices .i { width: 20px; height: 20px; }

.tile-demo { padding: 0; gap: 0; align-content: stretch; grid-template-rows: auto 1fr; }
.tile-demo figure { position: relative; aspect-ratio: 3 / 2; background: var(--surface-2); }
.tile-demo img { width: 100%; height: 100%; object-fit: cover; }
.demo-body { display: grid; gap: 10px; align-content: start; padding: 22px 24px 24px; }
.demo-results { display: grid; gap: 2px; margin-top: 8px; }
.demo-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.demo-fmt { font: 600 0.8125rem/1 var(--font-mono); }
.demo-size { font: 500 0.9375rem/1 var(--font-mono); color: var(--text); }
.demo-note { font-size: 0.8125rem; color: var(--text-3); text-align: right; }
.demo-row.is-best .demo-note { color: var(--accent-strong); font-weight: 600; }
.skeleton {
  display: inline-block; width: 72px; height: 14px; border-radius: var(--r-tag);
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: shimmer 1.4s linear infinite; }
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Tabs ---------- */
.tabs { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.tab-list {
  display: flex; gap: 2px; width: max-content; max-width: 100%;
  padding: 4px;
  border-radius: calc(var(--r-ctl) + 4px);
  background: var(--surface-2);
  overflow-x: auto; scrollbar-width: none;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab {
  height: 36px; padding: 0 16px;
  border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--text-2);
  font-size: 0.9375rem; font-weight: 550; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift); }
.tab-panel {
  display: grid; gap: 24px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}
.tab-panel-grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .tab-panel-grid { grid-template-columns: 1fr 1fr; } }
.tab-panel h3 { margin-bottom: 12px; }
.tab-panel p { color: var(--text-2); }
.js-tabs .tab-panel:not(.is-active) { display: none; }

.fmt-list { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-tag);
  background: var(--bg);
  font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.02em;
  color: var(--text-2);
  text-decoration: none;
}
a.fmt { transition: border-color 0.2s, color 0.2s, background-color 0.2s; }
a.fmt:hover { border-color: var(--accent-line); color: var(--text); background: var(--accent-soft); }
.fmt-label { font-size: 0.8125rem; color: var(--text-3); margin-bottom: 10px; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; gap: 28px; }
@media (min-width: 1024px) {
  .faq-wrap { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 64px; }
  .faq-side { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
}
.faq-side p { margin-top: 14px; color: var(--text-2); }
.faq-side .link-arrow { margin-top: 18px; }
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 2px;
  list-style: none; cursor: pointer;
  font-weight: 550; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .i { width: 18px; height: 18px; color: var(--text-3); transition: transform 0.3s var(--ease), color 0.2s; }
.faq-item summary:hover .i { color: var(--text); }
.faq-item[open] summary .i { transform: rotate(45deg); color: var(--accent); }
.faq-a { padding: 0 2px 22px; color: var(--text-2); max-width: 66ch; }
.faq-a p + p { margin-top: 10px; }
.faq-a a { color: var(--text); }
.faq-group + .faq-group { margin-top: 48px; }
.faq-group h2 { margin-bottom: 16px; }

/* ---------- CTA ---------- */
.cta-box {
  display: grid; gap: 24px; align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-box);
  background: var(--surface-2);
  overflow: hidden;
}
.cta-box p { margin-top: 10px; color: var(--text-2); }
@media (min-width: 768px) { .cta-box { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- Steps (how to) ---------- */
.steps { display: grid; gap: 28px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; } }
.step { position: relative; display: grid; gap: 10px; align-content: start; }
@media (min-width: 900px) {
  .step { padding-right: 36px; }
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 22px; left: 60px; right: 12px;
    border-top: 1px dashed var(--line-strong);
  }
}
.step-icon {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 6px;
  border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--accent);
}
.step-icon .i { width: 20px; height: 20px; }
.step p { color: var(--text-2); font-size: 0.9375rem; max-width: 36ch; }

/* ---------- Compare ---------- */
.compare { display: grid; gap: 12px; }
@media (min-width: 768px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare-card {
  display: grid; gap: 18px; align-content: start;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}
.compare-card.is-target { border-color: var(--accent-line); }
.compare-head { display: flex; align-items: baseline; gap: 12px; }
.compare-head .fmt-big { font: 650 1.75rem/1 var(--font-mono); letter-spacing: -0.02em; }
.compare-head span:last-child { color: var(--text-3); font-size: 0.9375rem; }
.compare-card > p { color: var(--text-2); }
.facts { display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.facts dt { color: var(--text-3); }
.facts dd { color: var(--text); }

/* ---------- Target tiles (category pages) ---------- */
.targets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.target {
  display: grid; gap: 8px; align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
a.target:hover { border-color: var(--line-strong); background: var(--surface-2); }
.target-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.target-head strong { font: 650 1rem/1 var(--font-mono); }
.target-head .i { width: 16px; height: 16px; color: var(--accent); }
.target p { font-size: 0.875rem; color: var(--text-3); }

.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.notes { display: grid; gap: 18px; }
.note { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.note .tile-icon { margin: 0; }
.note h3 { font-size: 1rem; margin-bottom: 4px; }
.note p { color: var(--text-2); font-size: 0.9375rem; }

.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--surface);
  text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.related a:hover { border-color: var(--line-strong); background: var(--surface-2); }
.related .i { width: 18px; height: 18px; color: var(--text-3); }

/* ---------- Formats page ---------- */
.filter { position: relative; max-width: 420px; margin-top: 28px; }
.filter label { display: block; margin-bottom: 8px; font-size: 0.875rem; font-weight: 550; color: var(--text-2); }
.filter input {
  width: 100%; height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-ctl);
  background: var(--surface);
  font-size: 1rem;
}
.filter input::placeholder { color: var(--text-3); }
.filter .i { position: absolute; left: 14px; bottom: 14px; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.format-group + .format-group { margin-top: clamp(40px, 6vw, 64px); }
.format-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.format-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.format-card {
  display: grid; gap: 10px; align-content: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}
.format-card-head { display: flex; align-items: baseline; gap: 10px; }
.format-card-head strong { font: 650 1.125rem/1 var(--font-mono); }
.format-card-head span { font-size: 0.875rem; color: var(--text-3); }
.format-card > p { font-size: 0.875rem; color: var(--text-2); }
.format-card .fmt-list { margin-top: 4px; }
.format-card .fmt { height: 26px; padding: 0 8px; }
.empty-state {
  display: grid; justify-items: start; gap: 8px;
  padding: 28px; margin-top: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-box);
  color: var(--text-2);
}

/* ---------- Prose ---------- */
.prose { max-width: 70ch; color: var(--text-2); }
.prose h2 { margin: 44px 0 12px; color: var(--text); font-size: 1.375rem; letter-spacing: -0.02em; }
.prose h3 { margin: 28px 0 8px; color: var(--text); font-size: 1.0625rem; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: 12px; }
.prose ul { display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.prose li::marker { color: var(--text-3); }
.prose a { color: var(--text); }
.prose strong { color: var(--text); font-weight: 600; }
.updated { margin-top: 14px; font-size: 0.875rem; color: var(--text-3); }

.credits { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.credits th { text-align: left; font-weight: 550; color: var(--text-3); font-size: 0.8125rem; padding: 0 12px 10px 0; }
.credits td { padding: 12px 12px 12px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--text-2); }
.credits td:first-child { color: var(--text); font-weight: 550; }
.table-scroll { overflow-x: auto; }

.contact-card {
  display: grid; gap: 16px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-box);
  background: var(--surface);
}
.contact-mail { font: 600 clamp(1.25rem, 1rem + 1vw, 1.625rem)/1.2 var(--font-sans); letter-spacing: -0.02em; word-break: break-all; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; font-size: 0.9375rem; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; display: grid; align-content: start; justify-items: start; gap: 14px; max-width: 320px; }
.footer-brand p { color: var(--text-3); }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}
.footer-h { margin-bottom: 14px; font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.footer-grid ul { display: grid; gap: 10px; }
.footer-grid a { color: var(--text-3); text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-3); font-size: 0.875rem;
}

/* ---------- Page-level helpers ---------- */
.section-tight { padding-top: 0; }
.notes-grid { display: grid; gap: 28px 40px; }
@media (min-width: 900px) { .notes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .notes-grid:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chips-block { margin-top: 28px; }
.notes-title { margin-bottom: 22px; }
.split > div > .lead { margin-top: 16px; }
.prose-legal h2:first-child { margin-top: 0; }
.prose-legal { padding-top: 8px; }
.faq-side > p:first-child { margin-top: 0; }

/* ---------- Motion ---------- */
/* Sections fade in as they scroll into view. Pure CSS (scroll-driven
   animations); browsers without support simply show the content. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *, .page-hero .container > * { animation: rise 0.7s var(--ease) both; }
  .hero-copy > *:nth-child(2), .page-hero .container > *:nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > *:nth-child(3), .page-hero .container > *:nth-child(3) { animation-delay: 0.12s; }
  .hero-grid > .cv { animation: rise 0.8s 0.12s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
