/* Shared tokens and controls. web.Static bundles this with app.css or site.css. */
:root {
  --bg: #FAF7F0;           /* brand kit v1: ivory */
  --bg-2: #f4ede3;
  --card: #ffffff;
  --ink: #27263F;          /* ink */
  --ink-2: #4b4e6d;
  --ink-3: #6c6e8a;
  --line: #e9e1d5;
  --line-2: #d9cfc0;
  --link: #B83B28;         /* the kit's terracotta for small text */
  --brand: #CE432C;        /* terracotta */
  --brand-ink: #ffffff;
  --btn: #CE432C;          /* white text on it: 4.7:1 (WCAG AA) */
  --logo-mark: #CE432C;
  --logo-name: #27263F;
  --brand-soft: #fde6e1;
  --pick: #4a5bc4;         /* what the learner selected: neutral, not right or wrong */
  --pick-soft: #e9ecfb;
  --pick-ink: #ffffff;
  --sun: #f4b33d;          /* azafrán */
  --sun-soft: #fff1d6;
  --sea: #1f8a8a;          /* mediterráneo */
  --sea-soft: #dff3f1;
  --plum: #6b4fbb;
  --plum-soft: #ece6fb;
  --ok: #167245;
  --ok-soft: #e0f5ea;
  --ok-ink: #ffffff;
  --bad: #b92e39;
  --bad-soft: #fde4e4;
  --bad-ink: #ffffff;
  --warn: #8a5700;
  --shadow: 0 1px 2px rgb(29 31 58 / 6%), 0 6px 20px rgb(29 31 58 / 6%);
  --shadow-lg: 0 2px 6px rgb(29 31 58 / 8%), 0 18px 48px rgb(29 31 58 / 12%);
  --radius: 18px;
  --radius-sm: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", "Nunito", var(--font);
  --font-read: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14152a; --bg-2: #1b1d36; --card: #202243; --ink: #f3f1fb; --ink-2: #c4c3dc; --ink-3: #8d8caa;
    --line: #2e3058; --line-2: #3b3e6a; --link: #ff9a87; --brand: #ff6a52; --btn: #ff6a52; --brand-ink: #1d0d0a; --brand-soft: #4a2420; --sun: #f6c25a; --sun-soft: #46391c;
    --sea: #42b8b4; --sea-soft: #173b3c; --plum: #a28bf0; --plum-soft: #2f2852; --ok: #3ccf8a; --ok-soft: #173a2b;
    --bad: #ff6b6b; --bad-soft: #452025; --warn: #f6c25a; --ok-ink: #10291d; --bad-ink: #310e14; --pick: #93a2ff; --pick-soft: #272c58; --pick-ink: #14152a; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
    --shadow-lg: 0 18px 48px rgb(0 0 0 / 45%); color-scheme: dark; --logo-name: #FAF7F0;
  }
}
:root[data-theme="dark"] {
  --bg: #14152a; --bg-2: #1b1d36; --card: #202243; --ink: #f3f1fb; --ink-2: #c4c3dc; --ink-3: #8d8caa;
  --line: #2e3058; --line-2: #3b3e6a; --link: #ff9a87; --brand: #ff6a52; --btn: #ff6a52; --brand-ink: #1d0d0a; --brand-soft: #4a2420; --sun: #f6c25a; --sun-soft: #46391c;
  --sea: #42b8b4; --sea-soft: #173b3c; --plum: #a28bf0; --plum-soft: #2f2852; --ok: #3ccf8a; --ok-soft: #173a2b;
  --bad: #ff6b6b; --bad-soft: #452025; --warn: #f6c25a; --ok-ink: #10291d; --bad-ink: #310e14; --pick: #93a2ff; --pick-soft: #272c58; --pick-ink: #14152a; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 6px 20px rgb(0 0 0 / 25%);
  --shadow-lg: 0 18px 48px rgb(0 0 0 / 45%); color-scheme: dark; --logo-name: #FAF7F0;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

/* Optional analytics: no overlay, equal choices, persistent footer settings. */
.cookie-notice {
  position: fixed; z-index: 100; inset: auto 16px 16px auto;
  width: min(520px, calc(100% - 32px)); padding: 18px;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  max-height: calc(100dvh - 32px); overflow-y: auto; font-size: .9rem;
}
.cookie-notice strong { display: block; margin-bottom: 6px; }
.cookie-notice p { margin-bottom: 12px; }
.cookie-notice a, .cookie-settings a { text-decoration: underline; }
.cookie-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.cookie-actions .btn { width: 100%; min-height: 44px; white-space: normal; }
.cookie-status:empty { display: none; }
.cookie-notice .cookie-status { margin: 10px 0 0; }
@media (max-width: 600px) {
  /* A thin bar on phones: it must not hide the page's main button. */
  .cookie-notice { inset: auto 8px 8px 8px; width: auto; padding: 10px 12px; font-size: .8rem; line-height: 1.35; }
  .cookie-notice strong, .cookie-notice .cookie-more { display: none; }
  .cookie-notice p { margin-bottom: 8px; }
  .cookie-actions { gap: 8px; }
}
.cookie-settings { padding: 16px; margin: 16px 0; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }

/* The logo: the brand kit's symbol and name as outlines (brand.js, brand.go),
   one box height for both so they line up as the kit's lockup (symbol at
   80 %, centred on the capitals). Kept left to right in Arabic too. */
.logo { --logo-h: 34px; display: flex; align-items: center; gap: calc(var(--logo-h) * .12); direction: ltr; color: var(--ink); }
.logo:hover { text-decoration: none; }
/* Where the logo is a block of its own (footer, sign-in panel), it takes its
   content's width: a right-to-left page puts it on its right (PM, 27 November:
   the theme button covered it on Arabic sign-in). */
:is(.site-foot-brand, .auth-art) .logo { width: fit-content; max-width: 100%; }
.logo-svg { display: block; height: var(--logo-h); width: auto; }
.logo-mark { flex: none; display: block; }
.logo-mark .logo-svg { aspect-ratio: 340.9 / 268.5; fill: var(--logo-mark); }
.wordmark { display: block; flex: none; }
.wordmark .logo-svg { aspect-ratio: 870.6 / 268.5; fill: var(--logo-name); }
.logo.light .logo-svg { fill: currentColor; }
.logo small { font: 600 .72rem var(--font); color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; direction: initial; }
.brand-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (forced-colors: active) { .logo .logo-svg { fill: CanvasText; } }

@media (max-width: 480px) {
  .logo { --logo-h: 28px; }
}

/* ---------- buttons & inputs ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 14px; font: 700 1rem/1 var(--font); background: var(--btn); color: var(--brand-ink);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--brand) 60%, #000), 0 8px 18px rgb(229 70 46 / 22%);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 60%, #000); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); box-shadow: 0 2px 0 var(--line-2); }
.btn.sea { background: var(--sea); box-shadow: 0 3px 0 color-mix(in srgb, var(--sea) 60%, #000); }
.btn.plum { background: var(--plum); box-shadow: 0 3px 0 color-mix(in srgb, var(--plum) 60%, #000); }
.btn.sm { padding: 8px 12px; font-size: .88rem; border-radius: 10px; }
.btn.lg { padding: 16px 26px; font-size: 1.1rem; border-radius: 16px; max-width: 100%; }
/* Phones: a big button's label wraps rather than leave the screen
   («Почати пробний іспит» at 320 px). */
@media (max-width: 480px) { .btn.lg { white-space: normal; text-align: center; line-height: 1.25; padding-inline: 18px; } }
.btn.block { width: 100%; }
.btn.link { background: none; box-shadow: none; color: var(--link); padding: 6px 8px; }
/* The selected one of a group of options or tabs: neutral, not the brand red (red means wrong). */
.btn.pick { background: var(--pick); color: var(--pick-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--pick) 60%, #000); }
.btn.good { background: var(--ok); color: var(--ok-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--ok) 60%, #000); }
.btn.pick:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--pick) 60%, #000); }
.btn.danger { background: var(--bad); color: var(--bad-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--bad) 60%, #000); }

label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; color: var(--ink-2); }
input:not([type]), input[type=""], input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=url], input[type=time], input[type=datetime-local], input[type=month], input[type=week], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); color: var(--ink);
  font: 1rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
textarea { resize: vertical; min-height: 140px; }
.err { background: var(--bad-soft); color: var(--bad); padding: 10px 14px; border-radius: 12px; font-weight: 600; margin-bottom: 14px; }
.note { background: var(--sun-soft); color: var(--ink); padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.okmsg { background: var(--ok-soft); color: var(--ok); padding: 10px 14px; border-radius: 12px; font-weight: 600; margin-bottom: 14px; }

/* ---------- line icons (js/icons.js) ---------- */
.icon { display: inline-block; vertical-align: -0.14em; flex: none; }
.icon.ok { color: var(--ok); }
.icon.bad { color: var(--bad); }
.icon.warn { color: var(--warn); }

/* ---------- light/dark switch (public pages, sign-in and sign-up) ---------- */
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; padding: 0; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; font-size: 1.15rem;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.theme-toggle[hidden] { display: none; }
.theme-toggle .theme-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .theme-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .theme-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .theme-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .theme-moon { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.btn, .btn.ghost, .btn.sea, .btn.plum, .btn.pick, .btn.good, .btn.danger { box-shadow: none; }

.btn:active, .btn.pick:active { transform: none; box-shadow: none; }

.date-choice{border:0;padding:0;margin:0;min-width:0}

.skip { position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: 10px; }

label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; margin: 6px 0; }

label.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pick); flex: none; }

.skip:not(:focus) { clip-path: inset(50%); inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; white-space: nowrap; }

.date-choice legend{font-weight:700;margin-bottom:14px;font-size:1.05rem}

.date-choice>.check{margin:14px 0;align-items:start}

.date-choice .check input{margin-top:.22em;flex-shrink:0}

/* ¡Mi Apto! — design tokens, layout and components. */
@font-face {
  font-family: 'Google Sans SSO';
  src: url('../fonts/google-sans-sso-500.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
.btn.sso-google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
  border-radius: 4px;
  min-height: 40px;
  padding: 9px 12px;
  gap: 10px;
  font: 500 14px/20px 'Google Sans SSO', Arial, sans-serif;
  box-shadow: none;
}
.btn.sso-google:hover { background: #f8faff; border-color: #747775; }
.sso-google img { flex: 0 0 20px; object-fit: contain; }
.connection-list { list-style: none; margin: 0; padding: 0; }
.connection { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px 0; }
.connection + .connection { border-top: 1px solid var(--line); }
.connection:last-child { padding-bottom: 0; }
.connection-logo { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 8px; background: #fff; }
.connection-logo img { object-fit: contain; }
.connection-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.connection-title h4 { margin: 0; font-size: 1.05rem; }
.connection-details p { color: var(--ink-2); font-size: .9rem; margin: 8px 0 0; }
.btn.connection-action { white-space: normal; }
@media (max-width: 600px) {
  .connection { grid-template-columns: 56px minmax(0, 1fr); align-items: start; gap: 12px; }
  .connection-action { grid-column: 2; justify-self: start; }
}
/* ---------- layout ---------- */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 20; -webkit-backdrop-filter: saturate(1.6) blur(10px); backdrop-filter: saturate(1.6) blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
@media (max-width: 480px) {
  .topbar-in { gap: 8px; padding-inline: 12px; }
  .chips { gap: 5px; }
  .chips .chip { padding: 5px 9px; }
  .chips .progress-chip { padding: 5px 8px; gap: 5px; }
  .chips .theme-toggle, .chips .avatar { width: 32px; height: 32px; }
}
/* Phones: the menus open under the header, aligned with its edge. */
@media (max-width: 760px) {
  .topbar-in { position: relative; }
  .topbar .topbar-menu { position: static; }
  .topbar .menu-panel { top: calc(100% - 2px); inset-inline-end: 12px; }
}
/* Phones: the name beside the mark when it fits on the line with the
   language, progress, theme, note and account; else the mark alone (the
   link keeps its name). main.js measures it (data-brand="mark"). */
.topbar .logo .wordmark { white-space: nowrap; }
/* The name and «Entrenador DELE» under it; the symbol lines up with the name. */
.topbar .logo { align-items: flex-start; }
/* The smallest phones: the symbol about as wide as the old square (30 px), so
   the header stays on one row (PM, 27 November, 320 px). */
@media (max-width: 360px) { .topbar .logo { --logo-h: 24px; } }
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.topbar-in[data-brand="mark"] .logo > span:not(.logo-mark) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-inline-start: 8px; flex-wrap: nowrap; min-width: 0; }
.nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav a .icon { display: none; }
@media (max-width: 1180px) { .nav { gap: 0; } .nav a { padding: 8px 8px; font-size: .9rem; } .logo small { display: none; } }
/* Tablets, or a long nav (teacher + admin) on a laptop: the top nav shows
   icons only (the label is the tooltip). */
@media (min-width: 761px) and (max-width: 1100px) {
  .nav a { padding: 8px 10px; font-size: 1.15rem; line-height: 1; }
  .nav a .icon { display: inline-block; vertical-align: -0.15em; }
  .nav a .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 761px) and (max-width: 1440px) {
  .nav.many a { padding: 8px 10px; font-size: 1.15rem; line-height: 1; }
  .nav.many a .icon { display: inline-block; vertical-align: -0.15em; }
  .nav.many a .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Labels that do not fit beside the chips (a longer language): main.js
   tries the narrower look of a small laptop (data-fit="tight"), then icons
   only, the label being the tooltip (data-fit="icons"). */
.topbar-in[data-fit] .logo small { display: none; }
.topbar-in[data-fit="tight"] .nav { gap: 0; }
.topbar-in[data-fit="tight"] .nav a { padding: 8px 8px; font-size: .9rem; }
.topbar-in[data-fit="icons"] .nav a { padding: 8px 10px; font-size: 1.15rem; line-height: 1; }
.topbar-in[data-fit="icons"] .nav a .icon { display: inline-block; vertical-align: -0.15em; }
.topbar-in[data-fit="icons"] .nav a .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav a:hover { background: var(--bg-2); text-decoration: none; }
.nav a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.spacer { flex: 1; }
/* A long upgrade label on a narrow phone: the button moves under the label
   instead of squeezing it to a word per line, and wraps if still too long. */
.access-bar { max-width:1120px; margin:0 auto; padding:6px 16px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; min-height:44px; border-top:1px solid var(--line); font-size:.85rem; }
.access-label { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; color:var(--ink-2); flex:1 1 0; min-width:min-content; padding-block:8px; margin-block:-8px; }
/* The name of the access reads as the link it is: until something of the
   learner's has been corrected it is the header's only way to the passes
   (first run, item 5). */
.access-label strong { color:var(--ink); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:3px; text-decoration-color:var(--ink-2); }
.access-label:hover strong { text-decoration-thickness:2px; }
.access-detail { font-size:.8rem; }
.btn.access-upgrade { flex-shrink:0; max-width:100%; white-space:normal; min-height:32px; padding:5px 10px; background:var(--brand-soft); color:var(--ink); border-color:transparent; }
.btn.access-upgrade:hover { border-color:var(--brand); }
.access-pill { background:var(--pick-soft); color:var(--pick); padding:5px 12px; border-radius:8px; }
.profile-access h2 { margin:0; font-size:1.25rem; }
.profile-access > .row:first-child { margin-bottom:14px; }
.profile-access .btn { min-height:44px; }
.duration-advice { padding:16px; margin:16px 0; border-radius:var(--radius-sm); background:var(--pick-soft); color:var(--ink); }
.duration-advice h3 { display:flex; align-items:center; gap:8px; font-size:1rem; }
.duration-advice .icon { color:var(--pick); }
.duration-advice small { display:block; color:var(--ink-2); margin-top:10px; }
.duration-advice p { margin-bottom:8px; }
.pass-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr)); gap:16px; margin:20px 0; }
.pass-option { border:1px solid var(--line-2); border-radius:var(--radius-sm); padding:18px; display:flex; flex-direction:column; min-width:0; }
.pass-option h3 { font-size:1.25rem; }
.pass-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px; margin:0; }
.pass-price strong { font-size:2rem; line-height:1.3; }
.pass-price span,.pass-terms { color:var(--ink-2); }
.pass-terms { font-size:.85rem; margin:6px 0 0; }
.payment-currency { font-size:.85rem; color:var(--ink-2); }
.pass-benefits { padding-inline-start:18px; color:var(--ink-2); font-size:.9rem; flex:1; }
.pass-benefits li + li { margin-top:8px; }
.pass-option .btn { width:100%; white-space:normal; min-height:44px; flex-wrap:wrap; justify-content:center; column-gap:.35em; }
/* Name, price and term each stay whole; the line breaks between them. */
.pass-option .btn bdi { white-space:nowrap; }
.pass-option,#elegir-pase,#mejorar-acceso,#uso-del-acceso,#pagos-y-facturas { scroll-margin-top:140px; }
@media (max-width:600px) {
  .access-label { gap:2px 6px; line-height:1.3; }
  .access-detail { flex-basis:100%; }
  .usage-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .usage-table tr { display:grid; grid-template-columns:1fr 1fr 1.6fr; }
  .usage-table td:first-child { grid-column:1 / -1; padding-bottom:4px; font-weight:600; border-bottom:0; }
  .usage-table td:not(:first-child) { padding:6px 8px 12px; min-width:0; font-size:.85rem; }
  .usage-table td:nth-child(2) { padding-inline-start:12px; }
  .usage-table .status-badge { white-space:normal; }
  .usage-table td[data-label]::before { content:attr(data-label); display:block; color:var(--ink-2); font-size:.7rem; }
}
.chips { display: flex; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); font-weight: 700; font-size: .88rem; white-space: nowrap;
}
/* Header tools: language, progress (streak · XP, one link), theme, notes and
   the account menu behind the avatar. */
.progress-chip { gap: 7px; }
.progress-chip .flame, .progress-chip .xp { display: inline-flex; align-items: center; gap: 5px; }
.progress-chip .flame { color: var(--brand); }
.progress-chip .xp { color: var(--plum); }
.progress-chip .sep { color: var(--ink-3); font-weight: 400; }
.chips .theme-toggle { width: 34px; height: 34px; border-radius: 999px; font-size: 1rem; }
.menu-btn { cursor: pointer; font: inherit; font-weight: 700; font-size: .85rem; color: var(--ink-2); }
.menu-btn .icon { font-size: 1.05rem; }
.menu-btn:hover, .chips .theme-toggle:hover { border-color: var(--line-2); color: var(--ink); }
.menu-btn[aria-expanded="true"] { background: var(--bg-2); color: var(--ink); }
.lang-menu .lang-code { text-transform: uppercase; letter-spacing: .03em; }
.topbar-menu { position: relative; display: flex; }
.menu-panel {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 40; width: max-content; min-width: 200px; max-width: min(300px, calc(100vw - 24px));
  /* Under the sticky header: a long menu scrolls inside itself on a short screen. */
  max-height: calc(100vh - var(--topbar-h, 64px) - 20px); max-height: calc(100dvh - var(--topbar-h, 64px) - 20px); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.menu-panel nav { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem; text-align: start; cursor: pointer;
}
.menu-item .grow { flex: 1; }
.menu-item .icon { color: var(--ink-2); font-size: 1.05rem; }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-2); text-decoration: none; }
.menu-item[aria-current="true"] { background: var(--bg-2); }
.menu-item[aria-current="true"] .icon { color: var(--pick); }
.menu-item:disabled { opacity: .6; cursor: default; }
.menu-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); overflow-wrap: anywhere; }
.menu-who b { color: var(--ink); font-size: .95rem; }
.menu-level { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--sea-soft); color: var(--sea); font-weight: 800; font-size: .8rem; }
.menu-logout { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--ink);
  background: var(--sun-soft); border: 1px solid var(--line); cursor: pointer;
}
button.avatar { padding: 0; font: inherit; font-weight: 800; font-size: 1rem; }
button.avatar:hover { border-color: var(--line-2); }
button.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--pick-soft); border-color: var(--pick); }
.main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }
.main.narrow { max-width: 760px; }
.main.read { max-width: 980px; }
.footer { text-align: center; color: var(--ink-3); font-size: .85rem; padding: 24px 16px 32px; }

.tabbar { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  /* The globe alone; its label names the language. */
  .lang-menu .lang-code { display: none; }
  .chips .menu-btn { padding: 5px 8px; }
  .tabbar {
    /* Equal tabs; a longer label (other languages) takes the room it needs
       and may wrap onto a second line instead of running into its neighbour. */
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1 1 0; min-width: min-content; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 700; line-height: 1.2; text-align: center; color: var(--ink-3); padding: 4px 2px; }
  .tabbar a.on { color: var(--pick); }
  .tabbar a span { font-size: 1.25rem; line-height: 1; }
  .tabbar a:hover { text-decoration: none; }
  .main { padding-bottom: 96px; }
}
/* The smallest phones (320 px): smaller type, and still every tab is as wide
   as its longest word, so a word is never split («Трени-ровка», owner,
   29 November); a label of two words takes two lines. When the words of a
   language do not fit side by side (six tabs for an administrator, a wide
   system font), the page asks for tighter type and only then for a break
   inside a word (data-fit, set in main.js): never the edge of the screen. */
@media (max-width: 380px) {
  /* Room between neighbours, so two labels never read as one line. */
  .tabbar { padding-inline: 4px; gap: 6px; }
  .tabbar a { font-size: .64rem; padding-inline: 0; }
  .tabbar[data-fit] { gap: 4px; }
}
@media (max-width: 760px) {
  .tabbar a { overflow-wrap: break-word; }
  .tabbar[data-fit] a { font-size: .6rem; }
  .tabbar[data-fit="break"] a { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 380px) {
  .topbar-in { flex-wrap: wrap; gap: 8px; }
  .topbar-in .spacer { display: none; }
  .topbar-in .chips { margin-inline-start: auto; flex-wrap: wrap; justify-content: flex-end; }
}

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.flat { box-shadow: none; }
.card.tight { padding: 14px 16px; }
.card h3 { margin-bottom: .35em; }
.card.link { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.card.link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
/* shared.css keeps a button's label on one line. A link button, or a button
   in a card or a dialog, whose label is longer than its box (a narrow screen,
   a longer language) wraps inside it instead of running off; one that fits
   is as before. */
.btn.link, .card .btn, .modal .btn { white-space: normal; max-width: 100%; }
.hero-card {
  position: relative; border-radius: var(--radius); padding: 24px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); box-shadow: none;
}
.hero-card h1, .hero-card h2 { color: var(--ink); }
.hero-card .muted { color: var(--ink-2); }
.hero-card > .row { gap: 20px; align-items: flex-start; }
.hero-card > .row > * { min-width: 0; }
/* Only a word longer than the line is broken: a name is never hyphenated while it fits. */
.hero-card h1 { overflow-wrap: anywhere; }
/* /simulacro: the hero is a dark gradient in both themes (exam.js), so its
   text is light; its white buttons keep the light theme's plum. */
.hero-card.exam-hero { color: #fff; background: radial-gradient(120% 140% at 0% 0%, #5b8def 0%, #6b4fbb 50%, #3b2a7a 100%); }
.hero-card.exam-hero h1, .hero-card.exam-hero h2 { color: #fff; }
.hero-card.exam-hero .muted { color: rgb(255 255 255 / 85%); }
.hero-card.exam-hero .btn, .hero-card.exam-hero .pill { background: #fff; color: #6b4fbb; }
.today-summary { color: var(--ink-2); font-size: .92rem; white-space: nowrap; padding-top: 4px; }
.today-summary b { color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-stats .card { background: transparent; box-shadow: none; border-color: var(--line); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: var(--bg-2); color: var(--ink-2);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.sun { background: var(--sun-soft); color: var(--warn); }
.pill.sea { background: var(--sea-soft); color: var(--sea); }
.pill.plum { background: var(--plum-soft); color: var(--plum); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }
.pill.pick { background: var(--pick-soft); color: var(--pick); }
/* «Tu respuesta: B) …» on /errores: one run of text, not two flex columns.
   The label keeps its line and a long answer wraps after it. */
.pill.answer-pill { display: inline-block; max-width: 100%; border-radius: 13px; }
.pill-label { white-space: nowrap; }

/* Semantics are shared across feedback and history; labels also work without
   colour. Activity/XP and unused allowances deliberately stay separate. */
[data-tone="good"] { --tone: var(--ok); --tone-soft: var(--ok-soft); }
[data-tone="warn"] { --tone: var(--warn); --tone-soft: var(--sun-soft); }
[data-tone="bad"] { --tone: var(--bad); --tone-soft: var(--bad-soft); }
[data-tone="neutral"] { --tone: var(--ink-2); --tone-soft: var(--bg-2); }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; font-size: .82rem; font-weight: 700; line-height: 1.4; color: var(--tone); background: var(--tone-soft); }
.status-badge .icon { flex: none; }
.bar.status-bar > i { background: var(--tone); }
.warning-message { padding: 12px 16px; border-radius: 12px; background: var(--sun-soft); color: var(--warn); }

/* ---------- auth / landing ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art {
  position: relative; overflow: hidden; padding: 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 120% at 10% 10%, #ff8a5c 0%, var(--brand) 42%, #8c2448 100%);
}
.auth-art h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); max-width: 520px; }
.auth-art p { font-size: 1.1rem; max-width: 480px; color: rgb(255 255 255 / 88%); }
.auth-art .bubbles span {
  position: absolute; border-radius: 50%; background: rgb(255 255 255 / 10%); animation: float 9s ease-in-out infinite;
}
.auth-art .feature { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0; font-weight: 600; }
.auth-art .feature b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(255 255 255 / 18%); flex: none; }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.auth-form .card { width: 100%; max-width: 420px; min-width: 0; padding: 28px; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 28px 20px; }
  .auth-art .features { display: none; }
}
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-18px) } }

/* ---------- dashboard ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font: 800 1.6rem/1.1 var(--font-display); }
.stat span { color: var(--ink-3); font-size: .85rem; font-weight: 600; }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.ring .ring-label b { font: 800 1.15rem var(--font-display); display: block; }
.ring .ring-label small { font-size: .7rem; font-weight: 700; }
.prueba-card { display: flex; gap: 16px; align-items: center; }
.prueba-icon {
  width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem;
}
.p-CL, .p-CLUL { background: var(--sea-soft); color: var(--sea); }
.p-CA, .p-CAUL { background: var(--plum-soft); color: var(--plum); }
.p-EE, .p-DIEE, .p-EMIE { background: var(--sun-soft); color: var(--warn); }
.p-EO, .p-DIEO, .p-EMIO { background: var(--pick-soft); color: var(--pick); } /* not red: red means wrong */
.bar { height: 10px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(var(--bar-to, 90deg), var(--sea), var(--ok)); transition: width .6s ease; }
.bar.sun > i { background: linear-gradient(var(--bar-to, 90deg), var(--sun), var(--brand)); }
.camino { display: flex; gap: 0; align-items: center; overflow-x: auto; padding: 6px 2px 2px; }
.camino .stop { display: flex; flex-direction: column; align-items: center; min-width: 74px; font-size: .7rem; font-weight: 700; color: var(--ink-3); text-align: center; }
.camino .dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line-2); background: var(--card); margin-bottom: 4px; }
.camino .stop.done .dot { background: var(--sun); border-color: var(--sun); }
.camino .stop.here .dot { background: var(--pick); border-color: var(--pick); box-shadow: 0 0 0 5px var(--pick-soft); }
.camino .stop.here { color: var(--ink); }
.camino .seg { flex: 1; min-width: 18px; height: 3px; background: var(--line-2); margin-bottom: 20px; }
.camino .seg.done { background: var(--sun); }
.heat { display: grid; grid-template-columns: repeat(auto-fill, 14px); gap: 4px; }
.heat i { width: 14px; height: 14px; border-radius: 4px; background: var(--bg-2); }
.heat i.l1 { background: color-mix(in srgb, var(--ok) 30%, var(--bg-2)); }
.heat i.l2 { background: color-mix(in srgb, var(--ok) 60%, var(--bg-2)); }
.heat i.l3 { background: var(--ok); }

/* ---------- catalogue ---------- */
.tarea {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; transition: border-color .15s, transform .12s, box-shadow .15s;
}
.tarea:hover { border-color: var(--brand); transform: translateX(2px); box-shadow: var(--shadow); }
.tarea .num { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--bg-2); flex: none; }
.tarea .meta { flex: 1; min-width: 0; }
.tarea .meta b { display: block; }
.tarea .meta small { display: block; }
.stars { color: var(--sun); letter-spacing: 1px; font-size: .95rem; white-space: nowrap; }

/* A task that is being answered takes the phone's screen (owner, 29 November
   2026: «без меню и компактно»): no bottom menu and no access strip, the
   level line of the task bar goes and the clock and the button are smaller,
   so they share a line. ui.js puts .in-task on <html> while the task is open
   for answers; the way out is the arrow of the task bar (.task-exit, below)
   and, as before, the logo. Left for the task at 320×480, before
   and after: 14 → 215 px in the listening section of a mock exam, 147 → 348 px
   in its reading section, 189 → more than 300 px in a training task (e2e
   flow 55). */
@media (max-width: 760px) {
  /* The reminder to confirm an address is the account's business, not the task's: it took 188 px above a task at 320×480. */
  .in-task .tabbar, .in-task .access-bar, .in-task .main > .banner { display: none; }
  .in-task .main { padding-bottom: 64px; }
  .in-task .taskbar { padding: 6px 0; }
  .in-task .taskbar-title small { display: none; }
  .in-task .taskbar .btn { min-height: 0; padding: 7px 12px; font-size: .88rem; }
  .in-task .taskbar .timer { padding: 5px 10px; font-size: .98rem; }
}
/* Inside a task the header keeps to one row. Where it would still take two
   with the mark alone — with points in the progress chip («1 · 23») on the
   narrowest phones the language and the theme did not fit beside it, 32 px of
   the task — the theme leaves it first, and the language only if that is not
   enough: main.js measures the row (data-task="tight", then "tighter"); at
   360 px both fit and stay. Both are back outside the task. */
.in-task .topbar-in[data-task] .chips .theme-toggle, .in-task .topbar-in[data-task="tighter"] .chips .lang-menu { display: none; }
/* The way out of a task on a phone (ui.js TaskExit; owner, 30 November 2026,
   after the pictures of four ways: «стрелка назад без крошек норм»): an arrow
   before the title of the pinned task bar, in sight wherever the page is
   scrolled. Only where the task has the screen and the menu is hidden; the
   crumbs go there — the arrow leads where they led and the bar names the
   task — which gives the task 62 px more at the top of the page. The button
   is taller than the title's line and is let into the bar's padding, so the
   pinned bar is no higher for it; its touch area is 44 px. It takes 40 px of
   the title's row: a title that only just fitted takes a second line (in a
   phone's font, 2 to 8 of the 58 titles and section names, by width). */
/* «Entrenar» before the first corrected work: why the oral tasks are closed. */
.locked-note { margin: 10px 0 0; font-size: .92rem; }
.locked-note a, .plan-pass a { text-decoration: underline; white-space: nowrap; }
.task-exit { display: none; }
@media (max-width: 760px), (orientation: landscape) and (max-height: 500px) and (max-width: 960px) {
  .in-task .crumbs { display: none; }
  .in-task .task-exit {
    display: inline-flex; align-items: center; justify-content: center; flex: none; position: relative;
    width: 32px; height: 32px; margin-block: -4px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: 1.1rem;
  }
  .in-task .task-exit::after { content: ''; position: absolute; inset: -7px; } /* 30 + 14: from inside the border */
  .in-task .task-exit:hover { border-color: var(--line-2); color: var(--ink); }
  .in-task .taskbar > .task-exit + .taskbar-title { flex: 1 1 calc(100% - 40px); }
}

/* A phone held sideways (owner, 30 November 2026, an iPhone 16 Pro Max: «очень
   много места занимают табы, меню и так далее»): 850–960 px wide and, under
   the browser's own bars, some 280 px high — of which the pinned header, the
   access strip and a two-row task bar took 180. It is wider than the phone
   layout's 760 px, so nothing of the task screen applied to it. Here the
   header is not pinned on any page: it scrolls away with the page, and
   whatever stands under it starts at the top (--topbar-h is what the sticky
   bars and the scroll margins read; main.js writes it on <html>, hence
   !important). Inside a task the access strip and the reminder of the address
   go as on an upright phone, the task bar is one row — arrow, title, switch or
   clock, button — and the arrow is the way out, because the header's menu has
   scrolled away. */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 960px) {
  :root { --topbar-h: 0px !important; }
  .topbar { position: static; }
  .in-task .access-bar, .in-task .main > .banner { display: none; }
  .in-task .main { padding-top: 8px; }
  .in-task .taskbar { padding: 6px 0; gap: 8px; }
  .in-task .taskbar-title small { display: none; }
  .in-task .taskbar > .taskbar-title, .in-task .taskbar > .task-exit + .taskbar-title { flex: 1 1 0; }
  .in-task .taskbar .btn { min-height: 0; padding: 7px 12px; font-size: .88rem; }
  .in-task .taskbar .timer { padding: 5px 10px; font-size: .98rem; }
}

/* The first run (decision of 23 November 2026). The line of what to expect
   above a newcomer's first practice, in the interface language; the note
   when «Corregir» is pressed with nothing answered; «Texto | Preguntas» in
   the task bar of a phone, where the questions stand under the whole text. */
.first-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; counter-reset: step; }
.first-steps li { counter-increment: step; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.first-steps li::before { content: counter(step) "."; font-weight: 800; }
.first-steps li.done { color: var(--ok); }
.first-steps li[aria-current] { border-color: var(--pick); background: var(--pick-soft); color: var(--ink); }
.first-what { margin: 10px 0 0; font-size: .95rem; color: var(--ink-2); }
/* A phone: the one action first, then the steps and the rest (at 320×480 the button stood under the bottom menu). */
.first-run-in { display: flex; flex-direction: column; position: relative; z-index: 1; max-width: 620px; }
@media (max-width: 600px) {
  .first-run-in > .first-go { order: -2; margin-bottom: 14px; }
  .first-run-in > h1 { order: -3; font-size: 1.45rem; }
}
.free-list { margin: 16px 0 0; padding: 12px 16px; padding-inline-start: 2em; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); }
.free-list li { margin: .25em 0; }
.hero-card .first-line { margin: 0; font-weight: 700; }
.first-practice { margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.first-practice h2 { margin: 0 0 4px; font-size: 1.05rem; }
.first-practice h2:focus { outline: none; }
.first-practice p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.first-practice-note { margin: -8px 0 16px; font-size: .9rem; }
.corrections-left { margin: -8px 0 16px; font-size: .9rem; }
.corrections-left.warn { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--sun-soft); color: var(--ink); font-weight: 600; }
.corrections-left a { text-decoration: underline; text-underline-offset: 3px; }
/* The refusal of a hand-in is brought under the header and takes the focus. */
.limit-refusal { scroll-margin-top: calc(var(--topbar-h, 57px) + 12px); outline: 0; }
.limit-back { margin: 0 0 10px; }
/* Tighter on a phone, where it stands above the whole task (after the rules above, or they would win). */
@media (max-width: 600px) {
  .first-practice { padding: 10px 12px; }
  .first-practice h2 { font-size: 1rem; }
  .first-practice p { font-size: .9rem; }
}
.taskbar .task-note { flex: 1 1 100%; margin: 0; padding: 7px 12px; border-radius: 10px; background: var(--sun-soft); font-weight: 600; font-size: .92rem; }
.task-note:empty { display: none; }
.parts { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; background: var(--card); padding: 2px; }
.parts button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; border-radius: 999px; padding: 5px 10px; font: 700 .88rem/1.2 var(--font); color: var(--ink-2); cursor: pointer; }
.parts button[aria-current] { background: var(--pick-soft); color: var(--ink); }
.parts .chip { padding: 1px 7px; font-size: .8rem; }
/* On the narrowest phones the switch, the count and «Corregir» still share a line. */
@media (max-width: 380px) { .parts button { padding: 5px 8px; } }
@media (max-width: 340px) { .parts button { gap: 4px; padding: 5px 6px; font-size: .8rem; } .parts .chip { padding: 1px 5px; font-size: .74rem; } }
.split > *, .split .q { scroll-margin-top: calc(var(--topbar-h, 57px) + var(--taskbar-h, 96px) + 10px); }

/* ---------- task runner ---------- */
.taskbar {
  position: sticky; top: 55px; z-index: 15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 10px 0; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
/* What scrolls under the pinned bar fades into it: a card cut flush by the
   bar's edge looked as if it hung from the bar, its heading stuck to its top
   (owner, 30 November 2026, of a text under the bar: «Texto слиплось с верхом
   блока»). Over the page's own colour the fade is not seen. */
.taskbar::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; margin-top: 1px; height: 14px; pointer-events: none; background: linear-gradient(var(--bg), transparent); }
.taskbar-title { flex: 1 1 0; min-width: 0; }
.taskbar .programme { flex: 1 1 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: .95rem; }
.taskbar .programme.done { color: var(--ok); font-weight: 700; }
.taskbar-title > div { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .taskbar { top: 57px; gap: 8px; }
  .taskbar > .taskbar-title { flex: 1 1 100%; }
  .taskbar .btn { margin-inline-start: auto; }
}
.timer { font: 800 1.05rem var(--mono); padding: 6px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.timer.low { color: var(--bad); border-color: var(--bad); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55 } }
.instructions { background: var(--sun-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; font-size: .97rem; white-space: pre-line; }
.instructions b { font-family: var(--font-display); letter-spacing: .03em; display: block; margin-bottom: 4px; }
.passage {
  font: 1.07rem/1.75 var(--font-read); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.passage h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: .6em; }
.passage p { margin: 0 0 .9em; }
.passage .label { font: 800 .75rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; display: block; }
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > .sticky { position: sticky; top: 120px; max-height: calc(100vh - 140px); overflow: auto; }
/* Not pinned on a narrow screen, and no scroller of its own either: «Preguntas» of the task bar brings a question under the bars by the page's scroll. */
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split > .sticky { position: static; max-height: none; overflow: visible; } }
/* A phone held sideways is wide enough for the text beside its questions and
   far too short for one under the other («сначала идут все вопросы, потом
   идут все ответы»): two columns as on a desk, the pinned one scrolling on its
   own under the task bar. train.js (BESIDE) drops the «Texto | Preguntas»
   switch by the same rule. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 640px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
  .split > .sticky {
    position: sticky; top: calc(var(--topbar-h, 0px) + var(--taskbar-h, 46px) + 8px); overflow: auto; overscroll-behavior: contain;
    max-height: calc(100vh - var(--topbar-h, 0px) - var(--taskbar-h, 46px) - 16px); max-height: calc(100dvh - var(--topbar-h, 0px) - var(--taskbar-h, 46px) - 16px);
  }
}
.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.q .stem { font-weight: 650; margin-bottom: 10px; display: flex; gap: 10px; }
.q .stem .n { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-2); font-weight: 800; font-size: .9rem; }
.opt {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line);
  margin: 6px 0; cursor: pointer; transition: border-color .12s, background .12s; background: var(--card); width: 100%; text-align: start;
  font: inherit; color: inherit;
}
.opt:hover { border-color: var(--line-2); background: var(--bg); }
.opt .letter { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; border: 1.5px solid var(--line-2); }
.opt.sel { border-color: var(--pick); background: var(--pick-soft); }
.opt.sel .letter { background: var(--pick); color: var(--pick-ink); border-color: var(--pick); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .letter { background: var(--ok); color: var(--ok-ink); border-color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .letter { background: var(--bad); color: var(--bad-ink); border-color: var(--bad); }
.opt[disabled] { cursor: default; }
.option-label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.answer-state { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; font-weight: 700; }
.right .answer-state { color: var(--ok); }
.wrong .answer-state { color: var(--bad); }
.btn.answer-choice:disabled { opacity: 1; cursor: default; }
.btn.answer-choice.right { background: var(--ok); color: var(--ok-ink); }
.btn.answer-choice.wrong { background: var(--bad); color: var(--bad-ink); }
.explain { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: .95rem; }
.explain .ev { font-family: var(--font-read); font-style: italic; color: var(--ink-2); display: block; margin-top: 6px; }
.gap {
  display: inline-flex; align-items: center; gap: 4px; min-width: 64px; padding: 1px 8px; margin: 0 2px; border-radius: 8px;
  border: 1.5px dashed var(--line-2); background: var(--bg); font: 700 .92rem var(--font); cursor: pointer; vertical-align: baseline; color: var(--ink);
}
.gap.filled { border-style: solid; border-color: var(--pick); background: var(--pick-soft); }
.gap.active { box-shadow: 0 0 0 4px var(--sun-soft); border-color: var(--sun); }
.gap.right { border-color: var(--ok); background: var(--ok-soft); border-style: solid; }
.gap.wrong { border-color: var(--bad); background: var(--bad-soft); border-style: solid; }
.frag { padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); margin: 6px 0; cursor: pointer; font-size: .95rem; display: flex; gap: 10px; }
.frag:hover { border-color: var(--line-2); }
.frag.used { opacity: .45; }
.frag .letter { flex: none; font-weight: 800; color: var(--ink-2); }
.frag.sel { border-color: var(--pick); background: var(--pick-soft); }
.frag.sel .letter { color: var(--pick); }
.matchgrid { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.matchgrid td { padding: 6px 8px; vertical-align: top; }
.audio-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--plum-soft); margin-bottom: 14px; }
.audio-card .play {
  width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--plum); color: #fff; font-size: 1.3rem; cursor: pointer;
  display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px rgb(107 79 187 / 35%);
}
.audio-card .play:disabled { opacity: .45; cursor: not-allowed; }
.audio-card .prog { flex: 1; height: 8px; background: rgb(107 79 187 / 18%); border-radius: 999px; overflow: hidden; }
.audio-card .prog i { display: block; height: 100%; background: var(--plum); width: 0; }
.wordcount { font-weight: 800; font-family: var(--mono); }
.wordcount.under { color: var(--warn); }
.wordcount.over { color: var(--bad); }
.wordcount.ok { color: var(--ok); }
.editor { font: 1.05rem/1.7 var(--font-read); min-height: 320px; }

/* ---------- results ---------- */
.score-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.score-big { font: 900 3rem/1 var(--font-display); }
.score-detail { flex: 1; min-width: min(240px, 100%); }
.practice-xp { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .85rem; color: var(--ink-2); }
.practice-xp b { color: var(--plum); }
.verdict { font: 900 clamp(2rem, 6vw, 3.4rem)/1 var(--font-display); letter-spacing: .02em; }
.verdict.apto { color: var(--ok); }
.verdict.noapto { color: var(--bad); }
.band { display: flex; gap: 4px; }
.band i { width: 22px; height: 8px; border-radius: 4px; background: var(--bg-2); }
.band i.on { background: var(--tone); }
.mark-err { background: var(--bad-soft); border-bottom: 2px solid var(--bad); border-radius: 3px; cursor: help; }
.errlist .e { padding: 10px 12px; border-radius: 12px; background: var(--bg); margin-bottom: 8px; }
.errlist .e del { color: var(--bad); }
.errlist .e ins { color: var(--ok); text-decoration: none; font-weight: 700; }

/* ---------- loader ---------- */
.loader-wrap { text-align: center; padding: 48px 16px; }
.loader-orb {
  width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand), var(--sun), var(--sea), var(--plum), var(--brand));
  animation: spin 2.4s linear infinite; position: relative;
}
.loader-orb::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg); }
.loader-orb span { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-size: 2rem; animation: spin 2.4s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg) } }
.steps { list-style: none; padding: 0; margin: 18px auto; max-width: 360px; text-align: start; }
.steps li { padding: 8px 12px; border-radius: 10px; margin: 4px 0; color: var(--ink-3); font-weight: 600; display: flex; gap: 10px; }
.steps li.now { color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
.steps li.done { color: var(--ok); }
.tip { max-width: 520px; margin: 18px auto 0; padding: 14px 16px; border-radius: 14px; background: var(--sea-soft); color: var(--ink); font-size: .95rem; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; }

/* ---------- toast, modal, confetti ---------- */
.toasts { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; animation: pop .25s ease; max-width: 360px; }
.toast.xp { background: var(--plum); color: #fff; }
@media (max-width: 760px) { .toasts { bottom: 84px; inset-inline-start: 16px; } }
@keyframes pop { from { transform: translateY(10px) scale(.96); opacity: 0 } }
#main-content { scroll-margin-block-start: 5rem; }
.modal { background: var(--card); color: var(--ink); border: 0; border-radius: 22px; padding: 24px;
  width: calc(100% - 32px); max-width: 520px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  box-shadow: var(--shadow-lg); overflow: auto; overscroll-behavior: contain; }
.modal::backdrop { background: rgb(15 16 35 / 45%); overflow: hidden; overscroll-behavior: contain; }
.modal-title { padding-inline-end: 24px; }
.modal-close { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; }
.security-check { margin: 4px 0 14px; min-height: 65px; color: var(--ink-2); font-size: .9rem; }
/* Cloudflare's widget is 300 px wide; a narrow phone's card is narrower. It
   keeps its width and is scaled to fit (ui.js), so it never widens the page. */
.security-check > div:first-child { width: 300px; max-width: none; transform-origin: top left; }
[dir="rtl"] .security-check > div:first-child { transform-origin: top right; }
.security-check button { margin-top: 6px; }
@keyframes fade { from { opacity: 0 } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- tables (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.t th { text-align: start; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
/* Chinese may break between any two characters, which squeezes every column
   to one character; keep words whole so .table-wrap scrolls, as in Spanish. */
table.t td:lang(zh) { word-break: keep-all; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--bg); }
code, .mono { font-family: var(--mono); font-size: .9em; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--ink-3); }
.kpi { padding: 16px; }
.kpi b { font: 800 1.7rem var(--font-display); display: block; }
.kpi span { font-size: .8rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); }
.empty .big { font-size: 2.6rem; margin-bottom: 8px; }
.fade-in { animation: fade .3s ease; }
.hide-sm { }
@media (max-width: 760px) { .hide-sm { display: none !important; } }

.stat b .icon { width: .82em; height: .82em; vertical-align: -0.08em; }
.stars { display: inline-flex; gap: 1px; color: var(--sun); }
.feature b .icon { width: 18px; height: 18px; }
.audio-card .play .icon { width: 18px; height: 18px; }

/* ---------- links on chips and stats; jobs ---------- */
a.chip:hover { text-decoration: none; box-shadow: var(--shadow); }
a.stat { color: inherit; }
a.stat:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.flame-ic { color: var(--brand); }
.xp-ic { color: var(--plum); }
.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px var(--sun); } 100% { box-shadow: var(--shadow); } }
.job-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; gap: 10px; flex-wrap: wrap; }
.job-row:hover { text-decoration: none; background: var(--bg-2); }
.pill .spinner { width: .9em; height: .9em; border-width: 2px; vertical-align: -0.12em; }
.card[id], section[id] { scroll-margin-top: 84px; }

/* ---------- account banner (unconfirmed email) ---------- */
.banner { margin-bottom: 14px; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px;
  background: var(--sun-soft); border: 1px solid color-mix(in srgb, var(--sun) 45%, transparent); }

/* ---------- invites, teachers ---------- */
.consent { background: var(--sea-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.consent p { margin: 0 0 8px; }
.invite-code { font-family: var(--mono); letter-spacing: .08em; font-weight: 700; }
.invite-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.invite-row:first-child { border-top: 0; }
.invite-row .grow { flex: 1 1 200px; min-width: 0; }
.invite-link { width: 100%; font-family: var(--mono); font-size: .85rem; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 12px; font-size: .92rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); font-weight: 600; }
.crumbs .sep { color: var(--ink-3); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.audio-card.recorder { background: var(--card); border: 1px solid var(--line); }
.tries { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.tries a.pill:hover { text-decoration: none; background: var(--bg-2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.readonly-bar { background: var(--plum-soft); color: var(--ink); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; }
.readonly-bar > span { flex: 1 1 220px; }
.student-card { display: block; color: inherit; }
.student-card:hover { text-decoration: none; }
.student-card .row { gap: 6px 10px; }
.links-list a { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); }
.links-list a:first-child { border-top: 0; }
.links-list a:hover { text-decoration: none; color: var(--brand); }
.links-list a .icon { color: var(--brand); flex: none; }
.links-list a span.grow { flex: 1; }
/* The referral button among these links (referrals.js) wraps centred inside
   its border; on one line it keeps the row's height (12 + 16 + 12 px). */
.links-list a.btn { padding: 10px 16px; line-height: 1.25; text-align: center; }

/* ---------- notes ---------- */
.note-chip { position: relative; cursor: pointer; font: inherit; font-weight: 700; font-size: .88rem; color: var(--ink-2); }
.note-chip:hover { border-color: var(--brand); color: var(--brand); }
.note-chip .icon { color: var(--brand); }
.note-count { background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: .7rem; min-width: 17px; height: 17px; padding: 0 4px; display: inline-grid; place-items: center; }
@media (max-width: 760px) {
  .note-chip { padding: 6px 9px; }
  .note-chip .lbl { display: none; }
  .note-count { position: absolute; top: -6px; inset-inline-end: -6px; }
}
.note-quote { margin: 0 0 10px; padding: 8px 12px; border-inline-start: 3px solid var(--sun); background: var(--sun-soft); border-start-start-radius: 0; border-end-start-radius: 0; border-start-end-radius: 10px; border-end-end-radius: 10px; font-family: var(--font-read); color: var(--ink-2); position: relative; }
.note-quote .btn { position: absolute; top: 2px; inset-inline-end: 2px; }
.note-quote:has(.btn) { padding-inline-end: 40px; }
.note-body { white-space: pre-wrap; word-break: break-word; margin: 6px 0 2px; }
.note-card.compact { border-top: 1px solid var(--line); padding-top: 8px; }
.note-search { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0; position: relative; }
.note-search .icon { position: absolute; inset-inline-start: 12px; color: var(--ink-3); }
.note-search input { padding-inline-start: 36px; }

/* ---------- impersonation ---------- */
.imp-bar {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px; background: var(--plum); color: #fff;
  font-size: .9rem; font-weight: 600; white-space: nowrap;
}
.imp-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.imp-bar .btn { background: #fff; color: var(--plum); box-shadow: none; padding: 4px 12px; }
.imp-bar .narrow { display: none; }
@media (max-width: 760px) { .imp-bar .wide { display: none; } .imp-bar .narrow { display: inline; } }
.app.impersonating .taskbar { top: var(--topbar-h, 95px); }
@media (max-width: 760px) { .app.impersonating .taskbar { top: var(--topbar-h, 97px); } .imp-bar { font-size: .82rem; padding: 0 12px; } }

/* ---------- coming back ---------- */
.resume-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; }
@media (max-width: 760px) {
  .card.resume-card { padding-inline-end: 44px; }
  .resume-card > .btn.link { position: absolute; top: 6px; inset-inline-end: 6px; }
}
.recap-card { position: relative; }
.resume-card .grow { flex: 1 1 220px; min-width: 0; }
.resume-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); flex: none; }
.recap-card ul { margin: 8px 0 0; padding-inline-start: 20px; }
.recap-card li { margin: 4px 0; }
@media (max-width: 760px) {
  .hero-card .row .btn { flex: 1 1 100%; justify-content: center; white-space: normal; text-align: center; }
}
.tarea.locked { opacity: .6; cursor: default; }
.tarea.locked:hover { transform: none; box-shadow: none; }
@media (max-width: 760px) { .grid.four.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A long word of a translated label (Greek «προσομοιώσεις») breaks inside
   its card instead of pushing the card off the screen. */
.stat span { overflow-wrap: anywhere; hyphens: auto; }
.invite-actions { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.t td.meta { min-width: 14ch; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Study plan up to the exam date */
.plan-card { border-color: var(--line); }
.plan-steps { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 6px; }
.plan-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.review-cta { align-items: center; }

.auth-wrap { position: relative; }
.auth-wrap > .theme-toggle { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 5; }


/* Quiet surfaces: color signals an action or result, rather than decorating every block. */
.card { box-shadow: none; }
.card.link:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
.tarea:hover { transform: none; box-shadow: none; }
@media (max-width:760px) { .hero-card { padding:20px; } .hero-card .today-summary { width:100%; padding-top:0; } }
.activity-meter { display:block; width:100%; height:10px; margin:8px 0 4px; accent-color:var(--sea); border:0; border-radius:3px; }
.auth-art { background:#25283f; }
@media (max-width:860px) {
  .auth-wrap { grid-template-rows:auto 1fr; }
  .auth-art { padding:20px; }
  .auth-art > div, .auth-art > small { display:none; }
}

/* Date choices and the quiet, task-based preparation calendar. */
.date-choice-detail{margin-block:8px 16px;margin-inline:28px 0}
.date-choice-detail p{margin:6px 0}
.preparation-calendar{border-top:1px solid var(--line);padding-top:16px}
.preparation-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;list-style:none;padding:0;margin:12px 0 8px}
.preparation-week li{display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 2px;border:1px solid var(--line);border-radius:6px;font-size:.82rem;min-width:0}
.preparation-week li.is-today{border-color:var(--ink)}
.preparation-week li>b{font-size:1.05rem}
.preparation-week li>small{font-size:.75rem;white-space:nowrap}
.preparation-milestones{margin-top:14px}
.preparation-milestones ol{list-style:none;padding:0}
.preparation-milestones li{display:grid;grid-template-columns:minmax(120px,1fr) 2fr;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.preparation-milestones time{font-weight:600;font-size:.88rem}
@media(max-width:480px){.date-choice-detail{margin-inline-start:0}.preparation-week{gap:3px}.preparation-milestones li{grid-template-columns:1fr;gap:3px}}

.draft-state:empty { display: none; }
.draft-state { font-size: .9rem; color: var(--ink-2); }
.draft-state [role="status"]:not(:empty) { margin-block-start: .4rem; }
.draft-state .note { margin-block: .5rem; }
.draft-preview { white-space: pre-wrap; overflow-wrap: anywhere; max-block-size: 12rem; overflow: auto; }
.audio-message:empty { display: none; }
.audio-message { font-size: .85rem; color: var(--ink-2); flex-basis: 100%; }
.audio-card:has(.audio-message:not(:empty)) { flex-wrap: wrap; }

.operator-console code { overflow-wrap: anywhere; }
.operator-scopes { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.operator-scopes .check { align-items: baseline; padding-block: 4px; }
.operator-values { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 6px 12px; overflow-wrap: anywhere; }
.operator-values dt { font-weight: 600; }
.operator-values dd { margin: 0; }
.operator-values dd:has(> .operator-values) { grid-column: 1 / -1; margin-inline-start: 14px; }

.review-card-title { font-size: 1.2rem; margin: 0; scroll-margin-top: 100px; }
.operator-prompt-block { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; min-width: 0; background: var(--bg); }
.operator-prompt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); }
.operator-copy { flex: 0 0 auto; min-width: 44px; min-height: 44px; }
.operator-prompt { margin: 0; padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font: .9rem/1.6 var(--mono); color: var(--ink); }
.operator-prompt code { font: inherit; }
.operator-clients summary { cursor: pointer; font-weight: 600; }
.operator-client-list dt { font-weight: 700; margin-top: 16px; }
.operator-client-list dd { margin: 4px 0 0; }
.operator-start { scroll-margin-top: 80px; }
.operator-permissions summary { cursor: pointer; }
.operator-permissions fieldset { margin-top: 12px; }
@media (max-width: 600px) {
  .operator-docs { grid-template-columns: minmax(0, 1fr); }
  .operator-docs dd { margin-bottom: 8px; }
}

/* Contextual purchase options stay within the learner flow. */
.activation-offer { margin-top:20px; margin-bottom:20px; }
.activation-offer h3 { margin-top:0; }
.activation-offer .row { flex-wrap:wrap; }
.activation-offer small { display:inline-block; margin-top:8px; }

/* Email codes stay readable and pasteable in both themes, including 320px. */
.access-code {font-family:var(--mono);font-size:1.35rem;letter-spacing:.16em;max-width:100%;}
.access-confirm {margin:16px 0;}
.access-confirm .btn {white-space:normal;margin-block:4px;margin-inline:0 8px;}
.connection-email {padding:0 0 18px;margin:0 0 18px;border-bottom:1px solid var(--line);}

.connection-address { overflow-wrap: anywhere; }

/* A short introduction; the complete guide lives at /docs. */

/* Profile: current information first, editing as an explicit local action. */
.profile-page { gap:20px }
.profile-heading h1 { margin-bottom:8px }
.profile-heading p { color:var(--ink-2); margin:0 0 20px }
.profile-heading nav { display:flex; flex-wrap:wrap; gap:4px 18px; border-bottom:1px solid var(--line); padding-bottom:16px }
.profile-heading nav a { font-size:.9rem; font-weight:700; padding:6px 0 }
.profile-heading nav a:hover { text-decoration:underline }
.profile-section { padding:24px }
.profile-section h2, .profile-group-heading h2 { font-size:1.18rem; margin:0 }
.profile-section-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px }
/* A heading with a long word (Russian «конфиденциальность») sends the button
   to the next line instead of pushing it out of the card; otherwise the
   heading wraps beside the button as before. */
.profile-section-head h2 { flex:1 1 0; min-width:min-content; overflow-wrap:break-word }
.profile-section-head .btn { margin-inline-start:auto }
.profile-section-head [hidden] { display:none }
.profile-facts { margin:0; display:grid; gap:16px }
.profile-facts>div { display:grid; grid-template-columns:minmax(0,190px) minmax(0,1fr); gap:8px 20px; align-items:baseline }
.profile-facts dt { color:var(--ink-2); font-size:.9rem }
.profile-facts dd { margin:0; min-width:0; overflow-wrap:anywhere; font-weight:600 }
.profile-email { font-size:1.02rem; font-weight:600; user-select:text; overflow-wrap:anywhere }
.profile-level { color:var(--ink); font-weight:800 }
.profile-footnote { color:var(--ink-2); font-size:.9rem; line-height:1.6; margin:16px 0 0 }
.profile-page p a:not(.btn) { text-decoration:underline; text-underline-offset:3px }
.profile-fields { border:0; padding:0; margin:0; min-width:0 }
.profile-edit-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:20px; padding-top:16px; border-top:1px solid var(--line) }
.profile-edit-actions small { color:var(--ink-2) }
.profile-group-heading { padding:16px 0 0 }
.profile-group-heading p { margin:6px 0 0; color:var(--ink-2) }
.profile-goal-group { display:grid; gap:12px }
.profile-signout { display:flex; gap:16px; align-items:center; justify-content:space-between; padding:12px 0; border-top:1px solid var(--line); flex-wrap:wrap }
.profile-page [id] { scroll-margin-top:150px }
/* The level (no longer in the header) and the interface's language. */
.profile-level-row { display:flex; flex-wrap:wrap; align-items:center; gap:12px 24px; margin-bottom:18px }
.profile-level-row .profile-facts { flex:1; min-width:min(240px,100%) }
.profile-level-badge { display:inline-flex; align-items:center; padding:8px 14px; border-radius:12px; background:var(--sea-soft); color:var(--sea); font-weight:800; font-size:1.1rem; white-space:nowrap }
.profile-language { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px }
.profile-language .field { flex:1; min-width:min(220px,100%); margin:0 }
.profile-language .btn { min-height:44px }
.profile-language .alert, .profile-language [role=alert] { flex-basis:100% }
.check-help { display:block; margin-block:-2px 8px; margin-inline-start:30px }
/* The date step: the Spanish interface for B1–C1. */
.lang-advice { padding:16px; border-radius:var(--radius-sm); background:var(--brand-soft); border:1px solid color-mix(in srgb, var(--brand) 35%, transparent); color:var(--ink) }
.lang-advice h3 { display:flex; align-items:center; gap:8px; font-size:1rem; margin:0 0 6px }
.lang-advice h3 .icon { color:var(--brand) }
.lang-advice p { margin:0 0 10px; color:var(--ink-2) }
.lang-advice .check { font-weight:600 }
.profile-page .connections-card h3, .profile-page>.card>h3 { font-size:1.18rem }
@media(max-width:600px) {
 .profile-section { padding:20px }
 .profile-facts>div { grid-template-columns:minmax(0,1fr); gap:4px }
 .profile-section-head { align-items:flex-start; gap:10px }
 .profile-section-head .btn { flex-shrink:0 }
 .profile-heading nav { gap:2px 16px }
 .profile-page [id] { scroll-margin-top:120px }
}
.access-guide { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2); font-size: .92rem; }
.access-guide p { margin: 0 0 8px; }
.access-guide p:last-child { margin: 0; }
.access-guide dl { margin: 0 0 8px; }
.access-guide dl > div { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 3px 0; }
.access-guide dt { font-weight: 700; }
.access-guide dd { margin: 0; color: var(--ink-2); }
.access-guide a { display: inline-block; padding: 8px 0; text-decoration: underline; }
.access-change { margin: 12px 0 0; }
.access-change .btn.link { min-height: 44px; padding-inline: 0; }
/* Phone sweep, 29 November: a long word (an e-mail address, a name) wraps
   inside its card and never widens the page; two buttons of the form never
   touch. */
.auth-form .card p, .landing-form p, .okmsg { overflow-wrap: anywhere; }
.access-check { margin: 0 0 12px; }
/* The code step's two forms (confirm, send again) used to have the security
   check between them; without it their buttons must not touch. */
.auth-form .card form + form, .landing-form form + form { margin-top: 10px; }
.access-retry { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-bottom: 14px; }
.access-retry .btn.link { min-height: 44px; line-height: 1.35; }

.quota-more { margin: 8px 0 12px; font-size: .92rem; color: var(--ink-2); }
.quota-more summary { cursor: pointer; padding: 8px 0; }
/* The task bar sticks below the real header, whose height depends on the access strip. */
.taskbar { top: var(--topbar-h, 55px); }
@media (max-width: 760px) { .taskbar { top: var(--topbar-h, 57px); } }

/* ---------- right-to-left (Arabic) ----------
   Spacing and offsets above are logical (inline-start/end), so the layout
   mirrors under dir="rtl" and stays left-to-right inside the Spanish task
   and exam containers (dir="ltr"). The few rules that only apply to
   right-to-left use :dir(), which follows the nearest dir, never [dir=rtl]
   on <html>, which would also reach into those containers. */
/* The brand is Spanish in every language: «¡Mi Apto!», never «!Mi Apto¡». */
.wordmark { direction: ltr; unicode-bidi: isolate; }
/* shared.css pins the cookie notice to the right; the same box, at the end. */
.cookie-notice { inset: auto; inset-block-end: 16px; inset-inline-end: 16px; }
@media (max-width: 600px) { .cookie-notice { inset-inline-start: 8px; inset-inline-end: 8px; inset-block-end: 8px; } }
/* Arrows that mean back/next (and the way out) point the other way
   (icons.js gives each icon an .icon-<name> class). Media (play), sound,
   refresh and the progress chart keep their drawing. */
.icon-left:dir(rtl), .icon-right:dir(rtl), .icon-logout:dir(rtl) { transform: scaleX(-1); }
/* Progress fills grow from the start; their gradient runs the same way
   (only the angle changes, so the tone of .status-bar fills is kept). */
.bar > i:dir(rtl) { --bar-to: 270deg; }
/* A Spanish task title in the quick review (home.js) stays one block: split
   over two right-to-left lines its parts would read in the wrong order. */
.recap-card li a:dir(rtl) { display: inline-block; max-width: 100%; }
/* Admin tables: a sortable column heading looks like the other headings. */
.t th .btn.sort { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; padding: 0; min-height: 0; text-decoration: none; }
.t th[aria-sort="ascending"] .btn.sort, .t th[aria-sort="descending"] .btn.sort { color: var(--ink); }
/* Admin → Usuarios: the access (plan · how it was obtained, its end below) in
   one narrow column, and the account's state beside the name only when it is
   not the usual one. Plain text, no colour: green and red would read as
   online and offline. */
.t.users th, .t.users td { padding-inline: 8px; }
/* Narrow enough for 1024 px in the longer languages: tighter headings; a
   long address breaks after its «@» and a state label may take two lines. */
.t.users th { font-size: .7rem; letter-spacing: .02em; }
.t.users .acct-state { white-space: normal; }
.t td.access { font-size: .85rem; line-height: 1.3; }
.t td.access small { display: block; margin-top: 1px; color: var(--ink-3); font-size: .72rem; white-space: nowrap; }
.t td.access .line { display: block; }
/* A date in a narrow cell: day and month on one line, the year small below,
   never three lines. */
.t td.date { line-height: 1.3; }
.t td.date .nw { white-space: nowrap; }
.t td.date small { display: block; color: var(--ink-3); font-size: .74rem; }
.acct-state { display: inline-block; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-2); font-size: .72rem; font-weight: 600; line-height: 1.45; white-space: nowrap; }

/* Admin → Ajustes (settings.js): a setting per row, its text beside its
   field; one column on a phone. */
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; }
.setting-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.setting-input { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.setting-input input { width: 110px; }
.setting-input select { max-width: 22rem; }
.note-inline { color: var(--warn); font-weight: 600; }
.setting-problem { grid-column: 1 / -1; color: var(--bad); font-weight: 600; }
.setting-input input[aria-invalid="true"] { border-color: var(--bad); }
.settings-actions { gap: 8px; padding: 8px 0; }
.settings-actions.dirty { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .setting-row { grid-template-columns: minmax(0, 1fr); }
  .setting-input { justify-content: flex-start; }
  .settings-actions.dirty { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
/* Ajustes → Enlaces cortos de campaña: a table on a wide screen; on a phone
   each link is a block, its cells one under another with their label
   (data-label). The scrolling box is the containing block of anything placed
   inside it, so nothing in the table can widen the page (27 November: 756 px
   on a 390 px phone). */
.short-links-wrap { position: relative; }
.short-links-box code { overflow-wrap: anywhere; }
.short-link-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.short-link-field { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.short-link-field .field { margin: 0; }
.short-link-hint { margin: 0; color: var(--warn); font-size: .9rem; }
@media (max-width: 760px) {
  .short-links-wrap { overflow: visible; border: 0; background: none; }
  table.short-links, .short-links tbody, .short-links tr, .short-links td { display: block; width: auto; }
  .short-links thead { display: none; }
  .short-links tr { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 6px 0; margin-bottom: 10px; }
  table.short-links td, table.short-links tr:last-child td { border: 0; padding: 4px 12px; }
  .short-links td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
}

/* Admin → Emails (emails.js): the list of messages, then a message's fields
   beside its live preview; one column below a wide screen. */
.email-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px; }
.email-card { display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.email-card:hover { text-decoration: none; box-shadow: var(--shadow); }
.email-controls { gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.email-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.email-preview { position: sticky; top: calc(var(--topbar-h, 64px) + 12px); }
.email-field { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.email-field label code { font-size: .72rem; overflow-wrap: anywhere; }
.email-field textarea { width: 100%; font: inherit; line-height: 1.5; resize: vertical; min-height: 2.6em; }
.email-field textarea.plain { min-height: 0; }
.email-field.bad textarea { border-color: var(--bad); }
.email-problem { color: var(--bad); font-weight: 600; }
.email-tools { gap: 4px; }
.email-tools .btn { min-width: 34px; }
.email-field-meta { gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85rem; }
.email-field-meta .chip { margin-inline-start: 4px; cursor: pointer; }
.email-orig summary { font-size: .85rem; color: var(--ink-3); cursor: pointer; }
.email-orig p { margin: 6px 0 0; font-size: .9rem; color: var(--ink-2); }
.email-actions { gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.email-actions.dirty { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: 1px solid var(--line); }
.email-meta { font-size: .9rem; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.email-frame { border: 1px solid var(--line); border-radius: var(--radius-sm, 10px); overflow: hidden; background: #fbf7f0; }
.email-frame iframe { display: block; width: 100%; height: min(72vh, 760px); border: 0; background: #fbf7f0; }
.email-frame.phone { max-width: 390px; margin-inline: auto; }
.email-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85rem; max-height: min(72vh, 760px); overflow: auto; background: var(--bg-2); padding: 12px; border-radius: 10px; margin: 0; }
@media (max-width: 1100px) {
  .email-editor { grid-template-columns: minmax(0, 1fr); }
  .email-preview { position: static; }
}
@media (max-width: 760px) {
  .email-actions.dirty { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* Admin → Textos (texts.js): the index beside the page being read; each text
   is a block that opens its note form. */
.texts-controls { gap: 12px; align-items: flex-end; }
.texts-check { gap: 6px; font-weight: 600; cursor: pointer; }
.texts-reader { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
.texts-index { position: sticky; top: calc(var(--topbar-h, 64px) + 12px); max-height: calc(100vh - var(--topbar-h, 64px) - 40px); overflow: auto; font-size: .9rem; }
.texts-index ul { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 3px; }
.texts-index li { overflow-wrap: anywhere; }
.texts-index a[aria-current] { font-weight: 800; }
.texts-index summary { cursor: pointer; margin: 4px 0; }
.texts-index .pill { padding: 0 6px; font-size: .72rem; }
.texts-doc { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-read); line-height: 1.55; }
.texts-doc-head { font-family: var(--font); margin-bottom: 10px; overflow-wrap: anywhere; }
.texts-seg { border-radius: 8px; }
.texts-seg-main { padding: 4px 8px; border-radius: 8px; cursor: pointer; outline-offset: 2px; }
.texts-seg-main:hover, .texts-seg.open > .texts-seg-main { background: var(--bg-2); }
.texts-seg.has-notes > .texts-seg-main { box-shadow: inset 3px 0 0 var(--brand); }
.texts-seg.in-box { border-inline-start: 3px solid var(--line-2, var(--line)); border-radius: 0; margin-inline-start: 4px; }
.texts-label { display: block; font-family: var(--font); color: var(--ink-3); font-size: .75rem; font-weight: 700; }
.texts-h { font-family: var(--font); font-weight: 800; margin-top: 10px; }
.texts-h2 { font-size: 1.25rem; } .texts-h3 { font-size: 1.08rem; } .texts-h4, .texts-h5, .texts-h6 { font-size: 1rem; }
.texts-box-title { font-weight: 700; }
.texts-html { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.texts-quote { margin: 0; padding-inline-start: 10px; border-inline-start: 3px solid var(--line); color: var(--ink-2); }
.texts-es { margin-top: 3px; font-size: .88rem; color: var(--ink-2); font-family: var(--font); }
.texts-marks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; font-family: var(--font); }
.texts-link { color: var(--link); text-decoration: underline; text-decoration-style: dotted; }
.texts-img { font-family: var(--font); font-size: .85rem; background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.texts-var { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; background: var(--plum-soft); color: var(--plum); padding: 0 3px; border-radius: 4px; }
.texts-tag { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-3); }
.texts-table td { vertical-align: top; min-width: 120px; }
.texts-th { font-weight: 700; background: var(--bg-2); }
.texts-note-form { margin: 4px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-family: var(--font); }
.texts-note-form textarea { width: 100%; font: inherit; line-height: 1.5; resize: vertical; }
.texts-where { font-size: .82rem; overflow-wrap: anywhere; }
.texts-diff { white-space: pre-wrap; overflow-wrap: anywhere; padding: 8px 10px; background: var(--bg-2); border-radius: 8px; font-family: var(--font-read); }
.texts-diff del { background: var(--bad-soft); color: var(--bad); }
.texts-diff ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; }
.texts-comment { margin: 6px 0; }
.texts-note { display: flex; flex-direction: column; gap: 6px; }
.texts-note code, .texts-report code { overflow-wrap: anywhere; }
.texts-groups { display: flex; flex-wrap: wrap; gap: 6px 16px; border: 0; padding: 0; margin: 0; }
.texts-missing { margin-top: 6px; font-size: .9rem; color: var(--ink-2); }
.texts-missing summary { cursor: pointer; font-weight: 700; }
.texts-missing ul { margin: 6px 0 0; padding-inline-start: 20px; }
.texts-seg-notes { display: grid; gap: 6px; margin: 2px 0 8px; padding-inline-start: 11px; border-inline-start: 3px solid var(--brand); font-family: var(--font); }
.texts-seg-note .texts-comment { margin: 2px 0; }
.texts-steps { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); gap: 8px; font-family: var(--font); }
.texts-step { max-width: 48%; white-space: normal; text-align: start; }
.texts-pager { gap: 8px; }
.texts-index > summary { cursor: pointer; }
.texts-groups legend { font-weight: 700; margin-bottom: 4px; }
@media (max-width: 900px) {
  .texts-reader { grid-template-columns: minmax(0, 1fr); }
  .texts-index { position: static; max-height: 45vh; }
}

/* A campaign landing (landing.js): the headline, then the access form beside
   the description on a wide screen; on a phone the form comes right after
   the headline, the description below it. */
.landing { max-width: 1160px; margin: 0 auto; padding: 0 16px 40px; }
.landing-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.landing-hero { padding: 12px 0 18px; max-width: 760px; }
.landing-eyebrow { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); font-weight: 800; font-size: .85rem; }
.landing-hero h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.15; }
.landing-lead { margin: 0; font-size: 1.08rem; color: var(--ink-2); }
.landing-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
.landing-form { order: 2; position: sticky; top: 16px; padding: 24px; }
.landing-text { order: 1; gap: 18px; }
.landing-text h2 { font-size: 1.2rem; margin: 0 0 8px; }
.landing-text ul { margin: 0; padding-inline-start: 20px; }
.landing-features { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.landing-features li { display: flex; gap: 12px; align-items: flex-start; }
.landing-features p { margin: 2px 0 0; color: var(--ink-2); }
.landing-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); flex: none; }
.landing-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 6px; font-weight: 700; }
.landing-more li { margin: 4px 0; }
.landing-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .88rem; }
@media (max-width: 860px) {
  .landing-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .landing-form { order: 0; position: static; padding: 18px; }
}

/* The same phone has the notch or the island at one side, and the page is
   drawn under it (viewport-fit=cover): «чёлка перекрывает текст слева на
   несколько пикселей». The page keeps clear of it, and only there: the inset
   is 0 on every other screen. As properties, so that a test can set them; last
   in the file, because the paddings above are shorthands. */
:root { --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
@media (orientation: landscape) {
  .topbar-in, .access-bar, .main, .footer, .imp-bar { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); }
  .tabbar { padding-left: max(4px, var(--safe-l)); padding-right: max(4px, var(--safe-r)); }
}
