/* Generated by scripts/build_css.py from static/css/src/. Edit the sources, then run the script. */
/* --- tokens.css --- */
:root{
  --bg:#FFFDFB; --surface:#FFFFFF; --surface-2:#F6F3F1; --border:#EAE4E0; --border-strong:#D6CEC9; --track:#EFEAE6;
  --text:#1E1B21; --text-2:#4F4954; --muted:#6E6872;
  --accent:#007A87; --on-accent:#FFFFFF; --accent-soft:#E9F4F5; --accent-text:#006E7A;  /* links: a shade deeper than the logo teal, APCA Lc 78 on the page */
  --picked-bg:#E9F4F5; --picked-ink:#1E1B21; --picked-mark:#007A87;  /* a chosen test answer */
  /* Plan 14: two soft accents beside the logo teal (mist: a light shade of the hero's mountains, owner 2026-10-25) */
  --mist:#C9D4D7; --mist-ink:#2E5054; --raised:#FFFFFF; --tile-edge:transparent; --tile-icon:currentColor;
  --tile-teal:#E9F4F5; --tile-teal-ink:#007A87; --step:rgba(255,255,255,.75); --sky:#14122A; --sky-glow:#2C2558;
  --ok:#1F8A4C; --ok-soft:#E7F5EC; --ok-text:#17703D;
  --danger:#B42318; --danger-soft:#FDECEA; --on-danger:#FFFFFF;
  --shadow:0 1px 2px rgba(30,27,33,.05); --shadow-float:0 8px 28px rgba(40,24,30,.07);
  --radius-xs:8px; --radius-sm:12px; --radius-md:16px; --radius-lg:20px; --radius-header:14px; --radius-pill:999px;
  --ease-out:cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out:cubic-bezier(0.77, 0, 0.175, 1);  /* the site's two curves: entering and leaving, moving on screen */
  /* Glass, only for layers that float over content (the pinned header, menus, the cookie bar, toasts) */
  --glass-bg:color-mix(in srgb,var(--surface) 72%,transparent); --glass-bg-dense:color-mix(in srgb,var(--surface) 90%,transparent);
  --glass-bg-menu:color-mix(in srgb,var(--surface) 72%,transparent);  /* menus: the bar's glass by day; dark mode 95% */
  --glass-bg-burger:color-mix(in srgb,var(--surface) 80%,transparent);  /* the phone burger: a little more solid over the hero's headline */
  --glass-filter:blur(16px) saturate(160%); --glass-filter-dense:blur(24px) saturate(160%);
  --glass-border:color-mix(in srgb,var(--border) 70%,transparent);
  --font:"Google Sans",system-ui,-apple-system,sans-serif;
  --container:1272px; --gutter:16px;
  color-scheme:light;
}
/* Night: small grey text, links and error text meet APCA (Lc 67); buttons and the logo keep the logo teal */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0B1426; --surface:#121D33; --surface-2:#1A2740; --border:#27354F; --border-strong:#364664; --track:#202D46;
    --text:#F4F4F5; --text-2:#CBD5E3; --muted:#B3BFD1;
    --accent:#007A87; --on-accent:#FFFFFF; --accent-soft:#1A2740; --accent-text:#6FCCD6;
    --picked-bg:#007A87; --picked-ink:#FFFFFF; --picked-mark:#FFFFFF;
    --mist:#172A48; --mist-ink:#F4F4F5; --raised:#1A2740; --tile-edge:#27354F; --tile-icon:#007A87; --tile-teal:#007A87; --tile-teal-ink:#FFFFFF; --step:#202D46; --sky:#0A1222; --sky-glow:#1A2744;
    --ok:#3CC073; --ok-soft:#10291A; --ok-text:#6FDB9B; --danger:#FFA69E; --danger-soft:#3A1715; --on-danger:#0B1426;
    --shadow:none; --shadow-float:0 8px 28px rgba(0,0,0,.5); color-scheme:dark;
    --glass-bg-menu:color-mix(in srgb,var(--surface) 95%,transparent);
  --glass-bg-burger:color-mix(in srgb,var(--surface) 85%,transparent);
  }
}
:root[data-theme="dark"]{
  --bg:#0B1426; --surface:#121D33; --surface-2:#1A2740; --border:#27354F; --border-strong:#364664; --track:#202D46;
  --text:#F4F4F5; --text-2:#CBD5E3; --muted:#B3BFD1;
  --accent:#007A87; --on-accent:#FFFFFF; --accent-soft:#1A2740; --accent-text:#6FCCD6;
    --picked-bg:#007A87; --picked-ink:#FFFFFF; --picked-mark:#FFFFFF;
  --mist:#172A48; --mist-ink:#F4F4F5; --raised:#1A2740; --tile-edge:#27354F; --tile-icon:#007A87; --tile-teal:#007A87; --tile-teal-ink:#FFFFFF; --step:#202D46; --sky:#0A1222; --sky-glow:#1A2744;
  --ok:#3CC073; --ok-soft:#10291A; --ok-text:#6FDB9B; --danger:#FFA69E; --danger-soft:#3A1715; --on-danger:#0B1426;
  --shadow:none; --shadow-float:0 8px 28px rgba(0,0,0,.5); color-scheme:dark;
  --glass-bg-menu:color-mix(in srgb,var(--surface) 95%,transparent);
  --glass-bg-burger:color-mix(in srgb,var(--surface) 85%,transparent);
}
/* Higher-contrast variants for the system's "increase contrast" setting (Apple HIG §6): text reaches 7:1 */
@media (prefers-contrast:more){
  :root{
    --text:#000000; --text-2:#1F2A2E; --muted:#2F3B40; --border:#8A989C; --border-strong:#56646A;
    --accent:#005A63; --accent-text:#00474F; --ok-text:#0B4F28; --danger:#8F1B12; --mist-ink:#1F4246; --tile-teal-ink:#00474F;
  }
  :root[data-theme="dark"]{
    --text:#FFFFFF; --text-2:#E3ECEE; --muted:#C9D5D8; --border:#5C7176; --border-strong:#8FA3A8;
    --accent:#5FD0DB; --on-accent:#031416; --accent-text:#9BE6EE; --ok-text:#9FF0C0; --danger:#FF9D95; --tile-teal:#004E56;
  }
  :focus-visible{outline-width:3px}
}
@media (prefers-contrast:more) and (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --text:#FFFFFF; --text-2:#E3ECEE; --muted:#C9D5D8; --border:#5C7176; --border-strong:#8FA3A8;
    --accent:#5FD0DB; --on-accent:#031416; --accent-text:#9BE6EE; --ok-text:#9FF0C0; --danger:#FF9D95; --tile-teal:#004E56;
  }
}
/* Glass turns solid when someone asks for less transparency or more contrast, or the browser can't blur */
@media (prefers-reduced-transparency:reduce){:root{--glass-bg:var(--surface); --glass-bg-dense:var(--surface); --glass-bg-menu:var(--surface); --glass-bg-burger:var(--surface); --glass-filter:none; --glass-filter-dense:none; --glass-border:var(--border)}}
@media (prefers-contrast:more){:root{--glass-bg:var(--surface); --glass-bg-dense:var(--surface); --glass-bg-menu:var(--surface); --glass-bg-burger:var(--surface); --glass-filter:none; --glass-filter-dense:none; --glass-border:var(--border)}}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){:root{--glass-bg:var(--surface); --glass-bg-dense:var(--surface); --glass-bg-menu:var(--surface); --glass-bg-burger:var(--surface); --glass-filter:none; --glass-filter-dense:none; --glass-border:var(--border)}}
/* --- base.css --- */
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}  /* hidden always wins over a class that sets display */
html{-webkit-text-size-adjust:100%;scroll-padding-top:96px}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:16px;line-height:1.6;display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
/* The page is a column at least as tall as the screen and the content takes the spare room, so on a short page the
   footer still sits at the bottom instead of right under the content. */
body>main{flex:1 0 auto}
body>.site-header-wrap,body>main,body>.site-footer{width:100%;box-sizing:border-box}
img,svg{display:block;max-width:100%}
h1,h2,h3{margin:0;font-weight:800;letter-spacing:-.015em;line-height:1.2;text-wrap:balance}
h1{font-size:clamp(24px,2.4vw,34px);letter-spacing:-.02em}
h2{font-size:clamp(19px,1.8vw,24px)}
h3{font-size:18px}
p,li,dd,figcaption,.note,.empty-state{text-wrap:pretty}
p{margin:0}
a{color:var(--accent-text)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--radius-xs)}
.container{max-width:var(--container);margin-inline:auto;padding-inline:var(--gutter)}
.page{padding-block:40px 64px;display:flex;flex-direction:column;gap:32px}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:16px;top:-48px;background:var(--surface);color:var(--text);padding:10px 14px;border-radius:var(--radius-sm);z-index:10}
.skip-link:focus{top:12px}
.text-accent{color:var(--text-2)}
.muted{color:var(--muted)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
/* --- components.css --- */
/* Header */
.site-header-wrap{position:sticky;top:0;z-index:50;padding:16px var(--gutter) 0;max-width:var(--container);margin-inline:auto}
/* The glass sits on its own layer: a blurred header would stop the menus inside it from blurring the page. */
.site-header{position:relative;background:none;border:1px solid var(--glass-border);border-radius:var(--radius-header);box-shadow:var(--shadow-float);min-height:64px;padding:8px 12px 8px 18px;display:flex;flex-wrap:nowrap;align-items:center;gap:12px 16px}
.site-header::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--glass-bg);backdrop-filter:var(--glass-filter);-webkit-backdrop-filter:var(--glass-filter)}
.brand{display:flex;align-items:center;gap:10px;min-height:44px;text-decoration:none;color:var(--text);font-weight:800;font-size:16px;letter-spacing:-.01em;flex:0 0 auto}
.brand img{width:44px;height:44px}  /* as tall as the Log in button (owner 2026-10-25) */
.nav{display:flex;flex-wrap:nowrap;align-items:center;gap:2px;flex:1 1 auto;justify-content:center;min-width:0}
.nav a{text-decoration:none;color:var(--text-2);font-weight:600;font-size:15px;padding:8px 10px;border-radius:var(--radius-pill);min-height:40px;display:inline-flex;align-items:center;white-space:nowrap}
.nav a[aria-current]{color:var(--accent-text)}  /* the page you are on, or a page under it: teal text, no background (owner 2026-11-05) */
.header-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto}
.inline-form{display:inline}
.header-auth{display:flex;align-items:center;gap:8px}
.icon-btn{width:44px;height:44px;border-radius:var(--radius-sm);border:0;background:var(--surface-2);color:var(--text-2);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font:inherit;font-weight:700;font-size:13px}
.icon-btn svg{width:18px;height:18px}
.lang-switch{display:inline-flex;gap:2px;background:var(--surface-2);border-radius:var(--radius-sm);padding:3px}
.lang-switch button{min-height:38px;min-width:44px;border:0;background:transparent;color:var(--text-2);font:inherit;font-size:13px;font-weight:700;border-radius:var(--radius-xs);cursor:pointer}
.lang-switch button[aria-pressed="true"]{background:var(--surface);color:var(--text)}
.icon-btn--text{width:auto;padding:0 12px;color:var(--text)}
.lang-menu,.nav-menu{position:relative}
.lang-menu summary,.nav-menu summary{list-style:none}
.lang-menu summary::-webkit-details-marker,.nav-menu summary::-webkit-details-marker{display:none}
.lang-menu__panel,.nav-menu__panel{position:absolute;right:0;top:calc(100% + 18px);z-index:20;background:var(--glass-bg-menu);backdrop-filter:var(--glass-filter-dense);-webkit-backdrop-filter:var(--glass-filter-dense);border:1px solid var(--glass-border);border-radius:var(--radius-sm);box-shadow:var(--shadow-float);padding:6px}
.lang-menu__panel .lang-switch{display:flex;flex-direction:column;background:transparent;padding:0}
.lang-menu__panel .lang-switch button{min-height:44px;padding:0 18px 0 12px;text-align:left;display:flex;align-items:center;gap:8px;min-width:180px;font-size:15px;font-weight:600}
/* the button: a globe says "language", the code says which, a chevron says it opens (owner 2026-11-04; no flags) */
.lang-menu summary{display:inline-flex;align-items:center;gap:6px}
.lang-menu__globe{width:18px;height:18px}
.lang-menu__chevron{width:14px;height:14px;transition:transform .18s var(--ease-out)}
.lang-menu[open] .lang-menu__chevron{transform:rotate(180deg)}
/* the list: each language named in itself, a tick beside the current one */
.lang-switch__tick{display:none;width:16px;height:16px;flex:none}
.lang-menu__panel .lang-switch__tick{display:block;visibility:hidden}
.lang-menu__panel .lang-switch button[aria-pressed="true"] .lang-switch__tick{visibility:visible}
@media (hover:hover) and (pointer:fine){.lang-menu__panel .lang-switch button:hover{background:var(--surface-2);color:var(--text)}}
/* Info food and Mental gym (owner 2026-11-04): the language picker's dropdown, opened under the group's name and by
   pointing at it (menus.js); its rows are the picker's rows */
.nav-menu__label{display:inline-flex;align-items:center;gap:4px;min-height:40px;padding:8px 8px 8px 10px;border-radius:var(--radius-pill);color:var(--text-2);font-weight:600;font-size:15px;white-space:nowrap;cursor:pointer}
.nav-menu__label svg{width:14px;height:14px;transition:transform .18s var(--ease-out)}
.nav-menu[open] .nav-menu__label svg{transform:rotate(180deg)}
.nav-menu__label.is-current{color:var(--accent-text)}  /* on one of its pages: the teal name only, no background (owner 2026-11-04) */
.nav-menu__panel{right:auto;left:0;display:flex;flex-direction:column;gap:2px;min-width:200px}
.nav-menu__panel::before{content:"";position:absolute;left:0;right:0;top:-19px;height:19px}  /* the gap under the bar: the pointer crosses it without closing the menu */
.nav .nav-menu__panel a{min-height:44px;padding:0 18px;border-radius:var(--radius-xs);color:var(--text-2);font-size:15px;font-weight:600;background:transparent}
.nav .nav-menu__panel a[aria-current]{background:var(--accent-soft);color:var(--accent-text)}  /* the page you are on, as in the burger */
@media (hover:hover) and (pointer:fine){.nav .nav-menu__panel a:hover{background:var(--surface-2);color:var(--text)}}
.brand__name{white-space:nowrap}
.theme-toggle .icon-sun{display:none}
/* Without JS, follow the saved choice; with JS (theme.js), follow the effective theme incl. the system setting. */
[data-theme="dark"] .theme-toggle .icon-sun,[data-effective-theme="dark"] .theme-toggle .icon-sun{display:block}
[data-theme="dark"] .theme-toggle .icon-moon,[data-effective-theme="dark"] .theme-toggle .icon-moon{display:none}
[data-effective-theme="light"] .theme-toggle .icon-sun{display:none}
[data-effective-theme="light"] .theme-toggle .icon-moon{display:block}
/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 18px;border-radius:var(--radius-sm);border:0;font:inherit;font-weight:700;font-size:15px;text-decoration:none;cursor:pointer;transition:background-color .15s ease,color .15s ease}
.btn-primary{background:var(--accent);color:var(--on-accent)}
.btn-secondary{background:var(--surface-2);color:var(--text);box-shadow:inset 0 0 0 1px var(--border)}
.btn-soft{background:var(--accent-soft);color:var(--accent-text)}
.btn-outline{background:transparent;color:var(--accent-text);box-shadow:inset 0 0 0 1.5px var(--accent)}
.btn-outline:hover{background:var(--accent-soft)}
.header-auth .btn,.menu-auth .btn{min-width:96px;min-height:44px;padding:8px 16px;font-size:14.5px}
.btn-lg{min-height:48px;padding:12px 20px;font-size:15px;text-align:center;line-height:1.3}
.btn-danger{background:var(--danger);color:var(--on-danger)}
.btn-link{background:none;border:0;color:var(--text);font:inherit;font-weight:700;font-size:15px;padding:8px 10px;cursor:pointer;text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.btn-block{width:100%}
/* Cards */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:24px}
.chip{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:var(--radius-pill);background:var(--surface-2);color:var(--text-2)}
/* Forms */
.auth{max-width:480px;margin-inline:auto;width:100%}
.auth .card{display:flex;flex-direction:column;gap:18px;padding:28px}
.form{display:flex;flex-direction:column;gap:16px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:700;font-size:14px}
.field input,.field textarea,.field select{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:11px 14px;min-height:44px}
.field textarea{min-height:120px;resize:vertical}
.field .help{font-size:13px;color:var(--muted)}
.field .help ul{margin:4px 0 0;padding-left:18px}
/* The languages an item really has, on its card (owner 2026-11-04): quiet outlined codes after the meta */
.lang-badges{display:flex;flex-wrap:wrap;align-items:center;gap:4px}  /* a line of its own under the meta (owner 2026-11-04) */
/* A card's meta line and badges, held at the card's bottom so a row of cards lines up whatever their titles' length */
.card-foot{display:flex;flex-direction:column;gap:8px;margin-top:auto}
.post-row__text>.lang-badges{margin-top:4px}
.course-card__body{flex:1 1 auto}
.course-card__body>.lang-badges,.book-card>.lang-badges{margin-top:auto}
.lang-badges abbr{text-decoration:none;font-size:10.5px;font-weight:700;letter-spacing:.02em;line-height:1;padding:3px 6px;border:1px solid var(--border-strong);border-radius:var(--radius-xs);color:var(--muted);cursor:default}
/* Password fields (owner 2026-11-04): an eye inside the field shows what was typed; a new password's rules tick green */
.password-field{position:relative;display:flex}
.password-field input{flex:1;min-width:0;padding-right:52px}
.password-toggle{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:44px;height:44px;display:grid;place-items:center;border:0;background:transparent;color:var(--muted);border-radius:var(--radius-xs);cursor:pointer}
.password-toggle[hidden]{display:none}
.password-toggle svg{width:20px;height:20px}
.password-toggle .icon-eye-off,.password-toggle[aria-pressed="true"] .icon-eye{display:none}
.password-toggle[aria-pressed="true"] .icon-eye-off{display:block}
@media (hover:hover) and (pointer:fine){.password-toggle:hover{color:var(--text)}}
.password-rules{list-style:none;margin:2px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:4px 16px;font-size:13px;color:var(--muted)}
.password-rules li{display:inline-flex;align-items:center;gap:6px}
.password-rules li::before{content:"";width:6px;height:6px;margin:0 4px;border-radius:50%;background:currentColor;opacity:.6}
.password-rules li.is-met{color:var(--ok-text)}
.password-rules li.is-met::before{width:14px;height:14px;margin:0;opacity:1;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/contain no-repeat}
.field .error,.form-errors{font-size:14px;color:var(--danger)}
.form-errors{background:var(--danger-soft);border-radius:var(--radius-sm);padding:10px 14px}
.form-footer{display:flex;flex-wrap:wrap;gap:8px 16px;justify-content:space-between;font-size:14px}
/* Messages */
/* Notices (owner 2026-10-25): every kind floats as glass at the bottom of the screen, never under the nav bar.
   Confirmations fade away on their own (messages.js); errors and warnings stay until closed. They rise in and sink
   away; above the cookie bar while it is open. */
.messages{position:fixed;bottom:calc(12px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);z-index:65;width:min(560px,calc(100% - 32px));
  list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;transition:opacity .25s var(--ease-out),transform .25s var(--ease-out)}
@starting-style{.messages{opacity:0;transform:translate(-50%,8px)}}
body:has(.consent) .messages{bottom:calc(140px + env(safe-area-inset-bottom,0px))}
.message{display:flex;align-items:center;gap:12px;border-radius:var(--radius-sm);padding:12px 16px;color:var(--text);
  background:var(--glass-bg-dense);backdrop-filter:var(--glass-filter-dense);-webkit-backdrop-filter:var(--glass-filter-dense);border:1px solid var(--glass-border);box-shadow:var(--shadow-float)}
.message__text{flex:1;min-width:0}
.message.success{border-color:color-mix(in srgb,var(--ok) 35%,var(--glass-border))}
.message.error,.message.warning{border-color:color-mix(in srgb,var(--danger) 45%,var(--glass-border))}
.message__close{position:relative;flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin:-8px -10px -8px 0;border:0;border-radius:var(--radius-pill);background:transparent;color:var(--muted);cursor:pointer}
.message__close::after{content:"";position:absolute;inset:-4px}  /* a 44 px target */
.message__close svg{width:18px;height:18px}
@media (hover:hover) and (pointer:fine){.message__close:hover{background:var(--surface-2);color:var(--text)}}
.message__close:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.message{overflow:hidden;transition:opacity .2s var(--ease-out),transform .2s var(--ease-out),height .3s var(--ease-out) .2s,padding .3s var(--ease-out) .2s,margin .3s var(--ease-out) .2s}
.message.is-leaving{opacity:0;transform:translateY(8px);height:0!important;padding-block:0;margin-top:-8px}
@media (prefers-reduced-motion:reduce){.message,.messages{transition:none}}
/* Footer */
.site-footer{max-width:var(--container);margin:0 auto;padding:0 var(--gutter) 24px}
.footer-card{border-top:1px solid var(--border);padding:28px 0 0;display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;font-size:14px;color:var(--muted)}
.footer-brand{margin-right:auto}
.footer-social{display:flex;gap:6px}
.footer-card .footer-social a{width:44px;height:44px;display:grid;place-items:center;padding:0;border-radius:var(--radius-sm);background:var(--surface-2);color:var(--text-2)}
.footer-social a:hover{color:var(--accent-text)}
.footer-social svg{width:20px;height:20px}
.footer-brand{display:flex;align-items:center;gap:10px;color:var(--text);font-weight:700}
.footer-brand img{width:26px;height:26px}
.footer-copy{flex-basis:100%;margin:4px 0 0;padding-top:16px;border-top:1px solid var(--border);font-size:13px;color:var(--muted)}  /* the copyright is the last line */
.footer-nav,.footer-links{display:flex;flex-wrap:wrap;gap:8px 20px}
.footer-card a{color:var(--text-2);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.footer-card a:hover{color:var(--accent-text)}
/* Home (Plan 1 placeholder layout; replaced by the full S2-Home in Plan 2) */
.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.home-intro{display:flex;flex-direction:column;gap:12px}
/* Phone menu (shown at 720px and below) */
.menu{display:none}
.menu summary{list-style:none}
.menu summary::-webkit-details-marker{display:none}
.menu .icon-close,.menu[open] .icon-open{display:none}
.menu:not([open]) .menu-panel{display:none}  /* a closed menu takes no room, so it never widens the page */
.menu[open] .icon-close{display:block}
.menu-panel{position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:20;background:var(--glass-bg-burger);backdrop-filter:var(--glass-filter-dense);-webkit-backdrop-filter:var(--glass-filter-dense);border:1px solid var(--glass-border);border-radius:var(--radius-header);box-shadow:var(--shadow-float);padding:12px;display:flex;flex-direction:column;gap:12px}
.menu-nav{display:flex;flex-direction:column;gap:2px}
.menu-nav a{text-decoration:none;color:var(--text);font-weight:600;font-size:15px;padding:10px 12px;border-radius:var(--radius-sm);min-height:44px;display:flex;align-items:center}
.menu-nav a[aria-current]{color:var(--accent-text);background:var(--accent-soft)}
/* a group folds its links out under its name, one group at a time (name="menu-groups"); its links are lighter */
.menu-group summary{list-style:none}
.menu-group summary::-webkit-details-marker{display:none}
.menu-group__label{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:10px 12px;border-radius:var(--radius-sm);color:var(--text);font-weight:600;font-size:15px;cursor:pointer}
.menu-group__label svg{width:16px;height:16px;color:var(--muted);transition:transform .2s var(--ease-out)}
.menu-group[open] .menu-group__label svg{transform:rotate(180deg)}
.menu-group__links{display:flex;flex-direction:column;gap:2px;padding:0 0 4px 12px;transition:opacity .2s var(--ease-out),transform .2s var(--ease-out)}
@starting-style{.menu-group[open] .menu-group__links{opacity:0;transform:translateY(-6px)}}
.menu-nav .menu-group__links a{font-weight:400}
@media (prefers-reduced-motion:reduce){.menu-group__links,.menu-group__label svg{transition:none}}
.menu-panel .lang-switch{display:flex}
.menu-panel .lang-switch button{flex:1;min-height:44px}
.menu-auth{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding-top:12px;border-top:1px solid var(--border)}
.menu-auth:has(>.btn-outline){grid-template-columns:1fr 1fr}  /* visitors: Log in and Join side by side */
.menu-auth .btn{width:100%;min-height:46px}
.menu-auth .inline-form{display:block}
.menu-auth .btn-link{width:100%;min-height:46px;justify-content:center;background:var(--surface-2);border-radius:var(--radius-sm)}
/* Save button and saved posts */
.post__actions{display:flex;flex-wrap:wrap;gap:10px}
.btn__icon{width:16px;height:16px;flex:none}
.save-btn{gap:8px}
.save-btn svg{width:16px;height:16px;fill:none}
.save-btn.is-saved svg{fill:currentColor}
.saved-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.saved-row{display:flex;align-items:center;gap:16px;padding:16px 20px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow)}
.saved-row__link{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:4px;text-decoration:none;color:var(--text)}
.saved-row__title{font-weight:800;overflow-wrap:anywhere}
.saved-row__meta{font-size:14px;color:var(--muted)}
.saved-row__link:hover .saved-row__title{color:var(--accent-text)}
/* Account menu (members) */
.account-menu{position:relative}
.account-menu summary{list-style:none}
.account-menu summary::-webkit-details-marker{display:none}
.account-menu__button{display:flex;align-items:center;gap:8px;min-height:44px;padding:4px 14px 4px 4px;border-radius:var(--radius-pill);background:var(--surface-2);color:var(--text);font-weight:700;font-size:14px;cursor:pointer}
.account-menu__name{max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.avatar{width:32px;height:32px;border-radius:var(--radius-pill);background:var(--accent);color:var(--on-accent);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;flex:0 0 auto}
.account-menu__panel{position:absolute;right:0;top:calc(100% + 18px);z-index:20;min-width:220px;background:var(--glass-bg-menu);backdrop-filter:var(--glass-filter-dense);-webkit-backdrop-filter:var(--glass-filter-dense);border:1px solid var(--glass-border);border-radius:var(--radius-sm);box-shadow:var(--shadow-float);padding:6px;display:flex;flex-direction:column}
.account-menu__panel a,.account-menu__panel button{display:flex;align-items:center;width:100%;min-height:44px;padding:0 14px;border:0;border-radius:var(--radius-xs);background:none;color:var(--text);font:inherit;font-weight:600;text-align:left;text-decoration:none;cursor:pointer}
.account-menu__panel a:hover,.account-menu__panel button:hover{background:var(--surface-2)}
.account-menu__panel .inline-form{display:block}
@media (min-width:1181px){  /* the full menu: centred on the bar, not on the room the logo and buttons leave (owner 2026-11-05) */
  .site-header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);padding-inline:15px}  /* even sides: the middle column is the bar's middle */
  .site-header>.brand{justify-self:start}
  .header-actions{justify-self:end;margin-left:0}
}
@media (max-width:1180px){
  .site-header{flex-wrap:nowrap;gap:10px;padding:8px 10px 8px 14px;border-radius:var(--radius-header)}
  .site-header>.nav,.header-actions>.lang-menu,.header-auth{display:none}
  .menu{display:block}
}
@media (max-width:720px){
  .site-header-wrap{padding:10px 10px 0}
  .site-header{gap:4px;padding:6px 6px 6px 14px;min-height:56px}
  .brand{font-size:15px;gap:8px;flex:1 1 auto;min-width:0}
  .brand img{width:40px;height:40px}
  .brand__name{overflow:hidden;text-overflow:ellipsis}
  .header-actions{gap:2px}
  .header-actions>.icon-btn,.header-actions>.inline-form .icon-btn{background:transparent}
}
/* Cookie consent (owner 2026-11-05): a small card in the corner, one sentence with its two links, two equal buttons */
.consent{position:fixed;left:16px;bottom:16px;z-index:60;width:calc(100% - 32px);max-width:400px}
.consent__card{padding:14px;border:1px solid var(--glass-border);border-radius:var(--radius-md);background:var(--glass-bg-dense);backdrop-filter:var(--glass-filter-dense);-webkit-backdrop-filter:var(--glass-filter-dense);color:var(--text);box-shadow:var(--shadow-float);display:grid;gap:12px}
.consent__text{margin:0;font-size:13.5px;line-height:1.5;color:var(--text-2)}
.consent__links{white-space:nowrap;color:var(--muted)}
.consent__links a{color:var(--accent-text);font-weight:600;padding-block:12px;margin-block:-12px}  /* a taller tap area without a taller line */
.consent__actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.consent__actions .btn{min-height:44px;padding-inline:8px;font-size:14px;white-space:nowrap}
@media (max-width:760px){
  .consent{left:8px;bottom:8px;width:calc(100% - 16px);max-width:none}
  .consent__card{padding:12px;gap:10px}
  .consent__text{font-size:13px}
}
.settings-row.cookie-choice{cursor:pointer;flex-wrap:nowrap;align-items:center}
.cookie-choice .settings-row__label,.cookie-choice .settings-row__value{display:block}
/* An on/off switch for a checkbox (role="switch"), in the logo teal when on. */
.switch{appearance:none;-webkit-appearance:none;flex:none;position:relative;width:48px;height:28px;margin:0;border-radius:var(--radius-pill);background:var(--muted);cursor:pointer;transition:background-color .2s ease}
.switch::before{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#FFFFFF;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s var(--ease-out)}
.switch:checked{background:var(--accent)}
.switch:checked::before{transform:translateX(20px)}
.switch:disabled{cursor:default;opacity:.6}
.switch:disabled::before{background:#FFFFFF}
.switch:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media (prefers-reduced-motion:reduce){.switch,.switch::before{transition:none}}
/* Phone rules from the owner's second review */
@media (max-width:720px){
  .auth .form-footer{flex-direction:column;align-items:center;text-align:center;gap:10px}
}
/* Pressed states (Apple HIG: a control must answer the touch) */
.btn:active,a.chip:active,.filter-chips a:active,.view-toggle a:active,.segmented button:active{filter:brightness(.9)}
.btn-secondary:active,.btn-outline:active,.icon-btn:active,.btn-link:active,.account-menu__button:active{background:var(--border);filter:none}
.nav a:active,.pill-link:active{background:var(--surface-2)}
.footer-card a:active{filter:brightness(.75)}
.post-card:active,.course-card:active,.book-card:active,.post-row:active{box-shadow:0 0 0 3px var(--accent-soft)}
@media (prefers-reduced-motion:no-preference){.btn:active,.icon-btn:active{transform:translateY(1px)}}
/* 44px tap targets (Apple HIG) */
.nav a,.nav-menu__label{min-height:44px}
.auth .form-footer a,.auth .card>p>a{min-height:44px;display:inline-flex;align-items:center}
.footer-card a{min-width:44px}
/* Labels that fit (Apple HIG: check the longest label at the narrowest width) */
.account-menu__panel{width:max-content;max-width:min(320px,calc(100vw - 32px))}
.account-menu__panel a,.account-menu__panel button{white-space:nowrap}
@media (max-width:720px){
  .auth .card{padding:20px}
  .footer-card{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}
  .footer-nav{flex-wrap:wrap;gap:0 18px}
}
.field-group{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:14px}
.field-group>legend{font-weight:700;padding:0;margin-bottom:2px}
.field-group>.help{margin:-8px 0 0;color:var(--muted);font-size:14px}

/* Profile: a desktop settings page. Each section is a card with its title and a short note on the left and the
   fields on the right; on narrow screens the two stack. */
.settings{container-type:inline-size;max-width:1000px;margin-inline:auto;width:100%;display:flex;flex-direction:column;gap:20px}
.settings-id{display:flex;align-items:center;gap:18px;padding-block:8px 12px}
.settings-id__avatar{width:64px;height:64px;font-size:22px;flex:none}
.settings-id__text{min-width:0}
.settings-id h1{margin:0}
.settings-id__email{margin:4px 0 0;color:var(--text-2);overflow-wrap:anywhere}
.settings__form{display:flex;flex-direction:column;gap:20px}
.settings-section{display:grid;gap:20px;padding:24px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md)}
.settings-section__title{font-size:18px;font-weight:700;margin:0}
.settings-section__intro p{margin:6px 0 0;color:var(--text-2);font-size:14.5px;line-height:1.5}
.settings-section__body{display:flex;flex-direction:column;gap:16px;min-width:0}
.settings-names{display:grid;gap:14px}
.settings__save{display:flex;justify-content:flex-end}
.settings-rows{gap:0}
.settings-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 24px;padding-block:16px;border-top:1px solid var(--border)}
.settings-row:first-child{border-top:0;padding-top:0}
.settings-row:last-child{padding-bottom:0}
.settings-row>div{min-width:0}
.settings-row__label{margin:0;font-weight:700}
.settings-row__value{margin:2px 0 0;color:var(--text-2);font-size:14.5px;overflow-wrap:anywhere}
.settings-row .btn{flex:none;min-width:200px}
.btn-danger-outline{background:transparent;color:var(--danger);box-shadow:inset 0 0 0 1.5px var(--danger)}
.btn-danger-outline:hover{background:var(--danger-soft)}
@container (min-width:760px){
  .settings-section{grid-template-columns:minmax(200px,280px) minmax(0,1fr);gap:40px;padding:32px}
  .settings-names{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@container (max-width:520px){
  .settings-section{padding:20px}
  .settings__save .btn,.settings-row .btn{width:100%}
}
/* Change password, change email, delete account: one settings section with a way back to the profile. */
.settings-back{align-self:flex-start;display:inline-flex;align-items:center;gap:4px;min-height:44px;margin-bottom:-12px;color:var(--text-2);font-weight:600;text-decoration:none}
.settings-back:hover{color:var(--text)}
.settings-back svg{width:20px;height:20px;margin-left:-4px}
.settings--task h1{margin:0 0 4px}
.settings-section__intro p+p{margin-top:10px}
.settings-section__intro a{min-height:44px;display:inline-flex;align-items:center}
.settings-section--danger{border-color:color-mix(in srgb,var(--danger) 40%,var(--border))}
.settings-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;padding-top:4px}
.field .help ul{margin:6px 0 0;padding-left:1.15em;display:grid;gap:2px}
@container (max-width:520px){.settings-actions{flex-direction:column-reverse}.settings-actions .btn{width:100%}}

/* Log in and Create account: a soft panel that says what the account is for beside the form; on narrow screens the
   form comes first and the login panel is left out. */
.auth-split{max-width:1000px;margin-inline:auto;width:100%;display:grid;gap:20px}
.auth-aside{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;gap:14px;padding:28px;border-radius:var(--radius-md);background:var(--mist);color:var(--mist-ink)}
.auth-aside__logo{width:64px;height:64px;border-radius:var(--radius-sm)}  /* owner 2026-10-25: the logo tops the panel */
.auth-aside h2{margin:0;font-size:clamp(22px,2.4vw,30px);line-height:1.2;text-wrap:balance;color:inherit}
.auth-aside p{margin:0;font-size:16px;line-height:1.55}
.auth-aside__list{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:12px;font-size:16px;line-height:1.45}
.auth-aside__list li{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:start}
.auth-aside__list li::before{content:"";width:22px;height:22px;margin-top:1px;border-radius:var(--radius-pill);background:var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/14px no-repeat}
.auth-form{display:flex;flex-direction:column;gap:18px;padding:28px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);min-width:0}
.auth-form h1{margin:0}
.auth-form__links{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;font-size:15px}
.auth-form__links p{margin:0;color:var(--text-2)}
.auth-form__links a{min-height:44px;display:inline-flex;align-items:center}
/* New here: a second, quieter button under the form, after a thin line (owner 2026-10-23) */
.auth-join{display:flex;flex-direction:column;gap:10px;padding-top:18px;border-top:1px solid var(--border);text-align:center}
.auth-join p{margin:0;color:var(--text-2);font-size:15px}
.auth-split--register .auth-aside{order:2}
.auth-split--login .auth-aside{display:none}
@media (min-width:860px){  /* a media query: the split is the grid itself, so a container query cannot reach it */
  .auth-split{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:stretch}
  .auth-split--register .auth-aside{order:0}
  .auth-split--login .auth-aside{display:flex}
  .auth-aside{padding:44px;justify-content:center}
  .auth-form{padding:40px}
}

/* Messages on the way in and out of an account (check your email, password changed, link expired, too many
   attempts): one centred card with an icon, a heading, a line of explanation and the next step. */
.notice{max-width:560px;margin:clamp(8px,4vh,48px) auto 0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:16px;padding:clamp(28px,5vw,48px) clamp(20px,5vw,44px);text-align:center;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md)}
.notice__icon{width:72px;height:72px;border-radius:var(--radius-pill);display:grid;place-items:center;background:var(--accent-soft);color:var(--accent-text)}
.notice__icon--mist{background:var(--mist);color:var(--mist-ink)}
.notice__icon svg{width:34px;height:34px}
.notice h1{margin:4px 0 0;font-size:clamp(24px,3vw,30px);line-height:1.2;text-wrap:balance}
.notice>p{margin:0;max-width:44ch;color:var(--text-2);font-size:16px;line-height:1.55}
.notice>.btn{margin-top:8px;min-width:200px}
.notice__actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:8px}
.notice__actions .btn{min-width:160px}
/* The 404 page: a search box filled with the broken address's words, then what it may have pointed to (or what is new) */
.notice-search{display:flex;align-items:center;gap:10px;width:100%;min-height:56px;margin-top:8px;padding:6px 6px 6px 16px;border-radius:var(--radius-md);background:var(--bg);border:1px solid var(--border);text-align:left}
.notice-search:focus-within{border-color:var(--accent)}
.notice-search svg{width:20px;height:20px;color:var(--muted);flex:none}
.notice-search input{flex:1;min-width:0;border:0;background:none;font:inherit;font-size:16px;color:var(--text);outline:none;min-height:44px}
.notice-search input::placeholder{color:var(--muted)}
.notice-search .btn{flex:none}
.notice-posts{max-width:560px;margin:32px auto 0;width:100%;display:flex;flex-direction:column;gap:8px}
.notice-posts h2{font-size:20px;line-height:1.3}
.notice__form{width:100%;margin-top:12px;padding-top:24px;border-top:1px solid var(--border);text-align:left}
.notice__form-title{margin:0;font-weight:700}
.auth-form__lead{margin:-6px 0 0;color:var(--text-2);line-height:1.5}
.auth-split--task .auth-aside{display:none}
@media (min-width:860px){.auth-split--task .auth-aside{display:flex}}
/* The header's menus open from their button: a short fade and settle, not a jump. Closing stays instant. */
.account-menu__panel,.lang-menu__panel,.nav-menu__panel{transform-origin:top right;transition:opacity .18s var(--ease-out),transform .18s var(--ease-out)}
.nav-menu__panel{transform-origin:top left}  /* it opens from the left, under its name */
.menu-panel{transform-origin:top center;transition:opacity .2s var(--ease-out),transform .2s var(--ease-out)}
@starting-style{.account-menu__panel,.lang-menu__panel,.nav-menu__panel,.menu-panel{opacity:0;transform:translateY(-4px) scale(.97)}}
/* The header's search bar: opened by the magnifier, it covers the header bar (header-search.js) */
.header-search{position:absolute;inset:6px;z-index:5;display:flex;align-items:center;gap:8px;padding:0 6px 0 14px;
  border-radius:var(--radius-sm);background:var(--surface);transition:opacity .18s var(--ease-out),transform .18s var(--ease-out)}
@starting-style{.header-search{opacity:0;transform:translateY(-4px)}}
.header-search[hidden]{display:none}
.header-search__icon{flex:none;width:20px;height:20px;color:var(--muted)}
.header-search__input{flex:1;min-width:0;min-height:44px;border:0;background:transparent;font:inherit;font-size:16px;color:var(--text);outline:none}
.header-search__input::placeholder{color:var(--muted)}
.header-search__input::-webkit-search-cancel-button{display:none}
.header-search:focus-within{box-shadow:inset 0 0 0 2px var(--accent)}
.header-search__submit{flex:none;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border:0;border-radius:var(--radius-pill);
  background:var(--accent);color:var(--on-accent);cursor:pointer}
.header-search__submit svg{width:18px;height:18px}
.header-search__submit:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.site-header.is-searching .header-search-toggle{background:var(--accent-soft);color:var(--accent-text)}
@media (max-width:720px){.header-search{inset:4px;padding-left:10px}}
/* Guests on wide screens: one Log in button straight to the login page, which offers Join (owner 2026-10-23) */
.guest-login{padding:0 16px 0 12px;background:var(--accent);color:var(--on-accent);text-decoration:none;transition:background-color .15s ease}
.guest-login svg{width:18px;height:18px;flex:none}
@media (hover:hover) and (pointer:fine){.guest-login:hover{background:color-mix(in srgb,var(--accent) 88%,#000)}}
.account-menu__button.guest-login:active{background:color-mix(in srgb,var(--accent) 80%,#000)}
.guest-login:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Guests' Save popup: Log in or Join (save-dialog.js) */
.save-dialog{width:min(420px,calc(100vw - 32px));margin:auto;padding:28px 24px 24px;border:1px solid var(--glass-border);border-radius:var(--radius-lg);
  background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-filter);backdrop-filter:var(--glass-filter);color:var(--text);box-shadow:var(--shadow-float);text-align:center;
  transition:opacity .2s var(--ease-out),transform .2s var(--ease-out)}
@starting-style{.save-dialog[open]{opacity:0;transform:translateY(8px) scale(.98)}}
.save-dialog::backdrop{background:rgba(20,18,26,.45);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.save-dialog__close{position:absolute;top:10px;right:10px}
.save-dialog__icon{display:inline-grid;place-items:center;width:52px;height:52px;margin-bottom:12px;border-radius:var(--radius-md);background:var(--accent-soft);color:var(--accent-text)}
.save-dialog__icon svg{width:24px;height:24px}
.save-dialog h2{margin:0;font-size:22px;line-height:1.25;text-wrap:balance}
.save-dialog p{margin:8px 0 20px;color:var(--text-2);font-size:15px;line-height:1.5}
.save-dialog__actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.save-dialog__actions .btn{min-height:46px}
/* Starry sky card, shared by the home page and My learning */
.night-card{position:relative;isolation:isolate;overflow:hidden;border-radius:var(--radius-lg);min-height:340px;display:flex;color:#FFFFFF}
.night-card__sky{position:absolute;inset:0;z-index:-2;background:linear-gradient(180deg,#081022 0%,#101E3A 55%,#1B2E50 100%)}
.night-card__sky::before,.night-card__sky::after{content:"";position:absolute;inset:0;opacity:.85;background-image:
  radial-gradient(1.6px 1.6px at 12% 18%,#fff 60%,transparent),radial-gradient(1.2px 1.2px at 28% 32%,#fff 60%,transparent),
  radial-gradient(1.4px 1.4px at 45% 12%,#fff 60%,transparent),radial-gradient(1px 1px at 62% 26%,#fff 60%,transparent),
  radial-gradient(1.8px 1.8px at 78% 14%,#fff 60%,transparent),radial-gradient(1.2px 1.2px at 88% 36%,#fff 60%,transparent),
  radial-gradient(1px 1px at 52% 44%,#fff 60%,transparent),radial-gradient(1.3px 1.3px at 18% 48%,#fff 60%,transparent),
  radial-gradient(1px 1px at 70% 52%,#fff 60%,transparent),radial-gradient(1.5px 1.5px at 94% 8%,#fff 60%,transparent),
  radial-gradient(1.4px 1.4px at 8% 72%,#fff 60%,transparent),radial-gradient(1px 1px at 34% 64%,#fff 60%,transparent),
  radial-gradient(1.6px 1.6px at 58% 78%,#fff 60%,transparent),radial-gradient(1.1px 1.1px at 82% 68%,#fff 60%,transparent),
  radial-gradient(1px 1px at 24% 88%,#fff 60%,transparent),radial-gradient(1.3px 1.3px at 92% 90%,#fff 60%,transparent)}
.night-card__sky::after{transform:translate(7%,9%);opacity:.45}
.night-card__text{padding:clamp(20px,2.4cqi,28px);display:flex;flex-direction:column;gap:12px;align-items:flex-start;max-width:440px}
.night-card p{color:#D5DEE8;font-size:15px;line-height:1.55}
.night-card__play{display:inline-flex;align-items:center;gap:10px;margin-top:6px;min-height:48px;padding:0 20px 0 14px;border-radius:var(--radius-pill);background:var(--accent);color:#FFFFFF;font-weight:700;font-size:15px;text-decoration:none;transition:background-color .18s ease}
.night-card__play svg{width:22px;height:22px}
@media (hover:hover) and (pointer:fine){.night-card__play:hover{background:color-mix(in srgb,var(--accent) 88%,#000)}}
/* Breadcrumbs (owner 2026-11-06): a home icon, then each step with the header's chevrons, the page itself last;
   one line on every screen, long names shortened with … so it never wraps or scrolls sideways */
.crumbs{margin:0 0 6px;min-width:0}
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;align-items:center;min-width:0;font-size:14px;line-height:1.3}
.crumbs li{display:flex;align-items:center;min-width:0;flex:none}
.crumbs li:last-child{flex:1 1 0}  /* the page itself gives way first … */
.crumbs li:nth-last-child(2):not(:first-child){flex:0 1 auto;max-width:55%}  /* … then the step before it */
.crumbs__sep{flex:none;width:16px;height:16px;margin:0 4px;color:var(--muted)}
.crumbs a,.crumbs__here{display:inline-flex;align-items:center;min-height:44px;min-width:0}
.crumbs__home{flex:none;justify-content:center;min-width:32px;color:var(--text-2)}
.crumbs__home svg{width:19px;height:19px}
.crumbs__step{color:var(--text-2);font-weight:600;text-decoration:none}
.crumbs .crumbs__step,.crumbs .crumbs__here{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:44px}
.crumbs__here{color:var(--muted)}
@media (hover:hover) and (pointer:fine){.crumbs__step:hover,.crumbs__home:hover{color:var(--accent-text)}}
@media (max-width:560px){.crumbs li:not(:first-child):not(:nth-last-child(-n+2)){display:none}}  /* phones: home, the parent, the page */
/* --- content.css --- */
/* Shared page pieces */
.page-head{display:flex;flex-direction:column;gap:12px}
.eyebrow{font-size:13px;font-weight:700;color:var(--muted)}
.note{background:var(--surface-2);color:var(--text-2);border-radius:var(--radius-sm);padding:10px 14px;font-size:14px}
.empty-state{background:var(--surface);border:1px dashed var(--border-strong);border-radius:var(--radius-lg);padding:32px;text-align:center;color:var(--muted)}
.card-grid{display:grid;gap:20px;grid-template-columns:repeat(4,minmax(0,1fr))}
.card-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
/* Detail pages */
.post{max-width:760px;margin-inline:auto;width:100%;display:flex;flex-direction:column;gap:24px}
.post__head{display:flex;flex-direction:column;gap:12px}
.post__head h1{overflow-wrap:anywhere;font-size:clamp(23px,2.2vw,30px);line-height:1.22}
.post__meta-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px}
.post__meta-row .post__meta{margin:0}
.post__meta{color:var(--muted);font-size:15px}
.player audio{width:100%}
/* Rich text */
.prose{font-size:17px;line-height:1.75;overflow-wrap:break-word}
.prose>*+*{margin-top:1em}
.prose h2{font-size:21px;margin-top:1.5em}
.prose h3{font-size:18px;margin-top:1.4em}
.prose h4{font-size:17px;margin-top:1.2em}
.prose ul,.prose ol{padding-left:1.4em}
.prose li+li{margin-top:.35em}
.prose blockquote{margin:0;padding:4px 0 4px 18px;border-left:3px solid var(--accent);color:var(--text-2)}
.prose img{border-radius:var(--radius-sm);height:auto}
.prose figure{margin:0}
.prose figcaption{font-size:14px;color:var(--muted);margin-top:6px}
.prose hr{border:0;border-top:1px solid var(--border)}
.prose table{border-collapse:collapse;width:100%;display:block;overflow-x:auto}
.prose th,.prose td{border:1px solid var(--border);padding:8px 10px;text-align:left}
/* Practice card (fixed dark teal in both themes, per MASTER.md) */
.practice-card{position:relative;overflow:hidden;background:radial-gradient(ellipse at 80% 110%,var(--sky-glow),var(--sky) 66%);background-color:var(--sky);color:#F2F1F8;border-radius:var(--radius-lg);padding:24px;display:flex;flex-direction:column;justify-content:space-between;gap:24px;min-height:240px;text-decoration:none}
.practice-card__stars{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.practice-card__label{position:relative;font-size:13px;font-weight:700;color:#F2F1F8;opacity:.85}
.practice-card__body{position:relative;display:flex;flex-direction:column;gap:10px}
.practice-card__play{width:52px;height:52px;border-radius:var(--radius-pill);background:var(--accent);color:#FFFFFF;display:flex;align-items:center;justify-content:center}
.practice-card__title{font-size:22px;font-weight:800;line-height:1.25}
.practice-card__subtitle{font-size:14px;color:#F2F1F8;opacity:.85}
/* Chips and section heads */
.chips{display:flex;flex-wrap:wrap;gap:8px}
a.chip{text-decoration:none;background:var(--accent-soft);color:var(--accent-text);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent-text) 35%,transparent)}
.chip--type{background:var(--text);color:var(--bg)}
.chip--neutral{background:var(--surface-2);color:var(--text-2)}
.section{display:flex;flex-direction:column;gap:20px}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.pill-link{background:var(--surface);border:1px solid var(--border);color:var(--text);text-decoration:none;font-weight:700;font-size:14px;padding:8px 14px;border-radius:var(--radius-pill);min-height:44px;display:inline-flex;align-items:center;white-space:nowrap}
.filter-chips{display:flex;flex-wrap:wrap;gap:8px}
.filter-chips a{min-height:44px;display:inline-flex;align-items:center;padding:8px 14px;border-radius:var(--radius-pill);background:var(--accent-soft);color:var(--accent-text);font-weight:600;font-size:14px;text-decoration:none}
.filter-chips a[aria-current="true"]{background:var(--accent);color:var(--on-accent)}
/* Post card (grid) */
.post-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;text-decoration:none;color:var(--text);min-width:0}
.post-card__cover{width:100%;height:160px;object-fit:cover}
.post-card__body{padding:16px;display:flex;flex-direction:column;gap:10px;flex:1 1 auto;justify-content:space-between;min-width:0}
.post-card__title{font-weight:800;font-size:17px;line-height:1.3;overflow-wrap:anywhere}
.post-card--text .post-card__body{padding:20px}
.post-card--text .post-card__title{font-size:20px}
.post-card__meta{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.post-card:hover .post-card__title,.post-card:focus-visible .post-card__title{color:var(--accent-text)}
/* List card with rows */
.list-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:8px 24px 12px;display:flex;flex-direction:column}
.list-card__head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0}
.list-card__head a{color:var(--accent-text);font-weight:700;font-size:14px;text-decoration:none;white-space:nowrap}
.post-row{display:flex;gap:16px;align-items:center;padding:14px 0;border-top:1px solid var(--border)}
.list-card>.post-row:first-child{border-top:0}
.post-row__thumb{width:84px;height:64px;object-fit:cover;border-radius:var(--radius-sm);flex:0 0 auto;background:var(--surface-2)}
.post-row__text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.post-row__title{font-weight:800;font-size:17px;color:var(--text);text-decoration:none;overflow-wrap:anywhere}
.post-row__title:hover{color:var(--accent-text)}
.post-row__meta{font-size:13px;color:var(--muted)}
.post__cover{width:100%;height:auto;max-height:400px;object-fit:cover;border-radius:var(--radius-lg)}
/* Pagination */
.pagination{display:flex;justify-content:center;align-items:center;gap:12px;flex-wrap:wrap}
.pagination__info{color:var(--muted);font-size:14px}
/* Library */
.book-grid{display:grid;gap:20px;grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
.book-card{display:flex;flex-direction:column;gap:10px;text-decoration:none;color:var(--text);min-width:0}
.book-card__cover{width:100%;height:auto;aspect-ratio:2/3;object-fit:cover;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);box-shadow:var(--shadow);transition:border-color .2s ease,box-shadow .2s ease}  /* the cards' thin edge, so a white cover keeps its shape (owner 2026-11-06) */
.book-card:hover .book-card__cover{border-color:color-mix(in srgb,var(--accent) 45%,var(--border));box-shadow:0 10px 28px rgba(40,24,30,.08)}  /* as the home cards (owner 2026-11-06) */
.book-card:hover .book-card__title{color:var(--accent-text)}
.book-card__placeholder{display:flex;align-items:center;justify-content:center;padding:12px;text-align:center;font-weight:700;color:var(--text-2);overflow:hidden;overflow-wrap:anywhere}
.book-card__title{font-weight:800;font-size:15px;line-height:1.3;overflow-wrap:anywhere}
.book-card__author{font-size:13px;color:var(--muted)}
.book{display:grid;grid-template-columns:minmax(0,280px) minmax(0,1fr);gap:32px;align-items:start}
.book__actions{display:flex;flex-wrap:wrap;gap:10px}
.book__actions .btn{gap:8px}.book__actions .btn>svg{width:17px;height:17px;flex:none}  /* the Download icon, sized like Save's */
/* Search */
.search-form{display:flex;gap:10px;flex-wrap:wrap}
.search-form input{flex:1 1 260px;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:11px 14px;min-height:44px}
@media (max-width:1100px){.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:720px){
  .card-grid,.card-grid--3{grid-template-columns:minmax(0,1fr);gap:10px}
  .prose{font-size:16px}
  .practice-card{min-height:0;border-radius:var(--radius-header);padding:16px;gap:16px}
  /* the grid on a phone: one full-width card each, its cover 2:1 (owner 2026-11-05; the list view is the most compact) */
  .card-grid,.card-grid--3{gap:16px}
  .post-card__cover{width:100%;height:auto;aspect-ratio:2/1}
  .post-card__body{padding:14px 16px 16px;gap:8px}
  .post-card__title{font-size:17px}
  .list-card{padding:6px 16px 10px;border-radius:var(--radius-md)}
  .post-row{gap:10px;padding:10px 0}
  .post-row__thumb{width:64px;height:48px}
  .post-row__meta time{display:block;white-space:nowrap}  /* the date on its own line, never broken */
  .post-row__sep:has(+ time){display:none}
  .post-row__title{font-size:15px}
  .post-row__meta{font-size:12px}
  .book{grid-template-columns:minmax(0,1fr)}
  .book>.book-card__cover{max-width:220px;justify-self:center}
  .book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
}
/* List/grid switch */
.page-head__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px}
.view-toggle,.segmented{display:inline-flex;border:1px solid var(--border);border-radius:var(--radius-pill);background:var(--surface);padding:3px;gap:2px}
.view-toggle a,.segmented button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 14px;border-radius:var(--radius-pill);color:var(--text-2);text-decoration:none;font-size:14px;font-weight:600}
.view-toggle a:hover,.segmented button:hover{color:var(--text)}
.segmented button{border:0;background:none;font:inherit;font-size:14px;font-weight:600;cursor:pointer}
.view-toggle a[aria-current="true"],.segmented button[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent-text)}
.view-toggle svg{width:18px;height:18px}
.post-row__thumb--book{width:56px;height:84px;border:1px solid var(--border);box-shadow:var(--shadow)}  /* the grid cards' edge (owner 2026-11-07) */
.saved-card .post-card__title{color:var(--text);text-decoration:none}
.saved-card .post-card__title:hover{color:var(--accent-text)}
.saved-card .post-card__meta .btn-link{font-size:13px}
@media (max-width:600px){.view-toggle a{padding:6px 10px;min-height:44px}}
/* Policy tables (the cookie list): plain words first, the technical name small and last; stacked rows on phones */
.prose--policy table{display:table;table-layout:fixed;font-size:15px;margin:12px 0 20px}
.prose--policy th,.prose--policy td{border:0;border-bottom:1px solid var(--border);padding:10px;vertical-align:top}
.prose--policy th{font-size:13px;color:var(--muted);font-weight:600;padding-block:8px}
.prose--policy th:first-child{width:50%}
.prose--policy th:nth-child(2){width:30%}
.prose--policy td:last-child{font:12.5px/1.6 ui-monospace,"SF Mono",Menlo,monospace;color:var(--muted)}
.prose--policy td:last-child em{font-style:normal;white-space:nowrap}
@media (max-width:600px){
  .prose--policy thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .prose--policy table,.prose--policy tbody,.prose--policy tr{display:block}
  .prose--policy tr{padding:12px 0;border-bottom:1px solid var(--border)}
  .prose--policy td{display:block;border:0;padding:0}
  .prose--policy td:nth-child(2),.prose--policy td:last-child{display:inline;white-space:normal;font-size:13px}
  .prose--policy td:nth-child(2){color:var(--text-2)}
  .prose--policy td:last-child{margin-left:10px;font-size:12px}
  .prose--policy td:first-child{margin-bottom:4px}
}
/* Phone rules from the owner's second review: icon-only switch and Save, one-line topics */
@media (max-width:720px){
  .page-head__row{flex-wrap:nowrap}
  .page-head__row h1{flex:1 1 auto;min-width:0}
  .view-toggle{flex:none}
  .view-toggle a{width:44px;min-height:44px;padding:0;justify-content:center}
  .view-toggle__text,.post__meta-row .save-btn__text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  /* the chips wrap onto lines, every topic in view (owner 2026-11-04: sideways scrolling was not obvious) */
  .filter-chips a{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;font-size:13px;line-height:30px;padding:7px 12px}
  .post-card__meta time{flex:none;white-space:nowrap}
  .post-card__meta .chip,.post-row .chip{font-size:11px}
  .post__meta-row{flex-wrap:nowrap}
  .post__meta-row .post__meta{flex:1 1 auto;min-width:0}
  .post__meta-row .save-btn{flex:none;width:44px;height:44px;padding:0}
  .post__meta-row .save-btn svg{width:18px;height:18px}
}
/* 44px tap targets (Apple HIG): list rows tap as a whole; small links get a full-height hit area */
.post-row{position:relative}
.post-row__title::after{content:"";position:absolute;inset:0;border-radius:var(--radius-sm)}
.post-row__title:focus-visible{outline:none}
.post-row:has(.post-row__title:focus-visible){outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--radius-sm)}
.list-card__head a,.section-head a,.pill-link,.about-card>a{min-height:44px;display:inline-flex;align-items:center}
.view-toggle a,.segmented button{min-height:44px}
.post__head a.chip{min-height:44px;padding-inline:14px;font-size:12px}
.list-card__head a,.section-head a{min-width:44px;justify-content:flex-end}
.about-card>a{min-width:44px}
.post-card__meta .chip,.post-row .chip,.lead-card .chips .chip{display:block;min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.post-card__meta time{flex:none;white-space:nowrap}
/* Phones: compact saved rows and book page (owner 2026-11-05): Remove under the title, a smaller book cover */
@media (max-width:600px){
  .saved-row{flex-wrap:wrap;gap:4px 12px;padding:14px 16px}
  .saved-row__link{flex-basis:100%}
  .saved-row .inline-form .btn-link{min-height:36px;font-size:13.5px}
  .book{gap:20px}
  .book>.book-card__cover{max-width:160px}
}
/* --- learning.css --- */
/* Course cards */
.course-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;text-decoration:none;color:var(--text);min-width:0}
.course-card__cover{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.course-card__body{padding:18px 20px;display:flex;flex-direction:column;gap:10px}
.course-card__title{font-size:19px;font-weight:800;line-height:1.25;overflow-wrap:anywhere}
.course-card__text{color:var(--text-2);font-size:15px}
.course-card:hover .course-card__title{color:var(--accent-text)}
/* Course page */
.course-page{display:flex;flex-direction:column;gap:28px}
.course-hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);overflow:hidden}
.course-hero__text{padding:40px;display:flex;flex-direction:column;gap:16px;justify-content:center}
.course-hero__text h1{overflow-wrap:anywhere}
.course-hero__lead{color:var(--text-2);font-size:17px}
.course-hero__cover{width:100%;height:100%;min-height:280px;object-fit:cover}
.course-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.btn.is-disabled{opacity:.6;cursor:not-allowed}
.course-progress{display:flex;flex-direction:column;gap:8px;max-width:520px;font-weight:700;font-size:14px}
progress{-webkit-appearance:none;appearance:none;width:100%;height:8px;border:0;border-radius:var(--radius-pill);background:var(--track);overflow:hidden;color:var(--accent)}
progress::-webkit-progress-bar{background:var(--track);border-radius:var(--radius-pill)}
progress::-webkit-progress-value{background:var(--accent);border-radius:var(--radius-pill)}
progress::-moz-progress-bar{background:var(--accent);border-radius:var(--radius-pill)}
/* On the course page and My learning the bar grows from empty to the learner's place once, as the page opens; the
   wrapper holds the track so only the coloured part moves */
.meter{display:block;border-radius:var(--radius-pill);background:var(--track);overflow:hidden}
.meter progress{display:block;background:transparent;transform-origin:left center;animation:meter-grow .7s var(--ease-out) .1s backwards}
.meter progress::-webkit-progress-bar{background:transparent}
@keyframes meter-grow{from{transform:scaleX(0)}}
@media (prefers-reduced-motion:reduce){.meter progress{animation:none}}
.completion-card{background:var(--ok-soft);border-radius:var(--radius-lg);padding:24px 28px;display:flex;flex-direction:column;gap:12px}
.completion-card__actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
/* Completing the course leads the result page; the last test's result follows, smaller (owner 2026-11-10). */
.completion-card:has(>h1){padding:32px 28px;gap:14px}
.completion-card:has(>h1) .cert-badge{align-self:flex-start;margin-bottom:4px}
.completion-card>h1{margin:0;font-size:clamp(28px,4.4vw,38px);line-height:1.15}
.result-card.result-card--after{padding:20px 24px;gap:8px;align-items:flex-start;text-align:start}
.result-card--after h2{margin:0;font-size:21px}
.result-card--after .result-card__mark{width:30px;height:30px}
.result-card--after .result-card__score{font-size:16px;margin:0}
.explanation-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:22px 28px;display:flex;flex-direction:column;gap:10px}
.explanation-card h2{font-size:18px;font-weight:700}
.course-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px;align-items:start}
.curriculum,.rules-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:24px;display:flex;flex-direction:column;gap:14px}
.course-aside{display:flex;flex-direction:column;gap:20px}
.rules-card h2{font-size:20px}
.rules-card ul{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:6px;color:var(--text-2)}
/* Curriculum */
.outline-part{display:flex;flex-direction:column;gap:10px}
.outline-part+.outline-part{border-top:1px solid var(--border);padding-top:16px}
.outline-part__title{font-size:18px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.outline-module{font-size:16px;color:var(--text-2);margin-top:6px}
.outline-lessons{list-style:none;margin:0;padding:0;counter-reset:lesson;display:flex;flex-direction:column}
.outline-lesson{counter-increment:lesson;display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 0;border-top:1px solid var(--border)}
.outline-lesson:first-child{border-top:0}
.outline-lesson::before{content:counter(lesson);flex:0 0 auto;width:28px;height:28px;border-radius:var(--radius-pill);background:var(--surface-2);color:var(--text-2);font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center}
.outline-lesson.is-viewed::before{background:var(--accent-soft);color:var(--accent-text)}
.outline-lesson__title{flex:1 1 auto;min-width:0;color:var(--text);text-decoration:none;font-weight:600;overflow-wrap:anywhere}
a.outline-lesson__title:hover{color:var(--accent-text)}
.outline-lesson.is-locked .outline-lesson__title{color:var(--muted)}
.outline-lesson__status{flex:0 0 auto;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:4px}
.outline-lesson__status svg{width:16px;height:16px}
.outline-test{font-size:14px;font-weight:700}
.outline-test a{color:var(--accent-text)}
.status{font-size:12px;font-weight:700;padding:3px 10px;border-radius:var(--radius-pill);background:var(--surface-2);color:var(--text-2)}
.status--done{background:var(--ok-soft);color:var(--ok-text)}
/* Lesson and test pages */
.lesson,.test-page{max-width:760px;margin-inline:auto;width:100%;display:flex;flex-direction:column;gap:24px}
.lesson-test{background:var(--accent-soft);border-radius:var(--radius-lg);padding:20px 24px;display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.lesson-nav{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}
.test-form{display:flex;flex-direction:column;gap:20px}
.question{margin:0;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow);padding:20px 24px;display:flex;flex-direction:column;gap:12px;min-width:0}
.question__text{display:flex;gap:8px;font-weight:700}
.question__text .prose{font-size:16px}
.question__image{border-radius:var(--radius-sm);max-height:360px;width:auto;height:auto}
.choice{display:flex;align-items:flex-start;gap:12px;min-height:44px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;overflow-wrap:anywhere}
.choice:has(input:checked){border-color:var(--accent);background:var(--picked-bg);color:var(--picked-ink)}
/* The radio is drawn here, not by the browser, so it is exactly the logo teal (browsers recolour accent-color at night). */
.choice input{appearance:none;-webkit-appearance:none;margin:2px 0 0;width:20px;height:20px;flex:0 0 auto;border-radius:50%;border:2px solid var(--muted);background:transparent;cursor:pointer}
.choice input:checked{border-color:var(--picked-mark);background:radial-gradient(circle,var(--picked-mark) 0 4px,transparent 4.5px)}
.choice input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.question textarea{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:11px 14px;min-height:120px}
.test-timer{font-weight:700;color:var(--accent-text)}
.result-card{border-radius:var(--radius-lg);padding:28px;display:flex;flex-direction:column;gap:12px;background:var(--surface-2)}
.result-card.is-passed{background:var(--ok-soft)}
.result-card.is-failed{background:var(--danger-soft)}
.result-card__score{font-size:18px;font-weight:700}
.result-card__actions{display:flex;flex-wrap:wrap;gap:10px}
/* A passed test, opened for the first time (result-once.js marks later visits "seen-result"): the ring draws, then the
   check, while the score counts up. A new certificate gets a soft sparkle around its badge, once. */
.result-card__mark{width:48px;height:48px;color:var(--ok)}
.result-card__mark svg{width:100%;height:100%;overflow:visible}
.result-card__mark :is(circle,path){fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1}
html:not(.seen-result) .result-card__mark circle{animation:draw-line .35s var(--ease-out) backwards}
html:not(.seen-result) .result-card__mark path{animation:draw-line .25s var(--ease-out) .3s backwards}
@keyframes draw-line{from{stroke-dashoffset:1}}
.result-card__score .count{font-variant-numeric:tabular-nums}
.result-counting .result-card.is-passed .count{visibility:hidden}
.cert-badge{position:relative;align-self:center;display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:var(--surface);color:var(--ok)}
.cert-badge__icon{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.cert-badge>svg:not(.cert-badge__icon){position:absolute;width:12px;height:12px;fill:var(--accent);opacity:0}
.cert-badge>svg:nth-child(2){top:-8px;left:-6px}
.cert-badge>svg:nth-child(3){top:-12px;right:-10px;width:9px;height:9px}
.cert-badge>svg:nth-child(4){bottom:-4px;right:-14px}
.cert-badge>svg:nth-child(5){bottom:-10px;left:-12px;width:8px;height:8px}
html:not(.seen-result) .cert-badge>svg:not(.cert-badge__icon){animation:sparkle .8s var(--ease-out) .45s}
html:not(.seen-result) .cert-badge>svg:nth-child(3){animation-delay:.52s}
html:not(.seen-result) .cert-badge>svg:nth-child(4){animation-delay:.59s}
html:not(.seen-result) .cert-badge>svg:nth-child(5){animation-delay:.66s}
@keyframes sparkle{0%{opacity:0;transform:scale(.4) rotate(0)}35%{opacity:1;transform:scale(1) rotate(20deg)}100%{opacity:0;transform:scale(.8) rotate(45deg)}}
@media (prefers-reduced-motion:reduce){.result-card__mark :is(circle,path),.cert-badge>svg{animation:none!important}}
.review{display:flex;flex-direction:column;gap:14px}
.review-item{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:18px 20px;display:flex;flex-direction:column;gap:12px}
.review-item__status{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;padding:4px 10px 4px 8px;border-radius:var(--radius-pill)}
.review-item__status svg{width:16px;height:16px}
.review-item__status.is-correct{background:var(--ok-soft);color:var(--ok-text)}
.review-item__status.is-wrong{background:var(--danger-soft);color:var(--danger)}
.review-choices{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.review-choices li{padding:9px 12px;border-radius:var(--radius-sm);background:var(--surface-2)}
.review-choices .is-chosen{font-weight:700;box-shadow:inset 0 0 0 1.5px var(--border-strong)}
.review-item.is-wrong .review-choices .is-chosen{background:var(--danger-soft)}
.review-choices .is-correct{background:var(--ok-soft);color:var(--ok-text)}
/* Certificates */
.certificate-page{max-width:760px;margin-inline:auto;width:100%;display:flex;flex-direction:column;gap:20px}
.certificate-page__title{text-align:center}
.verify-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);overflow:hidden}
.verify-status{background:var(--ok-soft);padding:18px 28px;display:flex;align-items:center;gap:14px}
.verify-status__icon{width:40px;height:40px;border-radius:var(--radius-pill);background:var(--ok);color:#FFFFFF;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.verify-status__icon svg{width:20px;height:20px}
.verify-status__text{display:flex;flex-direction:column;color:var(--ok-text)}
.verify-status__text strong{font-size:18px}
.verify-status.is-revoked{background:var(--danger-soft)}
.verify-status.is-revoked .verify-status__icon{background:var(--danger)}
.verify-status.is-revoked .verify-status__text{color:var(--text)}
.verify-list{margin:0;padding:12px 28px 24px;display:grid;grid-template-columns:200px minmax(0,1fr)}
.verify-list dt{padding:14px 0;border-bottom:1px solid var(--border);color:var(--muted);font-size:15px}
.verify-list dd{margin:0;padding:14px 0;border-bottom:1px solid var(--border);font-weight:700;overflow-wrap:anywhere}
.verify-list dt:last-of-type,.verify-list dd:last-of-type{border-bottom:0}
.certificate-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center}
.certificate-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.certificate-item{display:flex;flex-direction:column;gap:4px;padding:18px 22px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);text-decoration:none;color:var(--text)}
.certificate-item__title{font-weight:800;overflow-wrap:anywhere}
.certificate-item__meta{font-size:14px;color:var(--muted)}
@media (max-width:900px){
  .course-hero,.course-layout{grid-template-columns:minmax(0,1fr)}
  .course-hero__cover{min-height:200px;max-height:260px;order:-1}
  /* one column: the description first, then the curriculum, then How it works */
  .course-aside{display:contents}
  .course-aside>.prose{order:-1}
}
@media (max-width:720px){
  .course-hero{border-radius:var(--radius-md)}
  .course-hero__text{padding:20px 16px}
  .curriculum,.rules-card{padding:16px;border-radius:var(--radius-md)}
  .question{padding:16px;border-radius:var(--radius-md)}
  .result-card{padding:20px}
  .result-card__actions,.certificate-actions{flex-direction:column;align-items:stretch}
  .result-card__actions .btn,.certificate-actions .btn{justify-content:center;width:100%}
  .certificate-actions .btn-link{align-self:center;min-height:44px;display:inline-flex;align-items:center}
  .verify-list{grid-template-columns:minmax(0,1fr);padding:8px 18px 18px}
  .verify-list dt{border-bottom:0;padding-bottom:0}
  .verify-status{padding:16px 18px}
}
/* Foldable sections (the course program on phones): the heading's button covers the whole heading */
.fold__title{position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px}
.fold__toggle{flex:none;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;margin:-10px -10px -10px 0;border:0;border-radius:var(--radius-pill);background:transparent;color:var(--muted);cursor:pointer}
.fold__toggle::after{content:"";position:absolute;inset:-6px}
.fold__toggle:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.fold__toggle svg{width:22px;height:22px;transition:transform .2s var(--ease-out)}
.fold__toggle[aria-expanded="true"] svg{transform:rotate(180deg)}
@media (prefers-reduced-motion:reduce){.fold__toggle svg{transition:none}}
/* Phone rules from the owner's second review: steady full-width buttons */
@media (max-width:720px){
  .course-actions{flex-direction:column;align-items:stretch}
  .course-actions form{width:100%}
  .course-actions .btn{width:100%;font-size:15px;line-height:1.3;padding:11px 14px;text-align:center;text-wrap:balance}
  .course-actions .btn-link{align-self:center}
  .lesson-test{flex-direction:column;align-items:stretch;padding:18px}
  .lesson-test .status{align-self:flex-start}
  .lesson-test p{margin:0}
  .lesson-test .btn{width:100%}
  .lesson-nav{flex-direction:column-reverse}
  .lesson-nav>span:empty{display:none}
  .lesson-nav .btn{width:100%}
}
/* 44px tap targets (Apple HIG) */
.fold__title{min-height:44px}
.certificate-ready__title{margin:0;font-weight:700;color:var(--text-2);text-align:center}
/* The certificate in other languages */
.certificate-languages{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 8px;font-size:15px;color:var(--text-2)}
.certificate-languages>a{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;padding:0 12px;border-radius:var(--radius-pill);color:var(--accent-text);font-weight:700;text-decoration:none}
.certificate-languages>a:active{background:var(--surface-2)}
.certificate-languages .note{flex-basis:100%;margin:0;text-align:center}
.certificate-languages .note a{display:inline-flex;align-items:center;min-height:44px}
/* Unanswered questions, pointed out before a test is sent */
.question.is-unanswered{border-color:var(--danger)}
.test-unanswered{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px;padding:14px 18px;border-radius:var(--radius-sm);background:var(--danger-soft);color:var(--text)}
.test-unanswered p{margin:0;min-width:0}

/* The learner's own certificate (owner 2026-10-25): a plain mist card with the two main actions leads, sharing comes next,
   the details (and that it is valid) last; the public verify page keeps its status card */
.certificate-page--own{gap:24px}
.cert-head{display:grid;gap:8px}
.cert-head h1{font-size:clamp(26px,3.4vw,36px);line-height:1.15;letter-spacing:-.015em;text-wrap:balance;margin:0}
.cert-head__meta{margin:0;color:var(--text-2)}
.cert-main{position:relative;isolation:isolate;overflow:hidden;background:var(--mist);color:var(--mist-ink);border-radius:var(--radius-lg);padding:clamp(24px,4vw,40px);display:grid;gap:14px;min-height:220px;align-content:end}
.cert-main__actions{display:flex;flex-wrap:wrap;gap:12px}
.cert-main__btn{min-height:56px;padding:0 24px;font-size:16px;gap:10px}
.cert-main__btn svg{width:20px;height:20px;flex:none}
.cert-main .btn-secondary{background:var(--surface)}
.cert-main__langs{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;font-size:15px}
.cert-main__langs a{color:var(--mist-ink);font-weight:600;min-height:44px;display:inline-flex;align-items:center}
.cert-main__note{margin:0;font-size:14px}
.cert-main__note a{color:inherit}
.cert-main__revoked{margin:0;display:grid;gap:4px;font-size:16px}
.cert-share{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.cert-details{border-top:1px solid var(--border);padding-top:20px;display:grid;gap:12px}
.cert-details h2{font-size:17px;margin:0;display:flex;align-items:center;gap:10px}
.cert-valid{font-size:13px;font-weight:600;padding:3px 10px;border-radius:var(--radius-pill);background:var(--ok-soft);color:var(--ok-text)}
.cert-details dl{margin:0;display:grid;grid-template-columns:max-content 1fr;gap:6px 20px;font-size:15px}
.cert-details dt{color:var(--muted)}
.cert-details dd{margin:0}
@media (max-width:640px){
  .cert-main__actions{flex-direction:column}.cert-main__btn{width:100%;justify-content:center}
  .cert-share{flex-direction:column;align-items:stretch}.cert-share .btn{justify-content:center}.cert-share .btn-link{align-self:center}
  .cert-details dl{grid-template-columns:1fr}.cert-details dd{margin-bottom:6px}
}
/* Every curriculum lesson link fills its row: a full 44 px tap target (owner 2026-11-05) */
a.outline-lesson__title{display:flex;align-items:center;min-height:44px}
/* Phones: the compact course list and course page (owner 2026-11-05) */
@media (max-width:720px){
  .course-card__cover{aspect-ratio:2/1}
  .course-card__body{padding:14px 16px 16px;gap:8px}
  .course-card__title{font-size:17px}
  .course-card__text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:14.5px}
  .course-hero__cover{min-height:0;max-height:170px}
  .course-hero__text{gap:12px}
  .course-hero__text h1{font-size:22px}
  .course-hero__lead{font-size:15.5px}
}
