/* DoodnessDashboard - Cozy style */
html[data-accent=leaf]{--ac:#2a8a4f;--ac-dark:#7ad69a}
html[data-accent=sky]{--ac:#1f7fb8;--ac-dark:#7cc8f2}
html[data-accent=aqua]{--ac:#14877f;--ac-dark:#6fe0d4}
html[data-accent=sunny]{--ac:#a8700a;--ac-dark:#f6c445}
html[data-accent=coral]{--ac:#cf5a3a;--ac-dark:#ff9d82}
html[data-accent=blossom]{--ac:#c24a7f;--ac-dark:#f7a1c4}
html[data-accent=lavender]{--ac:#7556c4;--ac-dark:#c0a8f5}
html[data-theme=light]{color-scheme:light;
  --bg:#fbf6e8;--surface:#fffefa;--subtle:#f7f1e0;--border:#efe6cd;--border-strong:#e2d5b4;--text:#4a3d27;--muted:#7a6b50;
  --shadow:0 1px 2px rgba(122,92,40,.06),0 10px 28px -16px rgba(122,92,40,.28);--ok:#237a43;--err:#b8402e;--warn:#8c5a08}
html[data-theme=dark]{color-scheme:dark;--accent-text:var(--ac-dark);
  --bg:#15222f;--surface:#1e2f3f;--subtle:#25394b;--border:#33495d;--border-strong:#46607a;--text:#f5efde;--muted:#aebdc9;
  --shadow:0 1px 2px rgba(0,0,0,.2),0 12px 30px -16px rgba(0,0,0,.6);--ok:#7ad69a;--err:#ff9d8a;--warn:#f6c445}

/* Cozy style (loaded on top of style.css only when the Cozy style is selected)
   : warm paper, chunky rounded shapes, springy motion
   ===================================================================== */
:root{--radius:22px;--spring:cubic-bezier(.34,1.56,.64,1);--head:"Nunito Variable",Nunito,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif}
body{font:500 .95rem/1.6 "Nunito Variable",Nunito,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-feature-settings:normal;
  background:var(--bg)}
h1,h2,h3,h4,.brand,.tile-num,.num,.qnum,.doc-kicker{font-family:var(--head)}
h1,h2,h3,h4{letter-spacing:-.005em;font-weight:800}
h1{font-size:1.9rem}h2{font-size:1.2rem}h3{font-size:1.02rem}
strong,b{font-weight:800}
a{font-weight:700}
.container{max-width:60rem;padding-top:1.2rem}

/* floating pill header */
.site-header{top:.6rem;margin:.6rem auto 0;width:calc(100% - 1.5rem);max-width:60rem;border:2px solid var(--border);border-radius:999px;
  background:color-mix(in srgb,var(--surface) 82%,transparent);box-shadow:var(--shadow)}
.bar-row{max-width:none;padding:.4rem .6rem .4rem .8rem}
.brand{font-size:1.1rem;font-weight:800;letter-spacing:-.01em}
.logo{width:2rem;height:2rem;border-radius:50%;background:var(--accent-solid);box-shadow:inset 0 -3px 0 rgba(0,0,0,.14)}
.logo svg{width:1.4rem;height:1.4rem;stroke:#fffdf7}
.brand:hover .logo{transform:rotate(-14deg) scale(1.12)}
.mainnav a{padding:.4rem .95rem;border-radius:999px;font-weight:800;font-size:.86rem;transition:background-color .2s,transform .35s var(--spring)}
.mainnav a:hover{transform:translateY(-2px)}
.mainnav a.on{background:var(--accent-solid);color:#fff}
.who{font-weight:700}

/* buttons: chunky pills with a pressed edge */
button,.btn,summary.icon-btn{height:2.5rem;padding:0 1.15rem;border-radius:999px;border:2px solid var(--border-strong);font-weight:800;font-size:.88rem;
  background:var(--surface);box-shadow:0 3px 0 var(--border-strong);transition:background-color .15s,border-color .15s,box-shadow .15s,color .15s}
button:hover,.btn:hover{background:var(--surface);border-color:var(--accent-solid);color:var(--accent-text)}
button.primary,.btn.primary{background:var(--accent-solid);border-color:color-mix(in srgb,var(--accent-solid) 80%,#000);color:#fff;
  box-shadow:0 3px 0 color-mix(in srgb,var(--accent-solid) 62%,#000)}
button.primary:hover,.btn.primary:hover{background:color-mix(in srgb,var(--accent-solid) 92%,#fff);color:#fff;border-color:color-mix(in srgb,var(--accent-solid) 80%,#000)}
button.sm,.btn.sm{height:2.1rem;padding:0 .9rem;font-size:.82rem}
button.danger-btn{box-shadow:0 3px 0 color-mix(in srgb,var(--err) 60%,#000);border-color:var(--err)}
button.link,button.link.danger{box-shadow:none;border:0;height:auto;padding:0}
.icon-btn{width:2.5rem}
.swatch{box-shadow:none;height:1.9rem;width:1.9rem;border:3px solid transparent}
.swatch[aria-pressed=true]{border-color:var(--surface);box-shadow:0 0 0 3px var(--text)}
.swatch[data-accent=leaf]{--sw:#3fae6a}.swatch[data-accent=sky]{--sw:#4aa8e0}.swatch[data-accent=aqua]{--sw:#3cc3b6}
.swatch[data-accent=sunny]{--sw:#f2b52c}.swatch[data-accent=coral]{--sw:#f1805e}.swatch[data-accent=blossom]{--sw:#ee86ae}.swatch[data-accent=lavender]{--sw:#a58bec}
.accent-pop,.menu-pop{border:2px solid var(--border);border-radius:22px;box-shadow:0 14px 34px -10px rgba(80,55,20,.35)}
.menu-pop a{border-radius:14px}

/* fields */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea{border:2px solid var(--border-strong);border-radius:16px;
  background:var(--surface);padding:.55rem .95rem;font-weight:600;box-shadow:inset 0 2px 0 rgba(122,92,40,.06)}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select{height:2.7rem}
select{background-position:right .85rem center}
label{font-weight:800;font-size:.84rem}
input[role=switch]{width:2.6rem;height:1.5rem;background:var(--border-strong)}
input[role=switch]::before{top:.2rem;left:.2rem;width:1.1rem;height:1.1rem}
input[role=switch]:checked::before{transform:translateX(1.1rem)}
input[type=checkbox]:not([role=switch]){width:1.2rem;height:1.2rem}

/* cards: soft paper with a gentle drop */
.panel,.pcard,.qcard,.auth-card,.gsec,.takeaways,.terms,.tile{border:2px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel{padding:1.4rem 1.5rem}
.pcard,.tile,.link-cards a,.qcard{transition:transform .45s var(--spring),border-color .2s,box-shadow .3s}
.pcard:hover,.tile:hover{transform:translateY(-4px) rotate(-.4deg);border-color:var(--accent-solid);box-shadow:0 14px 28px -14px rgba(80,55,20,.4)}
.pcard h2 a::after{border-radius:var(--radius)}
.link-cards a{border:2px solid var(--border);border-radius:18px;background:var(--subtle)}
.link-cards a:hover{border-color:var(--accent-solid);transform:translateY(-3px)}
.chip,.tag{border:2px solid var(--border);font-weight:800;padding:.05rem .65rem;background:var(--subtle)}
.num{width:2rem;height:2rem;font-size:.95rem;box-shadow:inset 0 -3px 0 rgba(0,0,0,.15)}
.qnum{border-radius:50%;min-width:2rem;height:2rem;font-size:.9rem}
.letter{border-width:2px;font-weight:800}
.opts li{border:2px solid var(--border);border-radius:16px;font-weight:600;transition:transform .35s var(--spring)}
.opts li:hover{transform:translateX(3px)}
.opts li.correct{border-color:var(--ok)}
.flash{border-width:2px;border-radius:18px;font-weight:700}
.sources li,.term-grid div,.choice,.dropzone,.notes-box,.hint{border-radius:16px}
.sources li,.term-grid div,.choice{border-width:2px}
.dropzone{border:2.5px dashed var(--border-strong);border-radius:20px}
.seg,.seg-tabs{border:2px solid var(--border);border-radius:999px;padding:4px}
.seg span,.seg-tabs label{border-radius:999px;font-weight:800;padding:.35rem .95rem}
.seg input:checked+span,.addbox:has(input[value=up]:checked) .tab-up,.addbox:has(input[value=paste]:checked) .tab-paste{background:var(--accent-solid);color:#fff;box-shadow:0 2px 0 color-mix(in srgb,var(--accent-solid) 62%,#000)}
blockquote{border-left-width:4px;border-radius:4px}
pre.source{border:2px solid var(--border);border-radius:20px}

/* tabs become pills */
.tabs{border-bottom:0;gap:.4rem;margin:1rem 0 1.2rem;flex-wrap:wrap}
.tabs a{border:2px solid var(--border);border-radius:999px;margin:0;background:var(--surface);font-weight:800;padding:.4rem 1rem;transition:transform .35s var(--spring),background-color .2s}
.tabs a:hover{transform:translateY(-2px);border-color:var(--accent-solid)}
.tabs a.on{background:var(--accent-solid);border-color:var(--accent-solid);color:#fff}
.tabs a.on .count{background:rgba(255,255,255,.28);color:#fff}
.crumbs,.back{font-weight:700}

/* highlight boxes get a stitched, patch-like edge */
.results,.panel.is-next,.takeaways,.tile.alert{border:2px dashed color-mix(in srgb,var(--accent-solid) 55%,var(--border));border-radius:var(--radius);box-shadow:var(--shadow)}
.panel.is-next{box-shadow:var(--shadow),0 0 0 5px color-mix(in srgb,var(--accent-solid) 14%,transparent)}
.job .bar{height:10px;border:2px solid color-mix(in srgb,var(--accent-solid) 30%,transparent);background:var(--surface)}
.job .bar-fill{background:repeating-linear-gradient(135deg,var(--accent-solid) 0 10px,color-mix(in srgb,var(--accent-solid) 78%,#fff) 10px 20px);background-size:28px 28px;animation:stripe 1s linear infinite}
@keyframes stripe{to{background-position:28px 0}}

/* dashboard + students */
.tile-num{font-size:2.3rem;font-weight:800}
.tile-label{font-weight:800}
.avatar{border:2px solid color-mix(in srgb,var(--accent-solid) 40%,transparent);font-family:var(--head);font-weight:800;background:color-mix(in srgb,var(--accent-solid) 18%,var(--surface))}
.avatar.lg{box-shadow:0 4px 0 color-mix(in srgb,var(--accent-solid) 25%,transparent)}
.auth-card{border-radius:28px;padding:2rem}
.auth-card .logo{width:2.9rem;height:2.9rem}.auth-card .logo svg{width:1.6rem;height:1.6rem}
.credit{font-family:var(--head);font-size:.76rem;opacity:.6}

/* background: warm pastel clouds (peach / mint / sky), deep teal-blue at night */
.aurora i:nth-child(n){opacity:calc(var(--o) * var(--k,1));background:radial-gradient(closest-side,
  color-mix(in srgb,var(--b) 100%,transparent) 0%,color-mix(in srgb,var(--b) 86%,transparent) 12%,color-mix(in srgb,var(--b) 66%,transparent) 28%,
  color-mix(in srgb,var(--b) 44%,transparent) 44%,color-mix(in srgb,var(--b) 26%,transparent) 58%,color-mix(in srgb,var(--b) 12%,transparent) 72%,
  color-mix(in srgb,var(--b) 4%,transparent) 86%,transparent 100%)}
.aurora i:nth-child(1){--b:#ffcf9e;--o:.85}
.aurora i:nth-child(2){--b:#a9e3c4;--o:.8}
.aurora i:nth-child(3){--b:#a8d8f5;--o:.8}
html[data-theme=dark]{--k:.55}
html[data-theme=dark] .aurora i:nth-child(1){--b:#2f7f86}
html[data-theme=dark] .aurora i:nth-child(2){--b:#3b5f9a}
html[data-theme=dark] .aurora i:nth-child(3){--b:#5a4a8e}
.aurora::after{opacity:.05}
html[data-theme=dark] .aurora::after{opacity:.08}
.panel:hover,.pcard:hover,.qcard:hover,.gsec:hover,.terms:hover,.takeaways:hover{
  background-image:radial-gradient(420px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--accent-solid) 10%,transparent),transparent 65%)}
button.primary::after,.btn.primary::after{display:none}

/* PDF view keeps the page tidy */
.pdf .qcard,.pdf .gsec,.pdf .takeaways,.pdf .terms,.pdf .panel{box-shadow:none;transition:none;transform:none}
.pdf .qcard:hover,.pdf .gsec:hover{background-image:none}
.pdf-bar{border-bottom-width:2px}
@media print{.site-header{display:none}}

/* settings menu */
.settings-pop{border:2px solid var(--border);border-radius:24px;padding:1.1rem;box-shadow:0 14px 34px -10px rgba(80,55,20,.35)}
.settings-pop h2{font-family:var(--head);font-size:.85rem;letter-spacing:.02em;text-transform:none;color:var(--text)}
.style-opt{border-radius:18px;font-weight:800;font-size:.95rem}
.style-opt small{font-family:"Nunito Variable",Nunito,sans-serif;font-weight:700}
.style-opt[aria-pressed=true]{border-color:var(--accent-solid)}
.style-prev{border-width:2px}
.mode-pick{border-width:2px;border-radius:999px;padding:4px}
.mode-pick button{border-radius:999px;height:2.1rem;padding:0 1rem}
.mode-pick button[aria-pressed=true]{background:var(--accent-solid);color:#fff;box-shadow:0 2px 0 color-mix(in srgb,var(--accent-solid) 62%,#000)}
.swatches{justify-items:center}
summary.icon-btn{padding:0;width:2.5rem}

.menu-pop.pad{border-radius:22px;padding:1.1rem}
.qhead h3,.pcard h2,.scard h2,.sec-title{font-weight:800}
.qhead h3{font-size:1.02rem;line-height:1.45}

@media(max-width:860px){
  .site-header{top:.4rem;margin-top:.4rem;width:calc(100% - 1rem);border-radius:26px}
  .bar-row{padding:.4rem .5rem .5rem}
  .brand{font-size:1rem}
  .mainnav a{padding:.45rem .3rem}
  .container{padding-top:.8rem}
}


/* =====================================================================
   Polish pass: flatter, calmer, fewer heavy outlines
   ===================================================================== */
strong,b{font-weight:700}
h1,h2,h3,h4{font-weight:700}
label{font-weight:700}
.qhead h3,.pcard h2,.scard h2,.sec-title{font-weight:700}
.brand,.tile-num,.avatar,.style-opt{font-weight:800}
.tile-label,.chip,.tag,.crumbs,.back{font-weight:700}

/* buttons: flat, soft, no hard bottom edge */
button,.btn,summary.icon-btn{height:2.4rem;border:1.5px solid var(--border-strong);box-shadow:0 1px 2px rgba(122,92,40,.08);font-weight:700}
button:hover,.btn:hover{background:color-mix(in srgb,var(--accent-solid) 7%,var(--surface));border-color:color-mix(in srgb,var(--accent-solid) 55%,var(--border-strong));color:var(--accent-text)}
button.primary,.btn.primary{border:0;color:#fff;
  background:linear-gradient(180deg,color-mix(in srgb,var(--accent-solid) 88%,#fff),var(--accent-solid));
  box-shadow:0 6px 14px -6px color-mix(in srgb,var(--accent-solid) 70%,transparent),inset 0 1px 0 rgba(255,255,255,.28)}
button.primary:hover,.btn.primary:hover{border:0;color:#fff;background:linear-gradient(180deg,color-mix(in srgb,var(--accent-solid) 80%,#fff),color-mix(in srgb,var(--accent-solid) 92%,#fff))}
button.danger-btn{border:0;box-shadow:0 6px 14px -6px color-mix(in srgb,var(--err) 70%,transparent)}
button.sm,.btn.sm{height:2.1rem}
.icon-btn{box-shadow:0 1px 2px rgba(122,92,40,.08)}
.swatch{border:3px solid var(--surface);box-shadow:0 1px 3px rgba(0,0,0,.18)}
.swatch[aria-pressed=true]{border-color:var(--surface);box-shadow:0 0 0 2.5px var(--text)}
.logo{box-shadow:none}
.logo svg{stroke-width:3.2}
.num{box-shadow:none}
.avatar.lg{box-shadow:none}

/* surfaces: thin soft borders and gentle shadows */
.panel,.pcard,.qcard,.auth-card,.gsec,.takeaways,.terms,.tile{border:1.5px solid var(--border)}
.site-header{border:1.5px solid var(--border);box-shadow:0 10px 30px -18px rgba(122,92,40,.4)}
.pcard:hover,.tile:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--accent-solid) 45%,var(--border));box-shadow:0 16px 30px -18px rgba(80,55,20,.45)}
.link-cards a,.sources li,.term-grid div,.choice,.opts li,.flash,.seg,.seg-tabs,.accent-pop,.menu-pop,.settings-pop,pre.source,.mode-pick,.style-prev{border-width:1.5px}
.settings-pop,.menu-pop,.accent-pop{border-color:var(--border)}
.dropzone{border-width:2px}
.results,.panel.is-next,.tile.alert{border:1.5px solid color-mix(in srgb,var(--accent-solid) 40%,var(--border));background-color:color-mix(in srgb,var(--accent-solid) 6%,var(--surface))}
.takeaways{border:1.5px solid color-mix(in srgb,var(--accent-solid) 35%,var(--border))}
.panel.is-next{box-shadow:var(--shadow)}
.chip,.tag{border:0;background:color-mix(in srgb,var(--muted) 12%,var(--surface));padding:.1rem .7rem}
.chip.ok,.tag.ok{background:color-mix(in srgb,var(--ok) 14%,var(--surface))}
.chip.next,.tag.samples{background:color-mix(in srgb,var(--accent-solid) 13%,var(--surface))}
.tag.warn{background:color-mix(in srgb,var(--warn) 15%,var(--surface))}
.approval-count{border:0;background:color-mix(in srgb,var(--ok) 14%,var(--surface))}
.letter{border-width:1.5px}
.opts li:hover{transform:none;border-color:var(--border-strong)}

/* fields */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea{border:1.5px solid var(--border-strong);box-shadow:none;font-weight:600}

/* segmented controls + tabs: soft tinted track, white selected pill */
.seg,.seg-tabs,.mode-pick{background:color-mix(in srgb,var(--muted) 10%,var(--surface));border-color:transparent}
.seg input:checked+span,.addbox:has(input[value=up]:checked) .tab-up,.addbox:has(input[value=paste]:checked) .tab-paste,.mode-pick button[aria-pressed=true]{
  background:var(--accent-solid);color:#fff;box-shadow:0 4px 10px -5px color-mix(in srgb,var(--accent-solid) 75%,transparent)}
.tabs a{border:1.5px solid var(--border);box-shadow:none}
.tabs a.on{border-color:transparent;box-shadow:0 6px 14px -8px color-mix(in srgb,var(--accent-solid) 80%,transparent)}
.mainnav a.on{box-shadow:0 5px 12px -6px color-mix(in srgb,var(--accent-solid) 75%,transparent)}
.style-opt{box-shadow:none;height:auto}
.style-opt[aria-pressed=true]{box-shadow:0 0 0 3px var(--ring)}
.job .bar{border:0;background:color-mix(in srgb,var(--accent-solid) 14%,var(--surface))}

/* header: more solid so scrolled content never shows through, and a tidy track for the nav on small screens */
.site-header{background:color-mix(in srgb,var(--surface) 97%,transparent);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
@media(max-width:860px){
  .mainnav{background:color-mix(in srgb,var(--muted) 10%,var(--surface));border-radius:999px;padding:3px;gap:2px}
  .mainnav a:hover{transform:none}
}

/* no clipping or sweep effects on buttons (they can flicker on some phones) */
button.primary,.btn.primary{overflow:visible}
button.primary::after,.btn.primary::after{content:none}

/* Scroll glitch hardening: the header is nearly solid anyway, so drop the live blur behind it, and keep primary buttons simple to draw. */
.site-header{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--surface)}
@media(hover:none),(max-width:860px){
  button.primary,.btn.primary,button.danger-btn{background:var(--accent-solid);box-shadow:none;border:0}
  button.primary:hover,.btn.primary:hover{background:var(--accent-solid)}
  .tabs a.on,.mainnav a.on,.seg input:checked+span,.mode-pick button[aria-pressed=true]{box-shadow:none}
  .pcard,.tile,.panel,.qcard,.results{transition:none}
}
