/* ------------------------------------------------------------------
   Nalmeok site

   Breakpoints (mobile-first):
     0–479      small phones, fold cover screens (280–344)
     480–767    large phones, fold inner portrait
     768–1023   tablets, fold landscape
     1024–1279  laptops: two-column hero, sticky section labels
     1280+      wide desktop; the container stops growing

   The page is built from rules, not boxes: sections are separated by
   hairlines, labels sit in a left rail on desktop, and the only filled
   block is the API-key band near the end.
   ------------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  /* Colour */
  --bg: #f8f3e9;
  --bg-elevated: #fffdf8;
  --paper-frame: #fffdf8;
  --ink: #1f1d1a;
  --muted: #6d6559;
  --line: rgba(31, 29, 26, 0.14);
  --line-strong: rgba(31, 29, 26, 0.28);
  --accent: #bf5a18;
  --accent-hover: #a84d10;
  --accent-contrast: #ffffff;
  --accent-tint: rgba(191, 90, 24, 0.1);
  --accent-tint-strong: rgba(191, 90, 24, 0.18);
  --accent-shadow: rgba(160, 74, 17, 0.22);
  --invert-bg: #1f1d1a;
  --invert-fg: #f8f3e9;
  --invert-accent: #f2a468;
  --focus: #2f6fa8;
  --shadow: 0 18px 50px rgba(64, 47, 26, 0.12), 0 2px 8px rgba(64, 47, 26, 0.06);

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard Variable", Pretendard, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-h3: clamp(1rem, 0.98rem + 0.12vw, 1.125rem);
  --text-h2: clamp(1.375rem, 1.25rem + 0.65vw, 1.75rem);
  --text-display: clamp(2.125rem, 1.2rem + 3.9vw, 4.25rem);
  --text-display-sm: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  --text-lede: clamp(1.0625rem, 1rem + 0.35vw, 1.1875rem);

  /* Space */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --page-max: 1200px;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --section-space: clamp(var(--space-7), 7vw, var(--space-9));
  --header-h: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171512;
    --bg-elevated: #211e19;
    --paper-frame: #26221d;
    --ink: #f4ede2;
    --muted: #b3a897;
    --line: rgba(244, 237, 226, 0.14);
    --line-strong: rgba(244, 237, 226, 0.28);
    --accent: #f09045;
    --accent-hover: #ffa55e;
    --accent-contrast: #1b1208;
    --accent-tint: rgba(240, 144, 69, 0.12);
    --accent-tint-strong: rgba(240, 144, 69, 0.2);
    --accent-shadow: rgba(0, 0, 0, 0.4);
    --invert-bg: #f4ede2;
    --invert-fg: #171512;
    --invert-accent: #8a4410;
    --focus: #9cc7f0;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #454039;
    --line: rgba(31, 29, 26, 0.36);
    --line-strong: rgba(31, 29, 26, 0.58);
  }
}

@media (prefers-color-scheme: dark) and (prefers-contrast: more) {
  :root {
    --muted: #d9d0c3;
    --line: rgba(244, 237, 226, 0.36);
    --line-strong: rgba(244, 237, 226, 0.58);
  }
}

/* Reset and base */

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

::selection {
  background: var(--accent-tint-strong);
}

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

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-3);
}

/* Language blocks (guide page) */

html[data-lang="ko"] [data-lang-block="en"],
html[data-lang="en"] [data-lang-block="ko"] {
  display: none !important;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* The homepage header starts transparent over the hero image and picks up
   the page background once the page scrolls. */
.site-header--hero:not(.is-scrolled):not(.is-open) {
  border-bottom-color: transparent;
  background: transparent;
  color: #f7f1e7;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header--hero:not(.is-scrolled):not(.is-open) .brand,
.site-header--hero:not(.is-scrolled):not(.is-open) .brand-name,
.site-header--hero:not(.is-scrolled):not(.is-open) .menu-toggle {
  color: #f7f1e7;
}

.site-header--hero:not(.is-scrolled):not(.is-open) .brand-latin,
.site-header--hero:not(.is-scrolled):not(.is-open) .header-nav > a {
  color: rgba(247, 241, 231, 0.72);
}

.site-header--hero:not(.is-scrolled):not(.is-open) .header-nav > a:hover {
  color: #f7f1e7;
}

.site-header--hero:not(.is-scrolled):not(.is-open) .lang-switch {
  border-color: rgba(247, 241, 231, 0.28);
  background: rgba(0, 0, 0, 0.18);
}

.site-header--hero:not(.is-scrolled):not(.is-open) .lang-switch button {
  color: rgba(247, 241, 231, 0.72);
}

.site-header--hero:not(.is-scrolled):not(.is-open) .lang-switch button[aria-pressed="true"] {
  background: #f7f1e7;
  color: #1f1d1a;
}

.site-header--hero:not(.is-scrolled):not(.is-open) .menu-toggle {
  border-color: rgba(247, 241, 231, 0.28);
}

.site-header--hero.is-open {
  border-bottom-color: var(--line);
  background: var(--bg);
  color: var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
}

.brand-name {
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-latin {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 550;
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.header-nav > a {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
}

.header-nav > a:hover,
.header-nav > a[aria-current="page"] {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
}

.lang-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* Buttons and links */

.button-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px var(--accent-shadow);
  transition: background-color 0.16s ease, transform 0.16s ease,
    box-shadow 0.16s ease;
}

.button-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.button-primary:active {
  transform: translateY(0);
}

.button-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.button-title {
  font-size: var(--text-md);
  line-height: 1.3;
}

.button-meta {
  font-size: var(--text-xs);
  font-weight: 600;
  opacity: 0.82;
}

.button-icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.text-underline {
  text-underline-offset: 3px;
}

/* Hero */

.hero {
  --hero-pad: clamp(var(--space-8), 9vw, var(--space-9));
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(540px, 72vh, 760px);
  padding-block: var(--hero-pad);
  overflow: hidden;
  background: #17130e;
  color: #f7f1e7;
}

.hero--under-header {
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + var(--hero-pad));
}

.hero-backdrop,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.hero-shade {
  background: linear-gradient(
      90deg,
      rgba(18, 15, 11, 0.94) 0%,
      rgba(18, 15, 11, 0.8) 42%,
      rgba(18, 15, 11, 0.28) 100%
    ),
    linear-gradient(0deg, rgba(18, 15, 11, 0.55) 0%, transparent 50%);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 640px;
}

.hero h1 {
  margin: 0 0 var(--space-5);
  color: #f7f1e7;
  font-size: var(--text-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-lede {
  max-width: 46ch;
  margin: 0 0 var(--space-6);
  color: rgba(247, 241, 231, 0.74);
  font-size: var(--text-lede);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

.release-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.hero .release-line,
.hero .release-line a {
  color: rgba(247, 241, 231, 0.66);
}

.hero .release-line a:hover,
.hero .version {
  color: #f7f1e7;
}

.release-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.version {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.release-sep {
  opacity: 0.5;
}

.release-line a {
  text-underline-offset: 2px;
}

.hero .button-primary {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

/* Section frame */

.section {
  border-top: 1px solid var(--line);
  padding-block: var(--section-space);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

.section-aside {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3);
}

.section-aside h2 {
  margin: 0;
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-body {
  min-width: 0;
}

.section-lede {
  max-width: 60ch;
  margin: 0 0 var(--space-5);
  color: var(--muted);
  font-size: var(--text-md);
}

/* Cost comparison band */

.value-band {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}

.value-inner {
  padding-block: clamp(var(--space-6), 5vw, var(--space-8));
}

.value-inner h2 {
  max-width: 24ch;
  margin: 0 0 var(--space-4);
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-wrap: initial;
}

.value-inner p {
  max-width: 62ch;
  margin: 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.7;
}

/* Steps */

.step-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
}

.step:first-child {
  padding-top: 0;
  border-top: 0;
}

.step-index {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-h3);
  font-weight: 750;
  letter-spacing: -0.01em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.75;
}

.step .step-link {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.step-link a {
  color: var(--accent);
  font-weight: 650;
  text-underline-offset: 3px;
}

.step-link-sep {
  margin: 0 var(--space-2);
  color: var(--muted);
}

/* Download list */

.platform-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid var(--line);
}

.platform-row:last-child {
  border-bottom: 1px solid var(--line);
}

.platform-identity h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-md);
  font-weight: 750;
  letter-spacing: -0.01em;
}

.platform-detail {
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.device-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

.device-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.platform-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--ink);
  text-decoration: none;
}

.platform-action::after {
  content: "";
  position: absolute;
  inset: 0;
}

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

.platform-file {
  font-size: var(--text-sm);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.platform-size {
  color: var(--muted);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
}

.platform-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color 0.16s ease, transform 0.16s ease;
}

.platform-row:hover .platform-file {
  color: var(--accent);
}

.platform-row:hover .platform-icon {
  color: var(--accent);
  transform: translateY(2px);
}

.platform-row:has(.platform-action:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.platform-row:has(.platform-action:focus-visible) .platform-action:focus-visible {
  outline: none;
}

.platform-row.is-unavailable {
  opacity: 0.6;
}

/* Install notes */

.notes-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.note {
  padding-block: var(--space-4);
  border-top: 1px solid var(--line);
}

.note:first-child {
  padding-top: 0;
  border-top: 0;
}

.note h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-h3);
  font-weight: 750;
  letter-spacing: -0.01em;
}

.note p {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.75;
}

/* Key band */

.key-band {
  background: var(--invert-bg);
  color: var(--invert-fg);
}

.key-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  padding-block: clamp(var(--space-7), 6vw, var(--space-9));
}

.key-band h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.key-band p {
  max-width: 60ch;
  margin: 0;
  color: inherit;
  font-size: var(--text-md);
  opacity: 0.72;
}

.key-link {
  align-self: start;
  display: inline-flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.16s ease;
}

.key-link:hover {
  background: var(--accent-hover);
}

.key-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.key-link-secondary {
  color: inherit;
  font-size: var(--text-sm);
  opacity: 0.72;
  text-underline-offset: 3px;
}

.key-link-secondary:hover {
  opacity: 1;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 750;
}

.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.footer-latin {
  color: var(--muted);
  font-weight: 550;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.footer-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

/* Guide article */

.article-page {
  padding-block: clamp(var(--space-6), 6vw, var(--space-8)) var(--section-space);
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

.article-grid.article-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.article-grid--single .article {
  width: 100%;
  margin-inline: auto;
}

.article-aside {
  display: none;
}

.article {
  max-width: 760px;
  min-width: 0;
}

.article-head h1 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-display-sm);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.article-lede {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lede);
  line-height: 1.75;
}

.article-note {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.guide-steps {
  margin: var(--space-7) 0 0;
  padding: 0;
  list-style: none;
}

.guide-step {
  padding-block: var(--space-6);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

.guide-step:first-child {
  padding-top: 0;
  border-top: 0;
}

.guide-step-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: baseline;
  margin-bottom: var(--space-3);
}

.guide-step-index {
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.guide-step h2 {
  margin: 0;
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.guide-step p {
  margin: 0 0 var(--space-4);
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.8;
}

.guide-step p:last-child {
  margin-bottom: 0;
}

.guide-step strong {
  color: var(--ink);
  font-weight: 700;
}

.guide-step code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-tint);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.guide-step a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.guide-figure {
  margin: var(--space-5) 0 0;
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.guide-figure figcaption {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-xs);
}

.guide-note {
  margin: var(--space-5) 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.75;
}

.guide-note strong {
  color: var(--ink);
}

.guide-faq {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.guide-faq h2 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-h2);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.guide-faq dl {
  margin: 0;
}

.guide-faq dt {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-size: var(--text-md);
  font-weight: 750;
}

.guide-faq dd {
  margin: var(--space-1) 0 var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.75;
}

.guide-links {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.guide-links h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-h3);
  font-weight: 750;
}

.guide-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.guide-links a {
  color: var(--muted);
  text-underline-offset: 3px;
}

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

.guide-cta {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  text-decoration: none;
}

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  color: var(--muted);
  font-size: var(--text-sm);
  text-decoration: none;
}

.back-link svg {
  width: 16px;
  height: 16px;
}

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

.guide-index {
  margin: var(--space-7) 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.guide-index li {
  border-top: 1px solid var(--line);
}

.guide-index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-5);
  text-decoration: none;
}

.guide-index a > span {
  min-width: 0;
}

.guide-index-title {
  display: block;
  font-size: var(--text-lg);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.guide-index-desc {
  display: block;
  margin-top: var(--space-1);
  color: var(--muted);
  font-size: var(--text-sm);
}

.guide-index svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color 0.16s ease, transform 0.16s ease;
}

.guide-index a:hover .guide-index-title {
  color: var(--accent);
}

.guide-index a:hover svg {
  color: var(--accent);
  transform: translateX(3px);
}

/* 404 */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 680px;
  min-height: 100vh;
  padding-block: var(--space-8);
}

.not-found img {
  margin-bottom: var(--space-6);
  border-radius: var(--radius-lg);
}

.not-found h1 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-display-sm);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.not-found .article-lede {
  margin-bottom: var(--space-6);
}

/* ---------------------------- Breakpoints ---------------------------- */

/* Large phones and fold inner portrait */
@media (min-width: 480px) {
  .hero-lede {
    max-width: 52ch;
  }
}

/* Tablets, fold landscape */
@media (min-width: 768px) {
  :root {
    --header-h: 68px;
  }

  .step-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .step {
    padding-block: 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--line-strong);
  }

  .step:first-child {
    padding-top: var(--space-4);
    border-top: 1px solid var(--line-strong);
  }

  .platform-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-6);
  }

  .platform-action {
    justify-content: flex-end;
    text-align: right;
  }

  .notes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
  }

  .note {
    padding-block: 0;
    padding-top: var(--space-4);
    border-top: 1px solid var(--line-strong);
  }

  .note:first-child {
    padding-top: var(--space-4);
    border-top: 1px solid var(--line-strong);
  }

  .key-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-7);
  }

  .key-link {
    align-self: center;
  }
}

/* Laptops: sticky section rails */
@media (min-width: 1024px) {
  .hero-copy {
    max-width: 620px;
  }

  .section-grid {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--space-7);
  }

  .section-aside {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--space-2);
    position: sticky;
    top: calc(var(--header-h) + var(--space-4));
    align-self: start;
  }

  .article-grid {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: var(--space-7);
  }

  .article-aside {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + var(--space-4));
    align-self: start;
  }

  .guide-step p {
    font-size: var(--text-md);
  }
}

/* Wide desktop */
@media (min-width: 1280px) {
  .section-grid {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: var(--space-8);
  }

  .article-grid {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: var(--space-8);
  }
}

/* Small phones and fold cover screens */
@media (max-width: 479px) {
  .brand-latin {
    display: none;
  }

  .button-primary {
    width: 100%;
    justify-content: space-between;
  }

  .button-meta {
    display: none !important;
  }

  .section-aside {
    gap: var(--space-2);
  }

  .platform-action {
    gap: var(--space-3);
  }
}

/* Tablets and fold landscape: the hero image becomes a vertical backdrop */
@media (max-width: 1023px) {
  .hero-backdrop img {
    object-position: 62% center;
  }

  .hero-shade {
    background: linear-gradient(
      180deg,
      rgba(18, 15, 11, 0.55) 0%,
      rgba(18, 15, 11, 0.88) 55%,
      rgba(18, 15, 11, 0.95) 100%
    );
  }

  .hero-copy {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: 560px;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .header-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 19;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2) var(--gutter) var(--space-5);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.08);
  }

  .site-header.is-open .header-nav {
    display: flex;
  }

  .header-nav > a {
    padding-block: var(--space-3);
    border-top: 1px solid var(--line);
    font-size: var(--text-base);
  }

  .header-nav > a:first-child {
    border-top: 0;
  }

  .header-nav .lang-switch {
    align-self: flex-start;
    margin-top: var(--space-4);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
