:root {
  --bg: #fffaf8;
  --band-blush: #fcf0ef;
  --band-soft: #f6e7e5;
  --surface: #ffffff;
  --ink: #271f20;
  --muted: #5f4f51;
  --subtle: #6b585b;
  --accent: #b43b41;
  --accent-strong: #9f2f35;
  --accent-ink: #ffffff;
  --accent-soft: rgba(180, 59, 65, 0.09);
  --accent-border: rgba(180, 59, 65, 0.28);
  --hairline: rgba(39, 31, 32, 0.12);
  --hairline-strong: rgba(39, 31, 32, 0.22);
  --ok-bg: #eef8f2;
  --ok-ink: #176034;
  --ok-border: rgba(23, 96, 52, 0.24);
  --warn-bg: #fff5e4;
  --warn-ink: #7c4700;
  --warn-border: rgba(124, 71, 0, 0.24);
  --shadow-ambient: 0 18px 40px rgba(62, 34, 36, 0.08);
  --shadow-video: 0 22px 48px rgba(39, 31, 32, 0.14);
  --header-frosted: rgba(255, 250, 248, 0.9);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --sticky-offset: 84px;
}

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

html {
  color-scheme: light;
  background-color: var(--bg);
}

html:focus-within {
  scroll-behavior: smooth;
}

@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(180, 59, 65, 0.14);
}

body {
  overflow-x: clip;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--ink);
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-strong);
  color: var(--accent-ink);
  font-weight: 700;
  z-index: 200;
}

.skip-link:focus {
  left: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main a,
main button,
main summary,
main [tabindex] {
  scroll-margin-top: var(--sticky-offset);
}

.wrap {
  width: min(1140px, 100%);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Sticky Editorial Top Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-frosted);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--band-blush);
  border: 1px solid var(--accent-border);
  color: var(--accent-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 140ms ease, color 140ms ease;
}

.nav-link:hover {
  background: var(--band-blush);
  color: var(--ink);
}

.nav-link[aria-current="page"] {
  color: var(--accent-strong);
  background: var(--band-blush);
}

/* 4-Layer Atomic Tactile Buttons + 5 Interactive States */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  /* Layer 1: Base Surface */
  background: linear-gradient(180deg, #ffffff 0%, #fcf7f6 100%);
  color: var(--ink);
  /* Layer 2: Hairline Border */
  border: 1px solid rgba(39, 31, 32, 0.16);
  /* Layer 3 + 4: Top Bevel + Containment Ring Shadow */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(39, 31, 32, 0.06),
    0 0 0 1px rgba(39, 31, 32, 0.04);
  transition:
    transform 140ms ease-out,
    background-color 140ms ease-out,
    border-color 140ms ease-out,
    color 140ms ease-out,
    box-shadow 140ms ease-out;
}

.btn.btn-icon-leading {
  padding-left: 14px;
  padding-right: 18px;
}

.btn.btn-sm {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f8ecea 100%);
  border-color: var(--accent-border);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 16px rgba(62, 34, 36, 0.09),
    0 0 0 1px var(--accent-border);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: inset 0 2px 4px rgba(39, 31, 32, 0.14);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(180deg, #be4248 0%, #a53238 100%);
  color: var(--accent-ink);
  border: 1px solid rgba(110, 22, 27, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 6px rgba(165, 50, 56, 0.24),
    0 0 0 1px rgba(165, 50, 56, 0.12);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #b3383e 0%, #962a30 100%);
  color: var(--accent-ink);
  border-color: rgba(110, 22, 27, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 10px 24px rgba(165, 50, 56, 0.28),
    0 0 0 1px rgba(159, 47, 53, 0.2);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: inset 0 2px 5px rgba(39, 31, 32, 0.3);
}

.topbar-cta {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 0.84rem;
}

.notice-banner {
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-left: 3px solid var(--warn-ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.notice-banner[hidden] {
  display: none;
}

/* Full-Bleed Tonal Bands (Borderless Paper & Blush Flow) */
.band {
  width: 100%;
  scroll-margin-top: var(--sticky-offset);
}

.band-paper {
  background-color: var(--bg);
}

.band-blush {
  background-color: var(--band-blush);
}

.band-pad {
  padding-top: clamp(44px, 6vw, 76px);
  padding-bottom: clamp(44px, 6vw, 76px);
}

/* Screen 1: Hero */
.hero-band {
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(40px, 5.5vw, 68px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

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

.status-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok-ink);
  font-size: 0.8rem;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--ok-ink);
  flex-shrink: 0;
}

.hero-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  max-width: 54ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-quick-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.text-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.spec-strip {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr) minmax(0, 1.38fr);
  gap: 14px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.spec-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--subtle);
}

.spec-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Hero Right: Borderless Mascot & Brand Lockup Stage */
.hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  padding-top: 56px;
}

.blossom-accent {
  position: absolute;
  top: -8px;
  right: -8px;
  width: min(210px, 46%);
  height: auto;
  pointer-events: none;
  opacity: 0.92;
  user-select: none;
}

.brand-lockup {
  position: relative;
  z-index: 2;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.brand-lockup-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.brand-lockup-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
}

.brand-lockup-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.brand-lockup-sub {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ok-ink);
  letter-spacing: 0.03em;
}

.mascot-stage {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mascot-img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 3;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(82, 46, 48, 0.1));
}

.mascot-caption {
  margin: 8px 0 12px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

.mascot-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.pill-btn:hover {
  background: var(--band-blush);
  color: var(--ink);
}

.pill-btn[aria-pressed="true"],
.pill-btn[aria-selected="true"] {
  background: var(--ink);
  color: #ffffff;
}

/* Section Headers (Editorial Typographic Rhythm) */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 28px;
}

.section-kicker {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  margin-bottom: 4px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.38rem, 2.3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 62ch;
}

/* Screen 2: Showcase Video Band (#fcf0ef) */
.showcase-reel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.showcase-frame {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #141720;
  aspect-ratio: 1280 / 760;
  box-shadow: var(--shadow-video);
}

.showcase-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #141720;
}

.showcase-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.showcase-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.showcase-point {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.point-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.showcase-point strong {
  font-size: 1rem;
  color: var(--ink);
}

.showcase-point p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.mid-funnel {
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mid-funnel-copy {
  max-width: 58ch;
}

.mid-funnel-copy strong {
  display: block;
  font-size: 1.02rem;
  color: var(--ink);
}

.mid-funnel-copy span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Screen 3: Borderless Pricing, Workflow & OS Setup */
.subsection {
  scroll-margin-top: var(--sticky-offset);
}

.subsection + .subsection {
  margin-top: clamp(44px, 6vw, 68px);
  padding-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--hairline);
}

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

.pricing-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding-top: 8px;
}

.pricing-col-featured {
  border-top: 2px solid var(--accent-strong);
  padding-top: 18px;
}

.pricing-col-secondary {
  border-top: 1px solid var(--hairline-strong);
  padding-top: 19px;
}

.pricing-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 210px;
}

.pricing-art img {
  width: auto;
  max-width: min(290px, 100%);
  max-height: 210px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(62, 34, 36, 0.08));
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}

.tag-accent {
  background: var(--band-blush);
  color: var(--accent-strong);
}

.pricing-col h3 {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}

.price-amount {
  font-size: clamp(2rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

.clean-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.94rem;
}

.clean-list li + li {
  margin-top: 8px;
}

.clean-list strong {
  color: var(--ink);
}

.pricing-col .cta-row {
  margin-top: auto;
  padding-top: 8px;
}

.pricing-col .cta-row .btn {
  width: 100%;
}

/* 3-Step Borderless Workflow */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 36px);
}

.step-item {
  border-top: 1px solid var(--hairline-strong);
  padding-top: 18px;
  min-width: 0;
}

.step-num {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
  margin-bottom: 6px;
}

.step-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  text-wrap: balance;
}

.step-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Accessible OS Setup Tabs */
.os-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 78ch;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.os-panel {
  max-width: 78ch;
}

.os-panel[hidden] {
  display: none;
}

.os-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.os-panel-head h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
}

.os-arch-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--subtle);
}

.os-shortcut-note {
  margin: 16px 0 8px;
  font-size: 0.94rem;
  color: var(--muted);
}

.code-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--band-blush);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--ink);
  word-break: break-all;
}

.fallback-box {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 78ch;
}

.fallback-box summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.fallback-box[open] summary {
  margin-bottom: 8px;
}

.fallback-box p {
  margin: 0 0 12px;
}

/* Final Discord Conversion Band (#buy-key / #support) */
.discord-funnel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.discord-funnel-copy {
  min-width: 0;
}

.discord-funnel-copy h2 {
  margin: 6px 0 12px;
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}

.discord-funnel-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 56ch;
}

.discord-funnel-art {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.discord-funnel-art img {
  width: min(360px, 100%);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(62, 34, 36, 0.08));
}

/* Disclaimer & Footer */
.disclaimer-band {
  padding-top: clamp(32px, 4vw, 48px);
  padding-bottom: clamp(24px, 3vw, 36px);
}

.disclaimer-block {
  max-width: 78ch;
}

.disclaimer-block h2,
.disclaimer-block h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}

.disclaimer-block p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.68;
}

.disclaimer-links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 0.9rem;
  font-weight: 700;
}

.disclaimer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.disclaimer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer {
  border-top: 1px solid var(--hairline);
  padding-top: 22px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.88rem;
  color: var(--muted);
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Legal Reading Layout (Borderless Editorial Parity for Terms & Privacy) */
.legal-masthead {
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--hairline);
}

.legal-eyebrow {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 8px;
}

.legal-masthead h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.legal-lead {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
  font-size: 1rem;
}

.legal-meta-grid {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.legal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.legal-meta-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--subtle);
}

.legal-meta-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

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

.tldr-item {
  border-left: 2px solid var(--accent-strong);
  padding-left: 16px;
}

.tldr-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.96rem;
  color: var(--ink);
}

.tldr-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.58;
}

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

.legal-toc {
  position: sticky;
  top: var(--sticky-offset);
  padding-top: 4px;
}

.legal-toc-title {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--subtle);
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 44px;
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--muted);
  transition: background-color 140ms ease, color 140ms ease;
}

.toc-list a:hover {
  background: var(--band-blush);
  color: var(--accent-strong);
}

.toc-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-strong);
  flex-shrink: 0;
}

.toc-switch {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 700;
}

.legal-article {
  min-width: 0;
}

.legal-section {
  scroll-margin-top: var(--sticky-offset);
}

.legal-section + .legal-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.legal-section-num {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.legal-section h2 {
  margin: 0 0 12px;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.32;
  text-wrap: balance;
  color: var(--ink);
}

.legal-section h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.legal-section p,
.legal-section li {
  max-width: 72ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.72;
}

.legal-section p {
  margin: 0 0 12px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-list {
  margin: 8px 0 14px;
  padding-left: 20px;
}

.legal-list li + li {
  margin-top: 8px;
}

.legal-section strong {
  color: var(--ink);
}

.legal-section code {
  font-size: 0.85em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--band-blush);
  color: var(--ink);
}

.callout-box {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-strong);
  background: var(--band-blush);
}

.callout-box.callout-warn {
  background: var(--warn-bg);
  border-left-color: var(--warn-ink);
}

.callout-box.callout-ok {
  background: var(--ok-bg);
  border-left-color: var(--ok-ink);
}

.callout-title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.callout-warn .callout-title {
  color: var(--warn-ink);
}

.callout-ok .callout-title {
  color: var(--ok-ink);
}

.callout-box p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink);
}

.tufte-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
}

.tufte-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  font-size: 0.88rem;
}

.tufte-table th {
  text-align: left;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline-strong);
  white-space: nowrap;
}

.tufte-table td {
  padding: 10px 12px;
  vertical-align: top;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  line-height: 1.55;
}

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

.tufte-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 700;
}

/* Responsive Breakpoints: Desktop -> iPad (1024 / 768) -> Mobile (390) */
@media (max-width: 1060px) {
  .topbar-inner {
    gap: 10px;
  }

  .nav-link {
    padding: 6px 8px;
    font-size: 0.83rem;
  }

  .topbar-cta {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

@media (max-width: 959px) {
  :root {
    --sticky-offset: 122px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    gap: 4px 12px;
    min-height: 0;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .topbar-nav {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 899px) {
  .hero-grid,
  .discord-funnel-grid,
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    padding-top: 28px;
  }

  .legal-toc {
    position: static;
  }

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

@media (max-width: 768px) {
  .spec-strip,
  .showcase-points,
  .pricing-columns,
  .steps-grid,
  .tldr-grid,
  .legal-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn {
    white-space: normal;
    text-align: center;
  }

  .cta-row .btn {
    width: 100%;
  }

  .blossom-accent {
    width: min(175px, 44%);
    top: -4px;
    right: -4px;
  }

  .mascot-img {
    max-width: 280px;
  }
}

@media (max-width: 639px) {
  :root {
    --sticky-offset: 164px;
  }

  .wrap {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .topbar-inner {
    padding-top: 4px;
    padding-bottom: 4px;
    gap: 2px;
  }

  .brand {
    max-width: 100%;
    flex-wrap: wrap;
    font-size: 0.92rem;
  }

  .topbar-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
  }

  .topbar-nav {
    order: 2;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    gap: 2px;
  }

  .nav-link {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 6px 4px;
    font-size: 0.75rem;
  }

  .topbar-cta {
    order: 1;
    width: 100%;
  }
}

@media (max-width: 359px) {
  :root {
    --sticky-offset: 204px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }

  .skip-link,
  .topbar-actions,
  .legal-toc,
  .footer-links,
  .notice-banner,
  .mascot-switcher,
  .os-tabs {
    display: none !important;
  }

  .os-panel[hidden] {
    display: block !important;
  }

  .band,
  .band-blush,
  .band-paper {
    background: #ffffff;
  }

  .legal-layout {
    display: block;
  }
}
