/* Outfit AI website (docs/62 §3): one stylesheet for the marketing pages, the developer pages,
   the docs, the dashboard shell and the legal pages. Phones first; a 16 px gutter; no
   horizontal overflow; light and dark from the same tokens as the app (src/constants/theme.ts). */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f0f0f3;
  --bg-3: #e0e1e6;
  --text: #0f1012;
  --muted: #60646c;
  --line: #d8d9de;
  --accent: #3c87f7;
  --accent-2: #8b5cf6;
  --accent-ink: #ffffff;
  --ok: #1f8a4c;
  --warn: #b26a00;
  --danger: #c62828;
  --person-a: #ffe1c9;
  --person-b: #f7c6b0;
  --cloth-a: #dbe8ff;
  --cloth-b: #c9d8ff;
  --skin: #e8b795;
  --worn: #2f5fd6;
  --shadow: 0 12px 32px rgba(15, 16, 18, 0.08);
  --radius: 16px;
  --radius-lg: 24px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Inter, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-family: var(--font);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --bg-2: #191b1f;
    --bg-3: #272a2f;
    --text: #f2f3f5;
    --muted: #a2a8b0;
    --line: #32353b;
    --accent: #6ea8ff;
    --accent-2: #a78bfa;
    --accent-ink: #0f1012;
    --ok: #5cc98a;
    --warn: #f2b85c;
    --danger: #ff7b72;
    --person-a: #3a2a22;
    --person-b: #4a352b;
    --cloth-a: #1f2a44;
    --cloth-b: #263457;
    --skin: #c9987a;
    --worn: #6ea8ff;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
}
img,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
p {
  margin: 0 0 1em;
}
h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 {
  font-size: clamp(34px, 6vw, 56px);
}
h2 {
  font-size: clamp(26px, 4vw, 36px);
}
h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
}
h4 {
  font-size: 16px;
}
code,
pre {
  font-family: var(--mono);
  font-size: 0.92em;
}
code {
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 6px;
}
pre.code {
  margin: 16px 0;
  padding: 16px;
  overflow-x: auto;
  background: #101318;
  color: #e6edf3;
  border-radius: var(--radius);
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}
pre.code code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 13px;
}
pre.code[data-lang]::before {
  content: attr(data-lang);
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b949e;
  margin-bottom: 8px;
}
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .container {
    padding: 0 24px;
  }
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus {
  left: 8px;
  z-index: 100;
}
.draft {
  background: #fff3cd;
  color: #3d2f00;
  padding: 10px 16px;
  font-size: 14px;
}
details.draft summary {
  cursor: pointer;
}
details.draft p {
  margin: 6px 0 0;
}
mark.placeholder {
  background: #ffe08a;
  color: #3d2f00;
  padding: 0 2px;
}

/* ---- header --------------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
/* the Outfit AI symbol, red on a transparent background (the favicon) */
.brand-mark {
  /* larger than a filled square would need: the cross leaves its corners empty */
  width: 28px;
  height: 28px;
  background: url('/favicon-192.png') center / contain no-repeat;
}
.site-nav {
  display: none;
  gap: 4px;
  margin-left: 12px;
}
.site-nav a,
.menu-panel nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover,
.site-nav a[aria-current='page'],
.menu-panel nav a[aria-current='page'] {
  color: var(--text);
  background: var(--bg-2);
}
.header-actions {
  display: none;
  margin-left: auto;
  gap: 8px;
}
.menu {
  margin-left: auto;
  position: relative;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
}
.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.menu-icon::before {
  top: -6px;
}
.menu-icon::after {
  top: 6px;
}
.menu-panel {
  position: absolute;
  right: 0;
  top: 52px;
  width: min(320px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: grid;
  gap: 12px;
}
.menu-panel nav {
  display: grid;
}
.menu-actions {
  display: grid;
  gap: 8px;
}
@media (min-width: 900px) {
  .site-nav,
  .header-actions {
    display: flex;
  }
  .menu {
    display: none;
  }
}

/* ---- buttons, badges, cards ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-secondary {
  border-color: var(--line);
  background: var(--bg);
}
.btn-secondary:hover {
  background: var(--bg-2);
}
.btn-ghost {
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--bg-2);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.badge {
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--text);
  vertical-align: middle;
}
.badge-accent {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}
.badge-ok {
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  color: var(--ok);
}
.badge-warn {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--warn);
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.feature h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.feature h3 a {
  text-decoration: none;
}
.feature p {
  color: var(--muted);
  margin: 0;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.icon {
  width: 22px;
  height: 22px;
}
.grid {
  display: grid;
  gap: 16px;
}
@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));
  }
}

/* grid and flex children must be allowed to shrink below their content (code blocks, mocks) */
.hero .container > *,
.split > *,
.grid > *,
.steps > *,
.plans > *,
.footer-grid > *,
.dash-main,
.docs-body,
.main-docs > * {
  min-width: 0;
}
.flow {
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

/* ---- sections ------------------------------------------------------------------------------- */
.section {
  padding: 56px 0;
}
@media (min-width: 900px) {
  .section {
    padding: 88px 0;
  }
}
.section-alt {
  background: var(--bg-2);
}
.section-head {
  max-width: 720px;
  margin-bottom: 32px;
}
.lead {
  font-size: 18px;
  color: var(--muted);
}
.section-cta {
  text-align: center;
}
.section-cta .section-head {
  margin: 0 auto 24px;
}
.section-cta .btn-row {
  justify-content: center;
}

/* ---- hero ----------------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    radial-gradient(
      60% 60% at 20% 30%,
      color-mix(in srgb, var(--accent) 22%, transparent),
      transparent 70%
    ),
    radial-gradient(
      50% 50% at 80% 20%,
      color-mix(in srgb, var(--accent-2) 20%, transparent),
      transparent 70%
    );
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  gap: 40px;
}
.hero-copy .lead {
  font-size: 19px;
  max-width: 560px;
}
.hero-copy .btn-row {
  margin-top: 24px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-facts .icon {
  width: 16px;
  height: 16px;
  color: var(--ok);
}
@media (min-width: 900px) {
  .hero {
    padding: 96px 0 72px;
  }
  .hero .container {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
  }
}

/* the hero picture: person + clothing = Fit */
.demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.25fr;
  align-items: center;
  gap: 8px;
}
.demo-op {
  font-size: 26px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.tile {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tile-media {
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  padding: 12%;
}
.tile-person .tile-media {
  background: linear-gradient(160deg, var(--person-a), var(--person-b));
}
.tile-cloth .tile-media {
  background: linear-gradient(160deg, var(--cloth-a), var(--cloth-b));
}
.tile-fit .tile-media {
  background: linear-gradient(160deg, var(--person-a), var(--cloth-b));
  position: relative;
}
.tile-fit .tile-media::after {
  content: 'AI Fit';
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
}
.tile-muted .tile-media {
  background: var(--bg-2);
}
.tile figcaption {
  padding: 8px 12px 10px;
  font-size: 13px;
  display: grid;
}
.tile figcaption span {
  color: var(--muted);
}
.shape {
  width: 100%;
  height: 100%;
  fill: var(--skin);
}
.shape-person {
  fill: var(--skin);
}
.shape-top,
.shape-bottom,
.shape-outer,
.shape-dress {
  fill: var(--worn);
}
.shape-outer .line {
  stroke: var(--bg);
  stroke-width: 3;
  fill: none;
}
.shape-fit .skin {
  fill: var(--skin);
}
.shape-fit .worn {
  fill: var(--worn);
}
@media (prefers-reduced-motion: no-preference) {
  .demo .tile-fit {
    animation: rise 0.9s ease-out both;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---- the mock app screens ------------------------------------------------------------------- */
.mock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mock-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.mock-title {
  font-weight: 700;
}
.mock-step {
  color: var(--muted);
}
.mock-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}
.mock-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mock-row .tile {
  box-shadow: none;
}
.mock-row .tile figcaption {
  padding: 6px 8px;
  font-size: 12px;
}
.mock-choice {
  display: grid;
  gap: 6px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-2);
  font-size: 14px;
}
.choice .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.choice-on {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-2);
}
.opt-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  flex: none;
  margin-top: 2px;
}
.opt-on .opt-dot {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 45%, transparent 50%);
}
.opt-text {
  display: grid;
  font-size: 14px;
}
.opt-text span {
  color: var(--muted);
  font-size: 13px;
}
.opt-group {
  display: grid;
  gap: 6px;
}
.opt-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 4px 0 0;
}
.mock-cta {
  margin-top: 4px;
  min-height: 44px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
}
.mock-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-3);
  overflow: hidden;
}
.mock-progress span {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--bg-2);
  font-size: 14px;
}
.slot-name {
  font-weight: 600;
}
.slot-piece {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.slot-piece .shape {
  width: 26px;
  height: 26px;
}
.slot-empty {
  border: 1px dashed var(--line);
  background: transparent;
}
.slot-add {
  color: var(--accent);
  font-weight: 600;
}
.mock-list {
  display: grid;
  gap: 8px;
}
.mock-fit {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: var(--bg-2);
  font-size: 13px;
}
.mock-fit .tile {
  box-shadow: none;
  border: 0;
}
.mock-fit .tile-media {
  padding: 8px;
}
.mock-fit span {
  color: var(--muted);
}
.mock-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mock-actions span {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.compare {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.compare-handle {
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--text);
}
.compare-handle::after {
  content: '';
  position: absolute;
  left: -13px;
  top: calc(50% - 14px);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--bg);
}

/* ---- how it works (the tutorial) ------------------------------------------------------------ */
.steps {
  display: grid;
  gap: 24px;
  counter-reset: step;
}
.step {
  /* the positioning context of its visually hidden label, so it stays inside the phone track */
  position: relative;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg);
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.step h3 {
  margin: 12px 0 6px;
}
.step p {
  color: var(--muted);
  margin: 0;
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---- split sections (text + mock) ----------------------------------------------------------- */
.split {
  display: grid;
  gap: 28px;
  align-items: start;
}
.split .section-head {
  margin-bottom: 0;
}
.split ul.checks {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}
.checks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.checks .icon {
  width: 18px;
  height: 18px;
  color: var(--ok);
  flex: none;
  margin-top: 4px;
}
.split-media {
  max-width: 420px;
  width: 100%;
  justify-self: center;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
  .split-reverse .split-media {
    order: -1;
  }
}

/* ---- pricing -------------------------------------------------------------------------------- */
.plans {
  display: grid;
  gap: 16px;
}
.plan {
  display: grid;
  gap: 12px;
  align-content: start;
}
.plan-price {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.plan-price small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}
.plan li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.plan li .icon {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  flex: none;
  color: var(--ok);
}
.plan-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.tbd {
  color: var(--muted);
  font-weight: 500;
}
@media (min-width: 720px) {
  .plans-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plans-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .plans-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .plans-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---- faq ------------------------------------------------------------------------------------ */
.faq {
  display: grid;
  gap: 8px;
  max-width: 800px;
}
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  min-height: 48px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--muted);
}
.faq details[open] summary::after {
  content: '\2212';
}
.faq-a {
  padding: 0 20px 16px;
  color: var(--muted);
}
.faq-a p {
  margin: 0;
}

/* ---- article and legal pages ---------------------------------------------------------------- */
.main-article {
  padding: 32px 16px 56px;
}
.article {
  max-width: 760px;
}
.article h1 {
  font-size: clamp(30px, 5vw, 40px);
}
.article h2 {
  font-size: 22px;
  margin-top: 36px;
}
.article h3 {
  font-size: 17px;
  margin-top: 24px;
}
.table {
  overflow-x: auto;
  margin: 16px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
th,
td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--bg-2);
}
blockquote {
  margin: 16px 0;
  padding: 8px 16px;
  background: var(--bg-2);
  border-left: 3px solid var(--line);
  border-radius: 0 12px 12px 0;
}

/* ---- docs ----------------------------------------------------------------------------------- */
.main-docs {
  display: grid;
  gap: 32px;
  padding-top: 24px;
  padding-bottom: 64px;
}
.docs-nav {
  font-size: 15px;
}
.docs-nav details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 12px;
}
.docs-nav summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.docs-nav h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 16px 0 6px;
}
.docs-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.docs-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  min-height: 40px;
}
.docs-nav a:hover,
.docs-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--bg-2);
}
.docs-body {
  max-width: 760px;
  min-width: 0;
}
.docs-body h1 {
  font-size: clamp(28px, 4vw, 36px);
}
.docs-body h2 {
  font-size: 22px;
  margin-top: 40px;
  padding-top: 8px;
}
.docs-body h3 {
  font-size: 17px;
  margin-top: 24px;
}
.docs-body h4 {
  margin-top: 20px;
}
.docs-status {
  margin-bottom: 20px;
}
.docs-toc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-2);
}
.docs-toc ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.docs-toc a {
  color: inherit;
}
.docs-next {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
}
.docs-cards {
  margin-top: 24px;
}
.docs-links {
  display: none;
}
@media (min-width: 960px) {
  .main-docs {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .docs-menu {
    display: none;
  }
  .docs-links {
    display: block;
  }
  .docs-nav {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }
}

/* ---- dashboard shell ------------------------------------------------------------------------ */
.dash {
  display: grid;
  gap: 24px;
  padding: 24px 0 64px;
}
.dash-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.dash-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
  min-height: 44px;
  font-size: 15px;
}
.dash-nav a .icon {
  width: 18px;
  height: 18px;
}
.dash-nav a:hover,
.dash-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--bg-2);
}
.dash-main {
  min-width: 0;
  display: grid;
  gap: 20px;
}
.dash-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dash-head h1 {
  font-size: 28px;
  margin: 0;
}
.dash-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  display: grid;
  gap: 12px;
  justify-items: center;
}
.dash-empty h2 {
  font-size: 20px;
  color: var(--text);
  margin: 0;
}
.dash-empty p {
  margin: 0;
  max-width: 480px;
}
.stat-row {
  display: grid;
  gap: 12px;
}
.stat {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.stat span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.stat strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}
@media (min-width: 640px) {
  .stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 960px) {
  .dash {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .dash-nav {
    flex-direction: column;
    position: sticky;
    top: 80px;
    align-self: start;
    overflow: visible;
  }
}

/* ---- footer --------------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 32px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  gap: 24px;
}
.footer-brand p {
  margin: 12px 0 0;
  max-width: 320px;
}
.footer-col h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 8px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
}
.footer-col a {
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 40px;
}
.footer-col a:hover {
  color: var(--text);
}
.footer-note {
  margin: 32px 0 0;
  font-size: 13px;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

/* ---- the account deletion page (docs/61 §21.5) ---------------------------------------------- */
#deletion {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--bg-2);
  border-radius: 12px;
}
#deletion > div {
  display: grid;
  gap: 12px;
}
/* the display above would otherwise win over the hidden attribute and show every step at once */
#deletion > [hidden] {
  display: none;
}
input {
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
button {
  font: inherit;
  font-weight: 600;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.secondary {
  background: transparent;
  color: var(--text);
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.error {
  color: var(--danger);
}
.note {
  color: var(--muted);
  font-size: 14px;
}

/* ---- O13.5 browser polish -------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* a note or status line after a list or a grid keeps its distance */
.checks + p,
.checks + .note,
.grid + .note,
.section-note,
.status-note {
  margin-top: 16px;
}
.status-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.status-note .note {
  margin: 0;
}
/* the tutorial's last picture: the thumbnail is too small for the AI Fit label */
.mock-fit .tile-fit .tile-media::after {
  display: none;
}
/* disabled plan buttons read as a state, not as a broken link */
.btn[aria-disabled='true'] {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
  cursor: default;
}
.plan-price-tbd {
  font-size: 20px;
}
.plan-map {
  display: grid;
  gap: 12px;
}
.plan-map-item {
  display: grid;
  gap: 4px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.plan-map-item:hover {
  border-color: var(--accent);
}
.plan-map-item .eyebrow {
  margin: 0;
}
.plan-map-item strong {
  font-size: 20px;
}
.plan-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}
.plan-list li {
  display: grid;
  gap: 2px;
}
.plan-list-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.flow code {
  font-size: 0.9em;
}
/* endpoint headings in the docs and the reference */
.docs-body h3.endpoint,
.docs-body h2.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.endpoint code {
  background: transparent;
  padding: 0;
  font-size: 0.95em;
}
.method {
  display: inline-block;
  min-width: 58px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 6px;
  color: #fff;
  background: var(--muted);
}
.method-get {
  background: var(--ok);
}
.method-post {
  background: var(--accent);
}
.method-delete {
  background: var(--danger);
}
.method-patch,
.method-put {
  background: var(--warn);
}
@media (prefers-color-scheme: dark) {
  .method {
    color: #0f1012;
  }
}
/* docs tables scroll sideways on phones instead of squeezing the notes into a sliver */
.docs-body .table table {
  min-width: 520px;
}
.docs-toc a {
  text-decoration: none;
}
.docs-toc a:hover {
  text-decoration: underline;
}
@media (max-width: 719px) {
  /* the tutorial becomes a swipeable track with the next card peeking in */
  .steps {
    grid-auto-flow: column;
    grid-auto-columns: 86%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -16px;
    padding: 0 16px 12px;
    scroll-padding: 0 16px;
  }
  .step {
    scroll-snap-align: start;
  }
}
@media (max-width: 639px) {
  /* feature cards: the icon beside the text, not above it */
  .feature {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px;
  }
  .feature .feature-icon {
    grid-row: span 2;
    margin: 0;
  }
  .feature h3 {
    margin: 0 0 4px;
    font-size: 17px;
  }
  pre.code {
    font-size: 12px;
  }
}
