/* Cerebra — shared theme v2: calm and minimal.
   One accent (cobalt), one highlight (soft marker, only for "now"/current), hairline borders,
   no sticker shadows. Loaded after each page's own <style>, so these tokens and rules win. */
:root{
  --bg:#f7f4ee; --surface:#ffffff; --ink:#1a1814; --muted:#6b655a; --line:#e6e0d4; --line2:#d9d2c3;
  --accent:#2d4ee0; --accent-ink:#ffffff; --accent-soft:#e8ecfd; --code:#efeadf;
  --mark:#ffe27a; --mark-ink:#1a1814; --now:#fff3c4;
  --shadow:#d9d2c3;                 /* legacy name: now just a stronger hairline */
  --hl-ink:inherit; --hl-fill:#ffe27a; --hl-size:40%; --heat:45,78,224;
  --radius:14px;
  --font-body:"Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display:"Young Serif", Georgia, "Times New Roman", serif;
  --font-mono:"Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#141310; --surface:#1d1b17; --ink:#f1ece2; --muted:#a59e8f; --line:#2e2b25; --line2:#3d3930;
    --accent:#8fa3ff; --accent-ink:#0e1330; --accent-soft:#1f2645; --code:#26231d;
    --mark:#e8c547; --mark-ink:#141310; --now:#3a3218; --shadow:#3d3930;
    --hl-ink:inherit; --hl-fill:rgba(232,197,71,.30); --hl-size:40%; --heat:143,163,255;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#141310; --surface:#1d1b17; --ink:#f1ece2; --muted:#a59e8f; --line:#2e2b25; --line2:#3d3930;
  --accent:#8fa3ff; --accent-ink:#0e1330; --accent-soft:#1f2645; --code:#26231d;
  --mark:#e8c547; --mark-ink:#141310; --now:#3a3218; --shadow:#3d3930;
  --hl-ink:inherit; --hl-fill:rgba(232,197,71,.30); --hl-size:40%; --heat:143,163,255;
  color-scheme:dark;
}

body{background:var(--bg);color:var(--ink);font-family:var(--font-body);font-size:16px;line-height:1.55;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
h1,h2,.display{font-family:var(--font-display);font-weight:400;letter-spacing:-.01em;line-height:1.12}
h1{font-size:clamp(30px,4vw,40px);margin:18px 0 6px}
h2{font-size:clamp(22px,2.6vw,28px)}
h3{font-family:var(--font-body);font-weight:600;letter-spacing:-.005em}
code,kbd,.ts,#spage{font-family:var(--font-mono)}
a{color:var(--accent);text-underline-offset:3px}
::selection{background:var(--mark);color:var(--mark-ink)}

/* calm: no offset "sticker" shadows anywhere (the logo mark keeps its one, on a pseudo-element) */
*{box-shadow:none!important}

mark.hl{background:linear-gradient(100deg,transparent 0 2%,var(--hl-fill) 3% 96%,transparent 97%) no-repeat 0 88%/100% var(--hl-size);
  color:var(--hl-ink);padding:0 .06em;border-radius:0;-webkit-box-decoration-break:clone;box-decoration-break:clone}

/* ---- header: logo · Lectures Slides Heatmap · (search) (avatar) ---- */
header.top{background:var(--bg);border-bottom:1px solid var(--line)}
header.top .wrap{display:flex!important;align-items:center;justify-content:flex-start!important;gap:28px;height:64px!important}
.brand{display:inline-flex;align-items:center;gap:10px;font-family:var(--font-display);font-size:20px;font-weight:400;
  color:var(--ink);text-decoration:none;letter-spacing:-.01em;flex:none}
.brand span{color:var(--ink)}
.brand::before{content:"";width:22px;height:22px;flex:none;border-radius:6px;background:var(--accent);box-shadow:3px 3px 0 var(--mark)!important}
nav.tabs{display:flex;gap:22px;flex-wrap:wrap;align-items:center}
nav.tabs a{font:500 15px var(--font-body);color:var(--ink);text-decoration:none;padding:6px 0;border:0;border-radius:0;background:none}
nav.tabs a:hover{color:var(--accent);background:none}
nav.tabs a.on{color:var(--accent);font-weight:600;background:none}
.hdr-right{margin-left:auto;display:flex;align-items:center;gap:12px}
.hdr-search input{width:220px;font:500 14px var(--font-body);padding:9px 12px;border-radius:10px;border:1px solid var(--line2);background:var(--surface);color:var(--ink)}
.hdr-search input:focus{outline:none;border-color:var(--accent)}
.avatar{width:34px;height:34px;border-radius:50%;background:var(--accent-soft);color:var(--accent)!important;display:grid;place-items:center;
  font:700 14px var(--font-body);text-decoration:none;flex:none}
.themebtn{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:50%;border:1px solid var(--line2);background:transparent;color:var(--ink);cursor:pointer;padding:0}
.themebtn:hover{border-color:var(--accent);color:var(--accent)}
.signin{white-space:nowrap;font:600 14px var(--font-body);padding:8px 14px;border-radius:10px;background:var(--ink);color:var(--bg)!important;text-decoration:none}
@media (max-width:760px){ .hdr-search{display:none} nav.tabs{gap:14px} header.top .wrap{gap:16px} }
@media (max-width:560px){
  header.top .wrap{gap:14px!important;padding-left:16px!important;padding-right:16px!important}
  nav.tabs{gap:14px;flex-wrap:nowrap} nav.tabs a{font-size:14.5px;white-space:nowrap}
  .hdr-right{gap:8px}
  .themebtn,.avatar{width:32px;height:32px}
  .signin{padding:7px 12px;font-size:13.5px}
  .brand{font-size:18px} .brand::before{width:20px;height:20px}
}
/* phones: keep the logo mark, drop the word, when the header also carries the nav */
@media (max-width:440px){ header.top .wrap:has(nav.tabs) .brand{font-size:0;gap:0} }

/* ---- surfaces & controls ---- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
form.search button, .btn.primary, button.primary{background:var(--accent);color:var(--accent-ink);border:0;border-radius:10px;
  font-family:var(--font-body);font-weight:600}
form.search button:hover, .btn.primary:hover, button.primary:hover{filter:brightness(1.06)}
form.search input, form.search select, select{border:1px solid var(--line2);background:var(--surface);color:var(--ink);border-radius:10px;font-family:var(--font-body)}
form.search input:focus, select:focus{outline:none;border-color:var(--accent)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.kicker,.grp,.folder{font-family:var(--font-body)!important;font-weight:600!important;letter-spacing:.04em!important}

.chip{font-family:var(--font-body)}
.ts{font-weight:600;letter-spacing:-.02em}
footer{border-top:1px solid var(--line);color:var(--muted)}

@media (prefers-reduced-motion: reduce){ *{transition:none!important;animation:none!important} }
