/* ---------------------------------------------------------------------- */
/* Tokens                                                                  */
/* ---------------------------------------------------------------------- */

:root[data-theme="light"] {
  --bg: #faf5ef;
  --bg-elevated: #ffffff;
  --bg-sunken: #f2e9df;
  --text: #241811;
  --text-muted: #6e5c4d;
  --border: #e7dac8;
  --border-strong: #d8c5ab;
  --accent: #9c5f32;
  --accent-hover: #85512b;
  --accent-contrast: #fffaf5;
  --shadow: 0 20px 45px -20px rgba(98, 53, 28, 0.35);
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elevated: #0e0d0c;
  --bg-sunken: #161311;
  --text: #ffffff;
  --text-muted: #b7ab9f;
  --border: #2a2521;
  --border-strong: #3a332c;
  --accent: #d69566;
  --accent-hover: #e7ab7f;
  --accent-contrast: #1a0f08;
  --shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  font-size: 106.25%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

.btn-ghost:hover {
  border-color: var(--border-strong);
}

.btn-social {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-social:hover {
  border-color: var(--accent);
}

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

.btn-large {
  padding: 12px 24px;
  font-size: 1rem;
}

/* ---------------------------------------------------------------------- */
/* Header / navbar                                                        */
/* ---------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

/* iOS 26 Safari's "Liquid Glass" chrome-tinting samples the background-color
   of whatever sticky/fixed element sits at the viewport's top edge, but
   can't resolve a translucent/blurred one — so the status bar stops
   following theme toggles. Swap to an opaque background on iOS Safari only;
   desktop and Android keep the frosted-glass look. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    .site-header {
      background: var(--bg);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  height: 30px;
  width: auto;
}

.brand-logo--dark {
  display: none;
}

:root[data-theme="dark"] .brand-logo--light {
  display: none;
}

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

.primary-nav {
  flex: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
}

.icon-sun {
  display: none;
}

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

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

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-menu-actions .btn {
  width: 100%;
}

@media (min-width: 861px) {
  .header-inner {
    height: 84px;
  }

  .brand-logo {
    height: 38px;
  }

  .nav-links {
    gap: 34px;
  }

  .nav-links a {
    font-size: 1.05rem;
  }

  .header-controls {
    gap: 16px;
  }

  .header-controls .btn {
    padding: 12px 22px;
    font-size: 1rem;
  }

  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  .theme-toggle .icon {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 860px) {
  .primary-nav,
  .nav-auth {
    display: none;
  }

  .hamburger {
    display: inline-flex;
  }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  padding: clamp(48px, 8vw, 100px) 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 6px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 28px 0 0;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero-subhead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.hero-microcopy {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.hero-visual {
  position: relative;
}

.hero-visual > .eyebrow {
  display: flex;
  width: fit-content;
  margin: 28px auto 0;
}

.code-window {
  position: relative;
  margin-bottom: 64px;
}

.code-window-frame {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.code-dot--red {
  background: #f2544f;
}

.code-dot--yellow {
  background: #f2b23f;
}

.code-dot--green {
  background: #4dbf6e;
}

.code-window-title {
  margin-left: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-window-body {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.tok-tag {
  color: var(--accent);
}

.tok-attr {
  color: var(--text);
}

.tok-str {
  color: #2b8348;
}

:root[data-theme="dark"] .tok-str {
  color: #4dbf6e;
}

.tok-kw {
  color: var(--accent);
  font-weight: 600;
}

.tok-com {
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.75;
}

.hero-badge {
  position: absolute;
  right: 20px;
  bottom: -18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4dbf6e;
}

.hero-gopher {
  position: absolute;
  top: -46px;
  right: -5px;
  width: 110px;
  height: auto;
  opacity: 0.9;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  .hero-gopher {
    width: 84px;
    top: -34px;
    right: 4px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-badge {
    right: 12px;
    font-size: 0.78rem;
    padding: 8px 12px;
  }

  .code-window-body {
    font-size: 0.74rem;
    padding: 16px;
  }

  .hero-gopher {
    display: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Fit check ("who it's for")                                             */
/* ---------------------------------------------------------------------- */

.fit {
  padding: clamp(48px, 8vw, 100px) 0;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 9%, var(--bg));
}

.fit-intro {
  text-align: center;
  margin: 0 0 44px;
}

.fit-intro h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

.fit-threads {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 48px;
  max-width: 1000px;
  margin: 0 auto;
}

.fit-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fit-bubble {
  border-radius: 18px;
  padding: 16px 20px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.fit-bubble p {
  margin: 0;
}

.fit-bubble--ask {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text-muted);
  font-style: italic;
}

.fit-avatar {
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.fit-avatar--agency {
  width: 160px;
  height: 160px;
}

.fit-bubble--answer {
  align-self: flex-end;
  max-width: 92%;
  background: var(--accent);
  color: var(--accent-contrast);
  border-bottom-right-radius: 4px;
}

.fit-bubble--answer strong {
  font-weight: 700;
}

.fit-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 780px;
  margin: 48px auto 0;
  padding: 20px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--bg-elevated);
}

.fit-callout-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
}

.fit-callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

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

@media (max-width: 760px) {
  .fit-threads {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .fit-bubble--answer {
    max-width: 100%;
  }
}

/* ---------------------------------------------------------------------- */
/* Pricing                                                                 */
/* ---------------------------------------------------------------------- */

.pricing {
  padding: clamp(48px, 8vw, 100px) 0;
  border-top: 1px solid var(--border);
}

.pricing-intro {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
}

.pricing-intro h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.pricing-subhead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}

.billing-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.billing-option.is-active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}

.billing-save {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.72rem;
  font-weight: 700;
}

.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 32px 32px;
}

.pricing-card--featured {
  border-color: var(--accent);
  border-width: 2px;
}

.pricing-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-card-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.pricing-art {
  height: 88px;
  width: auto;
  flex-shrink: 0;
}

.pricing-card-info {
  min-width: 0;
}

.pricing-card h3 {
  font-size: 1.4rem;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.pricing-tagline {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 0 0 12px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 2px;
}

.price-amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-period {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.price-note--placeholder {
  visibility: hidden;
}

.pricing-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  width: 100%;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.pricing-features li.is-excluded {
  color: var(--text-muted);
}

.feature-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--accent);
}

.feature-x {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--text-muted);
  opacity: 0.7;
}

.pricing-cta {
  width: 100%;
  margin-top: auto;
  padding: 12px 24px;
  font-size: 1rem;
}

.pricing-trigger {
  margin-top: 48px;
  padding: 36px 40px;
  border-radius: 20px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.pricing-trigger-label {
  margin: 0;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.pricing-trigger-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pricing-trigger-chips li {
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-trigger {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------------------------------------------------------------------- */
/* FAQ                                                                     */
/* ---------------------------------------------------------------------- */

.faq {
  padding: clamp(48px, 8vw, 100px) 0;
  border-top: 1px solid var(--border);
}

.faq-intro {
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}

.faq-intro h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.faq-subhead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

.faq-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 8px 48px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.faq-index {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border);
}

.faq-index-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  width: 100%;
  margin-left: -2px;
  padding: 16px 22px;
  border: none;
  border-left: 2px solid transparent;
  background: none;
  text-align: left;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.faq-index-item:hover {
  color: var(--text);
}

.faq-index-item.is-active {
  color: var(--text);
  border-left-color: var(--accent);
}

.faq-index-num {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8b6b40;
  transition: color 0.15s ease;
}

:root[data-theme="dark"] .faq-index-num {
  color: #857565;
}

.faq-index-item.is-active .faq-index-num,
.faq-index-item:hover .faq-index-num {
  color: var(--accent);
}

.faq-index-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq-answer {
  min-height: 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px;
}

.faq-answer-num {
  display: block;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.faq-answer-q {
  margin: 0 0 16px;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.faq-answer-a {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.faq-answer.faq-answer--pop {
  animation: faqPop 0.28s ease;
}

@keyframes faqPop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  .faq-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .faq-answer {
    min-height: 0;
    padding: 28px;
  }
}

/* ---------------------------------------------------------------------- */
/* CTA banner                                                             */
/* ---------------------------------------------------------------------- */

.cta-banner {
  padding: 0 0 clamp(48px, 8vw, 100px);
}

.cta-banner-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(48px, 8vw, 76px) 32px;
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg-elevated));
}

.cta-banner-card::before {
  content: "";
  position: absolute;
  top: -170px;
  left: 50%;
  width: 440px;
  height: 260px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.25;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.cta-banner-card > * {
  position: relative;
  z-index: 1;
}

.cta-banner-card h2 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.cta-banner-subhead {
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.cta-banner-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--accent-contrast);
  padding: 14px 32px;
  font-size: 1.02rem;
}

.cta-banner-btn:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
}

.cta-banner-microcopy {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  padding: clamp(40px, 6vw, 64px) 0 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 280px;
}

.footer-tagline {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}

.footer-col-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-copyright {
  margin: 0;
}

.footer-credit {
  margin: 0;
}

.footer-credit a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.footer-credit a:hover {
  color: var(--accent);
}

@media (max-width: 760px) {
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 36px;
  }

  .footer-links {
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* ---------------------------------------------------------------------- */
/* Legal pages (Privacy Policy / Terms of Service)                        */
/* ---------------------------------------------------------------------- */

.legal-hero {
  padding: clamp(40px, 7vw, 72px) 0 8px;
  border-bottom: 1px solid var(--border);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 24px;
  transition: color 0.15s ease;
}

.legal-back:hover {
  color: var(--accent);
}

.legal-hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.legal-updated {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0 20px;
}

.legal-intro {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 66ch;
  margin: 0 0 40px;
}

.legal-body {
  padding: clamp(40px, 6vw, 64px) 0 clamp(64px, 10vw, 110px);
}

.legal-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 96px;
}

.legal-toc-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-toc a {
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.legal-toc a:hover {
  color: var(--text);
}

.legal-toc a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.legal-content {
  max-width: 720px;
  min-width: 0;
}

.legal-content h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 96px;
  margin: 44px 0 14px;
}

.legal-content > h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.05rem;
  margin: 24px 0 10px;
  scroll-margin-top: 96px;
}

.legal-content p,
.legal-content li {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text);
}

.legal-content p {
  margin: 0 0 16px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content li:last-child {
  margin-bottom: 0;
}

.legal-content strong {
  font-weight: 700;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--accent-hover);
}

.legal-content a.btn,
.legal-content a.btn:hover {
  text-decoration: none;
}

.legal-content a.btn-ghost {
  color: var(--text);
}

.legal-content a.btn-ghost:hover {
  color: var(--text);
}

.legal-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.legal-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--bg-elevated);
  margin: 0 0 24px;
}

.legal-callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--accent);
}

.legal-callout p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.legal-callout p + p {
  margin-top: 10px;
}

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

.legal-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 0 0 24px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.legal-table th {
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-footer-nav {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.legal-footer-nav p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .legal-toc {
    position: static;
  }

  .legal-toc ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 18px;
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
  }

  .legal-toc a {
    padding: 4px 0;
  }
}

/* ---------------------------------------------------------------------- */
/* Docs page                                                               */
/* ---------------------------------------------------------------------- */

.legal-content .code-window {
  margin-bottom: 24px;
}

.code-copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.code-copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.code-copy-btn.is-copied {
  color: var(--accent);
  border-color: var(--accent);
}

.docs-endpoint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-sunken);
  margin: 0 0 20px;
}

.docs-endpoint-method {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.docs-endpoint code {
  color: var(--text);
  font-size: 0.9rem;
  word-break: break-all;
}

.docs-response-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.docs-response-grid .code-window {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .docs-response-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
