/* Gymcade marketing page — tokens aligned with Gymcade iOS Settings palette (dark) */

/* nothing-design tokens: dark = OLED + instrument; light = warm paper + ink (references/tokens.md) */
html[data-theme="dark"] {
  --bg: #000000;
  /* Slightly lifted band — readable separation without leaving “pure black” language */
  --bg-band: #0b0b0b;
  --surface: #111111;
  --surface-raised: #1a1a1a;
  --text: #e8e8e8;
  --text-secondary: #999999;
  --border: #222222;
  --border-visible: #333333;
  --accent: #a0130c;
  --success: rgb(74, 158, 92);
  --font-display: "Doto", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --ease-nothing: cubic-bezier(0.25, 0.1, 0.25, 1);
  --phone-frame-border-hover: #404040;
  --phone-screen-border-hover: rgba(255, 255, 255, 0.14);
  --character-border-hover: #4d4d4d;
}

html[data-theme="light"] {
  /* Warm off-white “stock” — premium print / manual, not cold gray */
  --bg: #f2f1ef;
  --bg-band: #fcfcfb;
  --surface: #ffffff;
  --surface-raised: #ebeae8;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --border: #e8e8e8;
  --border-visible: #cccccc;
  --accent: #a0130c;
  --success: rgb(74, 158, 92);
  --font-display: "Doto", system-ui, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --ease-nothing: cubic-bezier(0.25, 0.1, 0.25, 1);
  --phone-frame-border-hover: #b0b0b0;
  --phone-screen-border-hover: rgba(0, 0, 0, 0.14);
  --character-border-hover: #aaaaaa;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/*
 * Canvas layers (ambient + structure — not UI chrome):
 * fixed attachment keeps the field stable while scrolling (instrument / drafting table).
 */
html[data-theme="dark"] body {
  background-image: radial-gradient(ellipse 110% 55% at 50% 0%, rgba(255, 255, 255, 0.055) 0%, transparent 52%),
    radial-gradient(ellipse 90% 45% at 50% 100%, rgba(0, 0, 0, 0.28) 0%, transparent 55%),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  background-position: center top, center bottom, -1px -1px, -1px -1px;
  background-attachment: fixed, fixed, fixed, fixed;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}

html[data-theme="light"] body {
  background-image: radial-gradient(ellipse 140% 75% at 50% -12%, rgba(255, 255, 255, 0.28) 0%, transparent 52%),
    linear-gradient(rgba(0, 0, 0, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.028) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  background-position: center top, -1px -1px, -1px -1px;
  background-attachment: fixed, fixed, fixed;
  background-repeat: no-repeat, repeat, repeat;
}

/* Full-width flex column; children use max-width + margin auto to center */
.page {
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.032;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

html[data-theme="light"] .noise {
  opacity: 0.022;
  mix-blend-mode: multiply;
}

.header,
.section,
.footer {
  position: relative;
  z-index: 1;
  width: 100%;
}

.header {
  box-sizing: border-box;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.25rem, 5vw, 3rem) 3rem;
  max-width: 720px;
  margin-inline: auto;
}

.header-main {
  min-width: 0;
}

@media (min-width: 900px) {
  .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    align-items: start;
    column-gap: clamp(2rem, 5vw, 3.75rem);
    max-width: min(1040px, 100%);
  }

  .header-review {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    border-left: 1px solid var(--border);
    padding-left: clamp(1.5rem, 3vw, 2.5rem);
    margin-left: 0;
    align-self: stretch;
  }
}

.header-logo {
  display: block;
  width: clamp(72px, 18vw, 112px);
  height: auto;
  margin: 0 0 1.25rem;
}

.meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.hero-title {
  margin: 0.35rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 10vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 36em;
  color: var(--text-secondary);
  font-size: 1rem;
}

.hero-how {
  margin: -0.5rem 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.5rem;
}

.hero-store-google {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary:hover {
  filter: brightness(1.08);
}

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

.btn-secondary:hover {
  border-color: var(--text);
}

.store-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.store-link:hover {
  transform: translateY(-1px);
}

.store-link__badge {
  display: block;
  height: 3.25rem;
  width: auto;
}

html[data-theme="light"] .store-link__badge {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.hero-hint {
  display: block;
  max-width: 12.5rem;
  line-height: 1.35;
}

.section {
  box-sizing: border-box;
  padding: 2rem clamp(1.25rem, 5vw, 3rem) 4rem;
  border-top: 1px solid var(--border);
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
}

/* Full-bleed bands: odd sections = raised surface, even = base (index: phones, features / characters alternates) */
main.page > section:nth-of-type(odd) {
  background: var(--bg-band);
}

main.page > section:nth-of-type(even) {
  background: var(--bg);
}

.section--tight {
  padding-top: 3rem;
}

.section-label {
  margin: 0 0 2rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  width: 100%;
  max-width: 1200px;
}

.section--tight .section-label {
  max-width: 640px;
}

/* Header — App Store review (Nothing: type + spacing, no card / no gold chrome) */
.header-review {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--border);
  max-width: 36em;
}

.header-review__kicker {
  margin: 0 0 0.65rem;
}

/* Same voice as `.lede` — one calm sentence: stars + rating + store */
.header-review__lede {
  margin: 0 0 1.25rem;
  max-width: 36em;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.header-review__star-run {
  font-family: var(--font-mono);
  font-size: 1em;
  letter-spacing: 0.06em;
  margin-right: 0.4em;
  color: var(--text);
}

.header-review__rating-line {
  font-family: var(--font-body);
}

.header-review__score {
  font-weight: 500;
  color: var(--text);
}

.header-review__copy {
  margin: 0 0 1.25rem;
  max-width: 34em;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.phones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  justify-items: center;
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
}

.phone-block {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 280px;
}

/* Device frame — ratio ~ 9 : 19.5 */
.phone {
  width: 100%;
  max-width: 260px;
}

.phone-frame {
  position: relative;
  padding: 10px;
  border-radius: 36px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 200ms var(--ease-nothing);
}

.phone-screen {
  position: relative;
  aspect-ratio: 9 / 19.2;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a0a0a;
  transition: border-color 200ms var(--ease-nothing);
}

.phone-shot {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Screenshots: border only (same idea as character cards — no image/caption shift) */
.phone-block:hover .phone-frame {
  border-color: var(--phone-frame-border-hover);
}

.phone-block:hover .phone-screen {
  border-color: var(--phone-screen-border-hover);
}

/* Paired screenshots: dark vs light app chrome */
html[data-theme="light"] .phone-shot--dark,
html[data-theme="dark"] .phone-shot--light {
  display: none;
}

.caption {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.caption-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.section--characters .section-label {
  margin-bottom: 1.5rem;
}

.characters-intro {
  width: 100%;
  max-width: 720px;
  margin: 0 0 2.5rem;
}

.characters-intro p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.characters-intro p:last-child {
  margin-bottom: 0;
}

.characters-intro strong {
  color: var(--text);
  font-weight: 500;
}

.character-view-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  width: 100%;
  max-width: 720px;
  margin: 0 0 0.5rem;
}

.character-view-toolbar__label {
  letter-spacing: 0.12em;
}

.character-view-disclaimer {
  width: 100%;
  max-width: 720px;
  margin: 0 0 1.75rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.character-view-segmented {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

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

.character-view-input:focus {
  outline: none;
}

.character-view-input:focus-visible + .character-view-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 1;
}

.character-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.character-view-btn:hover {
  color: var(--text);
}

.section--characters:has(#character-art-guy:checked) .character-view-btn[for="character-art-guy"],
.section--characters:has(#character-art-gal:checked) .character-view-btn[for="character-art-gal"] {
  background: var(--accent);
  color: #ffffff;
}

/* Toggle portraits; without :has(), GAL art stays hidden (GUY-only fallback). */
.character-shot--gal {
  display: none;
}

@supports selector(:has(*)) {
  .character-shot--gal {
    display: block;
  }

  .section--characters:has(#character-art-guy:checked) .character-shot--gal {
    display: none;
  }

  .section--characters:has(#character-art-gal:checked) .character-shot--guy {
    display: none;
  }
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.character-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 200ms var(--ease-nothing);
}

.character-card:hover {
  border-color: var(--character-border-hover);
}

.character-card__visual {
  position: relative;
  aspect-ratio: 1;
  background: radial-gradient(ellipse at 50% 30%, #1f1f1f 0%, #0a0a0a 65%);
}

/* Single accent interrupt on hover (nothing-design: color as signal) */
.character-card__visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 200ms var(--ease-nothing);
  pointer-events: none;
}

.character-card:hover .character-card__visual::after {
  opacity: 1;
}

.character-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.96;
  transition: opacity 200ms var(--ease-nothing);
}

.character-card:hover .character-shot {
  opacity: 1;
}

.character-card__body {
  padding: 1.1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.character-card__title {
  margin: 0;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.3;
}

.character-card__lv {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-left: 0.35rem;
}

.character-card__desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.character-card__argot {
  margin: 0.35rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.features li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.features li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.features .meta {
  grid-row: span 2;
  align-self: start;
  padding-top: 0.15rem;
  color: var(--accent);
}

.features strong {
  font-weight: 500;
  font-size: 1rem;
  grid-column: 2;
}

.feat-desc {
  grid-column: 2;
  color: var(--text-secondary);
  font-size: 14px;
}

.footer {
  box-sizing: border-box;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 2.5rem max(clamp(1.25rem, 5vw, 3rem), calc((100vw - 1200px) / 2)) 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem 1.5rem;
}

.footer-credits {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
  justify-self: start;
  max-width: min(100%, 22rem);
}

.footer-byline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--text-secondary);
}

.footer-link--company {
  text-transform: none;
  letter-spacing: 0.03em;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
}

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

.footer-social,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.footer-social {
  justify-self: center;
  justify-content: center;
}

.footer-nav {
  justify-self: end;
  justify-content: flex-end;
}

/* Lucide-style monoline icons — stroke 1.5px, inherits footer link color */
.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-social-icon {
  flex-shrink: 0;
  display: block;
}

/* Legal pages (privacy, terms) — same max width as .section / .footer on the home page */
.legal-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.25rem, 5vw, 3rem) 4rem;
}

.legal-content {
  box-sizing: border-box;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
}

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

.legal-page-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.legal-updated {
  display: block;
  margin: 0 0 2rem;
}

.legal-prose {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.legal-prose h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.legal-prose h2:first-of-type {
  margin-top: 0;
}

.legal-prose p {
  margin: 0 0 1rem;
}

.legal-prose ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.legal-prose li {
  margin-bottom: 0.35rem;
}

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

.legal-prose a:hover {
  filter: brightness(1.1);
}

.legal-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  /* Allow .footer width: 100vw + bleed; max-width: 100% was shrinking the bar inside padded main */
  max-width: none;
}

html[data-theme="light"] .phone-frame {
  background: linear-gradient(145deg, #fafafa 0%, #eaeaea 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 200ms var(--ease-nothing);
}

html[data-theme="light"] .phone-screen {
  background: #f0f0f0;
  border-color: rgba(0, 0, 0, 0.08);
  transition: border-color 200ms var(--ease-nothing);
}

html[data-theme="light"] .character-card__visual {
  background: radial-gradient(ellipse at 50% 30%, #f0f0f0 0%, #e2e2e2 65%);
}

/* Theme toggle (fixed; site defaults to dark via data-theme + localStorage) */
.theme-switch {
  position: fixed;
  top: 1rem;
  right: clamp(0.75rem, 3vw, 1.25rem);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
}

.theme-switch__label {
  letter-spacing: 0.1em;
}

.theme-segmented {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface);
}

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

.theme-input:focus {
  outline: none;
}

.theme-input:focus-visible + .theme-btn {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  z-index: 1;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

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

html[data-theme="dark"] .theme-btn[for="theme-dark"],
html[data-theme="light"] .theme-btn[for="theme-light"] {
  background: var(--accent);
  color: #ffffff;
}

@media (max-width: 720px) {
  .footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-credits {
    justify-self: center;
    align-items: center;
    max-width: none;
  }

  .footer-nav {
    justify-self: center;
    justify-content: center;
  }
}

/* How it works (how-it-works.html) */
.hiw-page .hiw-content {
  max-width: 720px;
}

.hiw-kicker {
  margin: 0 0 0.5rem;
}

.hiw-title {
  margin-bottom: 0.35rem;
}

.hiw-lede {
  margin: 0 0 1.5rem;
  max-width: 40em;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.hiw-lede strong {
  color: var(--text);
  font-weight: 500;
}

.hiw-toc {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-visible);
  border-radius: 12px;
  background: var(--surface);
}

.hiw-toc__label {
  display: block;
  margin-bottom: 0.65rem;
}

.hiw-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.hiw-toc__list a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.hiw-toc__list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hiw-shot {
  margin: 0 0 2.5rem;
}

.hiw-phone {
  max-width: 220px;
  margin-inline: auto;
}

.hiw-shot-caption {
  margin-top: 1rem;
}

/* Home gamification strip — mirrors iOS `gamificationStripContent` (Space Mono 10/11, 5px dots, 6px bar, 16px H-padding) */
.hiw-strip-figure {
  margin: 1.25rem 0 2.25rem;
}

.hiw-strip-sample {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  background: var(--bg);
  border: 1px solid var(--border-visible);
  border-radius: 10px;
  overflow: hidden;
}

.hiw-strip-sample__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 min(1.5rem, 4vw);
  padding: 10px 16px 8px;
}

.hiw-strip-sample__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hiw-strip-sample__streak-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.hiw-strip-sample__streak-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.065em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.hiw-strip-sample__streak-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}

.hiw-strip-sample__dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hiw-strip-sample__dot {
  box-sizing: border-box;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid var(--border-visible);
  flex-shrink: 0;
}

.hiw-strip-sample__dot--on {
  background: var(--text);
  border-color: var(--text);
}

.hiw-strip-sample__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.hiw-strip-sample__lv {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text);
  flex-shrink: 0;
}

.hiw-strip-sample__bar {
  position: relative;
  flex: 1;
  min-width: 36px;
  height: 6px;
  border-radius: 999px;
  background: var(--border-visible);
  overflow: hidden;
}

.hiw-strip-sample__bar-fill {
  display: block;
  height: 100%;
  width: max(4px, 23.77%);
  border-radius: 999px;
  background: var(--accent);
}

.hiw-strip-sample__xpcol {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  min-width: 0;
}

.hiw-strip-sample__xptotal {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.035em;
  color: var(--text);
  white-space: nowrap;
}

.hiw-strip-sample__xpfrac {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.hiw-strip-figure-caption {
  margin-top: 0.75rem;
  text-align: center;
}

@media (max-width: 380px) {
  .hiw-strip-sample__row {
    padding-inline: 12px;
    gap: 0 12px;
  }

  .hiw-strip-sample__lv {
    font-size: 10px;
  }

  .hiw-strip-sample__xptotal {
    font-size: 10px;
    letter-spacing: 0.02em;
  }

  .hiw-strip-sample__xpfrac {
    font-size: 9px;
  }
}

.hiw-prose {
  margin-top: 0.5rem;
}

.hiw-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--border-visible);
  border-radius: 10px;
  background: var(--surface);
}

.hiw-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text-secondary);
}

.hiw-table th,
.hiw-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.hiw-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-band);
}

.hiw-table td:last-child {
  font-variant-numeric: tabular-nums;
}

.hiw-table tbody tr:last-child th,
.hiw-table tbody tr:last-child td {
  border-bottom: none;
}

.hiw-week-demo {
  margin: 1.25rem 0 2rem;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border-visible);
  border-radius: 10px;
  background: var(--bg-band);
}

.hiw-week-dots {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.hiw-week-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border-visible);
  flex-shrink: 0;
}

.hiw-week-dot--on {
  background: var(--text);
  border-color: var(--text);
}

.hiw-week-caption {
  display: block;
  margin: 0;
  text-align: center;
}

.hiw-footnote {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.hiw-inline-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.hiw-inline-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

  html[data-theme="dark"] body,
  html[data-theme="light"] body {
    background-attachment: scroll;
  }

  .phone-frame,
  .phone-screen,
  .character-card,
  .character-card__visual::after,
  .character-shot {
    transition: none;
  }

  .character-shot {
    opacity: 1;
  }

  .character-card__visual::after {
    opacity: 0;
  }
}
