/* ==========================================================================
   Konvert — "Liquid Glass" design system
   --------------------------------------------------------------------------
   1. Tokens (light, then dark via prefers-color-scheme + [data-theme])
   2. Base & typography
   3. Backdrop (fixed colour field behind the glass)
   4. Glass material
   5. Layout primitives
   6. Components (buttons, badges, chips, cards, steps, callouts, TOC, specs,
      tables, prose, FAQ, CTA, breadcrumbs, ad slot)
   7. Site chrome (header, mobile menu, footer)
   8. Converter
   9. Job status
   10. Pages (home, job, errors)
   11. Accessibility & fallbacks (reduced motion/transparency, contrast,
       no backdrop-filter, forced colours, print)
   No web fonts, no external requests.
   ========================================================================== */

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

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* page + text */
  --bg: #f2f3f7;
  --surface-solid: #ffffff;
  --surface-fallback: rgba(255, 255, 255, 0.94);
  --text: #1d1d1f;
  --text-2: #3d3d42;
  --text-3: #4f4f57;
  --link: #004da6;
  --link-hover: #003b80;
  --accent: #007aff;
  --accent-text: #004ca3;
  --focus: #0a66ff;

  /* primary button fill (white text on it) */
  --btn-a: #0a63e0;
  --btn-b: #4f3fd9;
  --btn-glow: rgba(10, 99, 224, 0.42);

  /* glass */
  --glass-top: rgba(255, 255, 255, 0.72);
  --glass-bottom: rgba(255, 255, 255, 0.5);
  --glass-thick-top: rgba(255, 255, 255, 0.86);
  --glass-thick-bottom: rgba(255, 255, 255, 0.72);
  --rim-top: rgba(255, 255, 255, 0.98);
  --rim-mid: rgba(255, 255, 255, 0.32);
  --rim-bottom: rgba(255, 255, 255, 0.62);
  --inner-hi: rgba(255, 255, 255, 0.85);
  --edge: rgba(22, 28, 48, 0.08);
  --shadow-sm: 0 1px 2px rgba(22, 30, 60, 0.06), 0 2px 8px -2px rgba(22, 30, 60, 0.06);
  --shadow-md: 0 1px 1px rgba(22, 30, 60, 0.03), 0 6px 16px -4px rgba(22, 30, 60, 0.08), 0 24px 48px -18px rgba(30, 40, 100, 0.2);
  --shadow-lg: 0 2px 4px rgba(22, 30, 60, 0.04), 0 14px 30px -8px rgba(22, 30, 60, 0.14), 0 40px 80px -24px rgba(30, 40, 110, 0.3);

  /* fills, lines */
  --fill-1: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.07);
  --tile: rgba(255, 255, 255, 0.5);
  --chip-bg: rgba(255, 255, 255, 0.64);
  --input-bg: rgba(255, 255, 255, 0.92);
  --thumb: #ffffff;
  --thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 3px 10px rgba(22, 30, 60, 0.1), inset 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  --hairline: rgba(60, 60, 67, 0.14);
  --hairline-strong: rgba(60, 60, 67, 0.42);

  /* status colours: *-text on *-bg over glass */
  --green: #34c759;
  --green-text: #11622a;
  --green-bg: rgba(52, 199, 89, 0.16);
  --amber: #ff9f0a;
  --amber-text: #8a4700;
  --amber-bg: rgba(255, 159, 10, 0.18);
  --indigo-text: #4638c9;
  --indigo-bg: rgba(94, 92, 230, 0.13);
  --red: #ff3b30;
  --red-text: #b8231a;
  --red-bg: rgba(255, 59, 48, 0.1);
  --blue-bg: rgba(0, 122, 255, 0.1);

  /* gradients */
  --grad-text: linear-gradient(96deg, #005fdc 0%, #4a3fe0 40%, #8d34d8 70%, #b81d63 100%);
  --grad-accent: linear-gradient(115deg, #0a84ff 0%, #5e5ce6 52%, #bf5af2 100%);
  --grad-icon: linear-gradient(145deg, rgba(10, 132, 255, 0.16), rgba(94, 92, 230, 0.14) 55%, rgba(191, 90, 242, 0.14));

  /* backdrop blobs */
  --blob-blue: rgba(0, 122, 255, 0.26);
  --blob-indigo: rgba(88, 86, 214, 0.26);
  --blob-violet: rgba(175, 82, 222, 0.24);
  --blob-pink: rgba(255, 55, 95, 0.17);
  --blob-teal: rgba(48, 176, 199, 0.24);

  /* shape & rhythm */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-card: 28px;
  --r-xl: 34px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 80px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0c10;
    --surface-solid: #1c1c21;
    --surface-fallback: rgba(28, 28, 33, 0.96);
    --text: #f5f5f7;
    --text-2: #c9c9cf;
    --text-3: #b8b8c0;
    --link: #7dbdff;
    --link-hover: #a8d2ff;
    --accent: #0a84ff;
    --accent-text: #88c3ff;
    --focus: #7dbdff;
    --btn-a: #0a63e0;
    --btn-b: #5140dd;
    --btn-glow: rgba(10, 132, 255, 0.4);
    --glass-top: rgba(68, 70, 88, 0.42);
    --glass-bottom: rgba(34, 35, 46, 0.46);
    --glass-thick-top: rgba(46, 48, 62, 0.8);
    --glass-thick-bottom: rgba(27, 28, 37, 0.74);
    --rim-top: rgba(255, 255, 255, 0.3);
    --rim-mid: rgba(255, 255, 255, 0.06);
    --rim-bottom: rgba(255, 255, 255, 0.14);
    --inner-hi: rgba(255, 255, 255, 0.12);
    --edge: rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px -2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 1px rgba(0, 0, 0, 0.3), 0 8px 20px -6px rgba(0, 0, 0, 0.5), 0 30px 60px -22px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 34px -8px rgba(0, 0, 0, 0.55), 0 44px 90px -26px rgba(0, 0, 0, 0.8);
    --fill-1: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.14);
    --tile: rgba(255, 255, 255, 0.035);
    --chip-bg: rgba(255, 255, 255, 0.07);
    --input-bg: rgba(0, 0, 0, 0.3);
    --thumb: rgba(82, 82, 92, 0.94);
    --thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --hairline: rgba(255, 255, 255, 0.11);
    --hairline-strong: rgba(255, 255, 255, 0.42);
    --green: #30d158;
    --green-text: #7aeea0;
    --green-bg: rgba(48, 209, 88, 0.16);
    --amber: #ffb340;
    --amber-text: #ffd27f;
    --amber-bg: rgba(255, 159, 10, 0.18);
    --indigo-text: #b8b5ff;
    --indigo-bg: rgba(94, 92, 230, 0.26);
    --red: #ff453a;
    --red-text: #ff8f87;
    --red-bg: rgba(255, 69, 58, 0.15);
    --blue-bg: rgba(10, 132, 255, 0.16);
    --grad-text: linear-gradient(96deg, #5aaeff 0%, #8f8cff 40%, #d08cff 70%, #ff7ba3 100%);
    --grad-icon: linear-gradient(145deg, rgba(10, 132, 255, 0.3), rgba(94, 92, 230, 0.26) 55%, rgba(191, 90, 242, 0.24));
    --blob-blue: rgba(10, 132, 255, 0.3);
    --blob-indigo: rgba(94, 92, 230, 0.34);
    --blob-violet: rgba(191, 90, 242, 0.26);
    --blob-pink: rgba(255, 55, 95, 0.19);
    --blob-teal: rgba(64, 200, 224, 0.2);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c10;
  --surface-solid: #1c1c21;
  --surface-fallback: rgba(28, 28, 33, 0.96);
  --text: #f5f5f7;
  --text-2: #c9c9cf;
  --text-3: #b8b8c0;
  --link: #7dbdff;
  --link-hover: #a8d2ff;
  --accent: #0a84ff;
  --accent-text: #88c3ff;
  --focus: #7dbdff;
  --btn-a: #0a63e0;
  --btn-b: #5140dd;
  --btn-glow: rgba(10, 132, 255, 0.4);
  --glass-top: rgba(68, 70, 88, 0.42);
  --glass-bottom: rgba(34, 35, 46, 0.46);
  --glass-thick-top: rgba(46, 48, 62, 0.8);
  --glass-thick-bottom: rgba(27, 28, 37, 0.74);
  --rim-top: rgba(255, 255, 255, 0.3);
  --rim-mid: rgba(255, 255, 255, 0.06);
  --rim-bottom: rgba(255, 255, 255, 0.14);
  --inner-hi: rgba(255, 255, 255, 0.12);
  --edge: rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px -2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 1px rgba(0, 0, 0, 0.3), 0 8px 20px -6px rgba(0, 0, 0, 0.5), 0 30px 60px -22px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 34px -8px rgba(0, 0, 0, 0.55), 0 44px 90px -26px rgba(0, 0, 0, 0.8);
  --fill-1: rgba(118, 118, 128, 0.24);
  --fill-2: rgba(118, 118, 128, 0.14);
  --tile: rgba(255, 255, 255, 0.035);
  --chip-bg: rgba(255, 255, 255, 0.07);
  --input-bg: rgba(0, 0, 0, 0.3);
  --thumb: rgba(82, 82, 92, 0.94);
  --thumb-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --hairline: rgba(255, 255, 255, 0.11);
  --hairline-strong: rgba(255, 255, 255, 0.42);
  --green: #30d158;
  --green-text: #7aeea0;
  --green-bg: rgba(48, 209, 88, 0.16);
  --amber: #ffb340;
  --amber-text: #ffd27f;
  --amber-bg: rgba(255, 159, 10, 0.18);
  --indigo-text: #b8b5ff;
  --indigo-bg: rgba(94, 92, 230, 0.26);
  --red: #ff453a;
  --red-text: #ff8f87;
  --red-bg: rgba(255, 69, 58, 0.15);
  --blue-bg: rgba(10, 132, 255, 0.16);
  --grad-text: linear-gradient(96deg, #5aaeff 0%, #8f8cff 40%, #d08cff 70%, #ff7ba3 100%);
  --grad-icon: linear-gradient(145deg, rgba(10, 132, 255, 0.3), rgba(94, 92, 230, 0.26) 55%, rgba(191, 90, 242, 0.24));
  --blob-blue: rgba(10, 132, 255, 0.3);
  --blob-indigo: rgba(94, 92, 230, 0.34);
  --blob-violet: rgba(191, 90, 242, 0.26);
  --blob-pink: rgba(255, 55, 95, 0.19);
  --blob-teal: rgba(64, 200, 224, 0.2);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* The page colour lives on html (and the .backdrop layer). A body
     background would paint over the z-index:-1 backdrop. */
  background: transparent;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  overflow-x: clip;
}

.site-main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

strong,
b {
  font-weight: 600;
}

::selection {
  background: rgba(0, 122, 255, 0.24);
}

/* Google Material Symbols Rounded, self-hosted (no third-party requests) and
   subset to the icons in partials/icons.html. Regenerate with
   scripts/update_icon_font.py after adding an icon. */
@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 400 600;
  font-display: block;
  src: url("../fonts/material-symbols-rounded.woff2") format("woff2");
}

/* Material Symbols glyph. The box is 1em square, so any rule that sets an
   icon's size must set font-size to match its width/height. */
.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  overflow: hidden;
  font-family: "Material Symbols Rounded";
  font-size: 1.2em;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: -0.22em;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  user-select: none;
}

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

:focus:not(:focus-visible) {
  outline: none;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  text-decoration: none;
}

/* Text utilities */
.lede {
  font-size: clamp(1.125rem, 0.95rem + 0.7vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -0.016em;
  color: var(--text-2);
}

.muted {
  color: var(--text-3);
}

.small {
  font-size: 0.875rem;
  line-height: 1.45;
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-bottom: 0.06em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 11px;
  border-radius: 999px;
  background: var(--chip-bg);
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 1px 0 var(--inner-hi), var(--shadow-sm);
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.eyebrow .icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* 3. Backdrop --------------------------------------------------------------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, 0.5), transparent 60%),
    var(--bg);
}

:root[data-theme="dark"] .backdrop {
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .backdrop {
    background: var(--bg);
  }
}

.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  inset: -25%;
  will-change: transform;
}

.backdrop::before {
  background:
    radial-gradient(32% 28% at 22% 18%, var(--blob-blue), transparent 72%),
    radial-gradient(28% 26% at 80% 14%, var(--blob-violet), transparent 72%),
    radial-gradient(30% 30% at 62% 60%, var(--blob-pink), transparent 72%);
  animation: backdrop-drift-a 48s ease-in-out infinite alternate;
}

.backdrop::after {
  background:
    radial-gradient(30% 30% at 20% 66%, var(--blob-teal), transparent 72%),
    radial-gradient(34% 30% at 78% 82%, var(--blob-indigo), transparent 72%),
    radial-gradient(24% 22% at 48% 36%, var(--blob-indigo), transparent 72%);
  animation: backdrop-drift-b 62s ease-in-out infinite alternate;
}

@keyframes backdrop-drift-a {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4%, -3%, 0) rotate(7deg) scale(1.06); }
  100% { transform: translate3d(-3%, 3%, 0) rotate(-5deg) scale(1.02); }
}

@keyframes backdrop-drift-b {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1.04); }
  50% { transform: translate3d(-4%, 2%, 0) rotate(-6deg) scale(1); }
  100% { transform: translate3d(3%, -3%, 0) rotate(5deg) scale(1.07); }
}

/* 4. Glass material -----------------------------------------------------------
   Translucent gradient fill + blur/saturate + a specular rim (a 1px gradient
   ring drawn with mask-composite, brightest at the top edge) + an inner top
   highlight + layered soft shadow. .glass--thick is more opaque for reading. */
.glass,
.card,
.step {
  --g-top: var(--glass-top);
  --g-bot: var(--glass-bottom);
  position: relative;
  isolation: isolate;
  border-radius: var(--r-card);
  background: linear-gradient(165deg, var(--g-top), var(--g-bot));
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 0 0 var(--inner-hi),
    0 0 0 0.5px var(--edge),
    var(--shadow-md);
}

.glass--thick {
  --g-top: var(--glass-thick-top);
  --g-bot: var(--glass-thick-bottom);
}

.glass::before,
.card::before,
.step::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--rim-top), var(--rim-mid) 32%, var(--rim-mid) 68%, var(--rim-bottom));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* 5. Layout ----------------------------------------------------------------- */
.container,
.container--narrow {
  width: 100%;
  max-width: calc(1180px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(760px + 2 * var(--gutter));
}

/* A narrow container nested inside another container shouldn't double the gutter. */
.container .container--narrow,
.container--narrow .container--narrow {
  padding-inline: 0;
  max-width: 760px;
}

.section {
  padding-block: clamp(56px, 8vw, 112px);
}

.section--tight {
  padding-block: clamp(28px, 4vw, 48px);
}

.section + .section {
  padding-top: clamp(24px, 4vw, 56px);
}

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(28px, 4vw, 48px);
  text-align: center;
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
}

.section-lede {
  margin: 16px auto 0;
  max-width: 640px;
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-2);
}

.section-more {
  margin: clamp(22px, 3vw, 32px) 0 0;
  text-align: center;
}

.grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: minmax(0, 1fr);
}

ul.grid,
ol.grid {
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, clamp(16px, 2.4vw, 24px));
}

.stack > * {
  margin-block: 0;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

/* Inner-page hero */
.page-hero {
  padding-top: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(24px, 4vw, 44px);
}

.page-hero--center {
  text-align: center;
}

.page-hero--center .page-lede {
  margin-inline: auto;
}

.page-title {
  margin: 0;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.page-lede {
  margin: 18px 0 0;
  max-width: 680px;
  font-size: clamp(1.125rem, 0.98rem + 0.6vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -0.016em;
  color: var(--text-2);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 18px 0 0;
  font-size: 0.875rem;
  color: var(--text-3);
}

/* 6. Components ---------------------------------------------------------------- */

/* Buttons */
.btn {
  --btn-h: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-h);
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-1);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.2s var(--ease), background-color 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  text-decoration: none;
  color: var(--text);
}

.btn:active {
  transform: scale(0.97);
}

.btn .icon {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.btn--primary,
.btn--primary:hover {
  color: #fff;
}

.btn--primary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 52%),
    linear-gradient(105deg, var(--btn-a), var(--btn-b));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 30, 90, 0.2),
    0 8px 22px -8px var(--btn-glow);
}

.btn--primary:hover {
  filter: brightness(1.06) saturate(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 2px 4px rgba(0, 30, 90, 0.2),
    0 14px 30px -10px var(--btn-glow);
}

.btn--glass {
  background: linear-gradient(180deg, var(--glass-thick-top), var(--glass-top));
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--inner-hi), inset 0 0 0 1px var(--hairline), var(--shadow-sm);
}

.btn--glass:hover {
  box-shadow: inset 0 1px 0 var(--inner-hi), inset 0 0 0 1px var(--hairline-strong), var(--shadow-md);
}

.btn--sm {
  --btn-h: 36px;
  padding: 0 16px;
  font-size: 0.875rem;
}

.btn--lg {
  --btn-h: 54px;
  padding: 0 28px;
  font-size: 1.0625rem;
}

.btn--lg .icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: progress;
  filter: saturate(0.7);
  opacity: 0.85;
}

.link-arrow {
  display: inline;
  font-weight: 600;
  color: var(--link);
  text-wrap: balance;
}

.link-arrow .icon {
  width: 17px;
  height: 17px;
  font-size: 17px;
  margin-left: 0.1em;
  vertical-align: -0.2em;
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

.link-arrow:not(:has(.icon))::after {
  content: "\2192";
  transition: transform 0.25s var(--ease);
}

/* Badges & chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--fill-1);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.005em;
  white-space: nowrap;
  vertical-align: middle;
}

.badge--live {
  background: var(--green-bg);
  color: var(--green-text);
}

.badge--live::before,
.badge--soon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--soon {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.badge--lossless {
  background: var(--indigo-bg);
  color: var(--indigo-text);
}

.badge--xs {
  padding: 1px 7px;
  font-size: 0.6875rem;
}

.badge--xs::before {
  display: none;
}

.chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--chip-bg);
  box-shadow: inset 0 0 0 1px var(--hairline), inset 0 1px 0 var(--inner-hi);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.chip .icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

a.chip:hover {
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--hairline-strong), inset 0 1px 0 var(--inner-hi);
}

code.chip,
.chip code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.6vw, 30px);
  color: var(--text);
}

.card > :last-child {
  margin-bottom: 0;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: var(--grad-icon);
  box-shadow: inset 0 1px 0 var(--inner-hi), inset 0 0 0 1px var(--hairline);
  color: var(--accent-text);
}

.card-icon .icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.card-title {
  display: block;
  margin: 0 0 8px;
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card-text {
  display: block;
  margin: 0 0 12px;
  font-size: 0.96875rem;
  line-height: 1.5;
  color: var(--text-2);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: auto 0 0;
  padding-top: 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-3);
}

.card-meta .icon {
  width: 15px;
  height: 15px;
  font-size: 15px;
}

a.card--link,
.card--link {
  color: var(--text);
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.card--link:hover {
  color: var(--text);
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: inset 0 1px 0 0 var(--inner-hi), 0 0 0 0.5px var(--edge), var(--shadow-lg);
}

.card--link:active {
  transform: translateY(-1px) scale(0.99);
}

.card--link:focus-visible {
  outline-offset: 4px;
}

.card-go {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--accent-text);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.card--link:hover .card-go {
  transform: translateX(3px);
  background: var(--blue-bg);
}

/* Steps */
.steps {
  list-style: none;
  max-width: 880px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: clamp(12px, 2vw, 18px);
}

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: clamp(20px, 2.6vw, 28px);
}

.step-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, var(--btn-a), var(--btn-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 14px -6px var(--btn-glow);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step-body > :last-child {
  margin-bottom: 0;
}

.step-body p {
  color: var(--text-2);
}

.step-title {
  margin: 6px 0 8px;
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.step-icon {
  display: none;
}

/* Callouts */
.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--callout-bg, var(--blue-bg));
  box-shadow: inset 0 0 0 1px var(--callout-line, rgba(0, 122, 255, 0.22));
  color: var(--text);
  font-size: 0.96875rem;
  line-height: 1.55;
}

.callout > .icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
  margin-top: 1px;
  color: var(--callout-icon, var(--accent-text));
}

.callout > div > :last-child {
  margin-bottom: 0;
}

.callout p {
  margin-bottom: 0.6em;
}

.callout strong:first-child {
  color: var(--text);
}

.callout--info {
  --callout-bg: var(--blue-bg);
  --callout-line: rgba(0, 122, 255, 0.24);
  --callout-icon: var(--accent-text);
}

.callout--warn {
  --callout-bg: var(--amber-bg);
  --callout-line: rgba(255, 159, 10, 0.34);
  --callout-icon: var(--amber-text);
}

.callout--success {
  --callout-bg: var(--green-bg);
  --callout-line: rgba(52, 199, 89, 0.32);
  --callout-icon: var(--green-text);
}

/* Standalone callouts (not inside a glass surface) get their own frosting. */
:where(.site-main) > .callout,
.container > .callout,
.container--narrow > .callout,
.stack > .callout,
.section > .callout {
  background:
    linear-gradient(0deg, var(--callout-bg), var(--callout-bg)),
    linear-gradient(165deg, var(--glass-thick-top), var(--glass-top));
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

.callout-title {
  margin: 0 0 6px;
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* TOC */
.toc {
  padding: 18px 22px 20px;
  border-radius: var(--r-md);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 0.9375rem;
}

.toc.glass {
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 0 var(--inner-hi), 0 0 0 0.5px var(--edge), var(--shadow-sm);
  padding: 20px 24px 22px;
}

.toc-title {
  margin: 0 0 10px;
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toc ol,
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  gap: 2px;
}

.toc li {
  counter-increment: toc;
  margin: 0;
}

.toc li::before {
  display: none;
}

.toc a {
  display: flex;
  gap: 10px;
  padding: 6px 8px;
  margin-inline: -8px;
  border-radius: 10px;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.4;
}

.toc a::before {
  content: counter(toc);
  flex: none;
  min-width: 1.4em;
  color: var(--text-3);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.toc a:hover {
  background: var(--fill-2);
  color: var(--link);
  text-decoration: none;
}

/* Specs list */
.specs {
  margin: 0 0 1.25em;
  padding: 4px 18px;
  border-radius: var(--r-sm);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.specs > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 11px 0;
}

.specs > div + div {
  border-top: 1px solid var(--hairline);
}

.specs dt {
  margin: 0;
  color: var(--text-3);
  font-size: 0.875rem;
  font-weight: 500;
}

.specs dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: right;
}

.specs--compact {
  margin: 4px 0 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

.specs--compact > div {
  display: block;
  padding: 10px 0;
}

.specs--compact > div + div,
.specs--compact > div:first-child {
  border-top: 1px solid var(--hairline);
}

.specs--compact dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.specs--compact dd {
  margin-top: 2px;
  font-size: 0.875rem;
  text-align: left;
}

/* Tables */
.table-wrap {
  width: 100%;
  margin: 0 0 1.25em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-sm);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.table thead th {
  background: var(--fill-2);
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody tr + tr > * {
  border-top: 1px solid var(--hairline);
}

.table tbody th {
  font-weight: 600;
  color: var(--text);
}

.table td {
  color: var(--text-2);
}

/* Prose */
.prose {
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--text-2);
}

.prose.glass,
.prose.card {
  padding: clamp(22px, 5vw, 56px);
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 2.1em 0 0.6em;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  line-height: 1.18;
  letter-spacing: -0.028em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h3 {
  margin: 1.8em 0 0.5em;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h2 + h3 {
  margin-top: 1em;
}

.prose p,
.prose ul,
.prose ol,
.prose dl,
.prose blockquote,
.prose figure {
  margin: 0 0 1.1em;
}

.prose strong {
  color: var(--text);
}

.prose a:not(.btn):not(.link-arrow):not(.card) {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.prose a:not(.btn):not(.link-arrow):not(.card):hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li {
  margin: 0.35em 0;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--accent-text);
  font-weight: 600;
}

.prose blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid transparent;
  border-image: var(--grad-accent) 1;
  color: var(--text);
  font-size: 1.125rem;
}

.prose code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--fill-1);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.prose hr {
  margin: 2.4em 0;
  border: 0;
  height: 1px;
  background: var(--hairline);
}

.prose figure {
  margin-inline: 0;
}

.prose figcaption {
  margin-top: 8px;
  color: var(--text-3);
  font-size: 0.875rem;
}

.prose dl:not(.specs) dt {
  margin-top: 0.9em;
  color: var(--text);
  font-weight: 600;
}

.prose dl:not(.specs) dd {
  margin: 0.2em 0 0;
}

.prose .callout,
.prose .toc,
.prose .table-wrap,
.prose .specs,
.prose .grid,
.prose .steps {
  margin: 1.6em 0;
}

.prose .callout p {
  margin-bottom: 0.5em;
}

.prose .callout > div > :last-child {
  margin-bottom: 0;
}

.prose .specs {
  padding: 4px 18px;
}

.prose .toc li {
  margin: 0;
  padding: 0;
}

.prose .toc a {
  text-decoration: none;
  color: var(--text-2);
}

.prose .toc a:hover {
  color: var(--link);
}

.prose .table {
  margin: 0;
}

/* FAQ (one glass panel; rows inside it) */
.faq {
  padding: 6px clamp(4px, 1vw, 8px);
  border-radius: var(--r-card);
}

.faq-item + .faq-item {
  border-top: 1px solid var(--hairline);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(14px, 2.4vw, 22px);
  border-radius: 20px;
  list-style: none;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.016em;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s var(--ease);
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::marker {
  content: "";
}

.faq-q:hover {
  background: var(--fill-2);
}

.faq-q:focus-visible {
  outline-offset: -3px;
}

.faq-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fill-1);
  color: var(--text-2);
  transition: transform 0.35s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.faq-toggle .icon {
  width: 17px;
  height: 17px;
  font-size: 17px;
}

.faq-item[open] .faq-toggle {
  transform: rotate(180deg);
  background: var(--blue-bg);
  color: var(--accent-text);
}

.faq-a {
  padding: 0 clamp(14px, 2.4vw, 22px) 22px;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.62;
  max-width: 68ch;
}

@supports (interpolate-size: allow-keywords) {
  .faq-item {
    interpolate-size: allow-keywords;
  }

  .faq-item::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete;
  }

  .faq-item[open]::details-content {
    block-size: auto;
  }
}

/* CTA banner */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding: clamp(28px, 5vw, 60px);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: -40% -10% auto auto;
  z-index: -1;
  width: 70%;
  height: 180%;
  background:
    radial-gradient(closest-side at 60% 40%, var(--blob-blue), transparent),
    radial-gradient(closest-side at 30% 60%, var(--blob-violet), transparent),
    radial-gradient(closest-side at 80% 70%, var(--blob-pink), transparent);
  opacity: 0.9;
  pointer-events: none;
}

.cta-copy {
  flex: 1 1 420px;
  min-width: 0;
}

.cta-title {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);
  line-height: 1.08;
  letter-spacing: -0.034em;
}

.cta-text {
  margin: 0;
  max-width: 560px;
  font-size: 1.125rem;
  color: var(--text-2);
}

.cta-btn {
  flex: none;
}

/* Breadcrumbs */
.breadcrumbs {
  margin: 0 0 22px;
  font-size: 0.8125rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-3);
  min-width: 0;
}

.breadcrumbs a {
  color: var(--text-2);
  font-weight: 500;
}

.breadcrumbs a:hover {
  color: var(--link);
}

.breadcrumbs [aria-current="page"] {
  color: var(--text-3);
}

.crumb-sep {
  width: 13px;
  height: 13px;
  font-size: 13px;
  color: var(--text-3);
  opacity: 0.8;
}

.page-hero--center .breadcrumbs ol {
  justify-content: center;
}

/* Ad slot */
.ad-slot {
  margin: clamp(24px, 4vw, 40px) 0;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--hairline);
  text-align: center;
  overflow: hidden;
}

.ad-slot-label {
  margin: 0 0 8px;
  color: var(--text-3);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 7. Site chrome ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}

.nav-shell {
  max-width: 1120px;
  margin-inline: auto;
}

/* The bar's frosting lives on ::after, not on .nav itself, so the dropdown
   sheet (a child) isn't trapped inside the bar's backdrop root and can blur
   the page behind it. */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  pointer-events: auto;
}

.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(170deg, var(--glass-thick-top), var(--glass-top));
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  backdrop-filter: blur(22px) saturate(190%);
  box-shadow: inset 0 1px 0 var(--inner-hi), 0 0 0 0.5px var(--edge), var(--shadow-md);
  transition: box-shadow 0.3s var(--ease);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--rim-top), var(--rim-mid) 45%, var(--rim-bottom));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.site-header.is-scrolled .nav::after {
  box-shadow: inset 0 1px 0 var(--inner-hi), 0 0 0 0.5px var(--edge), var(--shadow-lg);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  border-radius: 12px;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.nav-links {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-link:hover {
  background: var(--fill-2);
  color: var(--text);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  background: var(--fill-1);
  color: var(--text);
  font-weight: 600;
}

.nav-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.theme-toggle,
.nav-menu-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--text);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover,
.nav-menu-btn:hover {
  background: var(--fill-1);
}

.theme-toggle:active,
.nav-menu-btn:active {
  transform: scale(0.92);
}

.theme-toggle .icon,
.nav-menu-btn .icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
}

.no-js .theme-toggle {
  display: none;
}

.theme-icon--sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon--sun {
  display: block;
}

:root[data-theme="dark"] .theme-icon--moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon--sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-icon--moon {
    display: none;
  }
}

.nav-cta {
  margin-left: 4px;
}

/* Mobile menu: a <details>, so it works without JS. */
.nav-menu {
  position: static;
}

.nav-menu-btn {
  list-style: none;
  cursor: pointer;
}

.nav-menu-btn::-webkit-details-marker {
  display: none;
}

.nav-menu-btn::marker {
  content: "";
}

.nav-menu-close,
.nav-menu[open] .nav-menu-open {
  display: none;
}

.nav-menu[open] .nav-menu-close {
  display: block;
}

.nav-menu[open] .nav-menu-btn {
  background: var(--fill-1);
}

.nav-sheet {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, calc(100vw - 2 * var(--gutter)));
  padding: 8px;
  border-radius: 26px;
  background: linear-gradient(170deg, var(--glass-thick-top), var(--glass-thick-bottom));
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  box-shadow: inset 0 1px 0 var(--inner-hi), 0 0 0 0.5px var(--edge), var(--shadow-lg);
  transform-origin: top right;
}

.nav-menu[open] .nav-sheet {
  animation: sheet-in 0.32s var(--ease-spring);
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.nav-sheet-links {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-sheet-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 18px;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-sheet-link .icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
  color: var(--accent-text);
}

.nav-sheet-link:hover {
  background: var(--fill-2);
  color: var(--text);
  text-decoration: none;
}

.nav-sheet-link[aria-current="page"] {
  background: var(--fill-1);
  font-weight: 600;
}

@media (max-width: 379px) {
  .nav-cta {
    display: none;
  }
}

@media (max-width: 559px) {
  .nav-sheet {
    left: 0;
    right: 0;
    width: auto;
  }
}

@media (min-width: 900px) {
  .nav {
    padding-left: 22px;
  }

  .nav-links {
    display: flex;
  }

  .nav-menu {
    display: none;
  }

  .nav-actions {
    margin-left: 0;
  }
}

/* Footer */
.site-footer {
  margin-top: clamp(32px, 4vw, 56px);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.footer-panel {
  padding: clamp(26px, 4vw, 48px);
  border-radius: var(--r-xl);
}

.footer-top {
  display: grid;
  gap: 32px;
}

.footer-brand .brand {
  margin-bottom: 12px;
}

.footer-tagline {
  max-width: 320px;
  margin: 0;
  color: var(--text-3);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 20px;
}

.footer-heading {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0;
}

.footer-col ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.footer-col a {
  color: var(--text-2);
  font-size: 0.9375rem;
}

.footer-col a:hover {
  color: var(--link);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 0.8125rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-disclaimer {
  max-width: 560px;
}

@media (min-width: 720px) {
  .footer-cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .footer-top {
    grid-template-columns: minmax(220px, 1fr) minmax(0, 2.6fr);
    gap: 48px;
  }
}

/* 8. Converter -------------------------------------------------------------- */
.converter {
  padding: clamp(16px, 3.4vw, 34px);
  border-radius: var(--r-xl);
  text-align: left;
  box-shadow:
    inset 0 1px 0 0 var(--inner-hi),
    0 0 0 0.5px var(--edge),
    var(--shadow-lg);
}

.convert-form {
  display: grid;
  gap: clamp(18px, 2.6vw, 24px);
  margin: 0;
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--red-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.3);
  color: var(--red-text);
  font-size: 0.96875rem;
  font-weight: 500;
  line-height: 1.45;
}

.form-error .icon {
  width: 20px;
  height: 20px;
  font-size: 20px;
  margin-top: 1px;
}

.form-error p {
  margin: 0;
}

.field-label {
  display: block;
  margin: 0 0 10px;
  padding: 0 4px;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.field-help {
  margin: 9px 4px 0;
  color: var(--text-3);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.url-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 7px 7px 7px 18px;
  border-radius: 999px;
  background: var(--input-bg);
  box-shadow:
    inset 0 0 0 1px var(--hairline),
    inset 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s var(--ease);
}

.url-box:focus-within {
  box-shadow:
    inset 0 0 0 1.5px var(--accent),
    0 0 0 5px rgba(0, 122, 255, 0.18);
}

.url-icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
  color: var(--text-3);
}

.url-box:focus-within .url-icon {
  color: var(--accent-text);
}

.url-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.0625rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.url-input:focus-visible {
  outline: none;
}

.url-input::placeholder {
  color: var(--text-3);
  opacity: 1;
}

.url-box:has(.url-input[aria-invalid="true"]) {
  box-shadow: inset 0 0 0 1.5px rgba(255, 59, 48, 0.6);
}

.paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-1);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.paste-btn[hidden] {
  display: none;
}

.paste-btn:hover {
  background: var(--blue-bg);
  color: var(--accent-text);
}

.paste-btn:active {
  transform: scale(0.95);
}

.paste-btn .icon {
  width: 17px;
  height: 17px;
  font-size: 17px;
}

/* Segmented controls (radio groups) */
.seg-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  transition: opacity 0.3s var(--ease), filter 0.3s var(--ease);
}

.seg-group legend {
  float: left;
  width: 100%;
}

.seg-group legend + * {
  clear: both;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 22px;
  background: var(--fill-1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.seg {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.seg-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.seg-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  min-height: 58px;
  padding: 9px 6px;
  border-radius: 18px;
  text-align: center;
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.seg-label {
  color: var(--text);
  font-size: 0.96875rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.seg-tag {
  color: var(--text-3);
  font-size: 0.71875rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: balance;
}

.seg:hover .seg-body {
  background: var(--fill-2);
}

.seg-input:checked + .seg-body {
  background: var(--thumb);
  box-shadow: var(--thumb-shadow);
}

.seg-input:checked + .seg-body .seg-tag {
  color: var(--text-2);
}

.seg-input:focus-visible + .seg-body {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.seg:active .seg-body {
  transform: scale(0.97);
}

/* Quality dims when another format is chosen (it's still submitted, but
   the server ignores it for non-MP3). */
.converter:has(.seg-group--format .seg-input[value="mp3"]:not(:checked)) .seg-group--quality {
  opacity: 0.5;
  filter: saturate(0.4);
}

.quality-note {
  display: none;
}

.converter:has(.seg-group--format .seg-input[value="mp3"]:not(:checked)) .quality-note {
  display: block;
}

.convert-btn {
  --btn-h: 60px;
  gap: 10px;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}

.convert-btn .icon {
  width: 22px;
  height: 22px;
  font-size: 22px;
}

.convert-btn.is-busy .convert-btn-icon {
  animation: pulse-wave 1s ease-in-out infinite;
}

@keyframes pulse-wave {
  50% { transform: scaleY(0.6); opacity: 0.7; }
}

.convert-note {
  display: block;
  margin: -6px 0 0;
  color: var(--text-3);
  font-size: 0.8125rem;
  text-align: center;
}

.convert-note .icon {
  width: 14px;
  height: 14px;
  font-size: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

@media (max-width: 599px) {
  .segmented--format {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .segmented--format .seg {
    grid-column: span 2;
  }

  .segmented--format .seg:nth-child(n + 4) {
    grid-column: span 3;
  }

  .seg-body {
    min-height: 56px;
    padding: 8px 4px;
  }

  .url-box {
    min-height: 58px;
    padding-left: 14px;
  }

  .url-input {
    font-size: 1rem;
  }

  .paste-btn {
    height: 42px;
    padding: 0 13px;
  }

  .paste-btn .icon {
    display: none;
  }
}

/* 9. Job status --------------------------------------------------------------- */
.job-card {
  padding: clamp(20px, 4vw, 36px);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 0 var(--inner-hi), 0 0 0 0.5px var(--edge), var(--shadow-lg);
}

.job-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.job-head-text {
  min-width: 0;
  flex: 1;
}

.job-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, var(--btn-a), var(--btn-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px -10px var(--btn-glow);
  color: #fff;
}

.job-badge .icon {
  width: 32px;
  height: 32px;
  font-size: 32px;
}

.job-card--done .job-badge {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #2fb350, #1f9a6e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px -10px rgba(40, 170, 80, 0.6);
}

.job-card--failed .job-badge {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #ff5a4f, #e0325f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px -10px rgba(230, 60, 60, 0.6);
}

.job-eq {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
}

.job-eq i {
  display: block;
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  transform: scaleY(0.35);
}

.job-card--working .job-eq i {
  animation: eq 1.1s ease-in-out infinite;
}

.job-eq i:nth-child(2) { animation-delay: -0.2s; transform: scaleY(0.6); }
.job-eq i:nth-child(3) { animation-delay: -0.45s; transform: scaleY(0.9); }
.job-eq i:nth-child(4) { animation-delay: -0.1s; transform: scaleY(0.55); }
.job-eq i:nth-child(5) { animation-delay: -0.6s; transform: scaleY(0.3); }

.job-card--queued .job-eq i {
  animation: eq-idle 2.4s ease-in-out infinite;
}

@keyframes eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

@keyframes eq-idle {
  0%, 100% { transform: scaleY(0.25); opacity: 0.7; }
  50% { transform: scaleY(0.45); opacity: 1; }
}

.job-state {
  margin: 2px 0 4px;
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 650;
}

.job-card--done .job-state {
  color: var(--green-text);
}

.job-card--failed .job-state {
  color: var(--red-text);
}

.job-dots {
  display: inline-block;
}

.job-title {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.022em;
}

.job-meta {
  margin: 0;
}

.job-meta .chip {
  padding: 4px 11px;
  font-size: 0.8125rem;
}

.job-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(24px, 4vw, 32px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.job-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.job-step:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 15px;
  right: calc(50% + 22px);
  left: calc(-50% + 22px);
  height: 2px;
  border-radius: 2px;
  background: var(--fill-1);
}

.job-step.is-complete::before,
.job-step.is-current::before,
.job-step.is-failed::before {
  background: linear-gradient(90deg, var(--btn-a), var(--btn-b));
}

.job-step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fill-1);
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.3s var(--ease);
}

.job-step-dot .icon {
  width: 17px;
  height: 17px;
  font-size: 17px;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 20;
}

.job-step.is-complete .job-step-dot {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  color: #fff;
}

.job-step.is-current .job-step-dot {
  background: var(--thumb);
  color: var(--accent-text);
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(0, 122, 255, 0.16);
}

.job-card--working .job-step.is-current .job-step-dot {
  animation: ring 1.8s ease-out infinite;
}

@keyframes ring {
  0% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 0 rgba(0, 122, 255, 0.3); }
  100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 12px rgba(0, 122, 255, 0); }
}

.job-step.is-failed .job-step-dot {
  background: var(--red);
  color: #fff;
}

.job-step-label {
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
}

.job-step.is-complete .job-step-label,
.job-step.is-current .job-step-label {
  color: var(--text);
}

.job-step.is-current .job-step-label,
.job-step.is-failed .job-step-label {
  font-weight: 650;
}

.job-step.is-failed .job-step-label {
  color: var(--red-text);
}

.job-progress {
  margin-top: clamp(22px, 3.5vw, 30px);
}

.progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fill-1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.progress-fill {
  position: relative;
  height: 100%;
  min-width: 10px;
  border-radius: inherit;
  background: var(--grad-accent);
  box-shadow: 0 0 12px rgba(10, 132, 255, 0.45);
  transition: width 0.7s var(--ease);
}

.job-card--done .progress-fill {
  background: linear-gradient(90deg, #30c758, #22b07d);
  box-shadow: 0 0 12px rgba(48, 199, 88, 0.4);
}

.job-card--failed .progress-fill {
  background: linear-gradient(90deg, #ff6a5f, #e0325f);
  box-shadow: none;
}

.progress-fill.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  from { background-position: -100% 0; }
  to { background-position: 200% 0; }
}

.job-percent {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 2px 0;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.job-percent > span:first-child {
  color: var(--text);
  font-weight: 650;
}

.job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 4vw, 32px);
}

.job-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--text-3);
  font-size: 0.875rem;
  line-height: 1.5;
}

.job-note .icon {
  width: 17px;
  height: 17px;
  font-size: 17px;
  margin-top: 1px;
}

.job-error {
  margin: clamp(22px, 3.5vw, 28px) 0 0;
}

@media (max-width: 559px) {
  .job-actions .btn {
    width: 100%;
  }

  .job-badge {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .job-badge .icon {
    width: 28px;
    height: 28px;
    font-size: 28px;
  }

  .job-step-label {
    font-size: 0.75rem;
  }
}

/* Status / error card (partials/error.html, errors/*.html) */
.status-card {
  padding: clamp(28px, 5vw, 52px);
  border-radius: var(--r-xl);
  text-align: center;
}

.status-card-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, var(--btn-a), var(--btn-b));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px -12px var(--btn-glow);
  color: #fff;
}

.status-card-icon .icon {
  width: 34px;
  height: 34px;
  font-size: 34px;
}

.status-card-icon--warn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #ffb020, #f07a14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px -12px rgba(240, 130, 20, 0.6);
}

.status-card-icon--danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 55%),
    linear-gradient(135deg, #ff5a4f, #e0325f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 28px -12px rgba(230, 60, 60, 0.6);
}

.status-card-title {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.2;
}

.status-card-text {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text-2);
}

.status-code {
  margin: 0 0 10px;
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-card .page-lede {
  margin-inline: auto;
}

.status-card-actions {
  justify-content: center;
  margin-top: 28px;
}

/* 10. Pages ------------------------------------------------------------------ */

/* page: home */
.hero {
  padding-top: clamp(20px, 4vw, 56px);
  text-align: center;
}





.hero-converter {
  max-width: 860px;
  margin: 0 auto;
}

.availability {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.chip--platform {
  gap: 8px;
  padding: 6px 7px 6px 13px;
  color: var(--text);
  font-weight: 600;
}

.chip--platform .icon {
  color: var(--text-3);
}

.chip--platform .badge {
  margin-left: 2px;
}

/* Homepage steps: a row of three glass cards with the icon floating. */
.steps--row {
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
}

.steps--row .step {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.steps--row .step-title {
  margin-top: 0;
}

.steps--row .step-icon {
  position: absolute;
  top: clamp(18px, 2.4vw, 26px);
  right: clamp(18px, 2.4vw, 26px);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad-icon);
  box-shadow: inset 0 1px 0 var(--inner-hi), inset 0 0 0 1px var(--hairline);
  color: var(--accent-text);
}

.steps--row .step-icon .icon {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.steps--row .step-num {
  margin-bottom: 6px;
}

@media (min-width: 860px) {
  .steps--row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Formats */
.format-grid {
  display: grid;
  gap: clamp(14px, 1.8vw, 20px);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 560px) {
  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .format-grid > :last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 860px) {
  .format-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .format-grid > * {
    grid-column: span 2;
  }

  .format-grid > :nth-child(n + 4) {
    grid-column: span 3;
  }
}

@media (min-width: 1140px) {
  .format-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .format-grid > *,
  .format-grid > :nth-child(n + 4) {
    grid-column: auto;
  }

  /* One row of five: line up taglines, summaries and spec rows. */
  @supports (grid-template-rows: subgrid) {
    .format-card {
      display: grid;
      grid-row: span 5;
      grid-template-rows: subgrid;
      row-gap: 0;
      align-content: start;
    }

    .format-card .specs--compact {
      display: contents;
    }

    .format-card .specs--compact > div {
      align-self: start;
    }

    .format-card .card-text {
      margin-bottom: 16px;
    }
  }
}

.format-card {
  --fc: var(--blob-blue);
  overflow: hidden;
}

.format-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  z-index: -1;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--fc), transparent);
  pointer-events: none;
}

.format-card--m4a { --fc: var(--blob-pink); }
.format-card--opus { --fc: var(--blob-teal); }
.format-card--wav { --fc: var(--blob-indigo); }
.format-card--flac { --fc: var(--blob-violet); }

.format-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.format-name {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.format-tagline {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 0.9375rem;
  font-weight: 600;
}

.format-card .card-text {
  font-size: 0.9375rem;
}

.format-card .specs--compact {
  margin-top: auto;
}

/* Features: one glass panel of tiles (only the panel is blurred). */
.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 10px;
  list-style: none;
  border-radius: var(--r-xl);
}

.feature {
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: 24px;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.feature .card-icon {
  margin-bottom: 16px;
}

.feature-title {
  margin: 0 0 6px;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.feature-text {
  margin: 0;
  color: var(--text-2);
  font-size: 0.96875rem;
  line-height: 1.5;
}

@media (max-width: 639px) {
  .feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
  }

  .feature .card-icon {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    margin: 0;
  }

  .feature-title {
    margin-top: 2px;
  }
}

@media (min-width: 640px) {
  .feature-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .feature-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Responsible-use callout */
.callout--feature {
  gap: 18px;
  padding: clamp(22px, 3.6vw, 34px);
  border-radius: var(--r-card);
}

.callout--feature > .icon {
  width: 30px;
  height: 30px;
  font-size: 30px;
}

.callout-links {
  margin-top: 14px;
  gap: 8px 22px;
}

/* Guide cards */
.guide-card .card-title {
  font-size: 1.125rem;
}

/* page: job */
.job-page .page-hero {
  padding-bottom: clamp(20px, 3vw, 32px);
}

.tips-heading {
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-align: center;
}

.tip {
  padding: 22px;
}

.tip .card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
}

.tip .card-icon .icon {
  width: 21px;
  height: 21px;
  font-size: 21px;
}

.tip .card-title {
  font-size: 1.0625rem;
}

.tip .card-text {
  margin: 0;
  font-size: 0.9375rem;
}

@media (min-width: 960px) {
  .tips {
    max-width: 1000px;
    margin-inline: auto;
  }
}

/* page: errors */
.error-page {
  padding-top: clamp(32px, 6vw, 72px);
}

.error-page .page-title {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
}

.error-links {
  margin-top: clamp(28px, 4vw, 40px);
}

.error-links-title {
  margin: 0 0 14px;
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.error-links .card {
  height: 100%;
  padding: 22px;
}

.error-links .card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
}

.error-links .card-title {
  font-size: 1.0625rem;
}

.error-links .card-text {
  margin: 0;
  font-size: 0.9375rem;
}

/* 11. Accessibility & fallbacks -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .backdrop::before,
  .backdrop::after {
    animation: none !important;
  }

  .progress-fill.is-active::after {
    display: none;
  }

  .card--link:hover {
    transform: none;
  }
}

/* No backdrop-filter support: make every surface nearly opaque. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body {
    --glass-top: var(--surface-fallback);
    --glass-bottom: var(--surface-fallback);
    --glass-thick-top: var(--surface-fallback);
    --glass-thick-bottom: var(--surface-fallback);
  }
}

/* The person asked for less transparency: solid surfaces, no blobs moving
   behind text. */
@media (prefers-reduced-transparency: reduce) {
  body {
    --glass-top: var(--surface-solid);
    --glass-bottom: var(--surface-solid);
    --glass-thick-top: var(--surface-solid);
    --glass-thick-bottom: var(--surface-solid);
    --chip-bg: var(--surface-solid);
    --tile: transparent;
  }

  .glass,
  .card,
  .step,
  .btn--glass,
  .nav::after,
  .nav-sheet,
  .callout {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .backdrop::before,
  .backdrop::after,
  .cta-glow,
  .format-card::after {
    display: none;
  }
}

/* More contrast: stronger text and hairlines. Overridden on body so the
   themed :root values underneath still decide light vs dark. */
@media (prefers-contrast: more) {
  body {
    --text-2: var(--text);
    --text-3: var(--text);
    --hairline: var(--hairline-strong);
    --glass-top: var(--glass-thick-top);
    --glass-bottom: var(--glass-thick-bottom);
    --edge: var(--hairline-strong);
  }

  .gradient-text {
    background: none;
    color: var(--text);
    -webkit-text-fill-color: currentColor;
  }

  .btn--glass,
  .chip,
  .eyebrow,
  .seg-body,
  .url-box {
    box-shadow: inset 0 0 0 1px var(--hairline-strong);
  }

  a:not(.btn):not(.card):not(.nav-link):not(.nav-sheet-link):not(.brand):not(.chip) {
    text-decoration: underline;
  }
}

@media (forced-colors: active) {
  .gradient-text {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }

  .glass,
  .card,
  .step,
  .nav,
  .nav-sheet,
  .callout,
  .url-box,
  .segmented {
    border: 1px solid CanvasText;
  }

  .seg-input:checked + .seg-body {
    outline: 2px solid Highlight;
  }

  .backdrop {
    display: none;
  }
}

@media print {
  .site-header,
  .backdrop,
  .skip-link,
  .nav-menu,
  .theme-toggle,
  .ad-slot,
  .cta,
  .converter,
  .site-footer .footer-cols {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .glass,
  .card,
  .step,
  .callout {
    background: none !important;
    box-shadow: none !important;
    border: 1px solid #ccc;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .glass::before,
  .card::before,
  .step::before {
    display: none;
  }

  .gradient-text {
    background: none;
    color: #000;
    -webkit-text-fill-color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
