/*! base.css v2 — design system for the Discord Video Compressor.
 * Tokens come from docs/design/DESIGN.md (Stripe-derived). Light-only by design.
 * Font: self-hosted Inter variable (latin subset). No external requests. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Brand */
  --primary: #533afd;
  --primary-deep: #4434d4;
  --primary-press: #2e2b8c;
  --primary-soft: #665efd;
  --primary-subdued: #b9b9f9;
  --primary-tint: #eef0ff;
  --navy: #1c1e54;

  /* Text */
  --ink: #0d253d;
  --ink-2: #273951;
  /* One step darker than DESIGN.md ink-mute (#64748d) so helper text keeps 4.5:1 on canvas-soft and the indigo tint. */
  --muted: #5d6d86;
  --muted-2: #61718a;
  --on-primary: #ffffff;

  /* Surface */
  --canvas: #ffffff;
  --canvas-soft: #f6f9fc;
  --cream: #f5e9d4;
  --hairline: #e3e8ee;
  --hairline-input: #a8c3de;

  /* Gradient stops (mesh only) */
  --ruby: #ea2261;
  --magenta: #f96bee;
  --lemon: #9b6829;

  /* Elevation */
  --shadow-1: 0 1px 3px rgba(0, 55, 112, 0.08);
  --shadow-2: 0 8px 24px rgba(0, 55, 112, 0.08), 0 2px 6px rgba(0, 55, 112, 0.04);

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Spacing */
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-xxl: 32px;
  --space-huge: 64px;
  /* Legacy aliases used by older inline styles. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1200px;
  --header-h: 64px;
  --section-y: 96px;
}

/* Reset */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0;
  font-feature-settings: "ss01";
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--primary); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--primary-subdued); color: var(--navy); }

/* Typography */
h1, h2, h3, h4 {
  font-weight: 300;
  color: var(--ink);
  text-wrap: balance;
}
.display-xxl {
  font-size: clamp(2rem, 1.45rem + 2.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
}
.display-xl {
  font-size: clamp(1.75rem, 1.35rem + 1.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
}
.display-lg {
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.018em;
}
.heading-lg {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.heading-md {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--primary-subdued) 42%, var(--canvas));
  color: var(--primary-deep);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1px;
  text-transform: uppercase;
}
.lead { font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "ss01", "tnum"; }
.muted { color: var(--muted); }
.fine { font-size: 11px; line-height: 1.5; color: var(--muted); }
.caption { font-size: 13px; line-height: 1.4; letter-spacing: -0.39px; font-weight: 400; color: var(--muted); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: var(--section-y); }
.section--soft { background: var(--canvas-soft); }
.section--tight { padding-block: 64px; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 16px; }
.section-head .display-lg + p { margin-top: 16px; }
.rule { height: 1px; background: var(--hairline); border: 0; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: top 150ms ease;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark-mark {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--primary);
  color: var(--on-primary);
  flex: none;
}
.wordmark-mark svg { display: block; }
.wordmark-strong { font-weight: 400; }
.wordmark-dim { color: var(--muted); font-weight: 300; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-inline-start: 8px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
}
.site-nav a:hover { background: var(--canvas-soft); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--primary); }
.site-nav .site-nav-cta { display: none; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-inline-start: auto;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--canvas);
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--canvas);
  color: var(--primary);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-lg { min-height: 48px; padding: 12px 24px; font-size: 16px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-deep); }
.btn-primary:active { background: var(--primary-press); }
.btn-secondary { background: var(--canvas); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-tint); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--hairline-input); background: var(--canvas-soft); }
.btn[disabled], .btn:disabled {
  background: var(--canvas-soft);
  color: var(--muted);
  border-color: var(--hairline);
  box-shadow: none;
}
.on-dark .btn-secondary { background: transparent; color: var(--on-primary); border-color: rgba(255, 255, 255, 0.6); }
.on-dark .btn-primary { background: var(--canvas); color: var(--navy); }
.on-dark :focus-visible { outline-color: var(--on-primary); }
.link-quiet { color: var(--primary); text-decoration: none; font-weight: 400; }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Chips and pills */
.credits-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary-deep);
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "ss01", "tnum";
  white-space: nowrap;
}
.credits-chip.is-empty { background: var(--canvas-soft); color: var(--muted); border: 1px solid var(--hairline); }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1px;
  text-transform: uppercase;
}

/* Hero + gradient mesh */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 0;
  background: var(--canvas);
}
.mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  margin: 0;
  -webkit-mask-image: linear-gradient(#000 58%, transparent 100%);
  mask-image: linear-gradient(#000 58%, transparent 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 56px 104px;
}
.hero h1 { max-width: 24ch; margin-top: 16px; }
.hero-sub {
  max-width: 46ch;
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
}
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 20px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--ink-2);
}
.trust-list li { display: inline-flex; align-items: center; gap: 7px; }
.trust-list svg { color: var(--primary); flex: none; }

.page-hero { position: relative; overflow: hidden; background: var(--canvas); }
.page-hero .hero-inner { padding-block: 56px 64px; }
.page-hero h1 { max-width: 24ch; }
.page-hero .hero-sub { max-width: 56ch; }
.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 8px; color: var(--hairline-input); }

/* Cards */
.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-xxl);
}
.card--soft { background: var(--canvas-soft); }
.card--cream { background: var(--cream); border-color: transparent; }
.card--lift { box-shadow: var(--shadow-1); }
.card h2, .card h3 { letter-spacing: -0.01em; }
.card > * + * { margin-top: var(--space-lg); }

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: var(--space-xxl);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name { font-size: 22px; font-weight: 300; letter-spacing: -0.01em; }
.plan-price {
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.022em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "ss01", "tnum";
}
.plan-price small { font-size: 14px; color: var(--muted); letter-spacing: 0; margin-inline-start: 4px; }
.plan-per { font-size: 13px; color: var(--muted); letter-spacing: -0.2px; }
.plan-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
}
.plan-list li { display: flex; gap: 8px; }
.plan-list svg { flex: none; color: var(--primary); margin-top: 3px; }
.plan .btn { margin-top: auto; width: 100%; }
.plan--featured {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-primary);
  box-shadow: var(--shadow-2);
}
.plan--featured .plan-name,
.plan--featured .plan-price { color: var(--on-primary); }
.plan--featured .plan-price small,
.plan--featured .plan-per { color: var(--primary-subdued); }
.plan--featured .plan-list { color: rgba(255, 255, 255, 0.88); }
.plan--featured .plan-list svg { color: var(--primary-subdued); }
.plan--featured .btn-primary { background: var(--canvas); color: var(--navy); }
.plan--featured .btn-primary:hover { background: var(--primary-subdued); }

.free-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--canvas-soft);
}
.free-strip p { font-size: 14px; color: var(--ink-2); }
.free-strip strong { font-weight: 400; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "ss01", "tnum";
}
table.data th,
table.data td { padding: 14px 18px; text-align: left; vertical-align: top; }
table.data th {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--canvas-soft);
  border-bottom: 1px solid var(--hairline);
}
table.data td { border-top: 1px solid var(--hairline); color: var(--ink-2); }
table.data tr:first-child td { border-top: 0; }
table.data td:first-child { color: var(--ink); }
table.data .yes { color: var(--primary-deep); }
table.data a { color: var(--primary); text-decoration: none; }
table.data a:hover { text-decoration: underline; }

/* Accordion */
.accordion { border-top: 1px solid var(--hairline); }
.accordion details { border-bottom: 1px solid var(--hairline); }
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 300;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 300;
  color: var(--muted);
  transition: transform 180ms ease;
  line-height: 1;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details > p { padding: 0 0 20px; max-width: 72ch; color: var(--ink-2); }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature { padding: 24px; background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
.feature-step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.feature h3 { margin-top: 16px; font-size: 18px; }
.feature p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tool-card {
  display: block;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--canvas);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.tool-card:hover { border-color: var(--primary-subdued); box-shadow: var(--shadow-1); }
.tool-card strong { display: block; font-size: 17px; font-weight: 400; letter-spacing: -0.01em; }
.tool-card span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.tool-card .arrow { color: var(--primary); }

/* CTA band */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  color: var(--on-primary);
}
.cta-band h2 { color: var(--on-primary); }
.cta-band p { margin-top: 8px; color: rgba(255, 255, 255, 0.78); font-size: 15px; }
.cta-band .actions-row { flex: none; }

/* Prose */
.prose { max-width: 70ch; }
.container > .prose { margin-block: 64px 96px; }
.prose > h2 { margin-top: 56px; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.prose > h2:first-child { margin-top: 0; }
.prose > h3 { margin-top: 32px; font-size: 19px; }
.prose p,
.prose ul,
.prose ol { margin-block: 16px; color: var(--ink-2); }
.prose li + li { margin-top: 8px; }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose strong { font-weight: 400; color: var(--ink); }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--primary-deep); }
.prose h2 + p, .prose h3 + p { margin-top: 12px; }
.prose .card { margin-block: 24px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
  padding-block: 64px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 32px 24px;
}
.footer-brand p { margin-top: 14px; max-width: 32ch; color: var(--muted); font-size: 13px; line-height: 1.5; }
.footer-col h2 {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-col ul { margin-top: 14px; padding: 0; list-style: none; display: grid; gap: 9px; }
.footer-col a { color: var(--ink-2); text-decoration: none; font-size: 13px; }
.footer-col a:hover { color: var(--primary); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.footer-legal p { max-width: 90ch; }

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.stack-sm > * + * { margin-top: 8px; }
.stack-md > * + * { margin-top: 16px; }
.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }

/* Responsive */
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .plans { grid-template-columns: 1fr 1fr; }
  .plan--featured { grid-column: 1 / -1; order: -1; }
}
@media (max-width: 767px) {
  :root { --section-y: 56px; }
  .container { padding-inline: 20px; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 8px 20px 16px;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-2);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; font-size: 15px; }
  .site-nav .site-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    min-height: 44px;
    background: var(--primary);
    color: var(--on-primary);
    border-radius: var(--radius-pill);
    font-weight: 400;
  }
  .site-nav .site-nav-cta:hover { background: var(--primary-press); color: var(--on-primary); }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }
  .hero-inner { padding-block: 24px 52px; }
  .hero h1 { max-width: 18ch; margin-top: 12px; }
  .hero-sub { font-size: 15px; }
  .trust-list { gap: 6px 16px; font-size: 12px; }
  .page-hero .hero-inner { padding-block: 32px 40px; }
  .btn { min-height: 44px; }
  .btn-sm { min-height: 44px; }
  .plans { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 28px; }
  .free-strip { flex-direction: column; align-items: flex-start; }
  .card { padding: 24px; }
  .prose > h2 { margin-top: 40px; font-size: 24px; }
  .section-head { margin-bottom: 28px; }
}
@media (max-width: 400px) {
  .credits-chip { padding: 4px 8px; font-size: 11px; }
  .wordmark { font-size: 14px; }
}

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

/* Account entry + sign-in dialog (markup injected by js/auth.js) */
.auth-slot { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; }
.auth-avatar {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: var(--radius-pill); background: var(--primary-tint);
  color: var(--primary-deep); font: inherit; font-size: 12px; font-weight: 600;
  line-height: 1; overflow: hidden; cursor: pointer;
}
.auth-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.auth-avatar:hover { box-shadow: 0 0 0 2px var(--primary-subdued); }
.auth-avatar:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.auth-nav { display: none; }
.auth-dialog {
  width: min(400px, calc(100vw - 32px)); margin: auto; padding: 28px;
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  background: var(--canvas); color: var(--ink); box-shadow: var(--shadow-2);
}
.auth-dialog::backdrop { background: rgba(13, 37, 61, 0.42); }
.auth-dialog [hidden] { display: none !important; }
.auth-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.auth-dialog h2 { font-size: 22px; letter-spacing: -0.01em; }
.auth-close {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--radius-pill);
  background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.auth-close:hover { background: var(--canvas-soft); color: var(--ink); }
.auth-sub { margin-top: 8px; font-size: 13px; color: var(--muted); }
.auth-field { display: grid; gap: 4px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.auth-field input {
  min-height: 40px; padding: 8px 10px; border: 1px solid var(--hairline-input);
  border-radius: var(--radius-sm); background: var(--canvas); color: var(--ink);
  font: inherit; font-size: 15px;
}
.auth-error { margin-top: 10px; font-size: 13px; color: var(--ruby); }
.auth-dialog .auth-submit, .auth-dialog .auth-google { width: 100%; margin-top: 16px; }
.auth-toggle {
  display: block; margin-top: 14px; padding: 0; border: 0; background: none;
  color: var(--primary); font: inherit; font-size: 13px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.auth-account { margin-top: 16px; }
.auth-account-email { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.auth-account-balance { margin-top: 4px; font-size: 13px; color: var(--muted); }
.auth-dialog .auth-signout { width: 100%; margin-top: 20px; }
@media (max-width: 767px) {
  .auth-nav {
    display: flex; align-items: center; justify-content: center; margin-top: 8px;
    min-height: 44px; padding: 12px; border: 1px solid var(--hairline);
    border-radius: var(--radius-pill); background: var(--canvas);
    color: var(--primary); font: inherit; font-size: 15px;
  }
}
@media (max-width: 430px) {
  .header-actions { gap: 8px; }
}
