/* Learner and guest screens: the December 2026 redesign (DESIGN_SPEC).
   One layout per screen, two themes: light ("warm paper", the default) and
   dark ("Ink", body.ink). Everything here applies only while body has the
   "lx" class, so Creator view keeps its own look (styles.css).
   ":root body.lx" is used so these rules win over styles.css's older rules.
   Flat and matte: no gradients, no glows. */

/* Shown only on learner screens */
.theme-btn,.logo-night{display:none}
:root body.lx .theme-btn{display:inline-flex}
:root body.lx.ink .logo-day{display:none}
:root body.lx.ink .logo-night{display:inline-block}
.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---------- colours ---------- */
:root body.lx{
  --paper:#FBF9F6; --surface:#F3EFE7; --card:#FFFFFF; --field:#FFFFFF; --line:#E8E3DA; --line-strong:#D9D2C6;
  --ink:#0E0A38; --heading:#0E0A38; --muted:#38344F; --soft:#F3EFE7;
  --label:#B5441B; --eyebrow:#B5441B; --focus:#0E0A38;
  --accent:#E8622C; --on-accent:#0E0A38; --amber:#F2A341;
  --mine:#0E0A38; --mineInk:#FBF9F6; --bubble:transparent;
  --hl:#FFE3CC; --ok:#1F7A4D; --bad:#B3261E;
  --seg:#E8E3DA; --chip:#F3EFE7; --net:rgba(232,98,44,.28); --netdot:rgba(232,98,44,.38);
  --pill-line:#E3C9B8;
  background:var(--paper); color:var(--ink);
  font-family:"Inter",system-ui,sans-serif;
}
:root body.lx.ink{
  --paper:#121019; --surface:#1C1A2B; --card:#1C1A2B; --field:#1C1A2B; --line:#2E2B44; --line-strong:#3A3654;
  --ink:#E6E3F0; --heading:#E6E3F0; --muted:#C9C5DA; --soft:#24223A;
  --label:#F2A341; --eyebrow:#F2A341; --focus:#F2A341;
  --mine:#F3EFE7; --mineInk:#0E0A38;
  --hl:rgba(232,98,44,.22); --ok:#8FE3B6; --bad:#F2867C;
  --seg:#2E2B44; --chip:#26233A; --net:rgba(232,98,44,.30); --netdot:rgba(232,98,44,.45);
  --pill-line:#5A4630;
  color-scheme:dark;
}
:root body.lx :is(h1,h2,h3){font-family:"Fraunces",Georgia,serif;font-weight:400;color:var(--heading);letter-spacing:-.01em}
:root body.lx h3{font-weight:600}
:root body.lx a{color:inherit}
:root body.lx :focus-visible{outline:3px solid var(--focus);outline-offset:2px}
:root body.lx :is(input[type=checkbox],input[type=radio]){accent-color:var(--accent)}
:root body.lx .muted,:root body.lx .link,:root body.lx footer{color:var(--muted)}
:root body.lx .err{color:var(--bad)}
:root body.lx .ok-msg,:root body.lx .res-ok{color:var(--ok)}
:root body.lx .res-bad{color:var(--bad)}

/* ---------- top bar ---------- */
:root body.lx header.top{background:var(--paper);border-bottom:1px solid var(--line);color:var(--heading)}
:root body.lx .top .in{max-width:1180px}
:root body.lx .mark{color:var(--heading);font-family:"Fraunces",Georgia,serif;font-weight:700}
:root body.lx .mark .dot{background:var(--accent)}
:root body.lx .powered{color:var(--muted)}
:root body.lx .theme-btn{width:40px;height:40px;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--heading);cursor:pointer;padding:0}
:root body.lx .theme-btn:hover{border-color:var(--line-strong)}
:root body.lx .top .nav button{border:1px solid var(--line);color:var(--heading);background:var(--card);border-radius:12px}
:root body.lx main{max-width:1180px}

/* ---------- buttons, cards, fields ---------- */
:root body.lx .btn,:root body.lx .btn:is(#go,#wgo,#toRev,#toSum,#fwd,#next,#sub,#ssub,[data-open]){background:var(--accent);color:var(--on-accent);border:0;border-radius:999px;padding:12px 22px;font-weight:600;background-image:none}
:root body.lx .btn:hover{filter:brightness(1.04)}
:root body.lx .btn.ghost{background:transparent;color:var(--heading);border:1.5px solid var(--line-strong)}
:root body.lx .btn.danger{background:transparent;color:var(--bad);border:1.5px solid var(--bad)}
:root body.lx .btn.sm{padding:7px 14px}
:root body.lx .btn-main{width:100%;justify-content:center;padding:16px 24px;font-size:1.05rem}
@media (min-width:1024px){:root body.lx .l-start .btn-main{width:auto;min-width:320px}}
:root body.lx .card{background:var(--card);border:1px solid var(--line);border-radius:20px}
:root body.lx .notice{background:var(--surface);border-radius:14px;color:var(--ink)}
:root body.lx .warn{border-radius:14px}
:root body.lx :is(textarea.field,input.field,select.field){background:var(--field);border:1.5px solid var(--line-strong);border-radius:14px;padding:12px 14px;color:var(--ink)}
:root body.lx .tag{background:var(--surface);color:var(--muted);border-radius:99px}
:root body.lx .modal{background:rgba(14,10,56,.45)}
:root body.lx.ink .modal{background:rgba(0,0,0,.6)}
:root body.lx .modal .card{border-radius:22px}
:root body.lx .eyebrow,:root body.lx .mod .st{font-family:"Inter",system-ui,sans-serif;font-size:.78rem;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--label);margin:0 0 10px}
:root body.lx .pill.ok{background:transparent;color:var(--ok);border:1.5px solid currentColor}
:root body.lx .pill.bad{background:transparent;color:var(--bad);border:1.5px solid currentColor}
:root body.lx footer{max-width:1180px;text-align:center}
:root body.lx footer a,:root body.lx footer .link{color:var(--muted)}

/* ---------- front page ---------- */
.landing{position:relative;overflow-x:clip}
.net{position:absolute;left:-20px;right:-20px;top:-40px;width:calc(100% + 40px);height:720px;z-index:0;pointer-events:none}
.net line{stroke:var(--net);stroke-width:1.3}
.net circle{fill:var(--netdot);animation:lxBlink 5s ease-in-out infinite}
.net .drift{animation:lxDrift 28s ease-in-out infinite alternate}
@keyframes lxBlink{0%,100%{opacity:.55}50%{opacity:1}}
@keyframes lxDrift{from{transform:translate(0,0)}to{transform:translate(-26px,18px)}}
.landing-grid{position:relative;z-index:1;display:grid;gap:22px;grid-template-areas:"top" "mods" "start";padding-top:28px}
.l-top{grid-area:top} .l-mods{grid-area:mods} .l-start{grid-area:start}
@media (min-width:1024px){
  .landing-grid{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);grid-template-areas:"top mods" "start mods";column-gap:56px;align-items:start;padding-top:72px}
  .l-mods{position:sticky;top:24px}
}
:root body.lx .lx-display{font-family:"Fraunces",Georgia,serif;font-weight:300;font-size:clamp(2.7rem,10vw,4.8rem);line-height:1.02;margin:0 0 18px;letter-spacing:-.02em}
:root body.lx .lx-display em{font-style:italic;font-weight:400;color:var(--label)}
:root body.lx .lead{font-size:1.15rem;line-height:1.6;color:var(--muted)}
:root body.lx .lead strong{color:var(--heading)}
:root body.lx .tebo-points{list-style:none;padding:0;margin:20px 0 0;display:grid;gap:10px}
:root body.lx .tebo-points li{background:none;border:0;padding:0 0 0 22px;position:relative;color:var(--muted)}
:root body.lx .tebo-points li::before{content:"";position:absolute;left:2px;top:.62em;width:8px;height:8px;border-radius:50%;background:var(--accent)}
:root body.lx .tebo-points strong{color:var(--heading)}
.modcards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}
:root body.lx .modcard{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:18px;display:flex;flex-direction:column;gap:6px;min-height:118px}
:root body.lx .modcard .num{font-family:"Fraunces",Georgia,serif;font-size:1.8rem;line-height:1;color:var(--label)}
:root body.lx .modcard strong{color:var(--heading);font-weight:600;line-height:1.3}
:root body.lx .modcard .desc{color:var(--muted);font-size:.9rem;line-height:1.45}
@media (max-width:420px){:root body.lx .modcard .desc{display:none}:root body.lx .modcard{min-height:0}}
:root body.lx .l-start .card{background:var(--card)}

/* ---------- the guest's home and module lists ---------- */
:root body.lx .hero h1{font-family:"Fraunces",Georgia,serif;font-weight:300;font-size:clamp(2.2rem,8vw,3.4rem);line-height:1.05}
:root body.lx .mod{border-radius:20px}
:root body.lx .mod h3{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:1.25rem}
:root body.lx .mod .st::before{background:var(--label)}

/* ---------- lesson and review chat ---------- */
:root body.lx main:has(.chatlayout){max-width:1180px;padding-top:8px}
@media (min-width:1024px){:root body.lx .chatlayout:not(.topics-hidden){grid-template-columns:250px minmax(0,1fr)}}
:root body.lx .lesson{max-width:760px;width:100%;margin:0 auto;gap:14px}
.lx-bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:12px;background:var(--paper);padding:12px 0;border-bottom:1px solid var(--line)}
.lx-back{flex:0 0 44px;height:44px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:14px;background:var(--surface);color:var(--heading);cursor:pointer}
.lx-bar-main{flex:1;min-width:0}
.lx-bar-row{display:flex;align-items:center;gap:8px;min-width:0}
:root body.lx .lx-title{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:1.3rem;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.segs{display:flex;gap:4px;margin-top:8px}
.segs i{flex:1;height:4px;border-radius:99px;background:var(--seg);transition:background-color .5s ease}
.segs i.on{background:var(--accent)}
.segs i.next{background:var(--amber)}
:root body.lx .lx-bar .prog{margin-top:4px}
:root body.lx .lx-bar .bar{display:none}
:root body.lx .lx-bar #progTxt{font-size:.78rem}
:root body.lx .chat{gap:18px;padding:8px 0}
:root body.lx .msg{font-size:1.04rem;line-height:1.7;overflow-wrap:anywhere}
:root body.lx .msg.tutor{background:none;padding:0;max-width:100%;border-radius:0;color:var(--ink)}
:root body.lx .msg.me{background:var(--mine);color:var(--mineInk);border-radius:22px 22px 6px 22px;padding:12px 18px;max-width:85%}
:root body.lx .msgwrap{animation:lxRise .35s ease both}
:root body.lx .msgwrap .link{font-size:.78rem}
:root body.lx mark.kw{background:var(--hl);color:inherit;border-bottom:2px solid var(--accent);border-radius:4px 4px 0 0;padding:0 3px}
:root body.lx .thinking{color:var(--muted);font-style:normal}
:root body.lx .quick{flex-wrap:nowrap;overflow-x:auto;gap:10px;padding:2px 2px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity}
:root body.lx .quick::-webkit-scrollbar{display:none}
:root body.lx .quick button{flex:0 0 auto;white-space:nowrap;background:transparent;border:1.5px solid var(--pill-line);color:var(--label);border-radius:999px;padding:9px 16px;font-weight:600;scroll-snap-align:start}
:root body.lx .composer{background:var(--paper);align-items:center;gap:12px;padding-top:6px}
:root body.lx .composer textarea{border:1.5px solid var(--line-strong);border-radius:18px;padding:14px 16px;min-height:54px;background:var(--field);resize:none}
:root body.lx .send-btn{flex:0 0 54px;width:54px;height:54px;border-radius:18px;padding:0;justify-content:center}
:root body.lx .left-note{font-size:.82rem}
:root body.lx .hint{font-size:.78rem}
:root body.lx .topics{background:transparent;border:0;border-right:1px solid var(--line);border-radius:0;padding:14px 16px 14px 0}
:root body.lx .topics-head h3{font-family:"Inter",system-ui,sans-serif;font-size:.78rem;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--label)}
:root body.lx .topic{border-radius:14px;color:var(--ink)}
:root body.lx button.topic:hover{background:var(--surface);border-color:var(--line)}
:root body.lx .tnum{color:var(--label);font-family:"Fraunces",Georgia,serif}
:root body.lx .tstat{background:transparent;border:1px solid currentColor}
:root body.lx .st-new{color:var(--muted)} :root body.lx .st-taught{color:var(--label)}
:root body.lx .st-solid{color:var(--ok)} :root body.lx .st-shaky{color:var(--bad)}
@media (max-width:1023px){:root body.lx .topics{background:var(--card);border-right:1px solid var(--line);padding:16px}}
:root body.lx .support{border-left-color:var(--ok)}
:root body.lx .mdtable table{background:var(--card)}
:root body.lx .mdtable :is(th,td){border-color:var(--line)}
:root body.lx .mdtable th{background:var(--surface);color:var(--heading)}
:root body.lx .mdtable tbody tr:nth-child(even) td{background:var(--paper)}

/* ---------- warm up, final test and survey: big tappable answers ---------- */
:root body.lx .opt{display:flex;gap:12px;align-items:center;padding:13px 16px;border:1.5px solid var(--line);border-radius:16px;background:var(--card);margin:0 0 10px;cursor:pointer}
:root body.lx .opt:hover{background:var(--card);border-color:var(--line-strong)}
:root body.lx .opt input{margin:0}
:root body.lx .opt:has(input:checked){border-color:var(--accent);background:var(--hl)}
:root body.lx .scale label{border:1.5px solid var(--line);border-radius:14px;background:var(--card);padding:9px 16px}
:root body.lx .scale label:has(input:checked){border-color:var(--accent);background:var(--hl)}
.tq{border:0;margin:0;padding:0}
:root body.lx .tq-q{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:clamp(1.45rem,5vw,1.9rem);line-height:1.3;color:var(--heading);margin-bottom:18px;padding:0}
:root body.lx .opt.big{padding:16px;font-size:1.02rem;position:relative}
:root body.lx .opt.big input{position:absolute;opacity:0;pointer-events:none}
:root body.lx .opt.big:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px}
:root body.lx .badge{flex:0 0 34px;height:34px;border-radius:50%;border:1.5px solid var(--line-strong);display:inline-flex;align-items:center;justify-content:center;font-weight:600;font-size:.92rem;color:var(--heading)}
:root body.lx .opt.big:has(input:checked) .badge{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.lx-test .lx-bar{margin-bottom:4px}
:root body.lx .fb{border-left:4px solid currentColor;padding:12px 16px;margin:0 0 12px;border-radius:0 14px 14px 0;border-top:0;background:var(--surface)}
:root body.lx .fb.fb-ok{border-left-color:var(--ok)} :root body.lx .fb.fb-bad{border-left-color:var(--bad)}
:root body.lx .sum{border-color:var(--line)}

/* ---------- result card ---------- */
:root body.lx .rc-eyebrow{text-align:center;margin:28px 0 12px;font-family:"Inter",system-ui,sans-serif;font-size:.8rem}
:root body.lx .resultcard{background:var(--card);color:var(--ink);border:1px solid var(--line-strong);border-radius:28px;padding:22px;margin:0}
:root body.lx .resultcard::before{display:none}
.rc-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
:root body.lx .resultcard .rc-brand{font-family:"Fraunces",Georgia,serif;font-weight:700;font-size:1.5rem;color:var(--heading);display:flex;align-items:baseline}
:root body.lx .resultcard .rc-brand .dot{display:inline-block;width:.3em;height:.3em;border-radius:50%;background:var(--accent);margin:0 0 0 .08em}
.rc-logo{height:26px;width:auto}
:root body.lx.ink .rc-logo.logo-day,:root body.lx:not(.ink) .rc-logo.logo-night{display:none}
.rc-main{display:flex;align-items:center;gap:22px;margin:18px 0;flex-wrap:wrap}
.rc-ring{position:relative;width:136px;height:136px;flex:0 0 136px}
.rc-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.rc-ring circle{fill:none;stroke-width:11}
.rc-ring .track{stroke:var(--seg)}
.rc-ring .fill{stroke:var(--accent);stroke-linecap:round;stroke-dasharray:326.73;stroke-dashoffset:calc(326.73 * (1 - var(--p)));animation:lxRing 1.2s ease-out both}
@keyframes lxRing{from{stroke-dashoffset:326.73}}
.rc-score{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:"Fraunces",Georgia,serif;font-size:1.2rem;color:var(--muted)}
.rc-score b{font-size:2.5rem;font-weight:400;color:var(--heading)}
.rc-head{flex:1;min-width:170px}
:root body.lx .resultcard .rc-name{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:1.7rem;color:var(--heading);margin:0}
:root body.lx .rc-line{margin:2px 0 0;color:var(--muted);font-size:.95rem}
:root body.lx .resultcard .rc-course{font-family:"Fraunces",Georgia,serif;font-size:1.4rem;color:var(--heading);margin:2px 0 12px}
:root body.lx .resultcard .rc-stamp{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;width:112px;height:112px;border-radius:50%;border:3px solid var(--label);color:var(--label);padding:0;margin:0;font-weight:800;font-size:.86rem;letter-spacing:.08em;text-transform:uppercase;line-height:1.25;text-align:center;transform:rotate(-12deg);animation:lxStamp .55s cubic-bezier(.2,1.4,.4,1) .5s both}
:root body.lx .resultcard .rc-stamp.plain{border-color:var(--muted);color:var(--muted)}
@keyframes lxStamp{from{transform:rotate(-12deg) scale(1.7);opacity:0}to{transform:rotate(-12deg) scale(1);opacity:1}}
:root body.lx .resultcard .rc-mods{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}
:root body.lx .resultcard .rc-mods li{background:var(--chip);border:0;border-radius:14px;padding:11px 14px;display:flex;justify-content:space-between;gap:10px;font-size:.95rem}
:root body.lx .resultcard .rc-mods strong{color:var(--label)}
@media (max-width:420px){:root body.lx .resultcard .rc-mods{grid-template-columns:1fr}}
:root body.lx .resultcard .rc-total{display:flex;justify-content:space-between;margin:14px 2px 0;color:var(--heading);font-weight:600}
:root body.lx .bonus{display:flex;gap:16px;align-items:center}
:root body.lx .bonus .bonus-icon{flex:0 0 52px;height:52px;border-radius:14px;background:var(--hl);color:var(--label);display:flex;align-items:center;justify-content:center}

/* ---------- legal pages, resting ---------- */
:root body.lx .legal{max-width:720px}
:root body.lx .legal h1{font-weight:300;font-size:clamp(2.2rem,7vw,3rem)}
:root body.lx .legal h2{font-size:1.25rem}

/* ---------- motion: gentle, and none when reduced ---------- */
@keyframes lxRise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
:root body.lx #app > *{animation:lxRise .45s ease both}
@media (prefers-reduced-motion:reduce){
  :root body.lx *,:root body.lx *::before,:root body.lx *::after{animation:none!important;transition:none!important}
}

@media (max-width:560px){
  :root body.lx main{padding-left:16px;padding-right:16px}
  :root body.lx .card{padding:18px;border-radius:18px}
  /* one row in the top bar: the logo keeps "Powered by" as its label for screen readers */
  :root body.lx .top .in{flex-wrap:nowrap;gap:10px;padding:10px 16px}
  :root body.lx .powered{font-size:0;gap:0;min-width:0}
  :root body.lx .powered .brandlogo{height:22px}
  :root body.lx .theme-btn{flex:0 0 38px;width:38px;height:38px}
  :root body.lx .top .nav{flex:0 0 auto}
  /* lesson bar: the title gets the room (up to two lines); the stage tag hides */
  :root body.lx .lx-bar-row .tag{display:none}
  :root body.lx .lx-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:1.15rem;line-height:1.25}
  :root body.lx .lx-bar #topicsBtn{padding:6px 10px}
  .rc-ring{width:112px;height:112px;flex-basis:112px}
  .rc-score b{font-size:2.1rem}
  .rc-head{min-width:150px}
}

/* ---------- calm chat: the conversation fills the screen, the message box
   stays at the bottom with one small line under it; links in the menu ---------- */
:root body.lx footer{display:none}
:root body.lx main{padding-bottom:24px}
:root body.lx main:has(.chatlayout){padding-bottom:0}
:root body.lx .lesson{min-height:calc(100dvh - var(--hdr,60px) - 8px)}
:root body.lx .lesson > .chat{flex:1}
.dock{position:sticky;bottom:0;z-index:4;background:var(--paper);padding:6px 0 calc(4px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:6px}
:root body.lx .dock .composer{position:static;padding:0;background:transparent}
.dock-code{margin:0;font-size:.74rem;line-height:1.3;color:var(--muted);text-align:center}
:root body.lx .dock .left-note{margin:0}
:root body.lx .dock #lerr{margin:0}
.menu-btn{display:none}
:root body.lx .menu-btn{display:inline-flex}
:root body.lx .top .in{position:relative}
.menu-pop{position:absolute;right:16px;top:calc(100% - 4px);z-index:20;min-width:240px;max-width:calc(100vw - 32px);background:var(--card);border:1px solid var(--line);border-radius:16px;padding:6px;display:flex;flex-direction:column;box-shadow:0 8px 24px rgba(14,10,56,.12)}
.menu-pop[hidden]{display:none}
.menu-pop :is(button,a){display:block;width:100%;text-align:left;background:none;border:0;border-radius:10px;padding:11px 12px;font:inherit;font-size:.95rem;color:var(--ink);text-decoration:none;cursor:pointer}
.menu-pop :is(button,a):hover,.menu-pop :is(button,a):focus-visible{background:var(--surface)}
.menu-pop .menu-sub{display:block;font-size:.78rem;color:var(--muted)}
.menu-pop .menu-code{margin:4px 0;padding:8px 12px;font-size:.82rem;color:var(--muted);border-top:1px solid var(--line)}
.menu-pop .menu-danger{color:var(--bad)}

/* ---------- laptops (from 1024px): two columns on the front page; the
   lesson chat with the topics on the left and a 760px column in the centre,
   the message box fixed at the bottom of that column; module screens and
   the final test centred at 760px. Phones keep the one column layout. ---------- */
:root body.lx #app > div.stack{max-width:760px;margin-left:auto;margin-right:auto}
@media (min-width:1024px){
  :root body.lx main:has(.chatlayout){max-width:none;padding:0 24px 0 0}
  :root body.lx .chatlayout{gap:32px}
  :root body.lx .chatlayout:not(.topics-hidden){grid-template-columns:270px minmax(0,1fr)}
  :root body.lx .chatlayout .topics{position:sticky;top:0;height:calc(100dvh - var(--hdr,60px));max-height:none;padding:24px 18px}
  :root body.lx .chatlayout.topics-hidden .lesson{padding-left:24px}
  :root body.lx .lesson{padding-top:8px}
}

/* ---------- the result page (end of the course) ---------- */
/* Phones: one column in this order; the side and Keep learning boxes open up
   so their parts can sit in the right place. */
.rp-grid{position:relative;z-index:1;display:flex;flex-direction:column;gap:16px;padding-top:20px}
.rp-side,.rp-learn,.rp-cards{display:contents}
.rp-label{order:1;text-align:center} .rp-card{order:2} .rp-h{display:none}
.rp-name{order:3} .rp-share{order:4} .rp-bonus{order:5} .rp-lhead{order:6} .rp-cards > li{order:7}
.rp-org{order:8} .rp-email{order:9} .rp-mods{order:10}
:root body.lx .rp-label{margin:0}
:root body.lx .rp-share .actions{margin:0}
:root body.lx .rp-share .err:empty{display:none}
:root body.lx .rp-email > .card{margin-top:0!important}
/* the lab card is one big button */
:root body.lx button.bonus{width:100%;text-align:left;font:inherit;color:var(--ink);cursor:pointer;padding:16px 18px;margin:0}
:root body.lx button.bonus:hover{border-color:var(--line-strong)}
.bonus-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
:root body.lx .bonus-text strong{color:var(--heading);font-size:1.05rem}
:root body.lx .bonus-text span{color:var(--muted);font-size:.95rem;line-height:1.4}
:root body.lx .bonus-go{color:var(--label);display:flex}
/* Keep learning: the three programmes scroll sideways on phones */
.rp-lhead{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin-top:14px}
:root body.lx .rp-lhead h2{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:clamp(1.45rem,5.4vw,1.8rem);color:var(--heading);margin:0}
:root body.lx .rp-all{display:inline-flex;align-items:center;gap:6px;color:var(--label);font-weight:600;font-size:.95rem}
.rp-cards{list-style:none;margin:0;padding:0}
:root body.lx .pcard{display:flex;flex-direction:column;gap:8px;height:100%;background:var(--card);border:1px solid var(--line);border-radius:20px;padding:18px 20px;color:var(--ink);text-decoration:none}
:root body.lx .pcard:hover{border-color:var(--line-strong)}
:root body.lx .pcard .eyebrow{margin:0}
:root body.lx .pcard strong{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:1.25rem;line-height:1.25;color:var(--heading)}
:root body.lx .pcard .pdesc{color:var(--muted);font-size:.92rem;line-height:1.45}
@media (max-width:1023px){
  .rp-learn{display:block;order:7;margin:0 -16px}
  .rp-learn .rp-lhead{padding:0 16px;margin-bottom:12px}
  .rp-cards{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 16px 6px;scroll-padding:0 16px;-webkit-overflow-scrolling:touch}
  .rp-cards > li{flex:0 0 min(78%,320px);scroll-snap-align:start}
  .rp-learn .rp-org{margin:16px 16px 0}
}
@media (min-width:561px) and (max-width:1023px){.rp-learn{margin:0 -20px}.rp-learn .rp-lhead{padding:0 20px}.rp-cards{padding:0 20px 6px}.rp-learn .rp-org{margin:16px 20px 0}}
/* For organisations: orange card, navy button */
:root body.lx .rp-org{background:var(--accent);color:var(--on-accent);border-radius:20px;padding:18px 20px;display:flex;align-items:center;gap:12px 16px;flex-wrap:wrap}
:root body.lx .rp-org .eyebrow{color:var(--on-accent);margin:0;flex:1 1 100%}
:root body.lx .rp-org-t{font-family:"Fraunces",Georgia,serif;font-size:1.3rem;line-height:1.25;margin:0;flex:1 1 180px;color:var(--on-accent)}
:root body.lx .rp-org .btn.rp-demo{background:#0E0A38;color:#fff;flex:0 0 auto;text-decoration:none}
.rp-mods{margin-top:12px}
:root body.lx .rp-mods h2{margin:0 0 12px}

/* Laptops: the card on the left (larger), the rest on the right; Keep
   learning across the page with the organisations card as the fourth. */
@media (min-width:1024px){
  .rp-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:20px;row-gap:28px;padding-top:40px;align-items:center}
  .rp-label{display:none}
  .rp-grid > *{order:0}
  .rp-card{grid-column:1 / span 2;grid-row:1}
  .rp-side{display:flex;flex-direction:column;gap:16px;grid-column:3 / span 2;grid-row:1;padding-left:28px}
  .rp-h{display:block}
  :root body.lx .rp-h{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:clamp(2.4rem,3.6vw,3.2rem);line-height:1.1;color:var(--heading);margin:0 0 4px;letter-spacing:-.01em}
  :root body.lx .rp-share .btn-main{width:auto}
  .rp-learn{grid-row:2;display:grid;grid-template-columns:subgrid;grid-column:1 / -1;row-gap:14px;border-top:1px solid var(--line);padding-top:28px;align-items:stretch}
  .rp-lhead{grid-column:1 / -1;margin:0}
  :root body.lx .rp-org{flex-direction:column;flex-wrap:nowrap;align-items:stretch;justify-content:space-between}
  :root body.lx .rp-org > *{flex:0 0 auto}
  :root body.lx .rp-org .btn.rp-demo{justify-content:center;text-align:center}
  .rp-mods{grid-column:1 / -1;grid-row:3;margin-top:0}
  .rp-mods .mods{grid-template-columns:1fr 1fr}
}

/* ---------- the lab's top bar: a clear Back button ---------- */
.lab-bar{display:flex;align-items:center;gap:14px;padding:4px 0 14px;margin-bottom:6px;border-bottom:1px solid var(--line)}
.lab-back{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;min-height:44px;padding:0 16px 0 10px;border:1.5px solid var(--line-strong);border-radius:999px;background:var(--card);color:var(--heading);font:inherit;font-weight:600;cursor:pointer}
.lab-back:hover{border-color:var(--heading)}
.lab-bar-title{font-family:"Fraunces",Georgia,serif;font-weight:400;font-size:1.3rem;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--heading)}
