:root{
  --ink:#15202B; --ink-2:#1C2B3B; --ink-3:#24374A;
  --paper:#FAF7F1; --card:#FFFFFF; --line:#E8E2D4; --line-soft:#F0EBDF;
  --text:#1B2430; --text-dim:#64707C; --text-faint:#9AA2AC;
  --terracotta:#E07856; --terracotta-ink:#B85A3C; --terracotta-bg:#FBE4DA;
  --mint:#3FAE82; --mint-bg:#DCEEE4;
  --lavender:#8C7FD6; --lavender-bg:#E6E2F6;
  --sky:#4F8FE0; --sky-bg:#E3EEFC;
  --amber:#E0A23F; --amber-bg:#FBEFD9; --peach-bg:#FBE8D8;
  --danger:#C2412D; --danger-bg:#FBE2DD;
  --radius-lg:22px; --radius-md:14px; --radius-sm:10px;
  --shadow-md:0 10px 28px rgba(20,24,30,.08);
  --spring:cubic-bezier(.22,1,.36,1);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:'Montserrat',system-ui,sans-serif;color:var(--text);background:var(--paper);letter-spacing:-.005em;line-height:1.5;font-size:15px}
h1,h2,h3{font-family:'Montserrat',system-ui,sans-serif;font-weight:700;letter-spacing:-.015em;margin:0;line-height:1.25}
h1{font-size:28px} h2{font-size:20px} h3{font-size:16.5px}
p{margin:0}
a{color:inherit;text-decoration:none}
img{max-width:100%}
:focus-visible{outline:2px solid var(--sky);outline-offset:2px;border-radius:6px}
button,input,select,textarea{font:inherit;color:inherit}
.i{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.btn .i{width:15px;height:15px}
.muted{color:var(--text-dim)} .small{font-size:13px} .tiny{font-size:12px}
.stack{display:flex;flex-direction:column;gap:20px}
.row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.spread{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.grow{flex:1 1 auto;min-width:0}
.script{font-family:'Marck Script',cursive;font-weight:400;letter-spacing:0}

/* shell */
.shell{display:flex;flex-wrap:wrap;min-height:100vh;width:100%}
.sidebar{width:260px;flex:0 0 260px;background:var(--ink);color:#fff;display:flex;flex-direction:column;padding:26px 18px;gap:26px;position:sticky;top:0;height:100vh;overflow-y:auto}
.brand{display:flex;align-items:center;gap:10px;padding:0 6px}
.brand img{width:52px;height:auto}
.brand span{font-weight:800;font-size:23px;letter-spacing:-.01em;line-height:1}
.brand .o{color:#FF8A2A} .brand .t{color:#19C3C0}
.nav{display:flex;flex-direction:column;gap:3px}
.nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;color:#AEB8C4;font-size:14.5px;font-weight:500;transition:background .22s var(--spring),color .22s var(--spring)}
.nav a:hover,.nav a.on{background:var(--ink-3);color:#fff}
.nav .badge{margin-left:auto;background:var(--terracotta);color:#fff;font-size:11px;font-weight:800;border-radius:999px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
.nav svg{width:19px;height:19px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.side-menu{display:flex;flex-direction:column;gap:26px;flex:1 1 auto}
.side-legal{padding:8px 4px 0}
.menu-toggle{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px}
.menu-btn{display:none}
.me{margin-top:auto;display:flex;flex-wrap:wrap;align-items:center;gap:11px;padding:12px;border-radius:var(--radius-md);background:var(--ink-2)}
.me .av{width:36px;height:36px;border-radius:50%;background:var(--terracotta);display:flex;align-items:center;justify-content:center;font-weight:700;flex:0 0 auto}
.me .who{flex:1 1 0;min-width:0}
.me b{display:block;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .me small{color:#AEB8C4;font-size:12px}
.me form{flex:0 0 100%}
.linkbtn{background:none;border:1px solid #33495E;color:#C9D3DD;cursor:pointer;font-size:13px;font-weight:600;padding:8px 12px;border-radius:10px;width:100%;transition:background .2s var(--spring),color .2s var(--spring)}
.linkbtn:hover{color:#fff;background:var(--ink-3)}
.main{flex:999 1 640px;min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;align-items:center;gap:14px;padding:18px 36px;border-bottom:1px solid var(--line)}
.page{padding:32px 36px 56px;display:flex;flex-direction:column;gap:26px}
.crumb{font-size:13.5px;color:var(--text-dim)}

/* cards, buttons, forms */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);padding:26px}
.card.flat{padding:10px}
.card.link{transition:box-shadow .25s var(--spring),transform .25s var(--spring)}
.card.link:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;font-size:14px;border:none;cursor:pointer;border-radius:999px;padding:11px 20px;background:var(--ink);color:#fff;transition:transform .2s var(--spring),box-shadow .2s var(--spring),background .2s var(--spring);text-align:center}
.btn:hover{background:var(--ink-2);box-shadow:var(--shadow-md);transform:translateY(-1px)}
.btn:active{transform:scale(.97)}
.btn:disabled{opacity:.4;cursor:not-allowed;transform:none;box-shadow:none}
.btn.accent{background:var(--terracotta)} .btn.accent:hover{background:var(--terracotta-ink)}
.btn.ghost{background:#fff;color:var(--text);border:1.5px solid var(--line)} .btn.ghost:hover{border-color:var(--text-faint);background:#fff}
.btn.danger{background:var(--danger)}
.btn.sm{padding:7px 14px;font-size:12.5px}
.btn.block{width:100%}
label.field,.school-pick{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--text-dim)}
.school-pick select{font-weight:400;padding:6px}.school-pick .tiny{font-weight:400}
input[type=text],input[type=email],input[type=password],input[type=number],input[type=search],input[type=datetime-local],input[type=tel],input[type=date],select,textarea{width:100%;padding:11px 14px;border-radius:var(--radius-md);border:1.5px solid var(--line);background:#fff;font-size:14.5px;font-weight:500;color:var(--text)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--sky);outline-offset:0;border-color:var(--sky)}
textarea{resize:vertical;min-height:84px}
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.flash{padding:12px 16px;border-radius:var(--radius-md);font-size:14px;font-weight:500;border:1px solid transparent}
.flash.success{background:var(--mint-bg);color:#1E6B4C} .flash.error{background:var(--danger-bg);color:var(--danger)} .flash.info{background:var(--sky-bg);color:#27508A}
.pill{display:inline-block;font-size:12px;font-weight:700;padding:5px 12px;border-radius:999px;white-space:nowrap;background:var(--line-soft);color:var(--text-dim)}
.pill.ink{background:var(--ink);color:#fff} .pill.terra{background:var(--terracotta);color:#fff}
.pill.mint{background:var(--mint-bg);color:#1E6B4C} .pill.amber{background:var(--amber-bg);color:#8A5A12} .pill.red{background:var(--danger-bg);color:var(--danger)}
.tabs{display:flex;gap:4px;background:var(--line-soft);padding:5px;border-radius:999px;width:fit-content;max-width:100%;overflow-x:auto}
.tabs a,.tabs button{padding:9px 16px;border-radius:999px;font-size:13.5px;font-weight:600;color:var(--text-dim);background:none;border:none;cursor:pointer;white-space:nowrap}
.tabs a.on,.tabs button.on{background:var(--ink);color:#fff}
.mode-pick label{padding:9px 16px;border-radius:999px;font-size:13.5px;font-weight:600;color:var(--text-dim);cursor:pointer;white-space:nowrap;display:flex;align-items:center;gap:6px}
.mode-pick input{width:auto;margin:0;accent-color:var(--terracotta)}
.mode-pick label:has(input:checked){background:var(--ink);color:#fff}
.mode-pick label:has(input:focus-visible){outline:2px solid var(--sky);outline-offset:2px}
.table{width:100%;border-collapse:collapse;font-size:14px}
.table th{text-align:left;font-size:12px;color:var(--text-dim);font-weight:700;padding:10px 12px;border-bottom:1px solid var(--line)}
.table td{padding:12px;border-bottom:1px solid var(--line-soft);vertical-align:middle}
.table tr:last-child td{border-bottom:none}
.scroll-x{overflow-x:auto}
.empty{padding:28px;text-align:center;color:var(--text-dim);font-size:14px}

/* list rows */
.item{display:flex;align-items:center;gap:14px;padding:12px;border-radius:var(--radius-md);transition:background .2s var(--spring)}
a.item:hover{background:var(--line-soft)}
.ico{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ico.math{background:var(--lavender-bg);color:var(--lavender)} .ico.bel{background:var(--mint-bg);color:var(--mint)} .ico.mixed{background:var(--sky-bg);color:var(--sky)}
.ring{position:relative;width:46px;height:46px;border-radius:50%;flex:0 0 auto;background:conic-gradient(var(--c,var(--mint)) calc(var(--p,0) * 1%),var(--line-soft) 0)}
.ring::after{content:attr(data-label);position:absolute;inset:5px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700}
.ring.big{width:96px;height:96px}.ring.big::after{inset:10px;font-size:20px}
.deadline-card{display:flex;align-items:center;gap:16px;flex-wrap:wrap;border-left:6px solid var(--sky)}
.deadline-card.urgent{border-left-color:var(--terracotta);background:#fff7f2}
.deadline-ico{width:48px;height:48px;border-radius:14px;background:var(--line-soft);display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.deadline-ico svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
/* the icons of the climb (partials/icon-legend.php) */
:root{--teal:#3E8FA0;--gold:#C9963A;--gold-bg:#FBF1DC}
.legend-ico{width:46px;height:46px;border-radius:14px;background:#F2F1EE;display:flex;align-items:center;justify-content:center;flex:0 0 auto;color:var(--teal)}
.legend-ico svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.legend-ico.flag{color:var(--terracotta)} .legend-ico.trophy{color:var(--gold)}
.deadline-ico{color:var(--terracotta)}
.icon-legend summary{cursor:pointer}
.legend-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px;margin-top:14px}
/* badges and ranks (partials/rewards.php) */
.rank-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;font-weight:700;font-size:14px;color:#fff;background:#9AA2AC}
.rank-badge .i{width:16px;height:16px}
.rank-start{--rk:#9AA2AC} .rank-bronze{--rk:#B87333} .rank-silver{--rk:#8E9AA6} .rank-gold{--rk:#D4A017} .rank-platinum{--rk:#4FA3B8} .rank-diamond{--rk:#6C7BF0}
.rank-badge.rank-start,.rank-badge.rank-bronze,.rank-badge.rank-silver,.rank-badge.rank-gold,.rank-badge.rank-platinum{background:var(--rk)}
.rank-badge.rank-diamond{background:linear-gradient(135deg,#6C7BF0,#47C6E0)}
.bar i.rank-fill{background:var(--rk,var(--mint))}
.rank-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--rk);margin-right:4px;vertical-align:middle}
.badge-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.badge-tile{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--radius-md);background:var(--paper);border:1px solid var(--line-soft)}
.badge-medal{width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;flex:0 0 auto}
.badge-climb .badge-medal{background:#B87333} .badge-near .badge-medal{background:#8E9AA6} .badge-peak .badge-medal{background:linear-gradient(135deg,#E8B923,#C9963A)}
/* the class's weekly winners (partials/leaderboard.php) */
.podium{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.podium-row{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:var(--radius-md);background:var(--paper)}
.podium-row.place-1{background:var(--gold-bg)}
.podium-row.me{outline:2px solid var(--sky)}
.podium-row .medal{font-size:22px;line-height:1}
.ring-pair{position:relative;width:120px;height:120px;flex:0 0 auto}
.ring-pair .outer{position:absolute;inset:0;width:auto;height:auto}
.ring-pair .outer::after{content:'';inset:11px}
.ring-pair .inner{position:absolute;inset:15px;width:auto;height:auto}
.ring-pair .inner::after{inset:10px;font-size:18px}
.ring-legend{display:flex;flex-direction:column;gap:4px;margin:4px 0 6px}
.ring-legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:middle}
.bar{height:9px;border-radius:999px;background:var(--line-soft);overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px;background:var(--mint);width:calc(var(--p,0) * 1%);transition:width .4s var(--spring)}
.bar i.warn{background:var(--amber)} .bar i.low{background:var(--terracotta)} .bar i.blue{background:var(--sky)}
.upload-progress{display:grid;gap:6px}
.upload-progress .bar{height:12px}
.upload-progress .bar i{transition:width .3s linear}

/* dashboard */
.hero{position:relative;overflow:hidden;display:flex;flex-wrap:wrap;align-items:stretch;background:linear-gradient(180deg,#FFFBF2 0%,#EAF4F2 100%);border:1px solid var(--line);border-radius:var(--radius-lg)}
.hero .copy{flex:1 1 380px;min-width:0;padding:52px 20px 40px 52px;display:flex;flex-direction:column;justify-content:center;gap:16px}
.hero h1{font-size:58px;line-height:1.1}
.hero .art{flex:1 1 420px;min-width:0;position:relative;min-height:280px}
.hero .art .scene{position:absolute;left:0;bottom:0;width:76%;height:auto;pointer-events:none;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 18%),linear-gradient(to bottom,transparent 0,#000 24%);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent 0,#000 18%),linear-gradient(to bottom,transparent 0,#000 24%);mask-composite:intersect}
.hero .art .sign{position:absolute;right:2%;bottom:0;height:62%;width:auto;pointer-events:none}
.cards3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.cards2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.cards4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.subject{display:flex;flex-direction:column;gap:14px;padding:26px;border-radius:var(--radius-lg);transition:box-shadow .25s var(--spring),transform .25s var(--spring)}
.subject:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
.subject .tile{height:120px;border-radius:14px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.subject .tile img{width:100%;height:100%;object-fit:cover}
.subject .tile.contain img{width:auto;object-fit:contain}
.subject .tile svg.art{width:100%;height:100%;display:block}
.subject .tile.art-book{background:#DDF2EB} .subject .tile.art-clipboard{background:#E9E8FA} .subject .tile.art-math{background:#FBE8D8}
.subject.mint{background:var(--mint-bg)} .subject.peach{background:var(--peach-bg)} .subject.lav{background:var(--lavender-bg)}
.stat b{display:block;font-size:30px;font-weight:800;line-height:1.1} .stat span{font-size:13px;color:var(--text-dim)}

/* guest */
body.guest{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(180deg,#FFFBF2 0%,#EAF4F2 100%)}
.auth-card{width:100%;max-width:440px;background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:34px;display:flex;flex-direction:column;gap:18px;box-shadow:var(--shadow-md)}
.brand.light{justify-content:center;color:var(--ink)}
.brand.light img{width:60px}
.brand.light span{font-size:28px}
.auth-card h1{font-size:24px;text-align:center}
.auth-card form{display:flex;flex-direction:column;gap:14px}

/* test taking */
.exam{display:flex;gap:22px;align-items:flex-start;flex-wrap:wrap}
.exam .nav-panel{flex:0 0 240px}
.exam .q-panel{flex:1 1 420px;min-width:0}
.exam .tools{flex:0 0 220px}
.numgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(34px,1fr));gap:6px}
.numgrid button{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.05;padding:0;border-radius:10px;border:1.5px solid var(--line);background:#fff;font-weight:700;font-size:12.5px;cursor:pointer;transition:transform .18s var(--spring)}
.numgrid button:hover{transform:translateY(-1px) scale(1.04)}
.numgrid button small{font-size:10px;font-weight:600;opacity:.85}
.numgrid button.solved{background:var(--sky);border-color:var(--sky);color:#fff}
.numgrid button.flagged{background:var(--amber-bg);border-color:var(--amber);color:var(--terracotta-ink)}
.numgrid button.right{background:var(--mint);border-color:var(--mint);color:#fff}
.numgrid button.wrong{background:var(--danger);border-color:var(--danger);color:#fff}
.numgrid button.current{border-color:var(--ink);box-shadow:0 0 0 2px var(--ink)}
.legend{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-dim)}
.legend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:7px}
.timer{display:flex;align-items:center;gap:8px;background:var(--line-soft);border-radius:999px;padding:8px 16px;font-weight:700;font-variant-numeric:tabular-nums}
.timer.warn{background:var(--danger-bg);color:var(--danger)}
.timer.over{background:var(--danger);color:#fff}
.exam-bar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 28px;background:rgba(250,247,241,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.exam-bar .crumb{font-size:13px;flex:1 1 180px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exam-bar .btn{padding:8px 16px}
.exam-bar .timer{padding:6px 12px}
.exam-stats{display:flex;gap:10px;flex-wrap:wrap;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.exam-stats .ok{color:#1f7a5a}
.exam-stats .bad{color:var(--danger)}
.exam-stats .info{color:var(--sky)}
.exam-stats .warn{color:#A8711A}
.exam-stats .muted{color:var(--text-dim);font-weight:600}
.exam-stats.split{flex-direction:column;gap:3px}
.stats-line{display:flex;gap:10px;flex-wrap:wrap;align-items:baseline}
.numgrid-sep{grid-column:1/-1;font-size:12px;font-weight:800;color:var(--text-dim);text-transform:uppercase;letter-spacing:.04em;margin-top:6px}
.parts,.parts-review{display:flex;flex-direction:column;gap:8px}
.part-row{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1.5px solid var(--line);border-radius:var(--radius-sm);background:#fff}
.part-row > b{min-width:22px}
.part-row input{flex:1 1 160px;min-width:0}
.part-row.ok{border-color:var(--mint);background:var(--mint-bg)}
.part-row.bad{border-color:var(--danger);background:var(--danger-bg)}
.upload-row.disabled{opacity:.75}
.link-full{word-break:break-all;font-weight:600;color:var(--text)}
.class-action summary{list-style:none;cursor:pointer;display:inline-flex}
.class-action summary::-webkit-details-marker{display:none}
.class-action[open]{flex-basis:100%}
.danger-text{color:var(--danger)}
.upload-task{gap:8px;padding:12px 14px;border:1.5px dashed var(--line);border-radius:var(--radius-md)}
.upload-row.disabled input{cursor:not-allowed}
body.lp:has(.exam-bar) .lp-top{position:static}
.opt{display:flex;align-items:center;gap:14px;padding:15px 18px;border-radius:var(--radius-md);border:1.5px solid var(--line);background:#fff;width:100%;text-align:left;cursor:pointer;transition:border-color .2s var(--spring),background .2s var(--spring),transform .15s var(--spring)}
@media (hover:hover){.opt:hover{border-color:var(--text-faint);transform:translateY(-1px)}}
.opt,.numgrid button,.q-panel .btn{touch-action:manipulation}
.opt.picked{border-color:var(--ink);background:#EEF0F2}
.opt .l{width:28px;height:28px;border-radius:50%;background:var(--line-soft);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex:0 0 auto}
.opt.picked .l{background:var(--ink);color:#fff}
.opt.right{border-color:var(--mint);background:var(--mint-bg)} .opt.wrong{border-color:var(--danger);background:var(--danger-bg)}
.qtext{font-size:18px;line-height:1.6;margin:18px 0 22px}
.saved{font-size:12px;color:var(--text-faint);min-height:16px}
.toolbtn{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:var(--radius-md);width:100%;background:#fff;border:1px solid var(--line);font-size:13.5px;font-weight:600;cursor:pointer;transition:background .2s var(--spring)}
.toolbtn:hover{background:var(--line-soft)}
.calc{display:none;gap:6px;flex-direction:column}
.calc.open{display:flex}
.calc input{text-align:right;font-weight:700;font-size:18px}
.calc .keys{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.calc .keys button{padding:10px 0;border-radius:10px;border:1px solid var(--line);background:#fff;font-weight:700;cursor:pointer}
.calc .keys button.op{background:var(--lavender-bg)} .calc .keys button.eq{background:var(--ink);color:#fff}
.notes{display:none} .notes.open{display:block}
.big-text .qtext,.big-text .opt{font-size:21px}

/* builder */
.task{border:1px solid var(--line);border-radius:var(--radius-md);padding:18px;display:flex;flex-direction:column;gap:12px;background:#fff}
.task .opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.task .optrow{display:flex;align-items:center;gap:8px}
.task .optrow input[type=radio]{width:auto}
.panel[hidden]{display:none}
.libitem{display:flex;gap:12px;align-items:flex-start;padding:10px 12px;border-bottom:1px solid var(--line-soft)}
.libitem input{flex:0 0 auto;width:18px;height:18px;margin-top:3px}
.libitem-text{flex:1 1 auto;min-width:0}
.libitem-src{display:block;margin-top:2px}
.libitem-body{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;margin-top:4px}
.libitem-body p{margin:0}
.lib-list{display:flex;flex-direction:column}
.lib-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line-soft)}
.lib-row:last-child{border-bottom:none}
.preview-img{max-width:100%;max-height:320px;border-radius:12px;border:1px solid var(--line)}
.photo{display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.photo-grid:empty{display:none}
.photo-grid-item{margin:0;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.photo-grid-item img,.photo-grid a img{width:100%;height:auto;max-height:220px;object-fit:contain;border-radius:12px;border:1px solid var(--line);background:#fff}
.solutions-box .photo-grid-item{position:relative}
.photo-del{position:absolute;top:6px;right:6px;width:28px;height:28px;border-radius:50%;border:1px solid var(--line);background:#fff;font-size:18px;line-height:1;cursor:pointer}
.sol-check{border:1px solid #c7d2fe;background:#eef2ff;border-radius:12px;padding:12px 14px}
.sol-chip{display:inline-flex;gap:6px;align-items:center;border-radius:999px;padding:3px 10px;font-size:13px;font-weight:700;background:#f1f5f9}
.sol-chip.ok{background:#dcfce7;color:#166534}
.sol-chip.warn{background:#fef3c7;color:#92400e}
.sol-chip.bad{background:#fee2e2;color:#991b1b}
.sol-list{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.photo-grid-item figcaption{font-size:12px;color:var(--text-dim);overflow-wrap:anywhere}
.task.task-read{border-color:var(--sky)}
.builder-savebar{position:sticky;top:10px;z-index:20;display:flex;justify-content:flex-end;margin-bottom:-6px;pointer-events:none}
.builder-savebar .btn{pointer-events:auto;box-shadow:0 6px 18px rgba(15,23,42,.18)}
#builder-tabs{flex-wrap:wrap;border-radius:20px}
.solutions{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,460px),1fr));gap:16px}
.solution{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.solution-photo{flex:0 0 130px;display:flex;align-items:center;justify-content:center;min-height:90px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fff}
.solution-photo img{width:130px;height:auto;display:block}
.ai-check{border:1px solid #c7d2fe;background:#eef2ff;border-radius:12px;padding:12px 14px}
.ai-check.failed,.ai-check.limit{background:#fff7ed;border-color:#fed7aa}
.ai-notes{margin:8px 0 0;padding-left:0;list-style:none;display:flex;flex-direction:column;gap:6px;font-size:14px}
.ai-notes li{padding-left:24px;position:relative}
.ai-notes li::before{position:absolute;left:2px;top:0;font-weight:800}
.ai-notes li.ok::before{content:'✓';color:#16a34a}
.ai-notes li.bad::before{content:'✗';color:#dc2626}
.coord-box{gap:10px}
.coord-svg{width:100%;max-width:520px;height:auto;background:#fff;border:1px solid var(--line);border-radius:10px;touch-action:manipulation;user-select:none}
.coord-svg.live{cursor:crosshair}
.coord-svg .g{stroke:#e2e8f0;stroke-width:1}
.coord-svg .ax{stroke:#334155;stroke-width:1.6}
.coord-svg .n{font-size:11px;fill:#475569;font-family:inherit}
.coord-svg .lb{font-size:13px;font-weight:700;fill:#1e293b;font-family:inherit}
.coord-svg .pt{fill:#2563eb}
.coord-svg .pt.bad{fill:#dc2626}
.coord-svg .key{fill:none;stroke:#16a34a;stroke-width:2.5}
.coord-chips{gap:6px;flex-wrap:wrap}
.coord-chips .chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:4px 12px;font-weight:700;cursor:pointer;font-size:14px}
.coord-chips .chip.on{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.25)}
.coord-chips .chip.done{background:#eff6ff}
.coord-chips .chip:disabled{cursor:default}
.cookie-bar{position:fixed;left:16px;right:16px;bottom:16px;z-index:60;max-width:560px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 30px rgba(15,23,42,.18);padding:12px 16px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.cookie-bar[hidden]{display:none}
.cookie-bar p{margin:0}
.task-figure-view{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap}
.task-figure-view img{max-width:min(100%,360px);max-height:260px;border:1px solid var(--line);border-radius:8px;background:#fff}
.task-figure-tools{display:flex;flex-direction:column;align-items:flex-start;gap:8px;max-width:260px}
.task-figure-tools .figure-state:empty{display:none}
.photo img{width:160px;height:auto;border-radius:12px;border:1px solid var(--line)}
.photo-text textarea{line-height:1.5}
.photo-text-done{background:var(--line-soft);border-radius:var(--radius-md);padding:10px 14px;font-size:14px;line-height:1.5;max-height:260px;overflow:auto}
.review-q{display:flex;flex-direction:column;gap:12px;border-left:5px solid var(--line);padding-left:20px}
.review-q.ok{border-color:var(--mint)} .review-q.bad{border-color:var(--danger)}
/* A wrong task stands out in a long list: red edge, tinted card and a bold verdict. */
.review-q.bad{border-left-width:10px;background:#FFF4F2;box-shadow:inset 0 0 0 2px #F3C3BC}
.review-q .pill.verdict{font-size:14px;padding:6px 14px;font-weight:800;background:var(--danger);color:#fff}
.review-q{scroll-margin-top:16px}
.grade-line{font-size:16px;font-weight:600;margin:4px 0}
.grade-line .pill{font-size:15px;padding:5px 12px}
.missed{display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-radius:var(--radius-md);background:#FFF4F2;border:1px solid #F3C3BC}
.missed .pill{text-decoration:none}
[hidden]{display:none !important}
#q-context-box:not(:empty) + .qtext{font-weight:700;margin-top:4px}
.frac{display:inline-flex;flex-direction:column;vertical-align:middle;text-align:center;font-size:.86em;line-height:1.15;margin:0 .12em}
.frac>span:first-child{border-bottom:1px solid currentColor;padding:0 .2em .05em}
.frac>span:last-child{padding:.05em .2em 0}
.sqrt{white-space:nowrap}
.sqrt>span{border-top:1px solid currentColor;padding:0 .12em;margin-left:.04em}
sup,sub{font-size:.72em;line-height:0}
.task-no{display:inline-flex;align-items:center;justify-content:center;min-width:1.9em;height:1.9em;padding:0 .45em;margin-right:.45em;border-radius:999px;background:var(--ink);color:#fff;font-weight:800;font-size:.85em;vertical-align:.08em}
.sub-label{font-weight:800;color:var(--terracotta-ink)}
.math-hint{margin-top:6px;line-height:1.6}
.math-preview span{color:var(--text);font-size:15px}
.rich p{margin:0 0 6px}
.rich p:last-child{margin-bottom:0}
.rich .katex{font-size:1.08em}
.qtext.rich .katex{font-size:1.12em}
.rich-table{border-collapse:collapse;margin:8px 0;font-size:14px;width:100%}
.rich-table th,.rich-table td{border:1px solid var(--line);padding:6px 8px;text-align:left;vertical-align:top}
.rich-table th{background:var(--line-soft)}
.opt .rich{flex:1 1 auto;min-width:0}
.topic-row{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap}
.topic-thumb{max-width:min(520px,100%);height:auto;border-radius:8px;border:1px solid var(--line)}
.topic-fields{gap:10px;flex:0 1 260px;min-width:220px}
.q-media{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
/* A drawing at its own size: in a flex column it would be stretched to the full width (and blurred). */
.q-image{display:block;align-self:flex-start;width:auto;max-width:100%;height:auto;border-radius:10px;background:#fff}
.img-retry{align-self:flex-start}
.math-hint .key-btn{padding:2px 12px;font-size:15px;margin-left:4px;vertical-align:middle}
.q-context{border:1px solid var(--line);border-radius:12px;padding:8px 12px;background:#fff}
.q-context summary{cursor:pointer;font-weight:700;font-size:14px}
.q-context img{display:block;width:auto;max-width:100%;height:auto;margin-top:8px}
.q-context-clock{font-weight:600;color:var(--text-dim);font-variant-numeric:tabular-nums}
.q-context.no-copy{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
@media print{.q-context.no-copy{display:none}}
.q-context-gone{background:var(--amber-bg);border-color:var(--amber);color:#6B4A0B;font-size:14px;font-weight:600}
.opts-inline{display:grid !important;grid-template-columns:repeat(auto-fit,minmax(56px,1fr));gap:8px}
.opts-inline .opt{justify-content:center;padding:12px}
.sol-img{width:100%;height:auto;border:1px solid var(--line);border-radius:12px;background:#fff}
.q-panel textarea{width:100%;min-height:180px}
.feedback{border-radius:var(--radius-md);padding:12px 16px;display:flex;flex-direction:column;gap:4px;margin-top:14px}
.feedback b .rich{font-weight:400}
.feedback b .rich p{display:inline;margin:0}
.feedback.ok{background:var(--mint-bg);border:1.5px solid var(--mint)}
.feedback.bad{background:var(--danger-bg);border:1.5px solid var(--danger)}
.q-panel.paused>*:not(.spread:first-child){filter:blur(8px);pointer-events:none;user-select:none}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}
.stat-grid>div{background:var(--line-soft);border-radius:var(--radius-md);padding:12px 16px}
.stat-grid b{display:block;font-size:24px}
.explain{background:var(--line-soft);border-radius:var(--radius-md);padding:12px 16px;font-size:14px}
.footer-art{position:absolute;right:0;bottom:0;width:560px;max-width:60%;pointer-events:none;z-index:0}
.main.art{position:relative;overflow:hidden}
.main.art>*:not(.footer-art){position:relative;z-index:1}

/* public landing page */
body.lp{background:var(--paper)}
.lp-wrap{width:100%;max-width:1180px;margin:0 auto;padding:0 28px}
.lp-top{background:rgba(250,247,241,.92);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10;backdrop-filter:blur(8px)}
.lp-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}
.lp-top .lp-bar{padding-top:18px;padding-bottom:20px}
.lp-foot .lp-bar{padding-top:34px;padding-bottom:48px}
.free-box{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;background:linear-gradient(180deg,#FFF6EC 0%,#FBE4DA 100%);border-color:#F4CDBE}
.paper-frame{width:100%;height:72vh;border:1px solid var(--line);border-radius:14px;background:#fff}
details.paper summary{cursor:pointer;font-weight:700;padding:4px 0}
.lp-nav{display:flex;gap:10px}
.lp-stack{display:flex;flex-direction:column;gap:46px;padding-top:28px;padding-bottom:56px}
.lp-stack .lp-stack{padding:0}
.lp-foot{border-top:1px solid var(--line);background:#fff}
.lp .hero .copy{gap:20px}
.lp .hero h1{font-size:54px}
.hero-points{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:15px;color:var(--text-dim)}
.hero-points li{position:relative;padding-left:22px}
.hero-points li::before{content:"";position:absolute;left:2px;top:.45em;width:10px;height:10px;border-radius:50%;background:var(--mint)}
.hero-points b{color:var(--text)}
.step-no{width:34px;height:34px;border-radius:50%;background:var(--terracotta-bg);color:var(--terracotta-ink);display:flex;align-items:center;justify-content:center;font-weight:800}
.lp-cta{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;background:linear-gradient(180deg,#FFFBF2 0%,#EAF4F2 100%)}
@media (max-width:640px){.exam-bar{padding:8px 12px;gap:8px}.exam-bar .crumb{display:none}.exam-stats{flex:1 1 100%;gap:8px}.topbar{flex-wrap:wrap;padding:14px 18px}.topbar .crumb{flex:1 1 100%}.lp-wrap{padding-left:18px;padding-right:18px}.lp-stack{padding-top:24px;padding-bottom:48px}.lp .hero h1{font-size:38px}.lp-stack{gap:34px}}

@media (max-width:1100px){.cards3,.cards4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:900px){
  /* Phone and tablet: a slim bar with the logo and „Меню“; the menu opens below it. */
  .sidebar{width:100%;flex:0 0 100%;position:static;height:auto;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;padding:10px 16px;gap:0}
  .brand img{width:38px} .brand span{font-size:20px}
  .menu-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;background:var(--ink-2);color:#fff;font-weight:700;font-size:14px;cursor:pointer;user-select:none}
  .menu-btn .badge{background:var(--terracotta);color:#fff;font-size:11px;font-weight:800;border-radius:999px;min-width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;padding:0 6px}
  .burger{display:inline-flex;flex-direction:column;gap:3px;width:16px}
  .burger i{display:block;height:2px;border-radius:2px;background:currentColor;transition:transform .2s,opacity .2s}
  .menu-toggle:checked + .menu-btn .burger i:nth-child(1){transform:translateY(5px) rotate(45deg)}
  .menu-toggle:checked + .menu-btn .burger i:nth-child(2){opacity:0}
  .menu-toggle:checked + .menu-btn .burger i:nth-child(3){transform:translateY(-5px) rotate(-45deg)}
  .menu-toggle:focus-visible + .menu-btn{outline:2px solid #fff;outline-offset:2px}
  .side-menu{display:none;flex:1 1 100%;gap:14px;padding:14px 0 6px;max-height:calc(100vh - 64px);overflow-y:auto}
  .menu-toggle:checked ~ .side-menu{display:flex}
  .nav{gap:2px}
  .nav a{padding:11px 12px;font-size:15px}
  .me{margin:0}
  .side-legal{padding:0 4px}
  .topbar,.page{padding-left:18px;padding-right:18px}
  .hero .copy{padding:34px 22px 10px} .hero h1{font-size:44px}
  .cards2,.cards3,.cards4{grid-template-columns:1fr}
  .exam .nav-panel,.exam .tools{flex:1 1 100%}
}
@media (max-width:640px){
  .hero .art{min-height:190px}
  .hero .art .scene{width:100%}
  .hero .art .sign{display:none}
  .hero h1{font-size:40px}
  .page{padding-top:22px}
}
/* the public home page (home/landing.php) */
.btn.lg{padding:14px 26px;font-size:15.5px}
a.link{text-decoration:underline;text-underline-offset:3px}
.lp-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:stretch;border-radius:var(--radius-lg);overflow:hidden;background:linear-gradient(135deg,#F4FAFB 0%,#E4F4F8 100%);border:1px solid #D7EBEE}
.lp-hero-copy{padding:44px 20px 40px 48px;display:flex;flex-direction:column;gap:12px;justify-content:center}
.lp-eyebrow{font-size:12.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#2B7F86}
.lp-hero h1{font-size:54px;line-height:1.1}
.lp-hero h1.script{font-family:'Marck Script',cursive;font-weight:400;font-style:normal;letter-spacing:0}
.lp-lead{font-size:18px;font-weight:700}
.lp-text{font-size:14.5px;line-height:1.55;color:var(--text-dim);max-width:56ch}
.lp-hero-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:6px}
.lp-hero-art{position:relative;min-height:300px;background:#cff2fd}
.lp-hero-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center bottom;display:block}
.lp-free{position:relative;display:flex;flex-direction:column;gap:16px;background:linear-gradient(180deg,#FFF6EC 0%,#FDEBE0 100%);border-color:#F4CDBE}
.lp-free-art{position:absolute;right:20px;top:14px;width:120px;height:auto;pointer-events:none}
.pill.mint-strong{background:var(--mint);color:#fff} .pill.soft{background:#fff;color:var(--text);border:1px solid var(--line)}
.lp-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.lp-mode{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:var(--radius-md);background:#fff;border:2px solid var(--line);cursor:pointer;transition:border-color .2s var(--spring)}
.lp-mode input{width:auto;margin:3px 0 0;accent-color:var(--mint)}
.lp-mode > span{display:flex;flex-direction:column;gap:2px}
.lp-mode:has(input:checked){border-color:var(--mint);background:#F3FBF7}
.lp-mode:has(input:focus-visible){outline:2px solid var(--sky);outline-offset:2px}
.lp-subject-btns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.lp-subject-btns .btn{justify-content:space-between}
.lp-h2{font-size:24px;position:relative;padding-bottom:10px}
.lp-h2::after{content:"";position:absolute;left:0;bottom:0;width:64px;height:4px;border-radius:4px;background:#2B9AA0}
.lp-path{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.lp-path li{display:flex;flex-direction:column;gap:2px;padding:12px 14px 12px 50px;position:relative;background:#fff;border:1px solid var(--line);border-radius:var(--radius-md);font-size:14px}
.lp-step{position:absolute;left:12px;top:12px;width:28px;height:28px;border-radius:50%;background:#2B9AA0;color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center}
.lp-cards .subject{padding:18px;gap:10px}
.lp-cards .subject .tile{height:84px}
.lp-cards .card{padding:18px}
.lp-why{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:16px;border-radius:var(--radius-lg);background:#F1F8F7;border:1px solid #DCEDEA}
.lp-why > div{display:flex;gap:12px;align-items:flex-start}
.lp-why p{margin-top:2px}
.legend-ico.users{color:var(--teal,#3E8FA0)}
@media (max-width:1000px){.lp-path,.lp-why{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){
  .lp-hero{grid-template-columns:1fr}
  .lp-hero-art{order:-1;min-height:170px;max-height:180px}
  .lp-hero-art img{object-position:center 25%}
  .lp-hero-copy{padding:22px 20px 26px}
  .lp-hero h1{font-size:40px}
  .lp-free-art{display:none}
  .lp-lead{font-size:16px}
  .lp-modes,.lp-subject-btns,.lp-path,.lp-why{grid-template-columns:1fr}
  .lp-cards .subject .tile{height:64px}
  .lp-hero-actions .btn{width:100%}
  .lp-h2{font-size:21px}
  .lp-top .lp-bar{flex-wrap:nowrap;padding-top:10px;padding-bottom:10px}
  .lp-top .brand img{width:38px} .lp-top .brand span{font-size:19px}
  .lp-nav{gap:6px} .lp-nav .btn{padding:7px 12px}
  .lp-subject-btns .btn{font-size:14px;padding:13px 18px}
  .lp-subject-btns .btn,.lp-hero-actions .btn{justify-content:center}
}
@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important}}
.profile-more summary{cursor:pointer}

/* Public home page, own look (27.11): white page, dark hero with the summit, Rubik headings, sharper corners. */
body.lp:has(.lph){background:#fff}
body.lp:has(.lph) .lp-top{background:var(--ink);border-bottom-color:#22364A}
body.lp:has(.lph) .lp-top .brand span{color:#fff}
body.lp:has(.lph) .lp-top .btn.ghost{background:transparent;color:#fff;border-color:#3A5268}
body.lp:has(.lph) .lp-top .btn:not(.ghost){background:#FF8A2A;color:#1B1206}
body.lp:has(.lph) .lp-foot{background:#F4F7F9;border-top:none}
.lph h2,.lph h3,.lph-eyebrow,.lph-facts b,.lph-camp{font-family:'Rubik','Montserrat',system-ui,sans-serif}
.lph h2{font-size:30px;font-weight:800;letter-spacing:-.02em}
.lph h3{font-size:17px;font-weight:700}
.lph .btn{border-radius:10px}
.lph-hero{position:relative;background:radial-gradient(1100px 520px at 75% -10%,#24506A 0%,rgba(36,80,106,0) 60%),var(--ink);color:#fff;overflow:hidden;padding:48px 0 28px}
.lph-hero-grid{position:relative;z-index:2;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:48px;align-items:start}
.lph-hero-copy{display:flex;flex-direction:column;gap:18px}
.lph-eyebrow{font-size:13px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#19C3C0}
.lph-hero h1{font-size:62px;line-height:1.05;color:#fff}
.lph-hero h1.script{font-family:'Marck Script',cursive;font-weight:400;letter-spacing:0}
.lph-lead{font-size:17.5px;line-height:1.6;color:#C9D6E2;max-width:54ch}
.lph-claim{font-family:'Rubik','Montserrat',sans-serif;font-size:20px;font-weight:700;color:#fff;margin-top:-4px}
.lph-login{font-size:13.5px;color:#93A4B5} .lph-login a{color:#fff;text-decoration:underline;text-underline-offset:3px}
.lph-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:4px}
.lph-actions .btn.lg{padding:14px 20px}
.lph-actions .btn.accent{background:#FF8A2A;color:#1B1206} .lph-actions .btn.accent:hover{background:#FF9F4D}
.lph-ghost{background:transparent;color:#fff;border:1.5px solid #3A5268} .lph-ghost:hover{background:#1C2B3B;border-color:#5B7690}
.lph-facts{list-style:none;margin:10px 0 0;padding:18px 0 0;border-top:1px solid #2A3F54;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.lph-facts li{display:flex;flex-direction:column;gap:2px}
.lph-facts b{font-size:22px;font-weight:800;color:#fff}
.lph-facts span{font-size:13px;color:#93A4B5;line-height:1.35}
.lph-visual{position:relative;display:flex;flex-direction:column}
/* The hero's foot: the summit with its winding path (img/hero-summit.webp, its dark background made transparent),
   under the AI's card on the right, down to the hero's bottom edge. */
.lph-summit{position:absolute;left:66%;bottom:0;transform:translateX(-50%);width:min(780px,70%);max-width:none;height:auto;z-index:1;pointer-events:none;
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 18%,#000 82%,transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 18%,#000 82%,transparent 100%)}
.lph-demo{margin:0;position:relative;z-index:3;background:#fff;color:var(--text);border-radius:14px;padding:18px;box-shadow:0 24px 60px rgba(0,0,0,.35);display:flex;flex-direction:column;gap:12px;transform:rotate(1.2deg)}
.lph-demo-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.lph-tag{font-family:'Rubik',sans-serif;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#2B7F86}
.lph-score{font-family:'Rubik',sans-serif;font-weight:800;font-size:15px;background:#FFF0E2;color:#B4560F;border-radius:8px;padding:4px 10px}
.lph-paper{display:flex;flex-direction:column;gap:2px;padding:14px 16px;border-radius:8px;background:repeating-linear-gradient(#FBFCFE 0 31px,#DCE6F0 31px 32px);border-left:3px solid #F2B8A6}
.lph-paper .script{font-size:25px;line-height:32px;color:#1E3A8A}
.lph-paper .bad{color:#1E3A8A;text-decoration:underline wavy #dc2626 1.5px;text-underline-offset:6px;align-self:flex-start}
.lph-demo figcaption b{font-size:14.5px}
.lph-demo .ai-notes{font-size:13.5px}
.lph-stack{display:flex;flex-direction:column;gap:64px;padding-top:8px;padding-bottom:72px}
.lph-text{font-size:15px;line-height:1.6;color:var(--text-dim)}
.lph-h2{position:relative;padding-left:18px}
.lph-h2::before{content:"";position:absolute;left:0;top:.2em;bottom:.2em;width:5px;border-radius:3px;background:linear-gradient(#FF8A2A,#19C3C0)}
.lph-free{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:32px;align-items:start;padding:30px;border-radius:14px;border:1px solid #E3E9EF;box-shadow:0 18px 40px rgba(21,32,43,.08);background:#fff;margin-top:28px;position:relative;z-index:3}
.lph-free-copy{display:flex;flex-direction:column;gap:12px}
.lph .lp-mode{border-radius:10px;border-width:1.5px}
.lph-climb{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;position:relative}
.lph-climb::before{content:"";position:absolute;left:24px;right:24px;top:23px;border-top:3px dashed #BFD3DE}
.lph-climb li{position:relative;display:flex;flex-direction:column;gap:4px;padding-right:18px}
.lph-climb li:nth-child(2){padding-top:0}
.lph-climb b{font-size:15.5px;margin-top:10px}
.lph-climb span:not(.lph-camp){font-size:13.5px;color:var(--text-dim)}
.lph-camp{position:relative;z-index:1;width:48px;height:48px;border-radius:50%;background:#fff;border:3px solid #19C3C0;color:#15606A;font-weight:800;font-size:18px;display:flex;align-items:center;justify-content:center}
.lph-camp.top{background:#FF8A2A;border-color:#FF8A2A;color:#fff}
.lph-camp .i{width:20px;height:20px}
.lph-why{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.lph-why p,.lph-roles p{font-size:14px;line-height:1.55;color:var(--text-dim)}
/* „Защо НВО100?“ as the same coloured sheets as „За кого е“, each with its icon in a circle of the sheet's colour. */
.lph-why .lph-role-top{gap:10px;align-items:flex-start}
.lph-why h3{font-size:16.5px;line-height:1.3;padding-top:7px}
.lph-why .lph-role p{color:var(--text);font-size:14.5px;line-height:1.6;margin:0}
.lph-dot{flex:0 0 auto;width:36px;height:36px;border-radius:50%;background:var(--c);color:#fff;display:flex;align-items:center;justify-content:center}
.lph-dot .i{width:18px;height:18px}
.lph-roles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
/* „За кого е“: each role as a task of the test itself (its number, its text, an answer option to pick), on a sheet in the
   role's colour: students orange, teachers teal, parents the mountains' darkest blue. */
.lph-role{--c:#E07856;--bg:var(--peach-bg);display:flex;flex-direction:column;gap:12px;padding:20px;border-radius:12px;background:var(--bg);
  border:1.5px solid color-mix(in srgb,var(--c) 30%,transparent)}
.lph-role.mint{--c:#1F9C8F;--bg:var(--mint-bg)} .lph-role.deep{--c:#046C82;--bg:#DDEDF1} .lph-role.amber{--c:#B4720C;--bg:#F5E1B9}
.lph-role-top{display:flex;align-items:center;gap:4px;font-size:16.5px}
.lph-role .task-no{background:var(--c)}
.lph-roles .lph-role p{color:var(--text);font-size:15px;line-height:1.6;margin:0}
.lph-role .opt{margin-top:auto;background:#fff;border-color:color-mix(in srgb,var(--c) 35%,transparent);font-weight:600;padding:11px 14px}
.lph-role .opt .l{background:color-mix(in srgb,var(--c) 18%,#fff);color:var(--c)}
.lph-role .opt .i{margin-left:auto;color:var(--c)}
.lph-role .opt:hover{border-color:var(--c)} .lph-role .opt:hover .l{background:var(--c);color:#fff}
/* The sign-up card beside „Изкачването на деня“: the same dark band with the handwritten font on top, then a white
   card with „Твоят път към успеха“ and the two buttons side by side. Side by side, the two dark bands are as tall as
   each other (the cards are subgrids of .lph-duo's two rows). */
.lph-cta{display:flex;flex-direction:column;background:#fff;border:1px solid #E3E9EF;border-radius:14px;overflow:hidden;box-shadow:0 14px 34px rgba(21,32,43,.06)}
.lph-cta .lph-cta-head{padding:18px 24px;background:radial-gradient(500px 200px at 85% 0%,#24506A,rgba(36,80,106,0) 70%),var(--ink);color:#fff;font-family:'Marck Script',cursive;font-weight:400;font-size:32px;letter-spacing:0;line-height:1.1;display:flex;align-items:center;margin:0}
.lph-cta-body{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:28px 24px;text-align:center}
.lph-cta-body h3{font-size:26px;line-height:1.2;color:var(--ink)}
.lph-cta-step{font-weight:600;color:var(--ink);margin:0}
.lph-cta-body p:not(.lph-cta-step){color:var(--text-dim);max-width:320px;margin:0}
.lph-cta-btns{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;margin-top:14px}
.lph-cta-btns .btn{justify-content:center;border-radius:10px}
.lph-cta .btn.accent{background:#F57C0A;border-color:#F57C0A;color:#fff}
.lph-cta .btn.lph-out{background:#fff;border:1.5px solid var(--ink);color:var(--ink)}
/* „Изкачването на деня“ narrower, with the sign-up call next to it on the same row (alone, half as wide, on a day
   without tasks). */
.lph-solo{display:flex;justify-content:center} .lph-solo .lph-cta{width:min(100%,560px)}
.lph-duo{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:20px;align-items:stretch}
@media (min-width:1001px){
  .lph-duo{grid-template-rows:auto 1fr;row-gap:0}
  .lph-duo>.daily3,.lph-duo>.lph-cta{display:grid;grid-template-rows:subgrid;grid-row:span 2}
}
@media (max-width:1000px){.lph-duo{grid-template-columns:1fr}.lph-why{grid-template-columns:repeat(2,minmax(0,1fr))}.lph-free{grid-template-columns:1fr;gap:18px}}
@media (max-width:860px){
  .lph-hero{padding:28px 0 150px}
  .lph-summit{width:min(560px,140%);left:50%}
  .lph-hero-grid{grid-template-columns:1fr;gap:30px}
  .lph-hero h1{font-size:44px}
  .lph-demo{transform:none}
  .lph h2{font-size:24px}
  .lph-climb{grid-template-columns:1fr;gap:18px}
  .lph-climb::before{left:23px;right:auto;top:24px;bottom:24px;border-top:none;border-left:3px dashed #BFD3DE}
  .lph-climb li{display:grid;grid-template-columns:48px 1fr;column-gap:14px;padding:0}
  .lph-climb .lph-camp{grid-row:span 2}
  .lph-climb b{margin-top:4px}
  .lph-roles{grid-template-columns:1fr}
  .lph-stack{gap:44px}
}
@media (max-width:640px){
  .lph-hero h1{font-size:38px}
  .lph-lead{font-size:16px}
  .lph-actions .btn{width:100%;justify-content:center}
  .lph-facts{gap:10px} .lph-facts b{font-size:18px} .lph-facts span{font-size:12px}
  .lph-why{grid-template-columns:1fr}
  .lph-why{gap:12px}
  .lph-why p,.lph-roles p{font-size:13.5px}
  .lph-roles{gap:12px} .lph-role{padding:16px;gap:10px}
  .lph-stack{gap:36px;padding-bottom:48px}
  .lph-demo{padding:14px;gap:8px}
  /* Mariana: smaller illustrations on a phone. */
  .lph-paper{display:none}
  .lph-lead-2{display:none}
  .lph-claim{font-size:17px}
  .lph-paper .script{font-size:22px;line-height:28px}
  .lph-paper{background:repeating-linear-gradient(#FBFCFE 0 27px,#DCE6F0 27px 28px);padding:10px 14px}
  .lph-free{padding:20px;margin-top:20px}
  .lph-cta .lph-cta-head{font-size:28px;padding:16px 18px} .lph-cta-body{padding:22px 18px}
  /* The cookie notice as a slim bar at the bottom of the phone screen. */
  .cookie-bar{left:0;right:0;bottom:0;max-width:none;border-radius:0;border-width:1px 0 0;padding:10px 14px;gap:8px}
}

/* „Изкачването на деня“ (partials/daily.php, js/daily.js): on the home page and the student's home page. */
.daily3{background:#fff;border:1px solid #E3E9EF;border-radius:14px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 14px 34px rgba(21,32,43,.06)}
.daily3-head{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:18px 24px;background:radial-gradient(500px 200px at 85% 0%,#24506A,rgba(36,80,106,0) 70%),var(--ink);color:#fff}
.daily3-head h2{font-family:'Marck Script',cursive;font-weight:400;font-size:32px;letter-spacing:0;color:#fff;line-height:1.1}
.daily3-sub{font-size:13px;color:#A9BACB}
.daily3-tabs{display:inline-flex;border:1.5px solid #3A5268;border-radius:10px;padding:3px;gap:3px}
.daily3-tab{border:none;background:transparent;padding:7px 14px;border-radius:7px;font-weight:600;font-size:13.5px;cursor:pointer;color:#C9D6E2}
.daily3-tab.on{background:#19C3C0;color:#0C2A30}
.daily3-body{flex:1;display:flex;flex-direction:column}
.daily3-set{display:flex;flex-direction:column;gap:14px;padding:16px 24px 6px}
.daily3-route{display:block;width:100%;height:auto;border-radius:10px;overflow:hidden}
/* The camps over the picture's own numbered circles (img/daily-climb.webp): orange ring on the current one, green or
   red after the answer. */
.daily3-camp{cursor:pointer;outline:none}
.daily3-camp circle{fill:#fff;stroke:#5E8EA5;stroke-width:18;transition:fill .2s,stroke .2s}
.daily3-camp text{font:800 78px 'Rubik','Montserrat',sans-serif;fill:#15304A;text-anchor:middle;pointer-events:none}
.daily3-camp.now circle{stroke:#FF8A2A;stroke-width:22}
.daily3-camp.ok circle{fill:var(--mint);stroke:#fff} .daily3-camp.bad circle{fill:var(--danger);stroke:#fff}
.daily3-camp.ok text,.daily3-camp.bad text{fill:#fff}
.daily3-camp:focus-visible circle{stroke:var(--sky)}
.daily3-task{display:flex;flex-direction:column;gap:12px}
.daily3-no{font-family:'Rubik','Montserrat',sans-serif;font-size:13px;font-weight:600;color:#B4560F}
.daily3-task .qtext{margin:0;font-size:17px;font-weight:600}
.daily3-opts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.daily3-opts .opt{border-radius:10px;padding:12px 14px}
.daily3-next{align-self:flex-start}
.daily3-end{display:flex;flex-direction:column;gap:4px;padding:16px;border-radius:10px;background:#F1F8F7}
.daily3-end-title{font-size:17px}
.daily3-foot{font-size:13px;color:var(--text-dim);padding:12px 24px 18px}
.daily3-foot b{color:var(--text)}
@media (max-width:640px){.daily3-head,.daily3-set{padding-left:16px;padding-right:16px}.daily3-foot{padding:10px 16px 16px}.daily3-opts{grid-template-columns:1fr}.daily3-tabs{width:100%}.daily3-tab{flex:1 1 0}.daily3-head h2{font-size:28px}}
