/* moncivique.app — "Carnet" identity, the same as the app: paper, ink, serif, pen ticks and stamps.
   Logical properties only (inline-start/end), so the Arabic pages mirror without extra rules. */

:root {
  --paper: #F4F1EA;
  --paper-2: #FBF9F4;
  --paper-3: #EAE5D9;
  --ink: #1B2340;
  --ink-2: #4E546B;
  --ink-3: #7D8195;
  --rule: #DAD3C4;
  --pen: #2E7D57;
  --pen-soft: #E3EEE6;
  --wrong: #B23A3A;
  --wrong-soft: #F5E3E0;
  --ochre: #9A6512;
  --ochre-soft: #F3E6CC;
  --stamp: #2F9563;
  --blue: #2B4BA8;
  --red: #D8343F;
  --block: #1B2340;
  --on-block: #F4F1EA;
  --on-block-2: #B9BDCC;
  --block-action: #F4F1EA;
  --on-block-action: #1B2340;
  --shadow: 0 1px 0 rgba(27, 35, 64, .04), 0 12px 32px -12px rgba(27, 35, 64, .22);
  --serif: "Newsreader", "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --display: var(--serif);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12172A;
    --paper-2: #1A2036;
    --paper-3: #232A43;
    --ink: #EEE9DE;
    --ink-2: #B7B9C6;
    --ink-3: #8B8FA3;
    --rule: #2E3550;
    --pen: #5BC08A;
    --pen-soft: #1D3A2E;
    --wrong: #E07A72;
    --wrong-soft: #3C2326;
    --ochre: #E0A84A;
    --ochre-soft: #3A2E1A;
    --stamp: #5BC08A;
    --block: #232A45;
    --on-block: #EEE9DE;
    --on-block-2: #A9ADBF;
    --block-action: #E0A84A;
    --on-block-action: #12172A;
    --shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 16px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #12172A; --paper-2: #1A2036; --paper-3: #232A43; --ink: #EEE9DE; --ink-2: #B7B9C6; --ink-3: #8B8FA3;
  --rule: #2E3550; --pen: #5BC08A; --pen-soft: #1D3A2E; --wrong: #E07A72; --wrong-soft: #3C2326; --ochre: #E0A84A;
  --ochre-soft: #3A2E1A; --stamp: #5BC08A; --block: #232A45; --on-block: #EEE9DE; --on-block-2: #A9ADBF;
  --block-action: #E0A84A; --on-block-action: #12172A; color-scheme: dark;
}

/* Arabic pages: Naskh for the voice of the page, the system face for the rest. French stays in the serif. */
:root:lang(ar) { --display: "Noto Naskh Arabic", var(--serif); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
:lang(ar) body, body:lang(ar) { line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; margin: 0; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0; }
.fr { font-family: var(--serif); }
[lang="fr"] { font-family: inherit; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.bar.is-stuck { border-bottom-color: var(--rule); }
.bar::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--blue) 0 33.33%, #fff 33.33% 66.66%, var(--red) 66.66%); }
.bar-inner { display: flex; align-items: center; gap: 20px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.brand small { font-weight: 500; color: var(--ink-3); font-size: 14px; }
.bar nav { margin-inline-start: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; }
.bar nav > a:not(.btn) { text-decoration: none; color: var(--ink-2); }
.bar nav > a:not(.btn):hover { color: var(--ink); }
@media (max-width: 860px) { .bar nav > a.nav-link { display: none; } }
@media (max-width: 480px) { .brand small { display: none; } .bar nav { gap: 10px; } }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); font-size: 14px; font-weight: 600;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; }
.lang[open] summary { background: var(--paper-2); color: var(--ink); }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none;
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-md); box-shadow: var(--shadow); min-width: 170px; z-index: 50;
}
.lang li a { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-size: 15px; }
.lang li a:hover { background: var(--paper-3); }
.lang li a[aria-current="page"] { font-weight: 700; }
.lang li a span { color: var(--ink-3); font-size: 13px; font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 650; font-size: 16px;
  padding: 14px 22px; border-radius: 14px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 10px 24px -14px rgba(27, 35, 64, .7);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-small { padding: 9px 14px; font-size: 14px; border-radius: 11px; box-shadow: none; }
.btn-small svg { width: 16px; height: 16px; }
.btn.is-soon { background: transparent; color: var(--ink); border: 1.5px dashed var(--ink-3); box-shadow: none; cursor: default; }
.btn.is-soon:hover, .btn.is-soon:active { transform: none; }
.btn-light { background: var(--block-action); color: var(--on-block-action); }
.btn-light.is-soon { color: var(--on-block); border-color: var(--on-block-2); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-grid > *, .try-grid > *, .journey > * { min-width: 0; }
.eyebrow { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; letter-spacing: .01em;
  padding: 5px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--rule); color: var(--ink-2);
}
.chip-pen { background: var(--pen-soft); border-color: transparent; color: var(--pen); }
.chip svg { width: 14px; height: 14px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); }
.hero h1 em { font-style: italic; color: var(--pen); }
:lang(ar) .hero h1 em { font-style: normal; }
.lead { font-size: clamp(18px, 1.9vw, 21px); color: var(--ink-2); margin-top: 22px; max-width: 36em; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.note { font-size: 14px; color: var(--ink-3); }
.langs-line { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.langs-line span { font-size: 14px; padding: 4px 10px; border-radius: 8px; background: var(--paper-3); color: var(--ink-2); }
.langs-line span:first-child { background: var(--ink); color: var(--paper); }

/* the residence card */
.card-stage { position: relative; perspective: 1100px; display: grid; justify-items: center; gap: 18px; }
.levels { display: inline-flex; max-width: 100%; padding: 4px; gap: 2px; border-radius: 999px; background: var(--paper-3); }
@media (max-width: 480px) { .levels button { padding: 7px 10px; font-size: 13px; } }
.levels button {
  border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 650; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.levels button[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 35, 64, .15); }
.rcard {
  width: min(100%, 470px); background: var(--paper-2); border-radius: var(--r-lg); box-shadow: var(--shadow);
  border: 1px solid var(--rule); overflow: hidden; position: relative;
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  touch-action: pan-y;
}
.rcard.is-tracking { transition: transform .08s linear; }
.rcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--gx, 30%) var(--gy, 0%), rgba(255, 255, 255, .45), transparent 55%);
  mix-blend-mode: soft-light; opacity: var(--glare, .5);
}
.rcard-band { display: grid; grid-template-columns: repeat(3, 1fr); height: 12px; }
.rcard-band i:nth-child(1) { background: var(--blue); }
.rcard-band i:nth-child(2) { background: #fff; }
.rcard-band i:nth-child(3) { background: var(--red); }
[dir="rtl"] .rcard-band { direction: ltr; }
.rcard-body { padding: 22px 24px 20px; }
.rcard-head { display: flex; gap: 16px; align-items: center; }
.rcard-photo { width: 64px; height: 78px; border-radius: 10px; background: #8FB2D4; position: relative; overflow: hidden; flex: none; }
.rcard-photo::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #F1D2B6; left: 50%; top: 16px; transform: translateX(-50%); box-shadow: 0 -8px 0 -2px #3A2A22; }
.rcard-photo::after { content: ""; position: absolute; width: 56px; height: 44px; border-radius: 26px 26px 0 0; background: #2F6E52; left: 50%; bottom: -10px; transform: translateX(-50%); }
.rcard-title { font-family: var(--display); font-size: clamp(20px, 2.3vw, 24px); font-weight: 600; line-height: 1.15; }
.rcard-sub { font-size: 14px; color: var(--ink-2); margin-top: 6px; font-variant-numeric: tabular-nums; }
.rcard-bar { height: 5px; background: var(--paper-3); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.rcard-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--pen); border-radius: inherit; transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 22px; }
.slot { display: grid; justify-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.slot svg { width: 52px; height: 52px; overflow: visible; }
.slot .track { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 3 5; opacity: .6; }
.slot .ring { fill: none; stroke: var(--c); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 145; stroke-dashoffset: 145; transform: rotate(-90deg); transform-origin: 26px 26px; transition: stroke-dashoffset .9s cubic-bezier(.3, .7, .2, 1); }
.slot .tick { fill: none; stroke: var(--c); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .35s ease .75s; }
.slot.is-done .ring { stroke-dashoffset: 0; }
.slot.is-done .tick { stroke-dashoffset: 0; }
.slot.is-done { color: var(--ink); }
.stamp-big {
  position: absolute; inset-inline-end: 20px; bottom: 8px; pointer-events: none;
  font: 800 22px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--stamp);
  border: 3px solid var(--stamp); border-radius: 10px; padding: 8px 12px 7px; transform: rotate(-12deg) scale(1.8); opacity: 0;
  box-shadow: inset 0 0 0 2px var(--paper-2), inset 0 0 0 4px var(--stamp);
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0, 0, 0, .75) 61%, #000 70%);
}
[dir="rtl"] .stamp-big { transform: rotate(12deg) scale(1.8); }
.stamp-big.is-in { animation: stamp-in .45s cubic-bezier(.3, 1.6, .5, 1) forwards; }
[dir="rtl"] .stamp-big.is-in { animation-name: stamp-in-rtl; }
@keyframes stamp-in { to { transform: rotate(-12deg) scale(1); opacity: .92; } }
@keyframes stamp-in-rtl { to { transform: rotate(12deg) scale(1); opacity: .92; } }
.rcard-mrz { font: 500 11px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-3); opacity: .7; margin-top: 34px; white-space: nowrap; overflow: hidden; direction: ltr; text-align: left; letter-spacing: .04em; }
.card-hint { font-size: 13px; color: var(--ink-3); text-align: center; }
.card-hint b { font-weight: 650; color: var(--ink-2); }

/* ---------- sections ---------- */
section { position: relative; }
.sec { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(32px, 4.4vw, 52px); }
.sec-head p { font-size: 18px; color: var(--ink-2); margin-top: 16px; }
.kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); margin-bottom: 14px; }
:lang(ar) .kicker { letter-spacing: 0; }
.ruled { border-top: 1px solid var(--rule); }

/* ---------- try it ---------- */
.try { background: var(--paper-2); border-block: 1px solid var(--rule); }
.try-grid { display: grid; grid-template-columns: 280px 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .try-grid { grid-template-columns: 1fr; } }
.try-side h3 { font-size: 15px; font-family: var(--sans); font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.helpers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.helpers button, .qtabs button {
  border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.helpers button[aria-pressed="true"], .qtabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.qtabs { display: flex; flex-wrap: wrap; gap: 8px; }
.try-score { margin-top: 20px; font-size: 15px; color: var(--ink-2); }
.sheet { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: clamp(20px, 3.4vw, 36px); box-shadow: var(--shadow); }
.q-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.q-meta .dot { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.q-meta .dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); }
.badge-official { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--pen-soft); color: var(--pen); font-weight: 650; font-size: 13px; }
.badge-official svg { width: 14px; height: 14px; fill: currentColor; }
.q-fr { font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); font-weight: 600; line-height: 1.2; }
.q-help { margin-top: 10px; font-size: 17px; color: var(--ink-2); }
.opts { margin-top: 22px; border-top: 1px solid var(--rule); }
.opt {
  width: 100%; display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; text-align: start;
  padding: 16px 10px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; cursor: pointer; border-radius: 0;
  transition: background .15s, opacity .2s;
}
.opt:hover:not(:disabled) { background: var(--paper-3); }
.opt:disabled { cursor: default; }
.opt .box { width: 24px; height: 24px; border: 2px solid var(--ink-3); border-radius: 6px; margin-top: 2px; position: relative; }
.opt .box svg { position: absolute; inset: -6px -8px -2px -2px; width: 34px; height: 32px; overflow: visible; }
.opt .box svg.cross { inset: 0; width: 100%; height: 100%; }
.opt .box svg.cross path { stroke-width: 2.6; }
.opt .box path { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.opt .t-fr { display: block; font-size: 17px; }
.opt .t-help { display: block; font-size: 15px; color: var(--ink-2); margin-top: 3px; }
.opt.is-right { background: var(--pen-soft); border-radius: 12px; }
.opt.is-right .t-fr { font-weight: 650; }
.opt.is-right .box { border-color: var(--pen); }
.opt.is-right path { stroke: var(--pen); animation: draw .4s ease forwards; }
.opt.is-wrong { background: var(--wrong-soft); border-radius: 12px; }
.opt.is-wrong .box { border-color: var(--wrong); }
.opt.is-wrong path { stroke: var(--wrong); animation: draw .3s ease forwards; }
.opt.is-dim { opacity: .5; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.margin-note { margin-top: 24px; border-inline-start: 3px solid var(--pen); padding-inline-start: 18px; }
.margin-note.bad { border-color: var(--wrong); }
.margin-note .verdict { font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--pen); display: flex; align-items: center; gap: 6px; }
:lang(ar) .margin-note .verdict { letter-spacing: 0; }
.margin-note.bad .verdict { color: var(--wrong); }
.margin-note p { margin-top: 8px; font-size: 17px; }
.margin-note a { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.noscript-answer { margin-top: 18px; color: var(--ink-2); }

.q-lead { display: inline-flex; align-items: center; gap: 12px; }
.q-count { font: 700 13px/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.next-q { margin-top: 18px; display: flex; }
.final-score { margin-top: 16px !important; font-weight: 650; color: var(--ink) !important; }
@media (max-width: 900px) {
  .wide-only { display: none !important; }
  .try-side h3 { margin-bottom: 8px; }
  .helpers { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); margin-bottom: 16px; scrollbar-width: none; }
  .helpers::-webkit-scrollbar { display: none; }
  .helpers button { flex: none; }
  .try .sec-head { margin-bottom: 22px; }
}

/* ---------- carousels: grids on wide screens, a swipe on phones ---------- */
.dots { display: none; }
@media (max-width: 900px) {
  .carousel {
    display: flex !important; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-block: 4px 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel > * { flex: 0 0 84%; scroll-snap-align: start; }
  .carousel .rise { opacity: 1; transform: none; }
  .dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
  .dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--rule); cursor: pointer; transition: width .25s, background .25s; }
  .dots button.is-on { width: 22px; background: var(--ink); }

  /* how it works: each step is a card with the top of its screenshot */
  .steps.carousel { padding-block: 4px 8px; gap: 14px; }
  .steps.carousel .step { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 22px 20px 0; display: flex; flex-direction: column; overflow: hidden; }
  .steps.carousel .step h3 { font-size: 24px; }
  .steps.carousel .step p { font-size: 16px; }
  .steps.carousel .facts { margin-top: 16px; }
  .steps.carousel .facts b { font-size: 24px; }
  .steps.carousel .step-shot { margin: 20px auto 0; width: 78%; max-width: 260px; aspect-ratio: 720 / 900; border-radius: 26px 26px 0 0; border-width: 7px 7px 0; box-shadow: none; }
  .steps.carousel .step-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

  /* in the app: compact cards */
  .kit.carousel { border-top: 0; }
  .kit.carousel li { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 22px 20px !important; flex-basis: 72%; }
  .kit.carousel h3 { font-size: 20px; }
  .exams.carousel .exam { flex-basis: 80%; }
  .format { grid-template-columns: repeat(3, 1fr) !important; }
  .format div { padding: 16px 14px; border-top: 0 !important; border-inline-start: 1px solid var(--rule) !important; }
  .format div:first-child { border-inline-start: 0 !important; }
  .format b { font-size: 26px; }
  .format span { font-size: 13px; }
  .sec { padding-block: 56px; }
  .sec-head { margin-bottom: 26px; }
  .faq summary { font-size: 18px; padding: 18px 0; }
}

/* ---------- how it works: fixed phone on wide screens, one shot per step on phones ---------- */
.journey { display: grid; grid-template-columns: 1fr 380px; gap: clamp(32px, 6vw, 96px); }
.steps { display: grid; gap: clamp(56px, 10vh, 120px); padding-block: 8vh 16vh; }
.step { max-width: 520px; opacity: .45; transition: opacity .35s; }
.step.is-active { opacity: 1; }
.step-num { font: 600 15px/1 var(--sans); color: var(--ochre); display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-num::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.step h3 { font-size: clamp(26px, 3vw, 36px); }
.step p { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 22px 0 0; padding: 0; list-style: none; }
.facts li { display: grid; }
.facts b { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts span { font-size: 14px; color: var(--ink-3); }
.step-shot { display: none; }
.stage { position: sticky; top: 90px; height: calc(100vh - 110px); max-height: 860px; display: grid; place-items: center; }
.phone { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1206 / 2622; border-radius: 52px; padding: 11px; background: #0E1222; box-shadow: 0 40px 80px -30px rgba(27, 35, 64, .55), inset 0 0 0 2px #2A3150; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--paper); }
.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.02); transition: opacity .45s, transform .6s; }
.phone img.is-active { opacity: 1; transform: none; }
.stage-cap { position: absolute; bottom: -4px; font-size: 13px; color: var(--ink-3); }
@media (max-width: 900px) {
  .journey { grid-template-columns: 1fr; }
  .stage { display: none; }
  .steps { padding-block: 0; gap: 72px; }
  .step { opacity: 1; max-width: none; }
  .step-shot { display: block; margin-top: 28px; max-width: 340px; border-radius: 34px; overflow: hidden; border: 8px solid #0E1222; box-shadow: 0 30px 60px -30px rgba(27, 35, 64, .5); }
}

/* ---------- numbers ---------- */
.numbers { background: var(--block); color: var(--on-block); }
.numbers .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: clamp(40px, 6vw, 64px); }
@media (max-width: 760px) { .numbers .wrap { grid-template-columns: repeat(2, 1fr); } }
.numbers b { display: block; font-family: var(--serif); font-size: clamp(40px, 5vw, 60px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.numbers span { display: block; margin-top: 10px; color: var(--on-block-2); font-size: 15px; }
.numbers-note { grid-column: 1 / -1; font-size: 14px; color: var(--on-block-2); border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; }

/* ---------- which exam ---------- */
.exams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .exams { grid-template-columns: 1fr; } }
.exam { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 26px; display: grid; gap: 12px; align-content: start; }
.exam .code { font: 800 13px/1 var(--sans); letter-spacing: .12em; color: var(--ink-3); }
.exam h3 { font-size: 24px; }
.exam p { color: var(--ink-2); font-size: 16px; }
.exam .count { display: flex; align-items: baseline; gap: 10px; border-top: 1px dashed var(--rule); padding-top: 14px; margin-top: 4px; }
.exam .count b { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.exam .count span { font-size: 14px; color: var(--ink-2); }
.format { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2); }
.format div { padding: 22px 24px; border-inline-start: 1px solid var(--rule); }
.format div:first-child { border-inline-start: 0; }
.format b { display: block; font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1; }
.format span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); }
@media (max-width: 600px) { .format { grid-template-columns: 1fr; } .format div { border-inline-start: 0; border-top: 1px solid var(--rule); } .format div:first-child { border-top: 0; } }
.fine { font-size: 14px; color: var(--ink-3); margin-top: 14px; }

/* ---------- kit ---------- */
.kit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
@media (max-width: 900px) { .kit { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .kit { grid-template-columns: 1fr; } }
.kit li { list-style: none; padding: 28px 24px 30px 0; border-bottom: 1px solid var(--rule); }
.kit li:not(:nth-child(3n)) { padding-inline-end: 28px; }
.kit { padding: 0; margin: 0; }
.kit svg { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kit h3 { font-size: 22px; margin-top: 14px; }
.kit p { margin-top: 8px; color: var(--ink-2); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font-family: var(--display); font-size: 21px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 12px; height: 12px; border-inline-end: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(225deg); }
.faq details p { padding-bottom: 22px; color: var(--ink-2); max-width: 46em; }

/* ---------- closing ---------- */
.close { background: var(--block); color: var(--on-block); text-align: center; }
.close .wrap { display: grid; justify-items: center; gap: 22px; padding-block: clamp(72px, 10vw, 120px); }
.close svg.icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5); }
.close h2 { font-size: clamp(32px, 4.6vw, 54px); max-width: 16em; }
.close p { color: var(--on-block-2); max-width: 34em; }
.close .note { color: var(--on-block-2); }

/* ---------- footer ---------- */
.foot { padding-block: 36px 48px; font-size: 14px; color: var(--ink-3); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { text-decoration: underline; }
.foot .disclaimer { flex-basis: 100%; border-top: 1px solid var(--rule); padding-top: 18px; }

/* ---------- language suggestion ---------- */
.suggest {
  position: fixed; inset-inline: 16px; bottom: 16px; z-index: 60; margin-inline: auto; max-width: 460px;
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; border-radius: 16px;
  background: var(--ink); color: var(--paper); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  transform: translateY(140%); transition: transform .4s cubic-bezier(.2, .9, .3, 1.2);
}
.suggest.is-in { transform: none; }
.suggest a { flex: 1; color: inherit; font-weight: 650; text-decoration: none; }
.suggest button { border: 0; background: rgba(255, 255, 255, .12); color: inherit; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 18px; line-height: 1; }

/* ---------- documents (privacy, terms, support) ---------- */
.doc { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); }
.doc-inner { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5vw, 56px); }
.doc .intro { font-size: 20px; color: var(--ink-2); margin-top: 18px; }
.doc .updated { font-size: 14px; color: var(--ink-3); margin-top: 12px; }
.doc h2 { font-size: 28px; margin-top: 52px; margin-bottom: 14px; }
.doc h3 { font-size: 21px; margin-top: 30px; margin-bottom: 10px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-inline-start: 22px; margin: 12px 0; }
.doc li + li { margin-top: 8px; }
.summary { margin-top: 32px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 22px 26px; }
.summary > p { font-weight: 700; }
.doc-table { overflow-x: auto; margin-top: 14px; border: 1px solid var(--rule); border-radius: var(--r-md); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.doc th, .doc td { text-align: start; padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc th { background: var(--paper-2); font-weight: 700; }
.contact-card { margin-top: 28px; display: grid; gap: 8px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 24px 26px; }
.contact-card a.btn { justify-self: start; margin-top: 8px; }

/* ---------- entrances ---------- */
.js .rise { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .rise.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rise { opacity: 1; transform: none; transition: none; }
  .rcard, .phone img, .slot .ring, .slot .tick, .rcard-bar i { transition: none; }
  .stamp-big.is-in { animation: none; opacity: .92; transform: rotate(-12deg); }
  .opt path { animation: none !important; stroke-dashoffset: 0 !important; }
}
