/* ==========================================================================
   MUUVR Help Center — production stylesheet
   Mobile-first. Breakpoints: 375 (base) / 768 / 1024 / 1440.
   Design tokens taken verbatim from the approved Claude Design reference.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  /* purple ramp */
  --purple-400: #8B78F8;
  --purple-500: #7059F1;
  --purple-600: #6A4FEE;
  --purple-700: #5B3FD9;
  --purple-800: #4F35C9;
  --purple-300: #C9BEF9;
  --purple-200: #DCD5FB;
  --purple-100: #F1EDFE;
  --purple-50:  #F4F1FE;

  /* accent + neutrals */
  --lime: #CCF945;
  --lime-hover: #DBFF6B;
  --ink: #1B1B1B;
  --text: #333333;
  --text-body: #393939;
  --muted: #828282;
  --muted-strong: #6E6E6E;      /* AA-safe variant of --muted for small text */
  --page: #F7F7F7;
  --border: #EDEDED;
  --border-strong: #E4E4E4;
  --border-button: #DBDBDB;
  --white: #ffffff;

  /* elevation — always violet-tinted, never neutral grey */
  --sh-card: 0 2px 10px rgba(40, 30, 90, 0.04);
  --sh-card-hover: 0 16px 36px rgba(40, 30, 90, 0.10);
  --sh-row-hover: 0 12px 30px rgba(40, 30, 90, 0.08);
  --sh-search: 0 18px 44px rgba(38, 22, 96, 0.22);
  --sh-button: 0 8px 24px rgba(40, 30, 90, 0.08);
  --sh-nav: 0 6px 24px rgba(40, 30, 90, 0.10);
  --sh-sheet: 0 -12px 40px rgba(40, 30, 90, 0.18);

  /* layout */
  --wrap: 1440px;
  --gutter: clamp(16px, 4vw, 24px);
  --gutter-l: max(var(--gutter), env(safe-area-inset-left));
  --gutter-r: max(var(--gutter), env(safe-area-inset-right));
  --section-gap: clamp(48px, 7vw, 80px);
  --ease: cubic-bezier(.22, .9, .24, 1);

  --font-display: "Anton", Impact, "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* keep anchored headings clear of the sticky header */
  scroll-padding-top: 84px;        /* clears the sticky "jump to question" bar */
}
@media (min-width: 1024px) { html { scroll-padding-top: 24px; } }

body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* `clip` rather than `hidden`: it prevents sideways scrolling without
     turning <body> into a scroll container, which would break position:sticky. */
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--lime); color: var(--ink); }

/* Long German compounds must never punch a hole through a card. */
p, li, h1, h2, h3, h4, dd, dt, figcaption {
  overflow-wrap: break-word;
  word-break: normal;
}
p, li, .lead, .card__desc, .row__summary {
  hyphens: auto;
  -webkit-hyphenate-limit-before: 4;
  -webkit-hyphenate-limit-after: 3;
  hyphenate-limit-chars: 8 4 3;
}
/* Display copy is set to balance, not to hyphenate — a broken word in a hero
   line reads as a bug, not as typography. */
.hero__title, .hero__sub, .cta__title, .cta__sub, .section__title,
.article__title, .qa__toggle, .chip, .card__title, .row__title,
.btn-primary, .cta__btn, .lang__item, .jump__btn { hyphens: none; }

/* ---------- focus ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--purple-600);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark :focus-visible, .hero :focus-visible, .cta :focus-visible {
  outline-color: var(--lime);
}
/* …but a menu or sheet opened from the hero renders on white, where lime is
   only 1.6:1. Put the ring back to brand purple inside those surfaces. */
.lang__menu :focus-visible, .sheet :focus-visible {
  outline-color: var(--purple-600);
}

.skip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--purple-600);
  color: #fff;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform .18s var(--ease);
}
.skip:focus-visible { transform: translateY(0); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- entrance motion ---------- */
@keyframes om-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes om-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes om-pop  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
/* the centred dialog keeps its own translate while it pops */
@keyframes modal-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }

.rise { animation: om-rise .7s var(--ease) both; animation-delay: var(--d, 0s); }
.fade { animation: om-fade .7s var(--ease) both; animation-delay: var(--d, 0s); }
.pop  { animation: om-pop  .8s var(--ease) both; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter-l) var(--gutter-r);
}

.shell { display: flex; flex-direction: column; align-items: center; }

/* ==========================================================================
   Top row — breadcrumb plus the language selector.
   There is no sticky header: the page starts with its own content.
   ========================================================================== */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  padding-top: env(safe-area-inset-top);
}
.topbar .crumbs { flex: 1 1 auto; min-width: 0; padding-top: 10px; }
.topbar .lang { flex: 0 0 auto; }

/* ==========================================================================
   Language selector — pill button + dropdown (desktop) / bottom sheet (mobile)
   ========================================================================== */
.lang { position: relative; }

.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-button);
  box-shadow: var(--sh-card);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.lang__btn svg { flex: 0 0 auto; }
.lang__chev { transition: transform .2s var(--ease); }
.lang__btn[aria-expanded="true"] .lang__chev { transform: rotate(180deg); }
.lang__btn[aria-expanded="true"] { border-color: var(--purple-600); color: var(--purple-800); }
@media (hover: hover) {
  .lang__btn:hover { border-color: var(--purple-600); color: var(--purple-800); box-shadow: var(--sh-button); }
}
.lang__btn:active { transform: scale(.97); }

.lang__code { letter-spacing: .04em; }

/* backdrop (mobile sheet only) */
/* One backdrop behind every overlay. `--ghost` is the invisible click-catcher
   the desktop language dropdown needs. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(27, 27, 27, .48);
  animation: fade-in .2s var(--ease) both;
}

[hidden] { display: none !important; }

.lang__menu {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: var(--sh-sheet);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  animation: sheet-up .28s var(--ease) both;
  max-height: 80vh;
  overflow-y: auto;
}
/* The drag handle shared by the bottom sheets. */
.grip {
  width: 44px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 6px auto 10px;
}
.lang__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-strong);
  padding: 6px 8px 10px;
}
.lang__list { display: flex; flex-direction: column; gap: 2px; }

.lang__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.lang__item:active { background: var(--purple-50); }
@media (hover: hover) { .lang__item:hover { background: var(--purple-50); color: var(--purple-800); } }
.lang__item[aria-current="true"] { color: var(--purple-800); font-weight: 600; background: var(--purple-50); }
.lang__item .tick { color: var(--purple-600); opacity: 0; }
.lang__item[aria-current="true"] .tick { opacity: 1; }
.lang__item--missing { color: var(--muted-strong); }
.lang__note { font-size: 13px; color: var(--muted-strong); font-weight: 400; }

@media (min-width: 768px) {
  .scrim--lang { background: transparent; }
  .lang__menu {
    position: absolute;
    inset: auto 0 auto auto;
    top: calc(100% + 10px);
    left: auto;
    bottom: auto;
    width: 268px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--sh-card-hover);
    padding: 10px;
    animation: om-pop .22s var(--ease) both;
  }
  .lang .grip { display: none; }
  .lang__item { min-height: 46px; font-size: 15px; }
  /* footer instance opens upward so it never falls off the page bottom */
  .lang--up .lang__menu { top: auto; bottom: calc(100% + 10px); }
}

/* ==========================================================================
   Language suggestion banner
   ========================================================================== */
.langbanner {
  width: 100%;
  background: var(--purple-100);
  border-bottom: 1px solid var(--purple-200);
}
.langbanner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding-block: 12px;
  font-size: 15px;
  color: var(--purple-800);
}
.langbanner__text { flex: 1 1 200px; min-width: 0; }
.langbanner__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--purple-600);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}
@media (hover: hover) { .langbanner__cta:hover { background: var(--purple-800); } }
.langbanner__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  color: var(--purple-800);
}
@media (hover: hover) { .langbanner__close:hover { background: var(--purple-200); } }

/* ==========================================================================
   Hero
   ========================================================================== */
.home {
  padding-top: max(32px, env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.hero {
  position: relative;
  /* `clip` with a margin lets the language dropdown hang outside the rounded
     card while the background image is still cropped to it. */
  overflow: clip;
  overflow-clip-margin: 320px;
  border-radius: clamp(20px, 3vw, 32px);
  background: var(--purple-600) url("../assets/hero-bg-sm.jpg") center / cover no-repeat;
  /* the top band is occupied by the logo and the language pill, so the eyebrow
     starts below both rather than colliding with them on narrow screens */
  padding: clamp(80px, 7vw, 88px) clamp(18px, 5vw, 64px) clamp(34px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
  color: #fff;
}
@media (min-width: 768px) { .hero { background-image: url("../assets/hero-bg.jpg"); } }

.hero__logo {
  position: absolute;
  top: clamp(20px, 3vw, 32px);
  left: clamp(16px, 3vw, 32px);
  height: clamp(32px, 4vw, 52px);
  width: auto;
  filter: brightness(0) invert(1);
}

.hero__lang {
  position: absolute;
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  z-index: 5;
}
/* On the hero the pill is translucent-on-purple rather than white-on-grey. */
.hero__lang .lang__btn {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .68);
  color: #fff;
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@media (hover: hover) {
  .hero__lang .lang__btn:hover { background: rgba(255, 255, 255, .28); border-color: #fff; color: #fff; }
}
.hero__lang .lang__btn[aria-expanded="true"] { background: #fff; border-color: #fff; color: var(--purple-800); }
/* the hero clips its decorative circles, so the dropdown is rendered by the
   fixed-position menu instead of overflowing the rounded card */
@media (min-width: 768px) {
  .hero__lang .lang__menu { right: 0; left: auto; }
}

.eyebrow {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  /* 0.92 rather than the reference's 0.78: on #6A4FEE that lifts this 12px
     label from 3.86:1 to 4.7:1, clearing AA for small text. */
  color: rgba(255, 255, 255, .92);
}

.hero__title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  /* 320px-safe: the German and French strings are the longest, so the floor is
     set by them, not by the English one. */
  font-size: clamp(30px, 9.2vw, 88px);
  line-height: .94;
  letter-spacing: .005em;
  color: var(--lime);
  text-align: center;
  text-wrap: balance;
  hyphens: none;
}
.hero__sub {
  position: relative;
  max-width: 560px;
  text-align: center;
  font-size: clamp(16px, 4vw, 19px);
  line-height: 1.5;
  color: rgba(255, 255, 255, .94);   /* 4.86:1 on #6A4FEE */
}

/* ---------- search ---------- */
.search {
  position: relative;
  width: 100%;
  max-width: 680px;
}
.search__field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 7px 7px 7px 16px;
  box-shadow: var(--sh-search);
}
@media (min-width: 768px) { .search__field { gap: 14px; padding: 8px 8px 8px 24px; } }

.search__icon { flex: 0 0 auto; color: var(--muted); }
.search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  /* 16px minimum keeps iOS Safari from zooming the viewport on focus */
  font-size: 16px;
  color: var(--text);
  padding: 13px 0;
  -webkit-appearance: none;
  appearance: none;
}
@media (min-width: 768px) { .search__input { font-size: 17px; } }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__input::placeholder { color: var(--muted-strong); }

.search__clear {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  color: var(--muted-strong);
}
.search.has-query .search__clear { display: flex; }
@media (hover: hover) { .search__clear:hover { background: var(--page); color: var(--text); } }

.search__submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;                      /* explicit: min-height alone resolved to
                                        the 42px line box inside this flex row */
  padding: 0 18px;
  border-radius: 999px;
  background: var(--purple-600);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s var(--ease);
}
@media (min-width: 768px) { .search__submit { height: 48px; padding: 0 26px; } }
@media (hover: hover) { .search__submit:hover { background: var(--purple-800); } }
.search__submit:active { background: var(--purple-800); }

/* On the narrowest phones the button drops under the field rather than
   squeezing the input below a usable width. */
@media (max-width: 359px) {
  .search__field { flex-wrap: wrap; border-radius: 26px; padding: 10px 12px; }
  .search__input { flex: 1 1 120px; }
  .search__submit { flex: 1 1 100%; margin-top: 8px; }
}

.chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  /* the control's own boundary needs 3:1 against the hero (WCAG 1.4.11) */
  border: 1px solid rgba(255, 255, 255, .68);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
@media (hover: hover) { .chip:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .7); } }
.chip:active { background: rgba(255, 255, 255, .3); }
.chip[aria-pressed="true"] { background: #fff; color: var(--purple-800); border-color: #fff; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 28px); }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section__title {
  font-size: clamp(24px, 5.2vw, 36px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--text);
}
.section__count { font-size: 15px; color: var(--muted-strong); }

/* ---------- topic grid: 1 / 2 / 3 columns ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: clamp(20px, 4vw, 28px);
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--sh-card);
  color: var(--text);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--sh-card-hover); border-color: var(--purple-200); }
}
.card:active { transform: translateY(0) scale(.99); border-color: var(--purple-200); }

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--lime);
  color: var(--ink);
}
.card__title { font-size: 19px; line-height: 1.3; font-weight: 600; color: var(--text); margin-top: 6px; }
.card__desc { flex: 1; font-size: 15px; line-height: 1.5; color: var(--muted-strong); }
.card__count {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--purple-600);
}

/* ---------- article rows ---------- */
.rows { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 1024px) { .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  min-width: 0;
  padding: clamp(18px, 3vw, 24px) clamp(18px, 3vw, 28px);
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
@media (hover: hover) { .row:hover { border-color: var(--purple-300); box-shadow: var(--sh-row-hover); } }
.row:active { border-color: var(--purple-300); transform: scale(.995); }

.row__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tag {
  align-self: flex-start;
  max-width: 100%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--purple-800);
  background: var(--purple-100);
  padding: 6px 12px;
  border-radius: 999px;
}
.row__title { font-size: 17px; font-weight: 600; line-height: 1.35; }
@media (min-width: 768px) { .row__title { font-size: 19px; } }
.row__summary { font-size: 15px; line-height: 1.5; color: var(--muted-strong); }

.row__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--page);
  color: var(--purple-600);
  transition: background .2s var(--ease), color .2s var(--ease);
}
@media (hover: hover) { .row:hover .row__arrow { background: var(--purple-100); } }

/* ---------- search results / empty state ---------- */
.results__meta { font-size: 15px; color: var(--muted-strong); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(24px, 5vw, 40px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
}
.empty__title { font-size: 19px; font-weight: 600; color: var(--text); }
.empty__text { font-size: 16px; line-height: 1.6; color: var(--muted-strong); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--purple-600);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
@media (hover: hover) { .btn-primary:hover { background: var(--purple-800); } }

/* ==========================================================================
   Topic page
   ========================================================================== */
.topic { padding-top: 10px; display: flex; flex-direction: column; gap: clamp(20px, 4vw, 48px); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted-strong);
}
.crumbs a { color: var(--purple-600); position: relative; }
/* The breadcrumb sits on a single 21px line by design. Rather than inflate the
   row, extend the hit area to 44px with a transparent overlay. */
.crumbs a::after { content: ""; position: absolute; inset: -12px -8px; border-radius: 8px; }
@media (hover: hover) { .crumbs a:hover { color: var(--purple-800); text-decoration: underline; } }
.crumbs__sep { color: var(--border-button); }
.crumbs__current { color: var(--text); }

.topic__cols {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 56px);
  align-items: flex-start;
}
@media (min-width: 1024px) { .topic__cols { flex-direction: row; flex-wrap: wrap; } }

.article {
  flex: 1 1 460px;
  min-width: 0;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 32px);
}

.article__title {
  font-size: clamp(26px, 6.4vw, 44px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: .005em;
  color: var(--ink);
  text-wrap: pretty;
}

.lead {
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.6;
  color: var(--text-body);
  padding: clamp(18px, 3vw, 24px) clamp(18px, 3vw, 28px);
  background: #fff;
  border-radius: 20px;
  border-left: 6px solid var(--lime);
}

/* ---------- Q&A blocks ---------- */
.qa-list { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 40px); }

.qa { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 84px; }
@media (min-width: 1024px) { .qa { scroll-margin-top: 24px; } }

.qa__h { margin: 0; }
.qa__toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  text-align: left;
  font-size: clamp(20px, 4.6vw, 28px);
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
  border-radius: 12px;
}
.qa__chev {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--purple-100);
  color: var(--purple-600);
  transition: transform .22s var(--ease);
}
.qa__body { display: flex; flex-direction: column; gap: 14px; }

/* Accordion mode is switched on by JS below 768px only. */
[data-accordion="on"] .qa {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  gap: 0;
}
[data-accordion="on"] .qa__chev { display: flex; }
[data-accordion="on"] .qa__toggle { min-height: 44px; align-items: center; }
[data-accordion="on"] .qa[data-open="true"] .qa__chev { transform: rotate(180deg); }
[data-accordion="on"] .qa__body { padding-top: 16px; }
[data-accordion="on"] .qa[data-open="false"] .qa__body { display: none; }
[data-accordion="on"] .qa-list { gap: 12px; }

.article p { font-size: clamp(16px, 4.2vw, 18px); line-height: 1.65; color: var(--text-body); }
.article h3 { font-size: clamp(17px, 4.4vw, 19px); line-height: 1.35; font-weight: 600; color: var(--ink); margin-top: 8px; }
.article ul, .article ol { display: flex; flex-direction: column; gap: 8px; padding-left: 22px; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { font-size: clamp(16px, 4.2vw, 18px); line-height: 1.6; color: var(--text-body); padding-left: 2px; }
.article li::marker { color: var(--purple-600); }
.article strong { font-weight: 600; color: var(--ink); }

.pill-open {
  display: inline;
  background: var(--purple-100);
  color: var(--purple-800);
  font-size: .82em;
  font-family: var(--font-mono);
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
  cursor: help;
  border-bottom: 1px dotted var(--purple-800);
}

/* ==========================================================================
   Device pop-up — bottom sheet on phones, centred dialog on desktop
   ========================================================================== */
.modal {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: var(--sh-sheet);
  padding: 8px clamp(16px, 4vw, 24px) calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up .28s var(--ease) both;
  max-height: 86vh;
  max-height: 86dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}
.modal__title {
  font-size: clamp(19px, 4.6vw, 22px);
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  hyphens: none;
}
.modal__hint {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted-strong);
}
.modal .iconbtn { margin: -4px -6px 0 0; }
.modal .modal__grid { margin-top: 12px; }
/* inside the sheet the cards sit on white, so they read as outlined tiles */
.modal .device { box-shadow: none; background: var(--page); border-color: transparent; }
@media (hover: hover) {
  .modal .device:hover { background: #fff; border-color: var(--purple-200); box-shadow: var(--sh-card); }
}

/* Short viewports — a landscape phone, or an old 320x568 screen. Tighten the
   pop-up so all six devices still arrive without a scroll. Keyed on height
   alone, so it catches the centred dialog on a landscape phone too. */
@media (max-height: 620px) {
  .modal {
    padding-top: 4px;
    gap: 0;
    max-height: 92vh;
    max-height: 92dvh;
  }
  .modal .grip { margin: 4px auto 8px; }
  .modal__title { font-size: 18px; }
  .modal__hint { margin-top: 2px; font-size: 14px; }
  .modal .modal__grid { margin-top: 8px; gap: 8px; }
  .modal .device { padding: 9px 14px; gap: 4px; }
  .modal .device__name { font-size: 15px; }
  .modal .device__tag { font-size: 13px; }
}
@media (max-height: 520px) and (min-width: 560px) {
  /* landscape: there is width to spare, so trade a column for the height */
  .modal .modal__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-height: 400px) {
  /* a landscape phone: the title carries the question on its own */
  .modal__hint { display: none; }
}

@media (min-width: 768px) {
  .modal {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(640px, calc(100vw - 48px));
    transform: translate(-50%, -50%);
    border-radius: 28px;
    padding: 28px;
    animation: modal-pop .24s var(--ease) both;
    max-height: min(86vh, 760px);
  }
  @media (max-height: 620px) {
    .modal { padding: 16px 20px; max-height: 92vh; max-height: 92dvh; }
  }
  .modal .grip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal { animation: none; }
}

/* ---------- device chooser page ---------- */
/* Title, one line of description, devices. Nothing competes with the choice. */
.topic--picker { gap: clamp(20px, 4vw, 32px); }
.chooser {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* keeps the two-column grid near a topic card's natural width instead of
     stretching two cards across the whole 1440 wrapper */
  max-width: 780px;
  padding-top: clamp(4px, 2vw, 16px);
}
.chooser__lead {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--muted-strong);
  max-width: 60ch;
  margin-bottom: clamp(8px, 2vw, 16px);
}
.picker__grid {
  /* two per row at every width — the cards are short enough to stay legible
     side by side even at 320px */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
@media (min-width: 560px) { .picker__grid { gap: 16px; } }
@media (min-width: 768px) { .picker__grid { gap: 20px; } }

.picker--focus { margin-top: 0; gap: 8px; }
.picker--focus .picker__title { font-size: clamp(19px, 4.6vw, 24px); }
.picker--focus .picker__grid { margin-top: 16px; }

/* Same card as the topic grid on the home page: white, radius 24, lime icon
   tile, title, muted description — stacked, and lifting on hover. */
.device {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: clamp(14px, 3.5vw, 20px) clamp(14px, 4vw, 22px);
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--sh-card);
  color: var(--text);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
@media (min-width: 560px) { .device { gap: 8px; } }
@media (hover: hover) {
  .device:hover { transform: translateY(-3px); box-shadow: var(--sh-card-hover); border-color: var(--purple-200); }
}
.device:active { transform: translateY(0) scale(.99); border-color: var(--purple-200); }

.device__name {
  font-size: clamp(16px, 4.4vw, 19px);
  line-height: 1.3;
  font-weight: 600;
  color: var(--text);
  hyphens: none;
}
.device__tag {
  flex: 1;
  font-size: clamp(14px, 3.8vw, 15px);
  line-height: 1.5;
  color: var(--muted-strong);
}


/* ---------- device guide page ---------- */
.article__title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.article__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--lime);
  color: var(--ink);
}

.backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  padding: 0 18px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-button);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.backlink__arrow { display: inline-flex; transform: rotate(180deg); color: var(--purple-600); }
@media (hover: hover) { .backlink:hover { border-color: var(--purple-600); color: var(--purple-800); box-shadow: var(--sh-button); } }
.backlink:active { border-color: var(--purple-600); color: var(--purple-800); }

/* ---------- media slot ---------- */
.media { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.media__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  background: var(--purple-100);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.media__label {
  font-size: 14px;
  line-height: 1.45;
  color: var(--purple-800);
  text-align: center;
  max-width: 34ch;
}
.media__badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--purple-600);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  pointer-events: none;
}
.media__caption { font-size: 14px; line-height: 1.5; color: var(--muted-strong); }

/* ---------- untranslated notice ---------- */
.untranslated {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 16px;
  background: #FFF7E3;
  border: 1px solid #F2E0B0;
  color: #6B4E09;
}
.untranslated__icon { flex: 0 0 auto; margin-top: 2px; }
.untranslated__title { font-weight: 600; font-size: 15px; }
.untranslated__text { font-size: 15px; line-height: 1.5; }
.untranslated + * { opacity: .92; }

/* ---------- helpful ---------- */
.helpful {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(20px, 4vw, 28px);
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
}
.helpful__q { font-size: 17px; font-weight: 600; color: var(--text); }
.helpful__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.helpful__btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border-button);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
@media (hover: hover) { .helpful__btn:hover { border-color: var(--purple-600); color: var(--purple-800); } }
.helpful__btn[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.helpful__thanks { font-size: 15px; color: var(--muted-strong); flex-basis: 100%; }

/* ---------- sidebar ---------- */
.aside {
  flex: 1 1 260px;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 1024px) {
  .aside { position: sticky; top: 24px; max-width: 320px; }
  /* related topics belong below the article on phones, beside it on desktop */
  .topic__cols { flex-wrap: nowrap; }
}

.aside__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 4vw, 28px);
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
}
.aside__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted-strong);
}
@media (min-width: 768px) { .aside__title { font-size: 17px; } }
.aside__list { display: flex; flex-direction: column; gap: 2px; }
.aside__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: background .16s var(--ease), color .16s var(--ease);
}
@media (hover: hover) { .aside__link:hover { background: var(--purple-50); color: var(--purple-800); } }
.aside__link:active { background: var(--purple-50); }
.aside__link .chev { color: var(--muted); flex: 0 0 auto; }

/* ---------- sticky "jump to question" (mobile only) ---------- */
.jump {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 40;
  margin-inline: calc(var(--gutter-l) * -1) calc(var(--gutter-r) * -1);
  padding: 8px var(--gutter-l) 8px var(--gutter-r);
  background: rgba(247, 247, 247, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-strong);
}
.jump__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-button);
  box-shadow: var(--sh-card);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}
.jump__label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jump__btn:active { border-color: var(--purple-600); color: var(--purple-800); }
@media (min-width: 1024px) { .jump { display: none; } }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: var(--sh-sheet);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  animation: sheet-up .28s var(--ease) both;
  max-height: 78vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 10px;
}
.sheet__title { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-strong); }
/* 44x44 circular icon button — sheet and dialog dismiss controls. */
.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--text);
}
.iconbtn:active { background: var(--page); }
@media (hover: hover) { .iconbtn:hover { background: var(--page); } }
.sheet__list { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }
.sheet__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
  text-align: left;
}
.sheet__item:active { background: var(--purple-50); color: var(--purple-800); }
.sheet__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 999px;
  background: var(--purple-100);
  color: var(--purple-800);
  font-size: 13px;
  font-weight: 600;
}

body.is-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* ==========================================================================
   Contact band
   ========================================================================== */
.cta-wrap { padding-top: var(--section-gap); }
.cta {
  position: relative;
  overflow: hidden;
  border-radius: clamp(20px, 3vw, 32px);
  background: #232323 url("../assets/cta-bg-sm.jpg") center / cover no-repeat;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
@media (min-width: 768px) { .cta { background-image: url("../assets/cta-bg.jpg"); } }

.cta__title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(26px, 6.6vw, 52px);
  line-height: 1.02;
  color: #fff;
  text-align: center;
  max-width: 760px;
  text-wrap: balance;
  hyphens: none;
}
.cta__sub { font-size: clamp(16px, 4vw, 19px); color: rgba(255, 255, 255, .78); text-align: center; }
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  width: 100%;
}
.cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  transition: background .18s var(--ease);
  max-width: 100%;
}
@media (min-width: 768px) { .cta__btn { min-height: 56px; padding: 0 32px; } }
@media (hover: hover) { .cta__btn:hover { background: var(--lime-hover); } }
.cta__btn:active { background: var(--lime-hover); }
.cta__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  text-align: center;
}
@media (hover: hover) { .cta__link:hover { border-bottom-color: #fff; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.foot__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
@media (min-width: 768px) {
  .foot__top { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
}
.foot__logo img { height: 44px; width: auto; }
@media (min-width: 768px) { .foot__logo img { height: 52px; } }

.foot__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 15px;
}
.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
}
@media (hover: hover) { .foot__links a:hover { color: var(--purple-600); } }

.foot__rule { height: 1px; background: var(--border-strong); }

.foot__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 768px)  { .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .foot__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

.foot__follow { font-size: 15px; line-height: 1.5; color: var(--text); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--purple-100);
  color: var(--purple-600);
  transition: background .18s var(--ease), color .18s var(--ease);
}
@media (hover: hover) { .social:hover { background: var(--purple-600); color: #fff; } }
.social:active { background: var(--purple-600); color: #fff; }

.foot__muted { font-size: 15px; line-height: 1.5; color: var(--muted-strong); }
.foot__made { font-size: 15px; color: var(--text); }
.foot__langrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   404
   ========================================================================== */
.nf {
  padding: clamp(60px, 14vh, 140px) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 640px;
}
.nf__code { font-family: var(--font-display); font-size: clamp(64px, 18vw, 140px); line-height: .9; color: var(--purple-600); }
.nf__title { font-size: clamp(24px, 6vw, 36px); font-weight: 600; color: var(--ink); }
.nf__text { font-size: 17px; line-height: 1.6; color: var(--muted-strong); }

/* ==========================================================================
   Root redirect stub
   ========================================================================== */
.stub {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--gutter-l) 40px var(--gutter-r);
  background: var(--purple-600);
}
.stub__card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 28px;
  padding: clamp(28px, 6vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--sh-card-hover);
}
.stub__logo { height: 44px; width: auto; align-self: flex-start; }
.stub__title { font-size: 20px; font-weight: 600; color: var(--ink); }
.stub__list { display: flex; flex-direction: column; gap: 8px; }
.stub__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
@media (hover: hover) { .stub__link:hover { border-color: var(--purple-600); color: var(--purple-800); background: var(--purple-50); } }

/* ---------- print ---------- */
@media print {
  .topbar, .jump, .cta-wrap, .foot, .skip, .langbanner, .helpful { display: none !important; }
  [data-accordion] .qa__body { display: block !important; }
  body { background: #fff; }
}
