/*
VOICE   calm, plain and encouraging: a study desk, not a games arcade
IDEA    a well-made exam revision card: one question, big clear choices, the explanation underneath
PICTURE the Rock of Gibraltar on the Strait as a horizon strip across the top of the home page
COLOUR  white ground, Strait blue for actions, flag red only as a thin accent; green and red with ticks and crosses for answers
TYPE    Atkinson Hyperlegible (made for readability), self-hosted so no third-party requests
LAYOUT  one centred column up to 1080px; cards stack on phones; 48px tap targets throughout
*/
@font-face{font-family:"Atkinson Hyperlegible";font-weight:400;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-weight:700;font-display:swap;src:url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2")}

:root{color-scheme:light dark;
  --bg:light-dark(#ffffff,#0c1820);--panel:light-dark(#f3f7f9,#132430);--line:light-dark(#d5e0e6,#2a3f4d);
  --ink:light-dark(#14212b,#e8f0f4);--soft:light-dark(#4b5d69,#a9bcc7);
  --blue:light-dark(#0d5170,#7cc4e6);--blue-ink:light-dark(#ffffff,#06202c);--blue-tint:light-dark(#e3f0f6,#17323f);
  --red:#da000c;--ok:light-dark(#17703a,#6fd394);--ok-tint:light-dark(#e6f4ea,#173826);
  --bad:light-dark(#b3261e,#ff8a80);--bad-tint:light-dark(#fbe9e7,#3e1d1b);
  --note:light-dark(#fff6d6,#3a3116);--note-ink:light-dark(#5c4600,#f3dc94);
  --sea1:light-dark(#cfe6f1,#10303f);--sea2:light-dark(#9fcbe0,#16465c);--rock:light-dark(#6f8794,#7b939f);--rock2:light-dark(#536b78,#5d7581);
  --r:14px;--font:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.55 var(--font);overflow-x:clip;border-top:5px solid var(--red)}
a{color:var(--blue);text-underline-offset:3px}
h1,h2,h3{line-height:1.15;text-wrap:balance;margin:0 0 .4em}
h1{font-size:clamp(30px,5vw,42px)}h2{font-size:24px}h3{font-size:19px}
p{margin:0 0 1em}
.wrap{max-width:1080px;margin:0 auto;padding:0 max(4vw,16px)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:12px;top:-60px;background:var(--blue);color:var(--blue-ink);padding:10px 16px;border-radius:8px;z-index:9}
.skip:focus{top:12px}
:focus-visible{outline:3px solid var(--blue);outline-offset:3px;border-radius:6px}
main:focus,h1[tabindex]:focus{outline:none}

/* header */
.top{border-bottom:1px solid var(--line)}
.top-in{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 20px;padding-block:12px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:700;font-size:19px;min-height:44px}
.mark{width:40px;height:28px;color:var(--blue);flex:none}
.nav{display:flex;flex-wrap:wrap;gap:4px}
.nav a{padding:10px 14px;border-radius:10px;text-decoration:none;color:var(--ink);min-height:44px;display:flex;align-items:center}
.nav a:hover{background:var(--panel)}
.nav a[aria-current=page]{background:var(--blue-tint);color:var(--blue);font-weight:700}
.banner{margin:0;background:var(--note);color:var(--note-ink);padding:10px max(4vw,16px);text-align:center;font-size:15px}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:10px 20px;border-radius:12px;border:2px solid var(--blue);background:var(--blue);color:var(--blue-ink);font:700 17px/1.2 var(--font);text-decoration:none;cursor:pointer;text-align:center}
.btn:hover{filter:brightness(1.08)}
.btn.ghost{background:transparent;color:var(--blue)}
.btn.ghost:hover{background:var(--blue-tint)}
.btn.small{min-height:44px;padding:8px 14px;font-size:16px}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.chip{display:inline-block;padding:3px 10px;border-radius:999px;background:var(--blue-tint);color:var(--blue);font-weight:700;font-size:14px;white-space:nowrap}
.muted{color:var(--soft)}
.small{font-size:15px}

/* hero */
.hero{position:relative;background:linear-gradient(var(--sea1),var(--bg));overflow:hidden}
.hero .wrap{position:relative;z-index:1;padding-top:clamp(24px,4vw,44px);padding-bottom:clamp(80px,11vw,130px)}
.hero p{font-size:19px;max-width:36em;color:var(--soft)}
.hero svg{position:absolute;left:0;right:0;bottom:0;width:100%;height:clamp(70px,11vw,130px)}
.steps{display:flex;flex-wrap:wrap;gap:8px 22px;list-style:none;padding:0;margin:14px 0 0;font-weight:700}
.steps li{display:flex;align-items:center;gap:8px}
.steps b{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--blue);color:var(--blue-ink);font-size:15px}

.section{padding-block:28px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:14px}
.card{background:var(--bg);border:1px solid var(--line);border-radius:var(--r);padding:18px}
.course{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:var(--ink);min-height:132px;transition:border-color .15s}
.course:hover{border-color:var(--blue)}
.course h3{margin:0}
.course .meta{margin-top:auto;font-size:15px;color:var(--soft)}
.due{color:var(--blue);font-weight:700}
.soon{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0}
.soon li{padding:8px 12px;border:1px dashed var(--line);border-radius:10px;color:var(--soft);font-size:15px}
.search{width:100%;max-width:420px;min-height:48px;font:16px var(--font);padding:10px 14px;border-radius:12px;border:2px solid var(--line);background:var(--bg);color:var(--ink)}
.continue{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;background:var(--blue-tint);border:0}

/* course page */
.crumb{font-size:15px;margin:20px 0 10px}
.head{padding-bottom:8px}
.tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:14px;margin:18px 0}
.tool{display:flex;flex-direction:column;gap:6px;background:var(--panel);border:0}
.tool .btn{margin-top:auto;align-self:flex-start}
.opts{display:flex;flex-wrap:wrap;gap:18px 28px;align-items:end;margin:6px 0 4px}
.seg{display:inline-flex;border:2px solid var(--line);border-radius:12px;overflow:hidden}
.seg button{min-height:44px;padding:8px 14px;border:0;background:transparent;color:var(--ink);font:16px var(--font);cursor:pointer}
.seg button[aria-pressed=true]{background:var(--blue);color:var(--blue-ink);font-weight:700}
label.f{display:flex;flex-direction:column;gap:4px;font-weight:700;font-size:15px}
input[type=date],textarea{font:16px var(--font);min-height:44px;padding:8px 12px;border-radius:10px;border:2px solid var(--line);background:var(--bg);color:var(--ink)}
textarea{width:100%;min-height:80px;resize:vertical}
.topics{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.topic{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 18px;align-items:center}
.topic h3{margin:0 0 2px}
.bar{height:10px;border-radius:99px;background:var(--panel);overflow:hidden;margin:8px 0 4px;max-width:340px;border:1px solid var(--line)}
.bar i{display:block;height:100%;background:var(--ok);border-radius:99px}
details.changes{margin-top:22px}
details summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:700;color:var(--blue)}

/* quiz and cards */
.play{max-width:760px;margin:0 auto;padding-block:20px 40px}
.playtop{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;font-size:15px}
.progress{height:8px;background:var(--panel);border-radius:99px;overflow:hidden;margin-bottom:22px}
.progress i{display:block;height:100%;background:var(--blue);transition:width .3s}
.q{font-size:clamp(21px,3vw,26px);font-weight:700;line-height:1.3;margin-bottom:18px}
.choices{display:grid;gap:10px;list-style:none;padding:0;margin:0}
.choice{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;align-items:start;text-align:left;padding:14px 16px;min-height:56px;border:2px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:17px/1.4 var(--font);cursor:pointer}
.choice:hover:not([disabled]){border-color:var(--blue)}
.choice .k{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:var(--panel);font-weight:700}
.choice[aria-pressed=true]{border-color:var(--blue);background:var(--blue-tint)}
.choice[disabled]{cursor:default}
.choice.right{border-color:var(--ok);background:var(--ok-tint)}
.choice.wrong{border-color:var(--bad);background:var(--bad-tint)}
.choice.right .k{background:var(--ok);color:var(--bg)}
.choice.wrong .k{background:var(--bad);color:var(--bg)}
.why{display:block;font-size:15px;margin-top:6px;color:var(--ink)}
.tag{font-weight:700}
.right .tag{color:var(--ok)}.wrong .tag{color:var(--bad)}
.sure{margin-top:18px;padding:16px;border-radius:12px;background:var(--panel)}
.sure p{font-weight:700;margin-bottom:10px}
.verdict{margin-top:18px;padding:14px 16px;border-radius:12px;font-weight:700}
.verdict.ok{background:var(--ok-tint);color:var(--ok)}
.verdict.no{background:var(--bad-tint);color:var(--bad)}
.next{margin-top:18px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;align-items:center}
.report{font-size:15px}
.report summary{min-height:44px;color:var(--soft);font-weight:400}
.flash{border:2px solid var(--line);border-radius:16px;padding:clamp(20px,4vw,34px);min-height:190px;display:flex;flex-direction:column;justify-content:center;gap:12px}
.flash .side{font-size:14px;font-weight:700;color:var(--soft)}
.flash .face{font-size:clamp(21px,3vw,26px);font-weight:700;line-height:1.3}
.answer{border-top:2px dashed var(--line);padding-top:14px}
.mine{font-size:15px;color:var(--soft)}
.score{font-size:clamp(40px,8vw,64px);font-weight:700;line-height:1;color:var(--blue)}
.list{padding-left:20px}.list li{margin-bottom:10px}
.tip{display:grid;gap:8px}
.tip h3{margin:0}
.try{background:var(--panel);border-radius:12px;padding:14px}
dl.words{display:grid;grid-template-columns:minmax(110px,max-content) minmax(0,1fr);gap:8px 18px;margin:0}
dl.words dt{font-weight:700}dl.words dd{margin:0}
.days{display:flex;gap:6px;margin:8px 0}
.days span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:13px;border:2px solid var(--line);color:var(--soft)}
.days span.on{background:var(--ok);border-color:var(--ok);color:var(--bg);font-weight:700}
.empty{padding:30px;text-align:center;background:var(--panel);border-radius:var(--r)}

.foot{border-top:1px solid var(--line);margin-top:40px;padding-block:22px;font-size:15px;color:var(--soft)}
.foot p{margin:4px 0}

@media (max-width:600px){
  body{font-size:16px}
  .topic{grid-template-columns:minmax(0,1fr)}
  dl.words{grid-template-columns:minmax(0,1fr)}dl.words dd{margin-bottom:8px}
  .nav a{padding:8px 10px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
@media print{.top,.foot,.banner,.btn{display:none}}
