/* APTO. One stylesheet for every page.
   Concept: an issuer of credentials, not an app. Paper, black ink, stamp-pad indigo,
   ruled forms, an index for the syllabus, a tariff for the price. The stamp is the
   only animation. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url("/fonts/archivo-var.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-deep: #ebe6d8;
  --sheet: #fffefa;
  --ink: #15161a;
  --text: #2b2d33;
  --muted: #61636b;
  --rule: rgba(21, 22, 26, 0.17);
  --sello: #2e2f7f;
  --sello-deep: #222368;
  --sello-wash: #e8e7f2;
  --ok: #1d6a49;
  --ok-wash: #e3eee7;
  --error: #ad2a1f;
  --error-wash: #f6e5e2;
  --warn: #77580f;
  --warn-wash: #f5ead2;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  /* Paper grain: a noise tile at a few percent, so the page reads as paper rather than a flat screen. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .08 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--text);
  font: 400 1.125rem/1.62 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sello); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
p { margin: 0 0 1em; }
strong { font-weight: 600; color: var(--ink); }
:focus-visible { outline: 3px solid rgba(46, 47, 127, 0.45); outline-offset: 2px; }

/* Display type: Archivo condensed. Interface type: Archivo at normal width. Reading: Source Serif. */
h1, h2, .display {
  font-family: var(--sans);
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.004em;
  margin: 0;
}
h1 { font-size: clamp(2.7rem, 1.55rem + 4.6vw, 5.6rem); line-height: 0.96; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.7vw, 2.6rem); line-height: 1; text-transform: uppercase; letter-spacing: 0.006em; }
h3 { font: 700 1.12rem/1.3 var(--sans); color: var(--ink); margin: 0; }
.label { font: 600 0.78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.reading { max-width: 800px; padding-top: 40px; padding-bottom: 88px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--sheet); padding: 8px 12px; z-index: 10; font-family: var(--sans); }
.skip:focus { left: 8px; }
.ic { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* The double rule (thick over thin) that frames the header, sections and the footer, like a form. */
.rule2 { position: relative; padding-top: 30px; }
.rule2::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: var(--sello); color: var(--sheet); border: 1.5px solid var(--sello); border-radius: 2px;
  font: 700 0.95rem/1.15 var(--sans); font-stretch: 87%; font-variation-settings: "wdth" 87;
  text-transform: uppercase; letter-spacing: 0.07em; text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--sello-deep); border-color: var(--sello-deep); color: var(--sheet); }
.btn:active { transform: translateY(1px); }
.btn-large { min-height: 58px; padding: 0 30px; font-size: 1rem; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.82rem; white-space: nowrap; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.btn-quiet { display: inline-flex; align-items: center; gap: 8px; font: 600 1rem/1.3 var(--sans); color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 5px; }
.btn-quiet:hover { color: var(--sello); text-decoration-color: currentColor; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 30px 0 0; }
.fine { font: 400 0.9rem/1.5 var(--sans); color: var(--muted); }

/* ---------- Header and footer ---------- */
.site-header { background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--sello); text-decoration: none; }
.brand:hover { color: var(--sello-deep); }
.brand .stamp-mark { height: 36px; width: auto; }
.brand-line { font: 600 0.8rem/1.25 var(--sans); color: var(--ink); max-width: 17em; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font: 500 0.95rem/1 var(--sans); }
.nav a:hover { color: var(--sello); }

.site-footer { padding: 0 0 40px; font: 400 0.92rem/1.5 var(--sans); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px 56px; }
.footer-brand .brand .stamp-mark { height: 30px; }
.footer-brand p { margin: 14px 0 0; color: var(--muted); max-width: 34ch; }
.footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 10px 40px; align-content: start; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--sello); text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; color: var(--muted); margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); }

/* ---------- Home ---------- */
.hero { padding: 52px 0 36px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 52px; align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 1.4rem + 3.6vw, 4.7rem); max-width: 10.5ch; }
.hero-badge { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 24px; font: 600 0.76rem/1 var(--sans); text-transform: uppercase; letter-spacing: 0.14em; color: var(--sello); }
.hero-badge i { width: 11px; height: 11px; border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 2px; }
.lead { font: 400 1.32rem/1.5 var(--serif); color: var(--ink); margin: 0; max-width: 34ch; }
h1 + .lead, .reading h1 + p { margin-top: 20px; }

.ficha { margin: 32px 0 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.ficha div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--rule); }
.ficha div:first-child { border-top: 0; }
.ficha dt { font: 600 0.76rem/1.6 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); padding-top: 3px; }
.ficha dd { margin: 0; font: 400 1.05rem/1.45 var(--serif); color: var(--ink); }

.cert-figure { margin: 0; }
.cert-sheet { position: relative; background: var(--sheet); box-shadow: 0 1px 1px rgba(21, 22, 26, 0.08), 0 22px 44px -18px rgba(21, 22, 26, 0.35); }
.cert-sheet img { width: 100%; height: auto; }
.stamp-drop { position: absolute; height: auto; color: var(--sello); transform: rotate(-5deg); animation: stamp-drop 0.55s cubic-bezier(0.3, 0.7, 0.2, 1) 0.7s both; mix-blend-mode: multiply; }
@keyframes stamp-drop {
  0% { opacity: 0; transform: scale(1.55) rotate(-13deg); }
  70% { opacity: 1; transform: scale(0.97) rotate(-4.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(-5deg); }
}
/* Same place, size and angle as the stamp printed on the PDF (src/pdf.js). */
.cert-sheet .stamp-drop { left: 39.9%; top: 75.41%; width: 20.19%; }
.cert-figure figcaption { margin-top: 16px; font: 400 0.9rem/1.5 var(--sans); color: var(--muted); }

.section { padding: 0 0 96px; }
.section-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 64px; }
.section-side h2 { margin-bottom: 14px; }
.section-side p { font: 400 1rem/1.55 var(--sans); color: var(--muted); max-width: 30ch; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { padding: 4px 28px 0; border-left: 1px solid var(--rule); }
.steps li:first-child { padding-left: 0; border-left: 0; }
.steps h3 { font: 800 1.6rem/1 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 12px; }
.steps p { margin: 0; font-size: 1.04rem; }

.toc { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; column-gap: 18px; align-items: start; padding: 18px 14px 18px 0; text-decoration: none; color: var(--ink); transition: background-color 0.2s ease; }
.toc a::before { content: ""; position: absolute; left: -14px; top: -1px; bottom: -1px; width: 3px; background: var(--sello); transform: scaleY(0); transform-origin: top; transition: transform 0.25s ease; }
.toc a:hover { background: rgba(46, 47, 127, 0.05); }
.toc a:hover::before { transform: scaleY(1); }
.toc a:hover .toc-t span:first-child { color: var(--sello); }
.toc-i { display: grid; place-items: center; width: 52px; height: 52px; color: var(--sello); background: var(--sheet); border: 1.5px solid var(--rule); transition: border-color 0.2s ease; }
.toc a:hover .toc-i { border-color: var(--sello); }
.toc-i .glyph { width: 30px; height: 30px; }
.toc-body { display: grid; gap: 3px; min-width: 0; }
.toc-n { font: 600 0.74rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--sello); }
.toc-t { display: flex; align-items: baseline; gap: 10px; font: 700 1.12rem/1.3 var(--sans); min-width: 0; }
.toc-t .dots { flex: 1; min-width: 24px; border-bottom: 2px dotted rgba(21, 22, 26, 0.35); transform: translateY(-4px); }
.toc-m { font: 500 0.95rem/1.4 var(--sans); color: var(--muted); white-space: nowrap; padding-top: 22px; }
.toc-d { font: 400 0.98rem/1.5 var(--serif); color: var(--muted); margin-top: 2px; }

.legal-note { border-left: 3px solid var(--sello); padding: 4px 0 4px 20px; margin: 26px 0; font: 600 1.15rem/1.45 var(--serif); color: var(--ink); }
.sources { font: 400 0.88rem/1.5 var(--sans); color: var(--muted); margin-top: 22px; }

.verify-box { margin-top: 40px; background: var(--sheet); border: 1.5px solid var(--ink); padding: 28px 30px; }
.verify-box h3 { font: 800 1.5rem/1.1 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; text-transform: uppercase; margin-bottom: 10px; }
.verify-box p { font-size: 1rem; }
.verify-form label { display: block; margin-bottom: 8px; }
.input-row { display: flex; gap: 10px; }
.input-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.06em; }

.tariff { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.tariff th { font: 600 0.76rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); text-align: left; padding: 14px 0; border-bottom: 1px solid var(--ink); }
.tariff th:last-child, .tariff td:last-child { text-align: right; }
.tariff td { padding: 18px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; font: 400 1.05rem/1.4 var(--serif); color: var(--ink); }
.tariff tr:last-child td { border-bottom: 0; }
.tariff td small { display: block; font: 400 0.9rem/1.4 var(--sans); color: var(--muted); margin-top: 2px; }
.tariff .amount { font: 800 1.5rem/1 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; white-space: nowrap; padding-left: 16px; }
.tariff .amount.main { font-size: 2.6rem; color: var(--sello); }
.tariff-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }
.tariff-foot p { margin: 0; }

.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font: 700 1.08rem/1.35 var(--sans); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px; background: var(--ink); }
.faq summary::after { transform: rotate(90deg); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { margin: 0 0 22px; max-width: 62ch; }

.closing { padding: 0 0 104px; }
.closing-inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
.closing .display { font-size: clamp(2.6rem, 1.6rem + 4vw, 5rem); line-height: 0.95; text-transform: uppercase; }
.closing .display span { color: var(--sello); }

/* ---------- Hero composition: guilloché, certificate, phone ---------- */
.compose { position: relative; padding: 30px 0 0 84px; }
.guilloche { position: absolute; left: 54%; top: 40%; width: 118%; aspect-ratio: 1 / 1; transform: translate(-50%, -50%); z-index: 0; pointer-events: none; }
.compose .cert-figure { position: relative; z-index: 1; }
.compose-caption { position: relative; z-index: 1; margin: 20px 0 0 30%; font: 400 0.88rem/1.5 var(--sans); color: var(--muted); max-width: 44ch; min-height: 3em; }

/* The phone that scans the sample QR and shows the verification. Sized by its own width (cqw). */
.phone { position: absolute; left: 0; top: 36%; z-index: 2; width: 29%; max-width: 192px; container-type: inline-size; }
.phone-body { aspect-ratio: 9 / 18.6; padding: 3.4cqw; background: #121317; border-radius: 15cqw; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 30px 50px -18px rgba(21, 22, 26, 0.6); }
.screen { position: relative; height: 100%; overflow: hidden; border-radius: 11.5cqw; background: var(--paper); }
.screen-bar { display: flex; justify-content: space-between; align-items: center; height: 13cqw; padding: 4.5cqw 9cqw 0; font: 700 5.4cqw/1 var(--sans); color: var(--ink); }
.screen-dots { display: flex; gap: 1.6cqw; }
.screen-dots i { width: 3.2cqw; height: 3.2cqw; border-radius: 50%; background: var(--ink); }
.screen-head { display: flex; align-items: center; gap: 4cqw; padding: 4cqw 8cqw 4.5cqw; border-bottom: 1px solid var(--rule); font: 600 5.4cqw/1 var(--sans); color: var(--ink); }
.screen-mark { height: 7.6cqw; width: auto; color: var(--sello); }
.scan { position: absolute; left: 0; right: 0; top: 30.5cqw; bottom: 0; display: grid; place-items: center; background: #1a1b21; animation: fade-out 0.3s ease 3.55s forwards; }
.scan .qr { width: 54cqw; height: auto; }
.scan-corners { position: absolute; left: 50%; top: 50%; width: 70cqw; aspect-ratio: 1; transform: translate(-50%, -50%);
  background:
    linear-gradient(#fff, #fff) left top / 9cqw 1.3cqw no-repeat, linear-gradient(#fff, #fff) left top / 1.3cqw 9cqw no-repeat,
    linear-gradient(#fff, #fff) right top / 9cqw 1.3cqw no-repeat, linear-gradient(#fff, #fff) right top / 1.3cqw 9cqw no-repeat,
    linear-gradient(#fff, #fff) left bottom / 9cqw 1.3cqw no-repeat, linear-gradient(#fff, #fff) left bottom / 1.3cqw 9cqw no-repeat,
    linear-gradient(#fff, #fff) right bottom / 9cqw 1.3cqw no-repeat, linear-gradient(#fff, #fff) right bottom / 1.3cqw 9cqw no-repeat; }
.beam { position: absolute; left: 17cqw; right: 17cqw; top: 50%; height: 1cqw; min-height: 2px; background: #a5a6ff; box-shadow: 0 0 5cqw 1cqw rgba(165, 166, 255, 0.6); transform: translateY(-27cqw); animation: beam 0.85s ease-in-out 1.55s 2 alternate both; }
@keyframes beam { from { transform: translateY(-27cqw); } to { transform: translateY(27cqw); } }
@keyframes fade-out { to { opacity: 0; visibility: hidden; } }
.screen-result { position: absolute; left: 0; right: 0; top: 30.5cqw; bottom: 0; padding: 7cqw 8cqw; opacity: 0; transform: translateY(4cqw); animation: result-in 0.45s ease 3.65s forwards; }
@keyframes result-in { to { opacity: 1; transform: none; } }
.res-verdict { display: flex; align-items: center; gap: 3cqw; margin: 0 0 6cqw; padding: 4cqw; border: 1.5px solid var(--ok); background: var(--ok-wash); color: var(--ok); }
.res-verdict .ic { width: 8cqw; height: 8cqw; }
.res-verdict b { font: 800 6.6cqw/1 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; text-transform: uppercase; letter-spacing: 0.02em; }
.res-rows { margin: 0; border-top: 1.5px solid var(--ink); }
.res-rows div { padding: 2.6cqw 0; border-bottom: 1px solid var(--rule); }
.res-rows dt { padding: 0; font: 600 3.5cqw/1.2 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.res-rows dd { margin: 0.8cqw 0 0; font: 400 5.2cqw/1.25 var(--serif); color: var(--ink); }

/* Banknote-style microprint between the hero and the rest of the page. */
.microprint { overflow: hidden; white-space: nowrap; margin: 0 0 88px; padding: 8px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font: 600 7.5px/1 var(--sans); letter-spacing: 0.26em; color: var(--sello); }
.microprint span { display: inline-block; opacity: 0.8; }

/* Guarantees: each one in a small double-framed seal, like the stamp. */
.trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.trust li { padding: 28px 30px 28px 0; border-bottom: 1px solid var(--rule); }
.trust li:nth-child(even) { padding: 28px 0 28px 30px; border-left: 1px solid var(--rule); }
.seal { display: grid; place-items: center; width: 56px; height: 56px; margin: 4px 0 20px 4px; color: var(--sello); border: 2px solid currentColor; outline: 1px solid currentColor; outline-offset: 3px; }
.seal .glyph { width: 30px; height: 30px; }
.trust h3 { font: 700 1.15rem/1.3 var(--sans); margin-bottom: 8px; }
.trust p { margin: 0; font-size: 1.02rem; }

/* How it works: a timeline that draws itself, with a stamp-ink square at each step. */
.steps { position: relative; padding-top: 30px; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: var(--ink); transform-origin: left center; }
.steps li::before { content: ""; display: block; width: 12px; height: 12px; margin: -31px 0 19px; background: var(--sello); outline: 3px solid var(--paper); }

/* Sample question. */
.try { position: relative; background: var(--sheet); border: 1.5px solid var(--ink); padding: 24px 28px 22px; }
.try-k { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 16px; font: 600 0.74rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.try .check { border-top: 0; padding-top: 0; margin: 0; }
.try .btn-quiet { margin-top: 12px; }

/* Scroll reveal, only when the script runs and motion is welcome. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .section-main.reveal { transition-delay: 0.08s; }
.js .reveal .steps::before { transform: scaleX(0); transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s; }
.js .reveal.is-in .steps::before { transform: scaleX(1); }
.js .reveal .steps li::before { transform: scale(0); transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
.js .reveal.is-in .steps li:nth-child(1)::before { transform: scale(1); transition-delay: 0.35s; }
.js .reveal.is-in .steps li:nth-child(2)::before { transform: scale(1); transition-delay: 0.75s; }
.js .reveal.is-in .steps li:nth-child(3)::before { transform: scale(1); transition-delay: 1.15s; }

/* ---------- Course ---------- */
.course { max-width: 900px; padding-top: 44px; padding-bottom: 96px; }
.course-head .lead { font-size: 1.2rem; max-width: 46ch; margin-top: 18px; }
.progress-row { display: flex; align-items: center; gap: 18px; margin: 28px 0 24px; font: 500 0.95rem/1 var(--sans); color: var(--ink); }
.progress-row span:first-child { white-space: nowrap; }
.progress { flex: 1; max-width: 320px; height: 8px; background: var(--paper-deep); border: 1px solid var(--ink); }
.progress span { display: block; height: 100%; background: var(--sello); }
.w0 { width: 0; } .w1 { width: 12.5%; } .w2 { width: 25%; } .w3 { width: 37.5%; } .w4 { width: 50%; }
.w5 { width: 62.5%; } .w6 { width: 75%; } .w7 { width: 87.5%; } .w8 { width: 100%; }

.rows { list-style: none; padding: 0; margin: 34px 0; border-top: 2px solid var(--ink); }
.rows li { border-bottom: 1px solid var(--rule); }
.rows a { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 16px 0; text-decoration: none; color: var(--ink); }
.rows a:hover .row-title { color: var(--sello); }
.row-n { font: 600 0.78rem/1.6 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.is-read .row-n { color: var(--sello); }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-title { font: 700 1.08rem/1.35 var(--sans); }
.row-meta { font: 400 0.9rem/1.4 var(--sans); color: var(--muted); }
.row-state { color: var(--muted); align-self: center; }
.is-read .row-state { color: var(--sello); }

.panel { position: relative; background: var(--sheet); border: 1.5px solid var(--ink); padding: 28px 30px; }
.panel h2 { font-size: 1.8rem; margin-bottom: 10px; }
.panel p { max-width: 60ch; }
.panel-ok { border-color: var(--sello); }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 0.88rem/1.4 var(--sans); color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--muted); }
.tema-head { margin-bottom: 34px; }
.tema-head h1 { font-size: clamp(2.3rem, 1.6rem + 2.8vw, 3.9rem); }
.tema-meta { margin: 16px 0 0; font: 500 0.82rem/1.4 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.tema-goal { margin: 14px 0 0; font-size: 1.28rem; line-height: 1.45; color: var(--ink); }

.prose { font-size: 1.15rem; }
.prose h3 { font: 800 1.55rem/1.1 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; text-transform: uppercase; margin: 2.1em 0 0.7em; letter-spacing: 0.01em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.15em; }
.prose li { margin: 0.4em 0; }
.prose li::marker { color: var(--sello); }
.prose ol.cols { columns: 2; column-gap: 44px; }
.prose ol.cols li { break-inside: avoid; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font: 400 0.98rem/1.45 var(--sans); }
th, td { text-align: left; vertical-align: top; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); }
th { font: 600 0.76rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink); font-weight: 500; }

.essentials, .case, .checks { margin-top: 48px; }
.essentials { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 22px 0 8px; }
.essentials h2, .case h2, .checks h2 { font-size: 1.6rem; margin-bottom: 16px; }
.essentials ul { margin: 0 0 14px; padding-left: 1.2em; }
.essentials li { margin: 0.5em 0; color: var(--ink); }
.essentials li::marker { color: var(--sello); }
.case { background: var(--paper-deep); padding: 26px 28px; border-left: 3px solid var(--ink); }
.case-q { font-weight: 600; color: var(--ink); }
details > summary { cursor: pointer; }
.case summary, .check-answer summary { font: 700 0.95rem/1.4 var(--sans); color: var(--sello); }
.case details p { margin: 12px 0 0; }

.check { border: 0; border-top: 1px solid var(--ink); padding: 18px 0 8px; margin: 0 0 6px; }
.check legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font: 700 1.05rem/1.4 var(--sans); color: var(--ink); }
.check legend + * { clear: both; }
.check-answer { margin-top: 6px; font-size: 1rem; }
.check-answer p { margin: 8px 0 0; }
.js .check-answer { display: none; }
.check-feedback { margin: 10px 0 8px; font: 500 0.98rem/1.5 var(--sans); }
.check-feedback.right { color: var(--ok); }
.check-feedback.wrong { color: var(--error); }

.opt { display: flex; gap: 14px; align-items: flex-start; padding: 13px 16px; border: 1.5px solid var(--rule); margin-bottom: 8px; cursor: pointer; background: var(--sheet); font: 400 1.02rem/1.45 var(--sans); color: var(--ink); transition: border-color 0.12s ease, background-color 0.12s ease; }
.opt:hover { border-color: var(--ink); }
.opt input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--sello); flex-shrink: 0; }
.opt:has(input:checked) { border-color: var(--sello); background: var(--sello-wash); }
.opt.is-right { border-color: var(--ok); background: var(--ok-wash); }
.opt.is-wrong { border-color: var(--error); background: var(--error-wash); }
.opt.is-answer { border-color: var(--ok); }
.answer-tag { margin-left: auto; padding-left: 10px; font: 700 0.72rem/1.6 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ok); white-space: nowrap; }

.tema-action { margin-top: 44px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 18px; border-top: 2px solid var(--ink); }
.pager a { display: inline-flex; align-items: center; gap: 8px; font: 700 0.95rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; color: var(--ink); }
.pager a:hover { color: var(--sello); }

/* ---------- Exam ---------- */
.facts { list-style: none; padding: 0; margin: 30px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.facts li { padding: 18px 20px 18px 0; display: grid; gap: 4px; }
.facts li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.facts strong { font: 800 2.2rem/1 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; color: var(--ink); }
.facts span { font: 400 0.92rem/1.4 var(--sans); color: var(--muted); }
.exam { margin-top: 30px; }
.exam-q { border: 0; border-top: 1px solid var(--ink); padding: 20px 0 10px; margin: 0 0 6px; scroll-margin-top: 100px; }
.exam-q legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font: 700 1.06rem/1.45 var(--sans); color: var(--ink); }
.exam-q legend + * { clear: both; }
.exam-n { display: block; font: 600 0.76rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 6px; }
.exam-q.is-missing .exam-n { color: var(--error); }
.exam-submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 26px; padding-top: 22px; border-top: 2px solid var(--ink); }
.exam-count { margin: 0; font: 500 0.95rem/1.4 var(--sans); color: var(--muted); }
.exam-count.warn { color: var(--error); }

.result { position: relative; margin: 26px 0 40px; padding: 30px 32px; background: var(--sheet); border: 1.5px solid var(--ink); }
.result-k { font: 600 0.78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 8px; }
.result-score { margin: 0 0 14px; font: 500 1rem/1 var(--sans); color: var(--muted); }
.result-score strong { font: 800 4.4rem/0.9 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; color: var(--ink); margin-right: 6px; }
.result p { max-width: 40ch; }
.result-ok { border-color: var(--sello); }
.result-stamp { position: absolute; right: 30px; top: 30px; width: 220px; color: var(--sello); transform: rotate(-7deg); animation: stamp-drop 0.55s cubic-bezier(0.3, 0.7, 0.2, 1) 0.25s both; mix-blend-mode: multiply; }
.result-ko .result-k { color: var(--error); }
.corrections h2 { font-size: 1.6rem; margin-bottom: 18px; }
.corrections ol { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.correction { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.correction p { margin: 0 0 8px; }
.corr-q { font: 700 1.04rem/1.45 var(--sans); color: var(--ink); }
.corr-mine, .corr-ok { display: flex; gap: 10px; align-items: flex-start; font: 400 1rem/1.45 var(--sans); }
.corr-mine .ic { color: var(--error); margin-top: 3px; }
.corr-ok .ic { color: var(--ok); margin-top: 3px; }
.corr-why { color: var(--muted); font-size: 1rem; margin-bottom: 0 !important; }

/* ---------- Forms, notices, certificate, verification ---------- */
.form { max-width: 580px; margin-top: 26px; }
.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 8px; }
.optional { text-transform: none; letter-spacing: 0; font-weight: 400; }
.hint { margin: 8px 0 0; font: 400 0.88rem/1.45 var(--sans); color: var(--muted); }
input[type="text"], input[type="email"], input:not([type]) {
  width: 100%; min-height: 52px; padding: 0 14px;
  border: 1.5px solid var(--ink); border-radius: 0; background: var(--sheet);
  font: 400 1.05rem var(--sans); color: var(--ink);
}
input:focus { outline: none; border-color: var(--sello); box-shadow: 0 0 0 3px rgba(46, 47, 127, 0.2); }

.notice { padding: 16px 20px; margin: 22px 0; border-left: 3px solid var(--ink); background: var(--paper-deep); font: 400 0.98rem/1.5 var(--sans); }
.notice p { margin: 0; }
.notice p + p { margin-top: 4px; }
.notice-title { font-weight: 700; color: var(--ink); }
.notice-ok { border-left-color: var(--ok); background: var(--ok-wash); }
.notice-error { border-left-color: var(--error); background: var(--error-wash); }
.notice-error .notice-title { color: var(--error); }

.summary { margin: 28px 0; }
.summary dl, .record, .code-box { margin: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--ink); }
.summary dl div, .record div, .code-box div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--rule); }
.summary dl div:first-child, .record div:first-child, .code-box div:first-child { border-top: 0; }
dt { font: 600 0.76rem/1.6 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); padding-top: 2px; }
dd { margin: 0; color: var(--ink); font: 400 1.05rem/1.45 var(--serif); overflow-wrap: anywhere; }
.summary .btn-quiet { margin-top: 14px; }
.pay { max-width: none; background: var(--sheet); border: 1.5px solid var(--ink); padding: 26px 28px; }
.pay-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin: 0 0 20px; font: 500 0.95rem/1.2 var(--sans); color: var(--muted); }
.pay-total strong { font: 800 3rem/1 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; color: var(--ink); }
.pay .fine { margin: 14px 0 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 22px; font: 400 0.95rem/1.5 var(--sans); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--sello); flex-shrink: 0; }

.issued-k { display: inline-flex; align-items: center; gap: 8px; font: 600 0.78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--sello); margin: 0 0 14px; }
.issued h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); margin-bottom: 14px; max-width: 14ch; }
.issued .lead { font-size: 1.15rem; max-width: 44ch; }
.issued h2 { font-size: 1.6rem; margin: 44px 0 14px; }
.issued-stamp { width: 200px; color: var(--sello); transform: rotate(-6deg); margin: 6px 0 24px; animation: stamp-drop 0.55s cubic-bezier(0.3, 0.7, 0.2, 1) 0.25s both; }
.code-box { margin-top: 34px; }
.plain { padding-left: 1.2em; }
.plain li { margin: 0.5em 0; }
.plain li::marker { color: var(--sello); }

.verdict { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; margin: 24px 0 28px; border: 1.5px solid; background: var(--sheet); }
.verdict .ic { width: 30px; height: 30px; margin-top: 2px; }
.verdict p { margin: 4px 0 0; font: 400 1rem/1.5 var(--sans); color: var(--text); }
.verdict .verdict-t { font: 800 1.7rem/1.05 var(--sans); font-stretch: 75%; font-variation-settings: "wdth" 75; text-transform: uppercase; margin: 0; }
.verdict-ok { border-color: var(--ok); color: var(--ok); }
.verdict-ok .verdict-t { color: var(--ok); }
.verdict-ko { border-color: var(--error); color: var(--error); }
.verdict-ko .verdict-t { color: var(--error); }
.verdict-warn { border-color: var(--warn); color: var(--warn); }
.verdict-warn .verdict-t { color: var(--warn); }
.record { margin-bottom: 18px; }

.legal h1 { font-size: clamp(2.3rem, 1.6rem + 2.6vw, 3.6rem); margin-bottom: 10px; }
.legal h2 { font-size: 1.45rem; margin: 2.2em 0 0.7em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 0.45em 0; }
.legal .record { margin: 18px 0; }
.pending { color: var(--error); font-weight: 600; font-family: var(--sans); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1000px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .nav-course { display: flex; margin-left: auto; gap: 18px; }
  .hero { padding: 36px 0 28px; }
  .hero h1 { max-width: 12ch; }
  .compose { padding: 18px 0 0; margin-top: 8px; }
  .phone { left: auto; right: -4px; top: auto; bottom: 46px; width: 34%; max-width: 168px; }
  .compose-caption { margin: 18px 38% 0 0; }
  .guilloche { left: 50%; top: 47%; width: 128%; }
  .microprint { margin-bottom: 64px; }
  .hero-grid, .section-grid, .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 48px; margin-top: 28px; }
  .section { padding-bottom: 72px; }
  .section-side p { max-width: 48ch; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding: 18px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .steps li:first-child { padding-top: 4px; border-top: 0; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  body { font-size: 1.06rem; }
  .brand-line { display: none; }
  .brand .stamp-mark { height: 32px; }
  .is-course .brand .stamp-mark { height: 28px; }
  .nav-course { gap: 14px; }
  .nav-course a { font-size: 0.9rem; }
  .sm-hide { display: none; }
  .lead { font-size: 1.18rem; }
  .ficha div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cta-row .btn-large, .pay .btn-large, .tariff-foot .btn-large, .closing .btn-large { width: 100%; }
  .input-row { flex-direction: column; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .prose { font-size: 1.08rem; }
  .prose ol.cols { columns: 1; }
  .summary dl div, .record div, .code-box div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rows a { grid-template-columns: minmax(0, 1fr) auto; }
  .row-n { grid-column: 1 / -1; }
  .toc a { grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; padding-right: 0; }
  .toc-i { width: 44px; height: 44px; }
  .toc-i .glyph { width: 26px; height: 26px; }
  .toc-m { grid-column: 2; padding-top: 6px; }
  .toc-t .dots { display: none; }
  .trust { grid-template-columns: minmax(0, 1fr); }
  .trust li, .trust li:nth-child(even) { padding: 24px 0; border-left: 0; }
  .try { padding: 20px 16px 18px; }
  .verify-box, .panel, .pay { padding: 22px 18px; }
  .result { padding: 24px 20px; }
  .result-stamp { position: static; width: 180px; margin: 0 0 18px; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, max-content)); gap: 10px 28px; }
}
@media (max-width: 370px) {
  .site-header .btn-small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp-drop, .result-stamp, .issued-stamp { animation: none; }
  .scan { display: none; }
  .beam { animation: none; }
  .screen-result { animation: none; opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .reveal .steps::before, .js .reveal .steps li::before { transform: none; transition: none; }
}
