/* Hallmark · macrostructure: Masthead · genre: editorial · theme: custom (fox sage/rust)
 * nav: N9 · footer: Ft5 · slop: pass (42–45)
 * contrast: pass (40–41) · honest: pass (46) · chrome: pass (47) · tokens: pass (48)
 * responsive: pass (49) · mobile: pass (34, 49, 50–57) · icons: pass (30)
 * Hallmark · pre-emit critique: P5 H4 E4 S5 R4 V5
 *
 * TubeLingua landing — study-desk editorial, not Apple product-page clone.
 * Proof stays real shots. Copy stays pain-first.
 */

:root {
  --color-paper: oklch(0.955 0.018 95);
  --color-paper-2: oklch(0.93 0.022 98);
  --color-paper-3: oklch(0.9 0.028 102);
  --color-ink: oklch(0.22 0.032 68);
  --color-muted: oklch(0.42 0.024 72);
  --color-line: oklch(0.22 0.032 68 / 0.16);
  --color-accent: oklch(0.5 0.155 44);
  --color-accent-strong: oklch(0.42 0.155 44);
  --color-accent-hover: oklch(0.44 0.155 44);
  --color-accent-ink: oklch(0.98 0.012 95);
  --color-sage: oklch(0.42 0.055 132);
  --color-sage-ink: oklch(0.96 0.02 95);
  --color-sage-muted: oklch(0.86 0.028 100);
  --color-sage-line: oklch(0.96 0.02 95 / 0.16);
  --color-sage-kbd: oklch(0.96 0.02 95 / 0.12);
  --color-inset-ring: oklch(0.98 0.01 95 / 0.22);
  --color-focus: var(--color-accent);
  --color-shot: oklch(0.22 0.02 70);
  --font-display: "Fraunces", "Songti SC", "Noto Serif SC", serif;
  --font-body: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-outlier: "IBM Plex Mono", ui-monospace, monospace;
  --text-body: 1.125rem;
  --text-lede: 1.25rem;
  --text-display: clamp(2.25rem, 5.4vw, 3.5rem);
  --text-h2: clamp(1.85rem, 3.6vw, 2.75rem);
  --lh-display: 1.06;
  --lh-body: 1.5;
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs: 12px;
  --space-s: 16px;
  --space-m: 24px;
  --space-l: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 88px;
  --space-4xl: 120px;
  --measure: 68rem;
  --prose: 62ch;
  --radius: 4px;
  --z-sticky: 200;
  --z-sticky-nav: 300;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --banner-height: 56px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  margin: 0;
  overflow-x: clip;
  color: var(--color-ink);
  background: var(--color-paper);
  font: 400 var(--text-body)/var(--lh-body) var(--font-body);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
kbd {
  display: inline-block;
  min-width: 1.4em;
  padding: 0.12em 0.4em;
  border-radius: var(--radius);
  background: var(--color-paper-3);
  font: 500 0.82em/1.3 var(--font-outlier);
  text-align: center;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 80;
  padding: var(--space-2xs) var(--space-xs);
  background: var(--color-ink);
  color: var(--color-paper);
}
.skip:focus { left: var(--space-xs); top: var(--space-xs); }

/* —— N9 masthead: brand + one CTA, no SaaS link row, no white hairline —— */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-nav);
  height: var(--banner-height);
  background: var(--color-paper);
}
.nav-inner {
  max-width: var(--measure);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-m);
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
  min-width: 0;
}
.nav-brand img { border-radius: var(--radius); }
.nav-cta {
  margin-left: auto;
  white-space: nowrap;
}

/* —— buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-m);
  border: 0;
  border-radius: var(--radius);
  font: 600 1rem/1 var(--font-body);
  letter-spacing: -0.016em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-sm {
  min-height: 32px;
  padding: 0 var(--space-s);
  font-size: 0.8125rem;
}
.btn-fill {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}
.btn-fill:hover { background: var(--color-accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  padding-left: var(--space-2xs);
  padding-right: var(--space-2xs);
}
.btn-ghost:hover { color: var(--color-accent); }

/* —— hero / masthead statement —— */
.hero,
.chapter,
.more,
.faq,
.get,
.legal {
  scroll-margin-top: calc(var(--banner-height) + var(--space-s));
}
.hero {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-m) var(--space-3xl);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-l);
  align-items: start;
}
.hero-copy { min-width: 0; max-width: 36em; }
.hero-kicker {
  margin: 0 0 var(--space-s);
  font-family: var(--font-outlier);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  line-height: 1;
}
.hero h1 {
  margin: 0;
  max-width: 16em;
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 600;
  font-style: normal;
  font-optical-sizing: auto;
  letter-spacing: -0.03em;
  line-height: var(--lh-display);
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}
.hero-lede {
  margin: var(--space-s) 0 var(--space-l);
  max-width: var(--prose);
  font-size: var(--text-lede);
  color: var(--color-muted);
  text-wrap: pretty;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  flex-wrap: wrap;
}
.hero-art {
  margin: 0;
  min-width: 0;
}
.hero-art img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  background: var(--color-shot);
}

@media (max-width: 860px) {
  .hero { padding-top: var(--space-l); padding-bottom: var(--space-2xl); }
}

/* —— numbered chapters —— */
.chapter {
  padding: var(--space-3xl) var(--space-m);
  max-width: var(--measure);
  margin: 0 auto;
}
.chapter-wash {
  max-width: none;
  background: var(--color-paper-2);
}
.chapter-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-xl) var(--space-2xl);
  align-items: center;
  max-width: var(--measure);
  margin: 0 auto;
}
.chapter-copy { min-width: 0; max-width: var(--prose); }
.ch-num {
  margin: 0 0 var(--space-2xs);
  font-family: var(--font-outlier);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  line-height: 1;
}
.chapter h2,
.more-intro h2,
.faq h2,
.get h2,
.legal h1 {
  margin: 0 0 var(--space-s);
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}
.chapter-copy p,
.more-intro p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--color-muted);
  text-wrap: pretty;
}

@media (max-width: 860px) {
  .chapter-split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-l);
  }
}

.shot {
  margin: var(--space-xl) 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-shot);
  border: 1px solid var(--color-line);
  min-width: 0;
}
.shot img { width: 100%; }
.shot-wide { max-width: 100%; }
.shot-panel {
  margin-top: 0;
  max-width: 24rem;
  margin-left: auto;
  background: var(--color-paper-3);
}
.shot-stack {
  position: relative;
  overflow: visible;
  background: transparent;
  border: 0;
  padding-bottom: 2.75rem;
}
.shot-stack > img:first-child {
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  background: var(--color-shot);
}
.shot-stack > img.shot-inset {
  position: absolute;
  right: 3%;
  bottom: 0;
  width: min(38%, 280px);
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-inset-ring);
  box-shadow: 0 10px 28px oklch(0.22 0.032 68 / 0.2);
}

@media (max-width: 860px) {
  .shot-panel { margin: 0 auto; }
  .shot-stack { padding-bottom: 2.25rem; }
  .shot-stack > img.shot-inset { width: min(56%, 280px); }
}

.keys {
  list-style: none;
  margin: var(--space-l) 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-line);
}
.keys li {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-s) 0;
  border-bottom: 1px solid var(--color-line);
  line-height: 1;
}
.key-combo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
}
.keys li > span:last-child {
  margin-left: auto;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.more {
  margin: 0;
  padding: var(--space-3xl) var(--space-m);
  background: var(--color-paper);
}
.more-intro {
  max-width: var(--prose);
  margin: 0 auto var(--space-xl);
}
.more-intro,
.more-grid {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}
.more-grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid var(--color-line);
}
.more-grid li {
  padding: var(--space-l) var(--space-m) var(--space-l) 0;
  border-bottom: 1px solid var(--color-line);
  min-width: 0;
}
.more-grid li:nth-child(odd) { padding-right: var(--space-l); }
.more-grid h3 {
  margin: 0 0 var(--space-2xs);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}
.more-grid p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.47;
  color: var(--color-muted);
  text-wrap: pretty;
}
@media (max-width: 800px) {
  .more-grid { grid-template-columns: minmax(0, 1fr); }
  .more-grid li:nth-child(odd) { padding-right: 0; }
}

.faq {
  max-width: 42rem;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-m) var(--space-xl);
}
.faq h2 { max-width: 14em; margin-bottom: var(--space-l); }
.faq-list details { border-bottom: 1px solid var(--color-line); }
.faq-list details:first-child { border-top: 1px solid var(--color-line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-m) 0;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.016em;
  list-style: none;
  line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-mark {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.faq-mark::before,
.faq-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--color-ink);
  border-radius: 1px;
}
.faq-mark::before {
  width: 12px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}
.faq-mark::after {
  width: 1.5px;
  height: 12px;
  transform: translate(-50%, -50%);
}
.faq-list details[open] .faq-mark::after { opacity: 0; }
.faq-list p {
  margin: 0 0 var(--space-m);
  max-width: var(--prose);
  font-size: 1rem;
  color: var(--color-muted);
  text-wrap: pretty;
}

.get {
  margin: 0 var(--space-m) var(--space-4xl);
  padding: var(--space-3xl) var(--space-m);
  max-width: calc(var(--measure) - 2 * var(--space-m));
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  background: var(--color-sage);
  color: var(--color-sage-ink);
  border-radius: var(--radius);
}
.get h2,
.get > p,
.get .steps h3 { color: var(--color-sage-ink); }
.get > p { color: var(--color-sage-muted); }
.get-ling {
  width: 72px;
  height: auto;
  margin: 0 0 var(--space-m);
  border-radius: var(--radius);
}
.get h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.get > p {
  margin: 0 0 var(--space-l);
  max-width: var(--prose);
  font-size: 1.125rem;
}
.get .hero-cta { margin-bottom: var(--space-xl); }
.get .btn-ghost { color: var(--color-sage-ink); }
.get .btn-ghost:hover { color: var(--color-accent-ink); }
.get kbd {
  background: var(--color-sage-kbd);
  color: var(--color-sage-ink);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 36rem;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-s);
  padding: var(--space-s) 0;
  border-bottom: 1px solid var(--color-sage-line);
}
.steps li:first-child { border-top: 1px solid var(--color-sage-line); }
.step-n {
  flex: 0 0 1.5rem;
  font-family: var(--font-outlier);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.6rem;
  color: var(--color-sage-muted);
}
.steps h3 {
  margin: 0 0 var(--space-3xs);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.016em;
}
.steps p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-sage-muted);
  text-wrap: pretty;
}

.legal {
  max-width: 45rem;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-m) var(--space-3xl);
}
.legal-kicker {
  margin: 0 0 var(--space-2xs);
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.legal .lede {
  margin: 0 0 var(--space-xl);
  color: var(--color-muted);
  font-size: 1.0625rem;
  text-wrap: pretty;
}
.legal h2 {
  margin: var(--space-xl) 0 var(--space-xs);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-style: normal;
  letter-spacing: -0.02em;
}
.legal h3 {
  margin: var(--space-m) 0 var(--space-2xs);
  font-size: 1.0625rem;
}
.legal p,
.legal li {
  font-size: 1rem;
  line-height: 1.55;
  text-wrap: pretty;
}
.legal ul { padding-left: 1.2em; }
.legal li { margin: 0 0 var(--space-2xs); }
.legal code { font-family: var(--font-outlier); font-size: 0.85em; }
.legal .meta { color: var(--color-muted); font-size: 0.875rem; }
.legal hr {
  border: 0;
  border-top: 1px solid var(--color-line);
  margin: var(--space-xl) 0 var(--space-l);
}

/* —— Ft5: one strip, rust rule, no 4-col sitemap —— */
.foot {
  padding: var(--space-l) var(--space-m) var(--space-2xl);
  max-width: var(--measure);
  margin: 0 auto;
  border-top: 3px solid var(--color-accent);
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.foot-row {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  flex-wrap: wrap;
  margin-bottom: var(--space-s);
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}
.foot-brand img { border-radius: var(--radius); }
.foot-links {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-left: auto;
}
.foot-links a {
  color: var(--color-muted);
  text-decoration: none;
  white-space: nowrap;
}
.foot-links a:hover { color: var(--color-ink); }
.foot p { margin: 0 0 var(--space-2xs); }

.reveal.in { opacity: 1; transform: none; }

@media (hover: hover) and (pointer: fine) {
  .nav-brand:hover { color: var(--color-accent); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--color-paper); }
}
@media (prefers-contrast: more) {
  .btn-fill { background: var(--color-accent-strong); }
  .foot { border-top-width: 4px; }
}
