/* =========================================================================
   LIFE — the design system
   =========================================================================
   Apple-inspired, chosen after the user picked the tile dashboard and asked
   for the whole app to feel like it: the system font (SF on a Mac), large
   bold titles, content in rounded grouped cards on a grey ground, tinted
   buttons, Apple's system blue as the one accent. Nothing glows.

   Five rules hold it together:

   1. Colour means STATE, never decoration. Two accents with two jobs, the
      user having asked for a colour that breaks the grey and blue: ORANGE
      (`--now`, Apple's system orange) is now and today (the today card, the
      calendar's date circle, the now-line, Next up); BLUE (`--accent`) is
      what you can press (buttons, links, focus). Green is done,
      yellow/ochre is due soon or behind, red is overdue. Course colours are identity: a spine,
      a tint or a ring, never a loud block with text on it.
   2. Content sits in CARDS on the ground (grouped, as in iOS Settings): a
      section's title above, its rows inside, divided by hairlines. Only what
      floats over the page (popovers, menus, the sheet, toasts) has a shadow.
   3. One family, SF. Large titles 34/700, section titles 20/600, body 14-15,
      meta 12-13. Weight and size carry hierarchy; no italics, no glow.
   4. One shape rule: chips and event blocks 6, controls 10, cards 16,
      dashboard tiles and the sheet 20, pills 999.
   5. The page's numbers are plain: big where they are the point (a tile's
      figure), never decorated.

   The palette is measured, not chosen: `tests/test_web_assets.py`
   (PaletteTests) checks every ink on every ground against 4.5:1 and the
   hairline against 2.46:1. Change a value and it names the pairing you broke.

   There is no page `zoom`. The app used to render at 125% through `zoom`,
   which scales layout coordinates as well as paint, and every piece of code
   that compared a pointer position with a CSS length was wrong by 1.25 — it
   bit four separate times. The type scale is simply the size it is now.
   ========================================================================= */

/* ---------- type: IBM Plex, self-hosted ----------
   Served from disk, never a CDN: this runs on a laptop with no guarantee of a
   network. `unicode-range` means latin-ext (å ä ö are in latin; ł, ő are not)
   is only fetched by a page that needs it. */
@font-face{font-family:"Plex"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/plex-sans-latin-400.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Plex"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/plex-sans-latin-ext-400.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,
    U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,
    U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Plex"; font-style:normal; font-weight:500; font-display:swap;
  src:url("/fonts/plex-sans-latin-500.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Plex"; font-style:normal; font-weight:500; font-display:swap;
  src:url("/fonts/plex-sans-latin-ext-500.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,
    U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,
    U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Plex"; font-style:normal; font-weight:600; font-display:swap;
  src:url("/fonts/plex-sans-latin-600.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Plex"; font-style:normal; font-weight:600; font-display:swap;
  src:url("/fonts/plex-sans-latin-ext-600.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,
    U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,
    U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
/* Roboto Mono (Apache-2.0): where you WRITE a quick line, like the capture
   box on Today. The user asked for it there; --type-mono is the token. */
@font-face{font-family:"RobotoMono"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/roboto-mono-latin-400.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"RobotoMono"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/roboto-mono-latin-ext-400.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,
    U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,
    U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"RobotoMono"; font-style:normal; font-weight:500; font-display:swap;
  src:url("/fonts/roboto-mono-latin-500.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,
    U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"RobotoMono"; font-style:normal; font-weight:500; font-display:swap;
  src:url("/fonts/roboto-mono-latin-ext-500.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,
    U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,
    U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"PlexMono"; font-style:normal; font-weight:400; font-display:swap;
  src:url("/fonts/plex-mono-latin-400.woff2") format("woff2")}

/* =========================================================================
   Tokens
   ========================================================================= */
:root{
  /* spacing: a 4px scale */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px; --s7:32px; --s8:48px;
  /* type: six sizes. 12 is the floor — nothing readable is set smaller. */
  --t-xs:12px; --t-sm:14px; --t-md:15px; --t-lg:17px; --t-xl:22px; --t-2xl:26px;
  /* radius: the one rule, see the header */
  --r-xs:6px; --r-sm:10px; --r-md:16px; --r-lg:20px; --r-pill:999px;
  /* faces: see rule 3 */
  --serif:var(--sans);
  --sans-base:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Segoe UI","Plex",Roboto,"Helvetica Neue",sans-serif;
  --sans:var(--sans-base);
  /* controls and chrome */
  --ctl-h:34px;
  --bar-h:52px;
  --hour:64px;
  --page-max:1320px;
  /* motion: short, and only where it shows what changed */
  --ease:cubic-bezier(.2,0,0,1);
  --fast:120ms;
  --med:160ms;
}

/* Dark is the default: this is looked at daily and often at night. `:root`
   alone carries it too, so a page with no data-theme attribute is still dark.
   Not a blue-black: the ground keeps a little of the orange's warmth. */
:root,
:root[data-theme="dark"]{
  /* Graphite: macOS dark, lifted. Neutral grey (no warm or blue cast), cards
     a clear step above the ground, Apple's system blue as the one accent. */
  --bg:#242428;
  --surface:#3a3a40;          --surface-solid:#3a3a40;
  --surface-2:#424249;        --surface-2-solid:#424249;
  --rail-bg:#1f1f23;
  --field:#2c2c31;
  --fill:rgba(255,255,255,.09);   /* a secondary button's tint */
  --line:#76767e;
  --line-soft:#48484f;
  --ctl-line:#85858e;
  --ink:#f5f5f7;
  --ink-2:#d1d1d6;
  --ink-3:#b4b4bc;
  --accent:#2f8bff;
  --accent-fill:#0a6cdd;      /* behind white words: 5:1 */
  --accent-soft:#1f3a5c;
  --accent-ink:#78b4ff;
  --on-accent:#ffffff;
  --now:#ff9f0a;              /* Apple system orange: now and today */
  --now-ink:#ffa940;
  --on-now:#1c1c1e;
  --now-soft:rgba(255,159,10,.22);
  --ok:#32d167;
  --warn:#ffcc33;
  --danger:#ff6961;
  --glow:transparent;
  --glass:rgba(58,58,64,.82);
  --shadow:0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  --hi:rgba(255,255,255,.06);
  color-scheme:dark;
}

/* Light: white paper, as on the reference. Nothing on the page is a filled
   card any more (rule 2), so a surface no longer has to stand off the ground:
   frames are hairlines and floating layers carry the shadow. */
:root[data-theme="light"]{
  /* Mist: Apple's grouped light, dimmed. A soft grey ground with near-white
     cards, so it is not a bright white page. */
  --bg:#e8e8ed;
  --surface:#f7f7f9;          --surface-solid:#f7f7f9;
  --surface-2:#efeff3;        --surface-2-solid:#efeff3;
  --rail-bg:#dfdfe5;
  --field:#ffffff;
  --fill:rgba(0,0,0,.06);
  --line:#8e8e95;
  --line-soft:#d6d6dc;
  --ctl-line:#8e8e95;
  --ink:#1c1c1e;
  --ink-2:#3a3a3f;
  --ink-3:#5e5e66;
  --accent:#0071e3;
  --accent-fill:#0071e3;
  --accent-soft:#dce9fb;
  --accent-ink:#0062c4;
  --on-accent:#ffffff;
  --now:#e8590c;
  --now-ink:#b04000;
  --on-now:#ffffff;
  --now-soft:rgba(232,89,12,.16);
  --ok:#1d7a3a;
  --warn:#8a5a00;
  --danger:#c41e1e;
  --glow:transparent;
  --glass:rgba(247,247,249,.85);
  --shadow:0 1px 2px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.12);
  --hi:rgba(255,255,255,.8);
  color-scheme:light;
}

/* Legacy names still referenced from page scripts' inline styles and charts.
   Each is an alias for a token above, never a new colour. */
:root{
  --gold:var(--warn);
  --muted:var(--ink-3);
  --panel:var(--surface);
  --ink-4:var(--ink-3);
}

/* =========================================================================
   Base
   ========================================================================= */
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0; height:100%}
/* Most pages scroll inside `main.dash`, so the body is exactly the window. The
   course page scrolls the document instead (its sidebar is sticky against it),
   and a window-height body ended after the first screenful — taking the sticky
   top bar with it, so the nav scrolled away halfway down a plan. */
body:has(> .course-main){height:auto; min-height:100%}
body{
  background:var(--bg); color:var(--ink); display:flex; flex-direction:column;
  font:400 var(--t-sm)/1.5 var(--sans);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  font-variant-numeric:tabular-nums;
  text-rendering:optimizeLegibility;
}
code,kbd,pre{font-family:"PlexMono",ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.92em}
a{color:inherit}
/* No double-tap zoom delay on anything you tap, and no grey flash over it:
   the focus and active states already say what was pressed. */
a,button,summary,label,input,select,textarea{touch-action:manipulation}
html{-webkit-tap-highlight-color:transparent}
.muted{color:var(--ink-3); font-weight:400}
h1,h2,h3{margin:0; font-weight:600; letter-spacing:-.005em; text-wrap:balance}
p{margin:0}

/* Keyboard focus is always visible, and only for the keyboard. One rule for the
   whole app: a 2px accent ring, offset so it never sits on top of the border
   it is describing. Nothing below may remove it without replacing it. */
:focus{outline:none}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline-offset:0}

.skip{position:fixed; left:var(--s3); top:-60px; z-index:200;
  padding:var(--s2) var(--s3); border-radius:var(--r-sm);
  background:var(--accent); color:var(--on-accent); font-weight:600;
  text-decoration:none; transition:top var(--fast) var(--ease)}
.skip:focus{top:var(--s3)}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:0s!important; animation-iteration-count:1!important;
    transition-duration:0s!important; scroll-behavior:auto!important}
}

/* =========================================================================
   Controls
   ========================================================================= */
button,.btn{
  font:inherit; font-size:var(--t-sm); font-weight:500; line-height:20px;
  color:var(--ink); background:transparent;
  border:1px solid var(--ctl-line); border-radius:var(--r-sm);
  padding:6px 12px; cursor:pointer; text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  transition:background-color var(--fast) var(--ease), border-color var(--fast) var(--ease),
             color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
button:hover,.btn:hover{border-color:var(--ink); background:transparent}
button:active:not(:disabled),.btn:active{transform:translateY(1px)}
button:disabled{opacity:.5; cursor:not-allowed}
/* The primary action is the ink itself: a black square with paper-coloured
   words (white on dark, so it inverts with the theme). Orange stays "now". */
button.primary,.btn.primary{background:var(--ink); border-color:var(--ink);
  color:var(--bg); font-weight:500}
button.primary:hover,.btn.primary:hover{background:var(--ink-2); border-color:var(--ink-2)}
button.primary:disabled{cursor:progress}
button.ghost{background:transparent; border-color:transparent; color:var(--ink-2)}
button.ghost:hover{background:var(--surface-2); border-color:transparent; color:var(--ink)}
/* A square button whose whole content is an icon centres it. The base padding
   is sized for a label, so a bare SVG sat left of centre in its own box. */
.ghost.icon,#side-toggle{display:inline-grid; place-items:center;
  width:var(--ctl-h); height:var(--ctl-h); padding:0; flex:none}
.ghost.icon svg,#side-toggle svg{display:block}
#side-toggle.on,#side-toggle[aria-expanded="false"]{color:var(--accent)}

/* Small secondary actions: card headers, "Import a plan", "+ Add widget". */
.allbtn{height:28px; padding:0 10px; font-size:var(--t-xs); font-weight:500;
  color:var(--ink-2); background:transparent; border:1px solid var(--ctl-line);
  border-radius:var(--r-sm)}
.allbtn:hover{color:var(--ink); background:transparent; border-color:var(--ink)}
.allbtn.more{display:inline-flex; margin-top:var(--s3)}
.linkbtn{border:0; background:none; padding:0; height:auto; font:inherit;
  font-size:var(--t-xs); font-weight:500; color:var(--accent-ink); cursor:pointer}
.linkbtn:hover{text-decoration:underline; background:none}

/* Step controls: ← → and "This Week". */
.wkbtn{height:30px; min-width:30px; padding:0 10px; font-size:var(--t-xs);
  color:var(--ink-2); background:transparent; border:1px solid var(--ctl-line)}
.wkbtn:hover{color:var(--ink); border-color:var(--ink)}
.wkbtn svg{display:block}
.wkbtn.icon{padding:0; width:30px}
.wkbtn.wknow{color:var(--bg); border-color:var(--ink); background:var(--ink)}
.wkbtn.wknow:hover:not(:disabled){background:var(--ink-2); border-color:var(--ink-2)}
.wkbtn.wknow:disabled{color:var(--ink-3); background:transparent; border-color:var(--line-soft);
  opacity:1; cursor:default}

/* Text fields, selects, textareas: one shape everywhere. */
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"])),
select,textarea{
  font:inherit; font-size:var(--t-sm); color:var(--ink);
  background:var(--field); border:1px solid var(--ctl-line); border-radius:var(--r-sm);
  transition:border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"])),
select{height:var(--ctl-h); padding:0 10px}
textarea{padding:var(--s2) 10px; line-height:1.5}
input::placeholder,textarea::placeholder{color:var(--ink-3); opacity:1}
input:focus,select:focus,textarea:focus{border-color:var(--accent);
  box-shadow:0 0 0 1px var(--accent)}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none}
input[type="checkbox"],input[type="radio"]{accent-color:var(--accent);
  width:16px; height:16px; margin:0; cursor:pointer}
input[type="color"]{width:36px; height:30px; padding:2px; cursor:pointer;
  border:1px solid var(--ctl-line); border-radius:var(--r-sm); background:var(--field)}
/* A native select opens the OS's own menu, but its CLOSED state is ours. */
select{appearance:none; -webkit-appearance:none; padding-right:30px; cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-3) 50%),
                   linear-gradient(135deg,var(--ink-3) 50%,transparent 50%);
  background-position:calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size:5px 5px, 5px 5px; background-repeat:no-repeat}
select option{background:var(--surface-solid); color:var(--ink)}

.formrow{display:flex; align-items:center; gap:var(--s2); flex-wrap:wrap}
.formrow .grow{flex:1 1 200px; min-width:0}
.formrow .fixed-xs{width:76px; text-align:center; flex:none}
.formrow .fixed-sm{width:104px; text-align:right; flex:none}
.formrow .datefield{flex:none}
.formrow .spacer{flex:1}
.formrow + .formrow.tight{margin-top:var(--s2)}
.inline-lbl{display:inline-flex; align-items:center; gap:6px; flex:none;
  font-size:var(--t-sm); color:var(--ink-3)}
@media (max-width:620px){ .formrow .grow{flex-basis:100%} }

/* Labelled fields (sheets, profile, review). The label is ABOVE the field. */
.f{display:block; margin-bottom:var(--s3)}
.f > span,.f .flabel{display:flex; align-items:baseline; justify-content:space-between;
  gap:var(--s2); font-size:var(--t-xs); font-weight:500; color:var(--ink-2); margin-bottom:6px}
.f input,.f select,.f > select{width:100%}
.f.chk{display:flex; align-items:center; gap:var(--s2); font-size:var(--t-sm);
  color:var(--ink-2); margin-bottom:var(--s3)}
.f.chk input{width:16px}
.frow{display:flex; gap:var(--s2); align-items:flex-end}
.frow .f{flex:1; min-width:0}
.frow > input{flex:1; min-width:0}
.fld{display:block; margin-top:var(--s3)}
.fld > span{display:flex; align-items:center; gap:var(--s2); font-size:var(--t-xs);
  font-weight:500; color:var(--ink-2); margin-bottom:6px}
.fld select{width:100%}
.sheet-act{display:flex; justify-content:flex-end; gap:var(--s2); margin-top:var(--s4)}
.toggle{display:inline-flex; align-items:center; gap:6px; color:var(--ink-2);
  font-size:var(--t-sm); cursor:pointer}

/* Segmented controls: calendar zoom, training tabs. */
.zoom,.tabs{display:inline-flex; gap:2px; padding:2px; width:max-content;
  background:var(--bg); border:1px solid var(--line-soft); border-radius:var(--r-sm)}
.tab{height:28px; padding:0 12px; font-size:var(--t-sm); color:var(--ink-2);
  background:transparent; border:0; border-radius:var(--r-xs)}
.tab:hover{color:var(--ink); background:transparent}
.tab.on{background:var(--surface); color:var(--ink); font-weight:600;
  box-shadow:0 0 0 1px var(--line-soft)}

/* Filter chips (to-do categories) and mode chips (calendar filters). */
.chipbar,.modes{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:var(--s3)}
.chip,.mode{height:26px; padding:0 10px; font-size:var(--t-xs); font-weight:500;
  color:var(--ink-2); background:transparent; border:1px solid var(--line-soft);
  border-radius:var(--r-pill)}
.chip:hover,.mode:hover{color:var(--ink); border-color:var(--ctl-line)}
.chip.on,.mode.on{background:var(--accent-soft); border-color:var(--accent-soft);
  color:var(--accent-ink); font-weight:600}
.chip.empty{opacity:.6; font-style:italic}

/* ---------- the date field ----------
   The native input stays in the DOM (forms read its value, and it owns the
   picker) but is invisible; the button is what you see and click. Write it
   with `LS.setDate`, never `el.value =` — assigning fires no event. */
.datefield{position:relative; display:inline-flex}
.datefield input[type="date"]{position:absolute; inset:0; width:100%; height:100%;
  opacity:0; pointer-events:none; border:0; padding:0; margin:0}
.datebtn{height:var(--ctl-h); padding:0 12px; gap:var(--s2); white-space:nowrap;
  font-weight:400; color:var(--ink); background:var(--field); border:1px solid var(--ctl-line)}
.datebtn:hover{border-color:var(--accent); background:var(--field)}
.datebtn svg{flex:none; color:var(--ink-3)}
.datebtn.is-today svg{color:var(--accent)}
.datebtn.is-empty{color:var(--ink-3)}
.f .datefield{display:flex; width:100%}
.f .datebtn{width:100%; justify-content:flex-start}
.dateclear{position:absolute; right:-6px; top:-6px; width:18px; height:18px; padding:0;
  border-radius:50%; border:1px solid var(--line-soft); background:var(--surface-solid);
  color:var(--ink-3); font-size:12px; line-height:1}
.dateclear:hover{color:var(--danger); border-color:var(--danger)}
/* Without showPicker the hidden field cannot be opened, so it is handed back. */
.datefield.native input[type="date"]{position:static; opacity:1; pointer-events:auto;
  width:auto; height:var(--ctl-h); padding:0 10px}
.datefield.native .datebtn{display:none}

/* Edit in place: the words carry a text cursor and become a field when clicked. */
.editable{cursor:text; border-radius:var(--r-xs)}
.editable:hover{text-decoration:underline dotted var(--ink-3); text-underline-offset:3px}
.inline-edit{height:auto!important; padding:2px 6px!important; width:100%; min-width:60px;
  font-size:inherit!important; border-color:var(--accent)!important}
select.inline-edit{width:auto; min-width:110px; padding-right:28px!important}
input.inline-edit[type=date]{width:auto}
.inline-edit.tiny{width:70px}

/* =========================================================================
   Chrome: the top bar
   ========================================================================= */
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:var(--s3);
  height:var(--bar-h); padding:0 var(--s4); position:sticky; top:0; z-index:20;
  flex:none; isolation:isolate; background:transparent;
}
/* The glass goes on a ::before, NEVER on the bar. `backdrop-filter` makes an
   element a containing block for position:fixed descendants, and the search
   hits, the course menu and the timer panel are fixed and live in here —
   blurring the bar would re-anchor all three to it, silently. */
.topbar::before{content:""; position:absolute; inset:0; z-index:-1;
  background:color-mix(in srgb,var(--bg) 82%,transparent);
  -webkit-backdrop-filter:blur(16px) saturate(1.3); backdrop-filter:blur(16px) saturate(1.3);
  box-shadow:inset 0 -1px 0 var(--line-soft)}
.brand{display:flex; align-items:center; gap:var(--s4); min-width:0; flex:1}
.controls{display:flex; align-items:center; gap:2px; flex:none}

/* The brandmark. Agenda is a coloured mark, so it needs no tile; the wordmark is
   the one place type is set by hand. */
.brandmark{display:inline-flex; align-items:center; gap:10px; text-decoration:none;
  color:var(--ink); flex:none; border-radius:var(--r-sm)}
.brandmark .mark{width:26px; height:26px; flex:none; transition:transform var(--med) var(--ease)}
.brandmark:hover .mark{transform:translateX(2px)}
.brandmark .word{font:400 21px/1 var(--serif); letter-spacing:.06em; color:var(--ink)}
/* In the bar the wordmark goes first when space runs out: a destination you
   cannot see is worth more than a logotype you can. */
@media (max-width:1180px){ .topbar .brandmark .word{display:none} }

/* The nav: links scroll, the picker and the search never do. */
.views{display:flex; align-items:center; gap:var(--s2); min-width:0; flex:1}
.views > .views-links{flex:1 1 auto}
.views > .coursepick{flex:0 1 auto; min-width:0}
.views-links{display:flex; align-items:center; gap:2px; min-width:0;
  overflow-x:auto; scrollbar-width:none}
.views-links::-webkit-scrollbar{display:none}
/* Fade an edge only when something is behind it — nav.js toggles these. */
.views-links.has-more{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 22px),transparent);
  mask-image:linear-gradient(90deg,#000 calc(100% - 22px),transparent)}
.views-links.has-before{-webkit-mask-image:linear-gradient(90deg,transparent,#000 22px);
  mask-image:linear-gradient(90deg,transparent,#000 22px)}
.views-links.has-before.has-more{
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 22px,#000 calc(100% - 22px),transparent);
  mask-image:linear-gradient(90deg,transparent,#000 22px,#000 calc(100% - 22px),transparent)}
.view{display:inline-flex; align-items:center; height:32px; padding:0 10px;
  font-size:var(--t-sm); font-weight:500; color:var(--ink-2); text-decoration:none;
  border-radius:var(--r-sm); white-space:nowrap;
  transition:color var(--fast) var(--ease), background-color var(--fast) var(--ease)}
/* Plain words, as on the reference's nav. The page you are on is in full ink
   with a short orange rule under it: current, so it is the accent's. */
.view{position:relative}
.view:hover{color:var(--ink); background:transparent}
.view.on{color:var(--ink); background:transparent; font-weight:500}
.view.on::after{content:""; position:absolute; left:10px; right:10px; bottom:3px; height:1.5px;
  background:var(--accent)}
.views .morebtn{height:32px; border:0; background:transparent; line-height:inherit}
.views .morebtn:hover{background:transparent; color:var(--ink)}
.views .morebtn.on{background:transparent; color:var(--ink)}
.navhits.moremenu .nh{grid-template-columns:1fr}

/* The course picker and the search box sit together, so they are one control:
   same height, same padding, same border. It is a button plus our own popover,
   not a native <select>, whose menu ignores the theme. */
.coursepick{position:relative; display:inline-flex}
.views .course-jump{height:var(--ctl-h); width:112px; min-width:88px; flex:0 1 auto;
  justify-content:space-between; padding:0 10px 0 12px; font-weight:400;
  color:var(--ink-2); background:var(--field); border:1px solid var(--ctl-line)}
.views .course-jump::after{content:""; width:6px; height:6px; margin-left:var(--s2);
  border-right:1.5px solid var(--ink-3); border-bottom:1.5px solid var(--ink-3);
  transform:translateY(-2px) rotate(45deg); flex:none}
.views .course-jump:hover,.views .course-jump[aria-expanded="true"]{color:var(--ink);
  border-color:var(--accent); background:var(--field)}
.views .course-jump.wide,.views .course-jump.on{width:128px; color:var(--ink); font-weight:600}

.navsearch{position:relative; display:inline-flex; min-width:0; flex:0 8 auto}
.navsearch input{width:180px; min-width:80px; max-width:100%;
  padding-left:32px!important; transition:width var(--med) var(--ease), border-color var(--fast) var(--ease);
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%238b929d'><path d='M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z'/></svg>");
  background-repeat:no-repeat; background-position:10px 50%; background-size:14px 14px}
.navsearch input:focus{width:260px}
.navsearch input::-webkit-search-cancel-button{-webkit-appearance:none}

/* One popover shape for search hits, the course menu, More, the widget menu
   and the timer; placed by `LS.placeFixed`. In the notebook language, like
   the event sheet: the page's ground, a thin frame, and one ruled line per
   row. The current row is marked by an accent edge, not a blue slab. */
.navhits{position:absolute; top:calc(100% + 6px); right:0; width:min(430px,78vw);
  max-height:62vh; overflow-y:auto; z-index:60; padding:0;
  background:var(--bg); border:1px solid color-mix(in srgb,var(--line) 70%,transparent);
  border-radius:var(--r-xs); box-shadow:var(--shadow);
  animation:ls-pop var(--med) var(--ease)}
:root[data-theme="light"] .navhits{background:var(--surface-solid)}
@keyframes ls-pop{from{opacity:0; transform:translateY(-4px)}}
.nh{display:grid; grid-template-columns:74px minmax(0,1fr) auto; gap:var(--s3);
  align-items:center; min-height:40px; padding:6px 14px; border-radius:0;
  border-bottom:1px solid var(--line-soft); text-decoration:none; color:var(--ink)}
.nh:last-child{border-bottom:0}
.nh:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}
.nh:focus-visible{background:color-mix(in srgb,var(--ink) 5%,transparent);
  outline:2px solid var(--accent); outline-offset:-2px}
.nh.on{background:color-mix(in srgb,var(--accent) 7%,transparent); box-shadow:inset 2px 0 0 var(--accent)}
.nh.on .nh-label{color:var(--accent-ink)}
.nh-kind{font-size:var(--t-xs); color:var(--ink-3)}
.nh-label{font-size:var(--t-sm); font-weight:500; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap}
.nh-when{font-size:var(--t-xs); color:var(--ink-3); white-space:nowrap}
.nh-empty{padding:12px 14px; font-size:var(--t-xs); color:var(--ink-3)}
/* Courses: the colour as the same 3px tick the Week page draws, the code
   bold, the name quiet beside it. */
.navhits.coursemenu .nh{grid-template-columns:3px 64px minmax(0,1fr); gap:var(--s3)}
.navhits.coursemenu .sw{width:3px; height:18px; border-radius:2px}
.navhits.coursemenu .nh-label{font-weight:600; white-space:nowrap}
.navhits.coursemenu .nh-sub{font-size:var(--t-xs); color:var(--ink-3);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}


/* Sync spins while it runs; that and "synced just now" is all it says. */
@keyframes ls-spin{to{transform:rotate(360deg)}}
#chrome-sync.spin svg{animation:ls-spin .9s linear infinite}
#chrome-sync:disabled{opacity:.7}

/* ---------- the study timer ----------
   Idle it shows the stopwatch; running it shows the MINUTES. Which of the two
   is decided off `.on` in CSS — `hidden` on an <svg> reflects to nothing. */
.studytimer{position:relative; display:inline-flex}
.studytimer .st-t{font-size:var(--t-xs); font-weight:600; line-height:1}
.studytimer.on .st-i{display:none}
.studytimer:not(.on) .st-t{display:none}
.studytimer.on .st-face{color:var(--ink)}
.studytimer.running .st-face{color:var(--accent-ink); background:var(--accent-soft)}
.stpanel{padding:var(--s3); display:grid; gap:var(--s3)}
.stpanel .st-big{font-size:var(--t-2xl); font-weight:600; line-height:1; letter-spacing:-.01em}
.stpanel .st-course{display:flex; align-items:center; gap:var(--s2);
  font-size:var(--t-xs); color:var(--ink-3)}
.stpanel .st-course select{flex:1; min-width:0}
.stpanel .st-acts{display:flex; flex-wrap:wrap; gap:6px}
.stpanel .st-acts button{flex:1 1 auto}
.stpanel .st-drop{flex:0 0 auto; color:var(--ink-3)}
.stpanel .st-drop:hover{color:var(--danger)}
.stpanel .st-hint{margin:0; font-size:var(--t-xs); color:var(--ink-3)}

/* ---------- notifications: toasts ----------
   Over the page, never in it. A bar at the top of the page pushed everything
   below it down the moment something was announced — the page jumped under
   the cursor. Now: a stack in the bottom-right corner, newest at the bottom,
   sliding up into place and fading out when it goes. #banner is what you just
   did (it leaves by itself); #warnings is a state that stays until dismissed,
   with an amber edge. See LS.banner / LS.toastShow in common.js. */
.toasts{position:fixed; right:var(--s5); bottom:calc(var(--s5) + env(safe-area-inset-bottom, 0px));
  z-index:90; display:flex; flex-direction:column; gap:var(--s2);
  width:min(360px, calc(100vw - var(--s4) * 2)); pointer-events:none}
.toasts > *{pointer-events:auto}
/* Solid, not glass: a notification is read, and text over a blurred page is
   harder to read than text on a surface. One edge colour, and only where it
   means something — a warning. */
.banner,.warnbar{position:relative; display:flex; align-items:center; gap:var(--s3);
  padding:10px 8px 10px var(--s4); font-size:var(--t-sm); line-height:1.4; overflow:hidden;
  color:var(--ink); background:var(--surface-solid); border:1px solid var(--line-soft);
  border-radius:var(--r-md); box-shadow:var(--shadow)}
.banner > span{flex:1}
.warnbar{align-items:flex-start; box-shadow:var(--shadow), inset 3px 0 0 var(--warn)}
.warnbar > div{flex:1}
.warnbar code{font-size:var(--t-xs); background:var(--surface-2); padding:1px 5px;
  border-radius:var(--r-xs)}
/* The time Undo has left, along the bottom edge; it pauses while hovered. */
.toast-timer{position:absolute; left:0; right:0; bottom:0; height:2px; background:var(--accent);
  transform-origin:left; animation:toast-time linear forwards}
.banner:hover .toast-timer{animation-play-state:paused}
@keyframes toast-time{from{transform:scaleX(1)} to{transform:scaleX(0)}}
.bannerx{height:28px; min-width:28px; padding:0 8px; border:0; background:none;
  color:var(--ink-3); font-size:16px; line-height:1}
.bannerx:hover{color:var(--ink); background:var(--surface-2)}
.bannerx.undo{font-size:var(--t-sm); font-weight:600; color:var(--accent-ink);
  background:var(--accent-soft); padding:0 12px}
.bannerx.undo:hover{background:var(--accent); color:var(--on-accent)}
@media (max-width:640px){
  .toasts{left:var(--s4); right:var(--s4); width:auto} }
/* A note that belongs IN the page (the course page's "this plan is a demo"). */
.inline-note{display:block; width:calc(100% - var(--s6) * 2); max-width:var(--page-max);
  margin:var(--s4) auto 0; padding:var(--s3) var(--s4); font-size:var(--t-sm);
  border-radius:0; border:1px solid var(--line-soft); background:var(--surface);
  box-shadow:inset 3px 0 0 var(--warn)}

/* =========================================================================
   Page layout
   ========================================================================= */
main{flex:1; display:flex; min-height:0}
.dash{flex:1; overflow:auto; display:flex; flex-direction:column; gap:var(--s4);
  width:100%; max-width:calc(var(--page-max) + var(--s6) * 2); margin:0 auto;
  padding:var(--s6) var(--s6) var(--s8)}
/* `.dash` is a viewport-height flex COLUMN in the bar shell, so its cards are
   flex items — and a flex item with overflow:hidden shrinks to nothing when the
   column runs out of room. `flex:none` stops any card being compressed. */
.dash > *{flex:none}
.dash-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--s4);
  align-items:start}
.dash-col{display:flex; flex-direction:column; gap:var(--s4); min-width:0}
@media (max-width:980px){ .dash-grid{grid-template-columns:minmax(0,1fr)} }

/* ---------- the page header ----------
   Every page opens with ONE section that is clearly its own: the title, a line
   of context, the page's own navigation on the right, and — where the page has
   them — its key numbers under a divider. It used to be a heading and a row of
   figures loose on the ground above the cards, which read as leftovers rather
   than as the top of the page.

   A band, not a card: the same frame, a faint wash of the accent so it never
   reads as one more card among the others, and a bigger title. */
/* Not boxed. A framed band read as one more widget — "AI slop", in the words
   of the person who uses it — where the page's title should read as the
   page. It sits on the ground; the cards below are the boxes. */
.dash-hero{display:flex; flex-direction:column; gap:var(--s4); padding:var(--s2) 0 0}
.hero-head{display:flex; align-items:center; gap:var(--s2) var(--s3); flex-wrap:wrap;
  min-height:36px}
.hero-head h1{font:400 40px/1.1 var(--serif); letter-spacing:-.015em}
.hero-head .sub,.hero-head .when{color:var(--ink-3); font-size:var(--t-sm)}
.hero-head .spacer{flex:1}
/* The second row: the numbers, and on the dashboard the week they are for. */
.hero-body{padding-top:0}
div.hero-body{display:flex; align-items:flex-end; justify-content:space-between;
  gap:var(--s4) var(--s6); flex-wrap:wrap}
div.strip.hero-body{display:flex; justify-content:flex-start; align-items:flex-start}
.dash-hero .strip .v{font-size:var(--t-xl)}
.dash-hero .tabs{margin-top:calc(var(--s1) * -1)}
.dash-hero .planrow.bare{display:flex; padding-top:var(--s3)}
.dash-hero textarea.planrow-t{font-size:var(--t-lg)}

/* What a page hangs in the global bar (the course page's name and switcher)
   is moved onto the page by nav.js, into this. */
.pagehead{display:flex; align-items:center; gap:var(--s3); flex-wrap:wrap; flex:none;
  width:calc(100% - var(--s6) * 2); max-width:var(--page-max); margin:var(--s6) auto 0;
  padding:var(--s2) 0 var(--s3)}
.pagehead:empty{display:none}
.pagehead-left{display:flex; align-items:center; gap:var(--s2) var(--s3); min-width:0; flex:1;
  flex-wrap:wrap}
.pagehead-right{display:flex; align-items:center; gap:var(--s2); flex:none}
.pagehead-right:empty{display:none}
.pagehead-left h1,.pagehead-left strong{font:400 48px/1.1 var(--serif); letter-spacing:-.015em}
.pagehead .muted{font-size:var(--t-sm)}
/* The course page's numbers continue the same band: the head loses its bottom
   corners, the stat bar takes them, and a divider runs between the two. */


/* ---------- the stat strip ----------
   Numbers on the page, not boxed. The label is above, quiet; the figure is
   the thing. A figure is coloured only when it is off track. */
.strip{display:flex; flex-wrap:wrap; gap:var(--s4) var(--s7)}
.strip > *{min-width:0}
.strip .k{font-size:var(--t-xs); font-weight:500; color:var(--ink-3)}
.strip .v{font-size:var(--t-2xl); font-weight:600; letter-spacing:-.02em; line-height:1.2}
.strip .v.warn{color:var(--warn)}
.strip .v.quiet{color:var(--ink-3); font-weight:500}
.strip a.jump{text-decoration:none; color:inherit; border-radius:var(--r-sm);
  margin:-4px -8px; padding:4px 8px; transition:background-color var(--fast) var(--ease)}
.strip a.jump:hover{background:var(--surface)}
.strip a.jump .v::after{content:"›"; font-weight:400; color:var(--ink-3); margin-left:4px;
  font-size:var(--t-lg); vertical-align:2px}

/* ---------- cards ----------
   Flat. A card is a panel with a hairline, no shadow — elevation is kept for
   things that float. Rows inside a card are divided, never boxed again. */
.card{background:var(--surface); border:1px solid var(--line-soft);
  border-radius:0; padding:var(--s4) var(--s5) var(--s5); margin:0; min-width:0}
.card > h2,.card details.fold > summary{display:flex; align-items:center; gap:var(--s2);
  min-height:28px; margin:0 0 var(--s3); font:400 20px/1.15 var(--serif);
  color:var(--ink); letter-spacing:-.01em}
.card > h2 .n,.card > h2 .muted,.card > h2 .sub,.card > h2 .allbtn,.card > h2 button,
.card details.fold > summary .muted{font-family:var(--sans); font-size:var(--t-sm); font-weight:400;
  letter-spacing:0; color:var(--ink-3)}
.card > h2 .allbtn,.card > h2 button{font-size:var(--t-xs); color:var(--ink-2)}
/* The last thing in a heading (Open, Review, Table) sits at the right edge. */
.card > h2 > .allbtn:last-child,.card > h2 > a.allbtn,.card > h2 > .tgt-edit,
.card > h2 > .planbtns{margin-left:auto}
h2 .cardlink{font-size:var(--t-xs); font-weight:400; margin-left:var(--s2)}
h2 .muted.sub{font-size:var(--t-xs); font-weight:400}

.pill{display:inline-grid; place-items:center; min-width:20px; height:20px; padding:0 6px;
  border-radius:var(--r-pill); background:var(--danger); color:var(--on-accent);
  font-size:var(--t-xs); font-weight:600; line-height:1}
:root[data-theme="light"] .pill{color:#fff}
#deadline-count{background:var(--fill); color:var(--ink-2)}
#deadline-count.late{background:var(--danger); color:var(--on-accent)}
:root[data-theme="light"] #deadline-count.late{color:#fff}
.nothing{margin:0; color:var(--ink-3); font-size:var(--t-sm)}
.card p.muted{font-size:var(--t-sm)}
.swatch{width:10px; height:10px; border-radius:3px; flex:none; display:inline-block}
.swatch.big{width:12px; height:12px}
.urgent{color:var(--danger); font-weight:600}
.back{color:var(--ink-3); text-decoration:none; font-size:var(--t-sm)}
a.courselink{text-decoration:none; color:inherit}
.prompts{margin:0 0 var(--s4); padding-left:18px; color:var(--ink-2); font-size:var(--t-sm)}
.prompts li{margin-bottom:var(--s1)}

/* ---------- folds ---------- */
details.fold > summary,details.clashes > summary{cursor:pointer; list-style:none;
  display:flex; align-items:center; gap:var(--s2); user-select:none;
  border-radius:var(--r-sm)}
details.fold > summary::-webkit-details-marker,
details.clashes > summary::-webkit-details-marker{display:none}
details.fold > summary::before,details.clashes > summary::before{content:""; flex:none;
  width:6px; height:6px; margin:0 2px; border-right:1.5px solid var(--ink-3);
  border-bottom:1.5px solid var(--ink-3); transform:rotate(-45deg);
  transition:transform var(--fast) var(--ease)}
details.fold[open] > summary::before,details.clashes[open] > summary::before{
  transform:rotate(45deg) translate(-1px,-1px)}
details.fold > summary:hover{color:var(--ink)}

/* ---------- rows ----------
   Every list is rows with a hairline between them. No zebra: the hairline and
   the aligned columns already separate the rows, and banding fought the
   status spine on the left. */
.row,.tl,.dl,.cd,.goal,.note,.sess,.mrow,.habit,.crow,.catrow,.feedrow{
  display:flex; gap:var(--s3); align-items:baseline; padding:10px 0;
  border-bottom:1px solid var(--line-soft); font-size:var(--t-sm); min-width:0}
.row:last-child,.tl:last-child,.dl:last-child,.cd:last-child,.goal:last-child,
.note:last-child,.sess:last-child,.mrow:last-child,.habit:last-child,
.crow:last-child,.catrow:last-child,.feedrow:last-child{border-bottom:0}
.row .when,.dl .when,.mrow .when{color:var(--ink-3); width:72px; flex:none}
.row .what,.dl .what,.tl .what,.mrow .what{flex:1; min-width:0}
.row .rt,.dl .rt,.crow .rt{font-size:var(--t-xs); color:var(--ink-3); flex:none}
.what .sub,.row .sub,.tl .sub{font-size:var(--t-xs); color:var(--ink-3); margin-top:2px}
/* A delete takes no space in the eye until you hover the row it belongs to. */
.row .del,.dl .del,.goal .del,.note button,.mrow .del,.habit .del,.catrow .del,
.feedrow .del,.todo .del,.wk .del,.planrow .del{
  height:24px; min-width:24px; padding:0 4px; opacity:0; flex:none; align-self:center;
  border:0; background:none; color:var(--ink-3); font-size:16px; line-height:1}
.row:hover .del,.dl:hover .del,.goal:hover .del,.note:hover button,.mrow:hover .del,
.habit:hover .del,.catrow:hover .del,.feedrow:hover .del,.todo:hover .del,
.planrow:hover .del,.planrow:focus-within .del,
.row .del:focus-visible,.dl .del:focus-visible,.todo .del:focus-visible,
.mrow .del:focus-visible,.note button:focus-visible{opacity:1}
.row .del:hover,.dl .del:hover,.mrow .del:hover,.catrow .del:hover,.feedrow .del:hover,
.todo .del:hover,.wk .del:hover,.planrow .del:hover,.habit .del:hover{
  color:var(--danger); background:none}
.wk .del{opacity:1}

/* The day's agenda (dashboard Today, the Today page). */
.tl{align-items:flex-start}
.tl .when{color:var(--ink-2); width:96px; flex:none; font-weight:500}
.tl .dot{width:3px; align-self:stretch; min-height:18px; border-radius:2px; flex:none}
.tl .what{color:var(--ink); font-weight:500}
.tl.skipped .what{color:var(--ink-3); font-weight:400; text-decoration:line-through;
  text-decoration-color:var(--ink-3)}
.tl.skipped .when{color:var(--ink-3); font-weight:400}
.tl.skipped .dot{opacity:.35}
/* `is-` because `.now` is the calendar's now-line, which is absolutely
   positioned: an agenda row wearing it was lifted out of the list. */
.tl.is-past .when,.tl.is-past .what{color:var(--ink-3)}
.tl.is-now .when{color:var(--accent-ink); font-weight:600}
.tl.is-now{box-shadow:inset 3px 0 0 var(--accent); margin-left:calc(var(--s3) * -1);
  padding-left:var(--s3); background:linear-gradient(90deg,var(--accent-soft),transparent 60%)}
.tl.block .what{color:var(--ink-2); font-style:italic}
.tl.done .what{color:var(--ink-2)}
.tl .tag{margin-left:var(--s2)}
/* Skipped sessions fold into one line at the end of the agenda. */
.skipfold{margin-top:var(--s1)}
.skipfold > summary{display:flex; align-items:center; gap:var(--s2); padding:var(--s2) 0;
  cursor:pointer; list-style:none; font-size:var(--t-xs); color:var(--ink-3)}
.skipfold > summary::-webkit-details-marker{display:none}
.skipfold > summary::before{content:""; flex:none; width:5px; height:5px; margin:0 3px;
  border-right:1.5px solid var(--ink-3); border-bottom:1.5px solid var(--ink-3);
  transform:rotate(-45deg); transition:transform var(--fast) var(--ease)}
.skipfold[open] > summary::before{transform:rotate(45deg)}
.skipfold > summary:hover{color:var(--ink)}
.dayrow{cursor:pointer; border-radius:var(--r-sm)}
.dayrow:hover{background:var(--surface-2)}

/* Clickable summary lines: they hover and carry a chevron. */
.linkrow{display:flex; align-items:center; gap:var(--s3); padding:10px var(--s3);
  margin:0 calc(var(--s3) * -1); border-radius:var(--r-sm); text-decoration:none;
  color:var(--ink); transition:background-color var(--fast) var(--ease)}
.linkrow + .linkrow{border-top:1px solid var(--line-soft)}
.linkrow:hover{background:var(--surface-2)}
.linkrow .lr-k{font-size:var(--t-sm); color:var(--ink); font-weight:600; flex:none; min-width:72px}
.linkrow .lr-v{font-size:var(--t-sm); color:var(--ink-2); flex:1; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.linkrow .lr-v .sub{font-size:var(--t-xs)}
.linkrow .lr-n{font-size:var(--t-sm); font-weight:600; flex:none}
.lr-n.in{color:var(--ok)}
.linkrow::after{content:""; flex:none; width:6px; height:6px; margin-right:2px;
  border-right:1.5px solid var(--ink-3); border-top:1.5px solid var(--ink-3);
  transform:rotate(45deg); transition:transform var(--fast) var(--ease)}
.linkrow:hover::after{border-color:var(--accent); transform:translateX(2px) rotate(45deg)}

/* Progress bars. Global, never scoped to a container, and a fill is display:
   block — width on an inline <span> is ignored. */
.minitrack,.bigtrack,.cp .track,.goal .track,.macro .mt{display:block; overflow:hidden;
  background:var(--line-soft); border-radius:0}
.minitrack{display:inline-block; vertical-align:middle; width:84px; height:6px;
  margin-right:var(--s2)}
.minitrack.wide{width:100%; height:8px}
.minitrack .fill,.bigtrack .fill,.cp .fill,.goal .track .fill,.macro .mf{display:block;
  height:100%; background:var(--ink); border-radius:0}
.minitrack .fill{background:var(--ok)}
.minitrack .fill.behind,.minitrack .fill.out,.bigtrack .fill.warn{background:var(--warn)}
.bigtrack{height:8px; margin-top:var(--s2)}

/* Course progress rows (dashboard Courses, calendar Coursework). */
.cp{display:flex; align-items:center; gap:var(--s3); font-size:var(--t-sm); padding:6px 0;
  text-decoration:none; color:inherit}
a.cp:hover .code{color:var(--accent-ink)}
.cp .code{width:64px; flex:none; font-weight:600}
.cp .track{flex:1; height:3px}
.cp .num{flex:none; color:var(--ink-3); font-size:var(--t-xs); width:64px; text-align:right}
.cp.behind .fill{background:var(--warn)}
.cp.behind .num{color:var(--warn); font-weight:600}

/* Countdowns (exams). The number carries it; red only when it is close. */
.cd{align-items:center; gap:var(--s4); padding:12px 0}
.cd .n{font:400 30px/1 var(--serif); width:44px; flex:none; text-align:right;
  letter-spacing:-.02em; line-height:1}
.cd .n.soon{color:var(--danger)}
.cd .u{font-size:var(--t-xs); color:var(--ink-3); flex:none; width:28px}
.cd .what{flex:1; min-width:0; color:var(--ink); font-weight:500}
.tag{display:inline-flex; align-items:center; height:20px; padding:0 8px; flex:none;
  font-size:var(--t-xs); font-weight:500; color:var(--ink-2);
  border:1px solid var(--line-soft); border-radius:var(--r-pill)}
.tag.final,.cd .tag.final{color:var(--warn); border-color:currentColor}
.tag.ok{color:var(--ok); border-color:currentColor}
.tag.over{color:var(--danger); border-color:currentColor}

/* ---------- notices ----------
   Ranked, few, and the whole card is the target. One line of claim, one line
   of the number behind it. */
.notices{display:flex; flex-direction:column; gap:var(--s2)}
#notices .notices{margin-bottom:0}
.notice{display:grid; grid-template-columns:8px minmax(0,1fr) auto; column-gap:var(--s3);
  align-items:center; text-decoration:none; color:inherit;
  background:var(--surface); border:1px solid var(--line-soft); border-radius:0;
  padding:var(--s3) var(--s4); transition:background-color var(--fast) var(--ease),
  border-color var(--fast) var(--ease)}
.notice::before{content:""; grid-column:1; grid-row:1 / span 2; width:8px; height:8px;
  border-radius:50%; background:var(--ink-3)}
.notice.rank-0::before{background:var(--danger)}
.notice.rank-1::before{background:var(--warn)}
.notice.rank-2::before{background:var(--accent)}
.notice .nt{grid-column:2; font-weight:600; font-size:var(--t-sm); color:var(--ink)}
.notice .nd{grid-column:2; color:var(--ink-3); font-size:var(--t-xs); margin-top:2px; max-width:80ch}
a.notice:hover{background:var(--surface-2); border-color:var(--ctl-line)}
a.notice::after{content:""; grid-column:3; grid-row:1 / span 2; width:6px; height:6px;
  margin-right:2px; border-right:1.5px solid var(--ink-3); border-top:1.5px solid var(--ink-3);
  transform:rotate(45deg); transition:transform var(--fast) var(--ease)}
a.notice:hover::after{border-color:var(--accent); transform:translateX(2px) rotate(45deg)}
.notice .nl{display:inline-block; margin-top:var(--s1); font-size:var(--t-xs);
  color:var(--accent-ink); text-decoration:none}

/* =========================================================================
   Floating layers: popover, modal sheet, annotation, chart tip
   ========================================================================= */
.detail,.sheet,.annot{background:var(--glass); border:1px solid var(--line-soft);
  border-radius:var(--r-md); box-shadow:var(--shadow), inset 0 1px 0 var(--hi);
  -webkit-backdrop-filter:blur(20px) saturate(1.3); backdrop-filter:blur(20px) saturate(1.3)}
.detail{position:fixed; z-index:40; padding:var(--s4); max-width:360px; font-size:var(--t-sm);
  animation:ls-pop var(--med) var(--ease)}
.detail h3{margin:0 0 var(--s1); font-size:var(--t-md)}
.detail dl{margin:var(--s3) 0 0; display:grid; grid-template-columns:auto 1fr; gap:4px var(--s3)}
.detail dt{color:var(--ink-3); font-size:var(--t-xs)}
.detail dd{margin:0; font-size:var(--t-sm)}
.detail .act{margin-top:var(--s4); display:flex; gap:6px; flex-wrap:wrap}
.detail .act .btn{text-decoration:none}

.modal{position:fixed; inset:0; z-index:50; display:flex; align-items:flex-start;
  justify-content:center; padding-top:10vh; background:rgba(8,10,14,.55);
  overscroll-behavior:contain}
:root[data-theme="light"] .modal{background:rgba(22,26,32,.35)}
.sheet{padding:var(--s5) var(--s6); width:min(460px,92vw); max-height:84vh; overflow:auto;
  background:var(--surface-solid); animation:ls-pop var(--med) var(--ease)}
.sheet h3{margin:0 0 var(--s4); font-size:var(--t-lg)}

/* The event sheet as a page of the notebook: the page's ground, a thin
   frame like the dashboard's widgets, the title over a 2px rule, and one
   ruled line per field with no box round the input. */
.sheet.nbform{width:min(520px,92vw); padding:var(--s5) var(--s6); background:var(--bg);
  border:1px solid color-mix(in srgb,var(--line) 70%,transparent); border-radius:var(--r-xs);
  border-radius:var(--r-md); box-shadow:var(--shadow)}
:root[data-theme="light"] .sheet.nbform{background:var(--surface-solid)}
.nbform h3{margin:0; padding-bottom:8px; border-bottom:1px solid var(--ink);
  font:400 28px/1.1 var(--serif); letter-spacing:-.01em}
.nf{display:flex; align-items:center; gap:var(--s3); min-height:46px; margin:0;
  border-bottom:1px solid var(--line-soft); transition:box-shadow var(--fast) var(--ease)}
.nf:focus-within{box-shadow:inset 0 -2px 0 var(--accent)}
.nf-k{width:56px; flex:none; font-size:var(--t-sm); color:var(--ink-3)}
.nf input:not([type=checkbox]):not([type=color]),.nf select,.nf .datebtn{flex:1; min-width:0;
  height:44px; padding:0 4px; border:0; border-radius:0; background-color:transparent;
  box-shadow:none; font-size:var(--t-md); color:var(--ink)}
/* The ruled line's blue underline is the focus mark for a field here. */
.nf input:focus-visible,.nf select:focus-visible{outline:none}
.nf .datebtn:focus-visible{outline:2px solid var(--accent); outline-offset:-2px}
.nf .datefield{display:flex; flex:1; min-width:0}
.nf .datebtn{justify-content:flex-start}
.nf .datebtn:hover{background:color-mix(in srgb,var(--ink) 4%,transparent)}
#ev-title{font-weight:600}
#ev-title::placeholder{font-weight:400}
.nf-time input[type=time]{flex:0 0 auto; width:112px}
.nf-sep{font-size:var(--t-sm); color:var(--ink-3)}
.nf-chk{display:inline-flex; align-items:center; gap:var(--s2); font-size:var(--t-sm);
  color:var(--ink-2); cursor:pointer; white-space:nowrap}
.nf-time .nf-chk{margin-left:auto}
.nf.frow .nf-chk{flex:none}
.nf input:disabled,.nf .datefield:has(input:disabled) .datebtn{color:var(--ink-3)}
.nbform #cat-editor{padding:var(--s3) 0; border-bottom:1px solid var(--line-soft)}
.nbform .sheet-act{margin-top:var(--s5)}

.annot{position:fixed; z-index:60; padding:var(--s3)}
.annot-h{font-size:var(--t-sm); font-weight:600; margin-bottom:var(--s2)}
.annot-r{display:flex; gap:2px; align-items:center; margin-bottom:var(--s2)}
.annot .star{height:28px; width:28px; padding:0; border:0; background:none;
  font-size:20px; line-height:1; color:var(--line)}
.annot .star.on,.annot .star:hover{color:var(--warn); background:none}
.annot-t{width:100%; resize:vertical}
.annot-a{display:flex; justify-content:flex-end; gap:6px; margin-top:var(--s2)}

/* A few places must never be see-through: a course colour diluted by whatever
   is behind it is no longer that course's colour. */
.ev,.wkev,.chip,.mpill{-webkit-backdrop-filter:none; backdrop-filter:none}

/* No backdrop-filter, no translucency: without the blur the same alpha is a
   weak colour with the page showing through the text. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  :root[data-theme="dark"]{--glass:#282d35}
  :root[data-theme="light"]{--glass:#fbfcfd}
}

/* =========================================================================
   Calendar
   ========================================================================= */
.subbar{display:flex; align-items:center; justify-content:space-between; gap:var(--s3);
  flex-wrap:wrap; flex:none; padding:var(--s3) var(--s4); position:sticky; top:var(--bar-h);
  z-index:19; isolation:isolate; background:transparent}
/* Solid, on the page's own ground: the calendar's top row is part of the
   page, not a bar floating over it, and the lighter glass strip was what made
   it read as older than the rest. */
.subbar::before{content:""; position:absolute; inset:0; z-index:-1; background:var(--bg);
  box-shadow:inset 0 -1px 0 var(--line-soft)}
.subbar-left,.subbar-right{display:flex; align-items:center; gap:6px}
.subbar-right{gap:var(--s2)}
.subbar h1{font-size:var(--t-lg); font-weight:600; margin:0 var(--s2); white-space:nowrap}
.range{font:400 30px/1 var(--serif); letter-spacing:-.01em; color:var(--ink);
  white-space:nowrap; margin-left:var(--s3)}
.range b{font-weight:inherit; color:inherit}
.range .range-d{margin-left:var(--s2); font:400 var(--t-sm)/1 var(--sans); letter-spacing:0; color:var(--ink-3)}
#prev,#next{width:var(--ctl-h); height:var(--ctl-h); padding:0}

.calendar{flex:1; display:flex; flex-direction:column; min-width:0}
.side{width:300px; flex:none; overflow:auto; padding:var(--s4);
  background:var(--bg); border-left:1px solid var(--line-soft)}
.side .panel{margin-bottom:var(--s2); padding-bottom:var(--s2);
  border-bottom:1px solid var(--line-soft)}
.side .panel:last-child{border-bottom:0}
.side details.fold > summary,.side details.clashes > summary,.side .panel > h2{
  min-height:32px; font-size:var(--t-sm); font-weight:600; color:var(--ink);
  margin:0}
.side details[open] > summary{margin-bottom:var(--s2)}
.side .panel > h2{margin-bottom:var(--s2)}
.side details.fold > summary .muted{font-weight:400; font-size:var(--t-xs)}
body.side-away main{gap:0}
@media (max-width:900px){ main{flex-direction:column}
  .side{width:auto; border-left:0; border-top:1px solid var(--line-soft)} }

.feed{display:flex; align-items:center; gap:var(--s2); padding:4px 0; font-size:var(--t-sm)}
.feed .n{margin-left:auto; color:var(--ink-3); font-size:var(--t-xs)}
.crow{align-items:center; gap:var(--s2); padding:6px 0}
.crow .courselink{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; text-decoration:none; color:inherit}
.crow .courselink:hover{color:var(--accent-ink)}
.feedrow{align-items:center}
.feedrow .what{flex:1; min-width:0}
.feedrow .sub{display:block; font-size:var(--t-xs); color:var(--ink-3);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
#feed-editor{margin-top:var(--s2); padding-top:var(--s2); border-top:1px solid var(--line-soft)}
#feed-editor .frow{margin-top:var(--s2)}
#feed-editor p.muted{font-size:var(--t-xs); margin:var(--s2) 0}

/* the week grid */
.daynames{display:grid; grid-template-columns:56px repeat(7,minmax(0,1fr));
  background:var(--bg); border-bottom:1px solid var(--line-soft);
  position:sticky; top:0; z-index:10}
.daynames > div{padding:var(--s3) 8px 6px; text-align:left; font-size:var(--t-xs);
  display:flex; align-items:baseline; justify-content:space-between; gap:6px; min-width:0}
/* Notebook headings, as on the Week page: the numeral large on the left, the
   day's name on the right, a 2px rule under each day (accent for today). */
.daynames > div:not(:first-child){margin:0 6px; padding-left:2px; padding-right:2px;
  border-bottom:1px solid var(--ink)}
.daynames div:first-child{border-left:0}
.daynames .dow{order:2; color:var(--ink-3); font-weight:400; font-size:var(--t-sm)}
.daynames .dnum{order:1; font:400 28px/1 var(--serif); letter-spacing:-.01em; color:var(--ink)}
.daynames .is-today{border-color:var(--accent)!important; box-shadow:0 1px 0 var(--accent)}
.daynames .is-today .dnum{color:var(--on-accent); background:var(--accent-fill)}
.daynames .is-today .dow{color:var(--accent-ink)}

.allday{display:grid; grid-template-columns:56px repeat(7,minmax(0,1fr));
  border-bottom:1px solid var(--line-soft); background:var(--bg)}
.allday > div{border-left:1px solid var(--line-soft); padding:3px; min-height:28px; min-width:0}
.allday .lbl{border-left:0; font-size:var(--t-xs); color:var(--ink-3); text-align:right;
  padding-right:8px; align-self:center}
.allday .chip{display:block; height:auto; margin-bottom:2px; padding:2px 6px; cursor:pointer;
  border:0; border-left:3px solid var(--ev); border-radius:var(--r-xs);
  background:color-mix(in srgb,var(--ev) 22%,var(--surface-solid)); color:var(--ink);
  font-size:var(--t-xs); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.allday .chip.personal{background:color-mix(in srgb,var(--ev) 8%,var(--surface-solid));
  box-shadow:inset 0 0 0 1.5px var(--ev); border-left-width:0}
.allday .chip.skipped{background:transparent; color:var(--ink-3); border-left-color:var(--line);
  box-shadow:inset 0 0 0 1px var(--line-soft); text-decoration:line-through}

.scroller{flex:1; overflow:auto; background:var(--bg)}
.grid{display:flex; position:relative}
.gutter{width:56px; flex:none}
.gutter .h{height:var(--hour); position:relative}
.gutter .h span{position:absolute; top:-8px; right:8px; font-size:var(--t-xs); color:var(--ink-3)}
.days{flex:1; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); position:relative}
.day{position:relative; border-left:1px solid var(--line-soft); cursor:copy}
.day .h{height:var(--hour); border-top:1px solid var(--line-soft)}
.day.weekend{background:color-mix(in srgb,var(--ink) 5%,transparent)}
:root[data-theme="light"] .day.weekend{background:rgba(22,26,32,.03)}
.now{position:absolute; left:0; right:0; height:0; border-top:2px solid var(--accent); z-index:6}
.now::before{content:""; position:absolute; left:-5px; top:-6px; width:10px; height:10px;
  border-radius:50%; background:var(--accent)}

/* Events. Course colour is identity, so it is the SPINE and a tint; the words
   sit in full ink on top. Timetabled and hand-added differ by FORM, not hue —
   a tinted block with a spine, against an outline — which survives colour-
   blindness and a crowded week. */
.ev{position:absolute; overflow:hidden; cursor:pointer; padding:4px 6px 4px 8px;
  border-radius:var(--r-xs); color:var(--ink); font-size:var(--t-xs); line-height:1.3;
  background:color-mix(in srgb,var(--ev) 34%,var(--bg));
  box-shadow:inset 3px 0 0 var(--ev), 0 0 0 1px var(--bg);
  transition:filter var(--fast) var(--ease)}
.ev:hover{filter:brightness(1.12); z-index:8}
:root[data-theme="light"] .ev:not(.personal):not(.skipped){
  background:color-mix(in srgb,var(--ev) 18%,var(--surface-solid))}
:root[data-theme="light"] .ev:hover{filter:brightness(.97)}
.ev .t,.ev .m{display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ev .t{font-weight:400; color:var(--ink-2)}
.ev .t b{font-weight:600; color:var(--ink)}
.ev .m{color:var(--ink-2)}
.ev .badge{display:inline-block; margin-right:4px; padding:0 4px; border-radius:3px;
  background:var(--surface-solid); color:var(--ink-2); font-size:10px; font-weight:600;
  vertical-align:1px}
.ev.personal{background:color-mix(in srgb,var(--ev) 9%,var(--surface-solid));
  box-shadow:inset 0 0 0 1.5px var(--ev), 0 0 0 1px var(--bg)}
.ev.skipped{background:var(--bg); color:var(--ink-3);
  box-shadow:inset 0 0 0 1px var(--ctl-line), 0 0 0 1px var(--bg)}
.ev.skipped .m{color:var(--ink-3)}
.ev.skipped .t,.ev.skipped .t b{font-weight:500; color:var(--ink-3); text-decoration:line-through; text-decoration-color:var(--ink-3)}
:root[data-theme="light"] .ev.skipped{background:var(--bg)}
/* A clash is a dashed amber edge and a corner flag: form as well as hue. */
.ev.clash{outline:2px dashed var(--warn); outline-offset:-2px}
.ev.clash::after{content:"!"; position:absolute; top:3px; right:3px; width:14px; height:14px;
  display:grid; place-items:center; border-radius:50%; background:var(--warn);
  color:var(--bg); font-size:10px; font-weight:700; line-height:1}
.ev.exam{box-shadow:inset 3px 0 0 var(--danger), inset 0 0 0 1.5px var(--danger),
  0 0 0 1px var(--bg)}
.ev.exam .t::before{content:"Exam · "; color:var(--danger)}
.ev.block{background:transparent; box-shadow:inset 0 0 0 1px var(--ink-3)}
.ev.proposed{background:transparent; color:var(--ink-2); box-shadow:inset 0 0 0 1px var(--accent)}
.day .ev{cursor:pointer}

.evkey,.wklegend,.ykey,.termkey{display:flex; flex-wrap:wrap; align-items:center;
  gap:var(--s2) var(--s4); font-size:var(--t-xs); color:var(--ink-3)}
.evkey{padding:var(--s2) var(--s4); border-top:1px solid var(--line-soft); background:var(--bg)}
.evkey span,.wklegend span,.ykey span,.termkey span{display:inline-flex; align-items:center; gap:6px}
.evkey i,.wklegend .sw,.ykey i,.termkey i{display:inline-block; width:14px; height:10px;
  border-radius:3px; flex:none}
.evkey i.school,.wklegend .sw.solid{background:color-mix(in srgb,var(--ink-3) 30%,var(--surface-solid));
  box-shadow:inset 3px 0 0 var(--ink-3)}
.evkey i.personal,.wklegend .sw.outline{box-shadow:inset 0 0 0 1.5px var(--ink-3)}
.evkey i.planned{box-shadow:inset 0 0 0 1px var(--accent)}
.evkey i.skipped,.wklegend .sw.skip{box-shadow:inset 0 0 0 1px var(--line)}
.wklegend .sw.clash{outline:1.5px dashed var(--warn); outline-offset:-1.5px}

/* month and year */
.zoomwrap{flex:1; overflow:auto; padding:var(--s4)}
.mgrid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:1px;
  background:var(--line-soft); border:1px solid var(--line-soft); border-radius:var(--r-lg);
  overflow:hidden}
.mgrid .dow{background:var(--surface); padding:6px; font-size:var(--t-xs); font-weight:500;
  color:var(--ink-3); text-align:center}
.mcell{background:var(--surface); min-height:112px; padding:6px; position:relative;
  min-width:0; cursor:pointer; transition:background-color var(--fast) var(--ease)}
.mcell:hover{background:var(--surface-2)}
.mcell.out{background:color-mix(in srgb,var(--surface) 55%,var(--bg))}
.mcell.out .dn{color:var(--ink-3)}
.mcell .dn{display:inline-grid; place-items:center; min-width:24px; height:24px;
  font-size:var(--t-sm); font-weight:600; color:var(--ink-2); border-radius:var(--r-pill)}
.mcell.today .dn{background:var(--accent); color:var(--on-accent)}
.mcell .free{position:absolute; top:10px; right:8px; font-size:var(--t-xs); color:var(--ink-3)}
.mpill{display:block; margin-top:3px; padding:2px 6px; cursor:pointer; min-width:0;
  font-size:var(--t-xs); font-weight:500; color:var(--ink); border-radius:var(--r-xs);
  background:color-mix(in srgb,var(--ev) 22%,var(--surface-solid));
  box-shadow:inset 3px 0 0 var(--ev);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.mpill.personal{background:transparent; box-shadow:inset 0 0 0 1px var(--ev)}
.mpill.skipped{background:transparent; color:var(--ink-3); box-shadow:none;
  text-decoration:line-through}
.mpill.exam{box-shadow:inset 3px 0 0 var(--danger), inset 0 0 0 1px var(--danger)}
.mmore{display:block; margin-top:3px; font-size:var(--t-xs); color:var(--ink-3)}

.ykey{margin-bottom:var(--s4)}
.ygrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:var(--s4)}
.ymonth{background:var(--surface); border:1px solid var(--line-soft); border-radius:var(--r-lg);
  padding:var(--s3)}
.ymonth h3{font-size:var(--t-sm); margin-bottom:var(--s2); color:var(--ink)}
.ydays{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px}
.ydays .h{font-size:10px; color:var(--ink-3); text-align:center}
.yd{aspect-ratio:1; display:grid; place-items:center; border-radius:var(--r-xs);
  font-size:11px; color:var(--ink-3); background:var(--surface-2); cursor:pointer}
.yd:hover{box-shadow:inset 0 0 0 1px var(--ctl-line)}
.yd.empty{background:transparent; cursor:default; box-shadow:none}
.yd[data-load="1"]{background:color-mix(in srgb,var(--accent) 22%,var(--surface-2)); color:var(--ink-2)}
.yd[data-load="2"]{background:color-mix(in srgb,var(--accent) 45%,var(--surface-2)); color:var(--ink)}
.yd[data-load="3"]{background:color-mix(in srgb,var(--accent) 72%,var(--surface-2)); color:var(--on-accent)}
.yd.exam{background:var(--danger); color:var(--on-accent); font-weight:700}
:root[data-theme="light"] .yd.exam{color:#fff}
.yd.today{box-shadow:inset 0 0 0 2px var(--now); font-weight:700}

/* the sidebar's lists */
.nu-row{display:grid; grid-template-columns:92px minmax(0,1fr) auto; align-items:center;
  gap:var(--s2); padding:6px var(--s2); margin:0 calc(var(--s2) * -1); border-radius:var(--r-sm);
  text-decoration:none; color:var(--ink); font-size:var(--t-sm)}
.nu-row:hover{background:var(--surface-2)}
.nu-row .when{font-size:var(--t-xs); color:var(--ink-3); white-space:nowrap}
.nu-c{display:flex; gap:4px; flex-wrap:wrap; min-width:0}
/* The rail's course pill, so a course looks the same in both places. */
.nu-tag{display:inline-flex; align-items:center; height:20px; padding:0 7px;
  font-size:11px; font-weight:700; color:var(--ink); border-radius:var(--r-pill); white-space:nowrap;
  background:color-mix(in srgb,var(--ev) 30%,transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ev) 60%,transparent)}
.nu-n{font-size:var(--t-sm); font-weight:600; color:var(--ink-2)}
.nu-row.overdue .nu-n{color:var(--danger)}

/* A clash cluster: the cluster carries the mark (an amber rail and the overlap),
   the members carry course-coloured dots, where colour means identity only. */
.clash-item{position:relative; padding:var(--s2) 0 var(--s3) var(--s3); margin-bottom:var(--s2)}
.clash-item:last-child{margin-bottom:0}
.clash-item::before{content:""; position:absolute; left:0; top:4px; bottom:4px; width:2px;
  border-radius:1px; background:var(--warn)}
.clash-item .w{display:flex; align-items:baseline; gap:var(--s2); margin-bottom:6px;
  font-size:var(--t-xs)}
.clash-item .cw-day{color:var(--ink); font-weight:600}
.clash-item .cw-time{color:var(--warn); font-weight:600}
.clash-item .cm{display:grid; grid-template-columns:8px minmax(0,1fr) auto; align-items:baseline;
  gap:var(--s2); padding:2px 0}
.clash-item .cm-dot{width:8px; height:8px; border-radius:2px; position:relative; top:-1px}
.clash-item .cm-t{min-width:0; font-size:var(--t-sm); color:var(--ink); line-height:1.35}
.clash-item .cm-s{display:block; font-size:var(--t-xs); color:var(--ink-3)}
.clash-item .cm-h{font-size:var(--t-xs); color:var(--ink-3); white-space:nowrap}

/* label manager in the event sheet and on the to-do page */
.catpick{display:flex; gap:6px; align-items:center}
.catpick select{flex:1}
#cat-editor{margin-top:var(--s3); padding-top:var(--s3); border-top:1px solid var(--line-soft)}
.catrow{align-items:center; gap:var(--s2); padding:6px 0}
.catrow .what{flex:1}
.catrow .muted{font-size:var(--t-xs)}
.labelbar{margin-top:var(--s3)}
.labelbar #cat-editor{margin-top:var(--s2); padding-top:var(--s2)}
.labelbar .frow,#cat-editor .frow{margin-top:var(--s2); align-items:center}

/* =========================================================================
   Dashboard
   ========================================================================= */
.wkmore{display:inline-block; margin:4px 0 0 24px; font-size:var(--t-xs);
  color:var(--accent-ink); text-decoration:none}
.wkmore:hover{text-decoration:underline}

#widget-shelf{display:none}

/* The Today card is the one place on the dashboard that is allowed to be loud. */
.card[data-widget="today"]{border-color:var(--line)}
.card[data-widget="today"] > h2{font-size:var(--t-lg)}
.today-due{margin-top:var(--s3); padding-top:var(--s3); border-top:1px solid var(--line-soft)}
.today-due .tl .when{color:var(--danger); font-weight:600}
.today-due .tl.soon .when{color:var(--warn)}

/* Capture */
.todo-add{display:flex; gap:var(--s2); margin-bottom:var(--s3); flex-wrap:wrap}
.todo-add > input[type=text],.todo-add > input:not([type]){flex:1; min-width:140px}
.todo-add input[type=date]{max-width:140px}
.todo-add input[type=number]{max-width:76px}
.todo-add .est{max-width:92px; text-align:center}

/* Free time */
.free-head{display:flex; align-items:baseline; gap:var(--s2); margin-bottom:var(--s4)}
.free-head .big{font:400 40px/1 var(--serif); letter-spacing:-.01em}
.free-head .of{color:var(--ink-3); font-size:var(--t-sm)}
.free-days{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:var(--s2)}
.fday{text-align:center}
/* The bar is the working day. What is free fills it from the bottom in the
   accent; what is booked hangs from the top in neutral — so the colour you
   read is the time you still have. */
.fday .bar{height:56px; position:relative; overflow:hidden; border-radius:0;
  background:color-mix(in srgb,var(--accent) 16%,var(--bg))}
.fday .bar .used{position:absolute; left:0; right:0; top:0; background:var(--surface-2);
  box-shadow:inset 0 -1px 0 var(--accent)}
.fday .bar .lbl{position:absolute; inset:0; display:grid; place-items:center;
  font-size:var(--t-xs); font-weight:600; color:var(--ink)}
.fday.none .bar .lbl{color:var(--ink-3)}
.fday .d{font-size:var(--t-xs); color:var(--ink-3); margin-top:4px}
.free-next{display:flex; gap:var(--s6); margin-top:var(--s4); font-size:var(--t-sm)}
.free-next .k{font-size:var(--t-xs); color:var(--ink-3)}
.free-next .v{font-weight:600}

.tiles{display:grid; grid-template-columns:repeat(auto-fit,minmax(84px,1fr)); gap:var(--s3)}
.tile .k{font-size:var(--t-xs); color:var(--ink-3)}
.tile .v{font-size:var(--t-lg); font-weight:600}
.tile .v.warn{color:var(--warn)}
.chartcap{font-size:var(--t-xs); color:var(--ink-3); margin-top:var(--s3)}

/* a small term strip for the dashboard */
/* Training's three tabs are sections of the page, spaced like it. */
[data-panel]{display:flex; flex-direction:column; gap:var(--s4)}

.tmini{display:flex; align-items:flex-end; gap:3px; height:44px; margin-top:var(--s3)}
.tmini .tw{flex:1; display:flex; align-items:flex-end; height:100%}

/* =========================================================================
   To-dos
   ========================================================================= */
/* A to-do is a row whose TITLE owns the line; its annotations sit underneath,
   in the order you read them: what it is, then when and how long. */
.todo{display:flex; align-items:flex-start; gap:var(--s3); padding:12px var(--s3) 12px var(--s3);
  margin:0 calc(var(--s3) * -1); border-bottom:1px solid var(--line-soft);
  border-radius:var(--r-sm); transition:background-color var(--fast) var(--ease)}
.todo:last-child{border-bottom:0}
.todo:hover{background:var(--surface-2)}
.todo input[type=checkbox]{margin-top:2px; flex:none; width:18px; height:18px}
.todo .body{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px}
.todo .txt{min-width:0; overflow-wrap:anywhere; font-size:var(--t-md); font-weight:600;
  line-height:1.35; color:var(--ink)}
.todo.is-done .txt{text-decoration:line-through; color:var(--ink-3); font-weight:500}
.todo .meta{display:flex; align-items:center; gap:var(--s2); flex-wrap:wrap;
  font-size:var(--t-xs); color:var(--ink-3)}
.todo .meta > *{border-radius:var(--r-xs); padding:0 2px}
.todo .m-due.urgent{color:var(--danger); font-weight:600}
.todo .m-cat{display:inline-flex; align-items:center; gap:6px; height:20px; padding:0 8px;
  border:1px solid var(--line-soft); border-radius:var(--r-pill); color:var(--ink-2);
  white-space:nowrap}
.todo .m-cat::before{content:""; width:6px; height:6px; border-radius:50%;
  background:var(--ev,var(--ink-3))}
.todo .m-cat.empty::before{display:none}
/* An empty annotation takes NO space until you go looking for it. */
.todo .meta .empty{display:none}
.todo:hover .meta .empty,.todo .meta .empty:focus-within{display:inline-flex; opacity:.65}
/* Urgency is a spine on the row. */
.todo.urg-overdue{box-shadow:inset 3px 0 0 var(--danger)}
.todo.urg-today{box-shadow:inset 3px 0 0 var(--warn)}
.todo.urg-soon{box-shadow:inset 3px 0 0 var(--ink-3)}
.todo.urg-overdue .m-due,.todo.urg-overdue .due{color:var(--danger); font-weight:600}
.todo.urg-today .m-due,.todo.urg-today .due{color:var(--warn); font-weight:600}
.todo.task .txt .sub{font-size:var(--t-xs); color:var(--ink-3); margin-top:1px}
.biglist .todo{align-items:flex-start}
.donebar{margin-top:var(--s3)}
#clear-done{margin-top:var(--s3)}

.goal{align-items:center}
.goal .txt{flex:1; min-width:0}
.goal .track{width:84px; height:6px; flex:none}
.goal.is-done .track .fill{background:var(--ok)}
.goal .num{width:58px; text-align:right; color:var(--ink-3); font-size:var(--t-xs); flex:none}
.note .txt{flex:1; min-width:0; overflow-wrap:anywhere; font-size:var(--t-md); color:var(--ink)}
.note.pinned .txt{font-weight:600}
.note button{opacity:0}
.biglist .note,.biglist .goal{padding:12px 0}

/* =========================================================================
   Today, Week
   ========================================================================= */
.dayform{display:flex; flex-direction:column; gap:var(--s3); margin-top:var(--s3)}
.dayform textarea{width:100%; resize:vertical}
.dayrecent{margin-top:var(--s5); border-top:1px solid var(--line-soft); padding-top:var(--s3)}
.dayrecent h3{margin:0 0 var(--s2); font-size:var(--t-sm); color:var(--ink-3); font-weight:600}

/* The plan: what you MEAN to do, in your own words. Set like a to-do title. */
.planrow{display:flex; align-items:flex-start; gap:var(--s3); padding:6px 0;
  border-bottom:1px solid var(--line-soft); cursor:text}
.planrow:last-child{border-bottom:0}
.planrow.weekend .planrow-d{color:var(--ink-3)}
.planrow-d{flex:none; width:72px; padding-top:7px; font-size:var(--t-sm); font-weight:600;
  color:var(--ink-2); display:flex; gap:6px; align-items:baseline}
.planrow-n{color:var(--ink-3); font-weight:400}
.planrow.is-today .planrow-d{color:var(--accent-ink)}
textarea.planrow-t{flex:1; min-width:0; resize:none; overflow:hidden; height:auto;
  font-size:var(--t-md); font-weight:600; line-height:1.45; color:var(--ink);
  background:transparent; border:1px solid transparent; padding:5px 8px; margin:0;
  box-shadow:none}
textarea.planrow-t::placeholder{color:var(--ink-3); font-weight:500}
textarea.planrow-t:hover{background:var(--surface-2)}
textarea.planrow-t:focus{background:var(--field); border-color:var(--accent); box-shadow:none}
.planrow.bare{border-bottom:0; padding:0}

/* ---------- the Week page: a ruled sheet ----------
   Chosen from three concepts (Tweek's paper week was the reference). No boxes:
   every line is --lh tall and sits on a rule, so the rules ARE the structure.
   The date numerals and the week number are the only large type. Colour is
   state only, plus the course colour as a 3px tick. */
.nbk{--lh:34px; --rule:var(--line-soft); gap:var(--s6)}
.nb-head{display:flex; align-items:flex-end; flex-wrap:wrap; gap:var(--s3) var(--s5)}
.nb-head h1{margin:0; font:400 56px/1 var(--serif); font-optical-sizing:auto;
  letter-spacing:-.015em; isolation:isolate}
.nb-head h1 b{font-weight:inherit; color:inherit}

.nb-ctx{margin:0 0 3px; font-size:var(--t-sm); line-height:1.4; color:var(--ink-3)}
.nb-head .spacer{flex:1}
.hero-nav{display:flex; align-items:center; gap:6px; flex:none; align-self:center}
.nb-sum{margin:calc(var(--s3) * -1) 0 0; font-size:var(--t-lg); line-height:1.5; color:var(--ink-2); max-width:72ch}
.nb-sum b{color:var(--ink); font-weight:600}
.nb-sum .w,.nbk .w{color:var(--warn); font-weight:600}
.onething{display:flex; align-items:baseline; gap:var(--s3); margin:calc(var(--s3) * -1) 0 0;
  padding-left:var(--s3); box-shadow:inset 2px 0 0 var(--accent)}
.onething-k{font-size:var(--t-xs); font-weight:500; color:var(--accent-ink); white-space:nowrap}
.onething-v{font-size:var(--t-md); font-weight:600; color:var(--ink)}

/* The rules. A block of lines draws one every --lh, from its top. */
.nbk .lines{display:flex; flex-direction:column; min-width:0;
  background:repeating-linear-gradient(to bottom, transparent 0 calc(var(--lh) - 1px),
    var(--rule) calc(var(--lh) - 1px) var(--lh))}
.nbk .ln{display:flex; align-items:center; gap:8px; width:100%; min-width:0; height:var(--lh);
  padding:0 4px; margin:0; font:inherit; font-size:var(--t-xs); line-height:1.2; color:var(--ink);
  text-align:left; justify-content:flex-start; white-space:nowrap; background:none; border:0;
  border-radius:0; box-shadow:none}
.nbk .ln.prose{display:block; height:auto; min-height:var(--lh); line-height:var(--lh);
  font-size:var(--t-sm); white-space:normal}
.nbk .ln.quiet,.nbk .ln .k{color:var(--ink-3)}
.nbk .ln .t{width:36px; flex:none; color:var(--ink-3)}
.nbk .ln .c{font-weight:600; flex:none}
.nbk .ln .k{min-width:0; overflow:hidden; text-overflow:ellipsis}
.nbk .ln .sw{width:3px; height:16px; border-radius:2px; flex:none; background:var(--ev, var(--ink-3))}
.nbk button.ln,.nbk summary.ln{cursor:pointer}
.nbk button.ln:hover,.nbk summary.ln:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}
.nbk button.ln:active:not(:disabled){transform:none}

/* Six columns: the weekdays, then Saturday over Sunday. */
.nb{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)) minmax(0,.9fr); gap:var(--s6) var(--s5);
  align-items:start}
.nbcol{display:flex; flex-direction:column; gap:var(--s4); min-width:0}
.nbday{display:flex; flex-direction:column; min-width:0}
.nbh{margin:0; padding-bottom:6px; border-bottom:1px solid var(--ink); font-size:var(--t-sm); font-weight:400}
.nbh a{display:flex; align-items:baseline; justify-content:space-between; gap:var(--s2);
  text-decoration:none; color:inherit; border-radius:var(--r-xs)}
.nbh .n{font:400 36px/1 var(--serif); letter-spacing:-.01em; color:var(--ink)}
.nbh .d{color:var(--ink-3)}
.nbh a:hover .d{color:var(--ink)}
.nbday.past .nbh{border-color:var(--line)}
.nbday.past .nbh .n{color:var(--ink-2)}
.nbday.today .nbh{border-color:var(--accent); box-shadow:0 1px 0 var(--accent)}
.nbday.today .nbh .n{color:var(--accent-ink)}
.nbday.today .nbh .d{color:var(--accent-ink)}
/* Six ruled lines under a weekday whatever it holds, three under a weekend
   day: the sheet keeps its shape on an empty day. */
.nbday > .lines{min-height:calc(var(--lh) * 7)}
.nbday.short > .lines{min-height:calc(var(--lh) * 3)}

.nbk .ln.plan{font-weight:600; font-size:var(--t-xs); white-space:normal; overflow:hidden;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:var(--lh)}
.nbk .ln.addplan{color:var(--ink-3); opacity:0; transition:opacity var(--fast) var(--ease)}
.nbday:hover .ln.addplan,.nbk .ln.addplan:focus-visible,.nbday.today .ln.addplan{opacity:1}
@media (hover:none){ .nbk .ln.addplan{opacity:1} }
textarea.wkplan{width:100%; min-height:var(--lh); resize:none; overflow:hidden; padding:7px 6px;
  font-size:var(--t-xs); font-weight:600; line-height:1.4}

/* Sessions: form, not hue, tells them apart. */
/* A line never runs out of its day card: a long hand-added title shrinks
   to an ellipsis, in every font, not only in mono. */
.nbk .ln.sess{overflow:hidden; white-space:nowrap; min-width:0}
.nbk .ln.sess .c{flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis}
.nbk .ln.sess .k{flex:1 1 0; text-overflow:ellipsis}
.nbk .ln.sess.personal .sw{background:none; box-shadow:inset 0 0 0 1.5px var(--ev); width:6px}
.nbk .ln.sess.skipped{color:var(--ink-3)}
.nbk .ln.sess.skipped .c{font-weight:500; text-decoration:line-through}
.nbk .ln.sess.skipped .sw{opacity:.4}
.nbk .ln.sess.clash .c{text-decoration:underline dashed var(--warn) 1.5px; text-underline-offset:3px}
.nbk .ln.sess.exam .c{color:var(--danger)}
.skipd > summary,.exd > summary{list-style:none}
.skipd > summary::-webkit-details-marker,.exd > summary::-webkit-details-marker{display:none}

/* Exercises: one line per course, closed by default; it opens onto chips
   that keep the rhythm, one row per rule. */
.exd > summary .c{font-weight:500}
.exd-n{margin-left:auto; color:var(--ink-3)}
.exd-n.met{color:var(--ok); font-weight:600}
.exd-n.behind{color:var(--warn); font-weight:600}
.exd .chev{flex:none; color:var(--ink-3); transition:transform var(--fast) var(--ease)}
.exd[open] .chev{transform:rotate(90deg)}
.exd-body{display:flex; flex-wrap:wrap; column-gap:4px; padding-left:15px}
.exd-body .tick{height:24px; margin:5px 0; padding:0 8px 0 6px; font-size:var(--t-xs)}

/* Under the sheet: two ruled halves. */
.nb-foot{display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:var(--s4) var(--s7);
  align-items:start}
.nb-foot > :only-child{grid-column:1 / -1}
.nb-foot > [hidden] + *{grid-column:1 / -1}
.nb-h2{display:flex; align-items:baseline; gap:var(--s3); margin:0; padding-bottom:8px;
  border-bottom:1px solid var(--ink); font:400 24px/1.1 var(--serif); letter-spacing:-.01em}
.nb-h2 .muted{font:400 var(--t-xs)/1.4 var(--sans); letter-spacing:0; color:var(--ink-3)}
.nb-h2 label{cursor:inherit}
.nbk .ln.commit-line{gap:var(--s3)}
.commit-v{font-size:var(--t-md); font-weight:600; overflow:hidden; text-overflow:ellipsis}
.nbk .ln.commit-form{height:auto; padding:6px 0; gap:var(--s2); background:var(--surface-sunk, transparent)}
.commit-form input{flex:1; min-width:0}
.nbk .ln.also{font-size:var(--t-sm)}
.also-k{width:72px; flex:none; font-size:var(--t-xs); color:var(--ink-3)}
.also-t{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:6px}
.also-d{flex:none; font-size:var(--t-xs); color:var(--ink-3)}
.also-d.urgent{color:var(--danger); font-weight:600}
.also-d.warn{color:var(--warn); font-weight:600}
label.ln.also{cursor:pointer}
.ln.also.done .also-t{color:var(--ink-3); text-decoration:line-through}

/* Shared notebook pieces used beyond the Week page. */
.nbk .ln .r{margin-left:auto; flex:none; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis;
  max-width:45%}
.nbk .ln .r.late{color:var(--danger); font-weight:600}
.nbk .ln .del{margin-left:auto; flex:none}
.nbk .ln .sw.warn{background:var(--warn)}
.nbk a.ln{text-decoration:none; color:var(--ink)}
.nbk a.ln:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}
.nbk label.ln{cursor:pointer}
.nbk label.ln input{flex:none; margin:0}
.nbk .ln.done .c{color:var(--ink-3); text-decoration:line-through; font-weight:500}

/* Today: the same sheet, one day long. */
.today-page .ln{font-size:var(--t-sm)}
.today-page .ln .t{width:88px}
.today-page .ln.notice-ln{font-size:var(--t-sm)}
.today-page .ln.notice-ln .c{flex:0 1 auto; min-width:0; font-weight:600; overflow:hidden; text-overflow:ellipsis}
.today-page .ln.notice-ln .k{flex:1 1 0}
.today-page .ln.todo-ln .c,.today-page .ln.agl .c{flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis}
@media (max-width:640px){ .today-page .ln.notice-ln .k{display:none} }
.planline{gap:var(--s2)}
.planline textarea{flex:1; min-width:0; height:var(--lh); min-height:0; padding:0 4px; resize:none;
  overflow:hidden; border:0; border-radius:0; background:transparent; box-shadow:none;
  font-size:var(--t-md); font-weight:600; line-height:var(--lh); color:var(--ink)}
.planline textarea::placeholder{font-weight:400; color:var(--ink-3)}
.planline textarea:focus-visible{outline:2px solid var(--accent); outline-offset:-2px}
.dy-cols{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.dy-side{display:flex; flex-direction:column; gap:var(--s6); min-width:0}
.today-page .ln.agl.is-past{color:var(--ink-3)}
.today-page .ln.agl.is-past .c{font-weight:500}
.today-page .ln.agl.is-past .sw{opacity:.4}
.today-page .ln.agl.is-now{box-shadow:inset 2px 0 0 var(--accent);
  background:color-mix(in srgb,var(--accent) 7%,transparent)}
.today-page .ln.agl.is-now .t{color:var(--accent-ink); font-weight:600}
.today-page .ln.agl.skipped .c{text-decoration:line-through; font-weight:500; color:var(--ink-3)}
.today-page .ln.agl.skipped .sw{opacity:.4}
.today-page .ln.todo-ln .c{font-weight:600; overflow:hidden; text-overflow:ellipsis}

/* To-Do: one sheet. The first line writes, the rest are rows on rules. */
.todo-sheet{display:flex; flex-direction:column; min-width:0; border-top:1px solid var(--ink)}
.nbk .todo-add.ln{height:auto; min-height:calc(var(--lh) + 12px); padding:6px 0; gap:var(--s2);
  margin:0; border-bottom:1px solid var(--rule); flex-wrap:wrap}
.todo-add #todo-text{flex:1; min-width:200px; border:0; background:transparent; box-shadow:none;
  padding:0 4px; font-size:var(--t-md); font-weight:600}
.todo-add #todo-text::placeholder{font-weight:400}
.todo-add #todo-text:focus-visible{outline:2px solid var(--accent); outline-offset:0}
.nbk .todo-tabs.ln{height:auto; min-height:var(--lh); padding:4px 0; border-bottom:1px solid var(--rule)}
.todo-tabs .chipbar{margin:0; flex:1}
.cat-editor{padding:var(--s3) 0; border-bottom:1px solid var(--rule)}
.todo-page .todo{align-items:center; min-height:var(--lh); margin:0; padding:5px 4px; gap:var(--s3);
  border-bottom:1px solid var(--rule); border-radius:0; background:none}
.todo-page .todo:hover{background:color-mix(in srgb,var(--ink) 4%,transparent)}
.todo-page .todo input[type=checkbox]{margin-top:0; width:16px; height:16px}
.todo-page .todo .body{flex-direction:row; align-items:center; gap:var(--s4)}
.todo-page .todo .txt{flex:1; min-width:0}
.todo-page .todo .meta{flex:none; font-size:var(--t-xs)}
.todo-page .todo.urg-overdue,.todo-page .todo.urg-today,.todo-page .todo.urg-soon{box-shadow:none}
.todo-page .todo.urg-overdue .txt::before,.todo-page .todo.urg-today .txt::before{content:"";
  display:inline-block; width:3px; height:14px; margin-right:8px; border-radius:2px; vertical-align:-2px;
  background:var(--warn)}
.todo-page .todo.urg-overdue .txt::before{background:var(--danger)}
.done-fold > summary{list-style:none; cursor:pointer; border-bottom:1px solid var(--rule)}
.done-fold > summary::-webkit-details-marker{display:none}
.done-fold > summary::after{content:"Show"; margin-left:auto; font-size:var(--t-xs); color:var(--accent-ink)}
.done-fold[open] > summary::after{content:"Hide"}
@media (max-width:640px){ .todo-page .todo .body{flex-direction:column; align-items:flex-start; gap:2px} }


@media (max-width:1100px){ .nb{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media (max-width:860px){ .nb-foot{grid-template-columns:minmax(0,1fr)} }
@media (max-width:640px){
  .nb{grid-template-columns:minmax(0,1fr); gap:var(--s5)}
  .nbday > .lines,.nbday.short > .lines{min-height:calc(var(--lh) * 2)}
  .nb-head h1{font-size:40px}
  .nbk .ln.addplan{opacity:1} }


/* the work the week is asking for */
.wkgroup + .wkgroup{margin-top:var(--s4)}
.wkgroup-h{display:flex; align-items:baseline; gap:var(--s2); padding-bottom:6px;
  font-size:var(--t-xs); font-weight:600; color:var(--ink-2); border-bottom:1px solid var(--line-soft)}
.wkgroup-h.urgent{color:var(--danger)}
.wkgroup-h .n{margin-left:auto; color:var(--ink-3); font-weight:500}
.wkitem{display:flex; align-items:center; gap:var(--s2); padding:6px 0; min-width:0;
  font-size:var(--t-sm); cursor:pointer}
.wkitem + .wkitem{border-top:1px solid var(--line-soft)}
.wkitem input{flex:none}
.wkitem .sw{width:8px; height:8px; border-radius:2px; flex:none}
.wkitem .wkitem-c{font-size:var(--t-xs); color:var(--ink-3); flex:none; min-width:60px}
.wkitem .wkitem-l{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.wkitem .wkitem-l.grow{flex:1}
.wkitem .wkitem-d,.wkitem .wkitem-e,.wkitem .wkitem-n{font-size:var(--t-xs); color:var(--ink-3); flex:none}
.wkitem .wkitem-d{margin-left:auto}
.wkitem.done{opacity:.55}
.wkitem.done .wkitem-l{text-decoration:line-through}

.clashblock{border-left:2px solid var(--warn); padding:2px 0 4px var(--s3); margin-bottom:var(--s3)}
.clashblock .clash-h{font-size:var(--t-xs); font-weight:600; color:var(--warn)}
.clashblock .clash-m{display:flex; align-items:center; gap:var(--s2); font-size:var(--t-sm); min-width:0}
.clashblock .clash-m .grow{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.clashblock .dot{width:8px; height:8px; border-radius:2px; flex:none}
.clashblock .rt{font-size:var(--t-xs); color:var(--ink-3); flex:none}
.cd .dot,.tl .dot{flex:none}

/* Study time: seven bars, no target line. */
.stbars{display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:var(--s2);
  align-items:end; height:72px; margin-bottom:var(--s3)}
.stbar{display:flex; flex-direction:column; justify-content:flex-end; align-items:center;
  gap:4px; height:100%}
.stbar-f{display:block; width:100%; min-height:2px; border-radius:3px 3px 0 0; background:var(--accent)}
.stbar-k{font-size:var(--t-xs); color:var(--ink-3)}

/* =========================================================================
   Course page
   ========================================================================= */
.statbar{display:flex; flex-direction:column; gap:var(--s3); flex:none;
  width:calc(100% - var(--s6) * 2); max-width:var(--page-max); margin:0 auto;
  padding:0}
/* Course page, notebook: the sentence, then one hairline of progress. */
.statbar .nb-sum{margin:0; font-size:var(--t-md); color:var(--ink-2); max-width:none}
.statbar .nb-sum b{color:var(--ink); font-weight:600}
.statbar .nb-sum .w{color:var(--warn); font-weight:600}
.statbar .bigtrack{height:3px; max-width:none}
.stat{min-width:96px}
.stat .k{font-size:var(--t-xs); font-weight:500; color:var(--ink-3)}
.stat .k::first-letter{text-transform:uppercase}
.stat .v{font:400 30px/1.15 var(--serif); letter-spacing:-.01em}
.stat .v.warn{color:var(--warn)}
.stat .v .muted{font:400 var(--t-md)/1 var(--sans)}
.stat.grow{flex:1; min-width:240px}
.stat .k + .muted,.stat > .muted{font-size:var(--t-xs)}

.course-main{flex:1 0 auto; display:flex; align-items:flex-start; gap:var(--s5); width:100%;
  max-width:calc(var(--page-max) + var(--s6) * 2); margin:0 auto; padding:var(--s5) var(--s6) var(--s8)}
.plan-col{flex:1; min-width:0}
/* The sidebar travels with you down the plan. `.course-main` grows with its
   content (`flex:1 0 auto`) rather than being clamped to the viewport, because
   a sticky element only sticks inside its parent's box — clamped, the parent
   ended at the first screenful and so did the sticking. If the sidebar itself
   is taller than the window it scrolls on its own. */
.course-side{width:320px; flex:none; align-self:flex-start; border:0; background:none;
  position:sticky; top:calc(var(--bar-h) + var(--s4));
  max-height:calc(100vh - var(--bar-h) - var(--s4) * 2); overflow-y:auto;
  scrollbar-width:thin}
.course-side .nu-row{margin:0 calc(var(--s2) * -1)}
.course-side .nu-c{display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:var(--ink-2)}
.course-side .nu-row.overdue .when{color:var(--warn); font-weight:600}
.course-side .cd{padding:4px 0}
.plan-col > h2{display:flex; align-items:center; gap:var(--s3); margin:var(--s7) 0 var(--s3);
  font:400 28px/1.1 var(--serif); letter-spacing:-.01em}
.planbtns{display:inline-flex; gap:var(--s2); margin-left:auto}
#plan-delete:hover{color:var(--danger); border-color:var(--danger)}
@media (max-width:980px){ .course-main{flex-direction:column; align-items:stretch}
  .course-side{width:auto; position:static; max-height:none} }

/* The plan, a week at a time. */
.pweek{margin-bottom:var(--s5)}
.pweek-h{display:flex; align-items:baseline; gap:var(--s3); margin:0 0 2px; padding:var(--s2) 0 6px;
  font:400 22px/1.15 var(--serif); letter-spacing:-.01em; color:var(--ink); border-bottom:1px solid var(--ink)}
.pweek-h .muted{font:400 var(--t-xs)/1.4 var(--sans); letter-spacing:0}
.pweek-n{margin-left:auto; font:600 var(--t-xs)/1.4 var(--sans); letter-spacing:0; color:var(--ink-3)}
.pweek-n.met{color:var(--ok)}
.pweek.finished .pweek-h{color:var(--ink-2)}
/* The finished weeks at the start of the term: one line, opened on demand. */
.pfold{margin-bottom:var(--s5); border:1px solid var(--line-soft); border-radius:0;
  background:transparent}
.pfold > summary{display:flex; align-items:center; gap:var(--s3); padding:var(--s3) var(--s4);
  cursor:pointer; list-style:none; border-radius:0}
.pfold > summary::-webkit-details-marker{display:none}
.pfold > summary::before{content:""; flex:none; width:6px; height:6px; margin:0 2px;
  border-right:1.5px solid var(--ink-3); border-bottom:1.5px solid var(--ink-3);
  transform:rotate(-45deg); transition:transform var(--fast) var(--ease)}
.pfold[open] > summary::before{transform:rotate(45deg) translate(-1px,-1px)}
.pfold > summary:hover{background:var(--surface-2)}
.pfold-t{font-weight:600; color:var(--ok)}
.pfold > summary .muted{font-size:var(--t-sm)}
.pfold[open]{padding-bottom:var(--s2)}
.pfold[open] > .pweek{padding:0 var(--s4)}
.prow.flash{animation:ls-flash 1.2s var(--ease)}
@keyframes ls-flash{0%,30%{background:var(--accent-soft)} 100%{background:transparent}}

.prow{padding:var(--s3) 0; border-bottom:1px solid var(--line-soft)}
.prow:last-child{border-bottom:0}
.prow.done .head{opacity:.6}
/* Late is said by the date's ink, not a spine: the page has no boxes. */
.prow.overdue .date{color:var(--warn); font-weight:600}
.prow.landmark .head{color:var(--ink-3)}
.prow .head{display:flex; align-items:center; gap:var(--s3); font-size:var(--t-sm)}
.prow .date{color:var(--ink-3); width:88px; flex:none}
.prow .type{font-weight:600; width:32px; flex:none; color:var(--ink-2)}
.prow .desc{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:var(--ink); font-weight:500}
.prow .count{color:var(--ink-3); font-size:var(--t-xs); flex:none}
.prow .count.reading{font-weight:400; flex:0 1 auto; min-width:0; max-width:45%;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.prow .ticks{margin-top:var(--s2); padding-left:calc(88px + var(--s3))}
.prow .readings{margin-top:var(--s1); font-size:var(--t-xs); color:var(--ink-3)}
@media (max-width:620px){ .prow .ticks{padding-left:0} }

/* Exercise chips. A page holds 114 of them, so each is small and quiet, and
   ticked reads as done at a glance: green check, muted label. */
.tickwrap{position:relative; display:inline-flex; align-items:center; margin:0 4px 4px 0}
.tick{display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 10px 0 8px;
  font-size:var(--t-xs); font-weight:500; cursor:pointer; user-select:none;
  border:1px solid var(--line-soft); border-radius:var(--r-sm); background:var(--surface-2);
  transition:border-color var(--fast) var(--ease), background-color var(--fast) var(--ease)}
.tick:hover{border-color:var(--accent)}
.tick input{width:14px; height:14px; accent-color:var(--ok)}
.tick.done{color:var(--ink-3); background:transparent; text-decoration:line-through;
  text-decoration-color:var(--ink-3)}
.tick .stars{color:var(--warn); font-size:10px; letter-spacing:-.5px; margin-left:2px; line-height:1}
.tick.done .stars{color:var(--ink-3)}
.tickedit{height:24px; width:22px; padding:0; opacity:0; border:0; background:none;
  color:var(--ink-3); font-size:12px; line-height:1; transition:opacity var(--fast) var(--ease)}
.tickwrap:hover .tickedit,.tickwrap:focus-within .tickedit{opacity:1}
.tickedit:hover{color:var(--accent-ink); background:none}
.tickedit.has{opacity:1; color:var(--accent-ink)}

.sess{align-items:baseline; padding:8px var(--s4); margin:0 calc(var(--s4) * -1)}
.sess .w{color:var(--ink-2); width:108px; flex:none}
.sess .k{flex:1; min-width:0; font-weight:500}
.sess .r{color:var(--ink-3); font-size:var(--t-xs)}
.course-side .panel{padding:0 0 var(--s5); background:none; border:0}
.course-side .panel > h2{display:flex; align-items:baseline; gap:var(--s2); margin:0 0 var(--s2);
  padding-bottom:8px; border-bottom:1px solid var(--ink); font:400 22px/1.15 var(--serif);
  letter-spacing:-.01em}
.course-side .panel > h2 .muted{font:400 var(--t-xs)/1.4 var(--sans); letter-spacing:0}

/* dropping a course plan in */
.dropzone{border:1px dashed var(--ctl-line); border-radius:0;
  padding:var(--s6) var(--s5); margin-bottom:var(--s4); background:var(--surface);
  transition:border-color var(--fast) var(--ease), background-color var(--fast) var(--ease)}
.dropzone.over{border-color:var(--accent); background:var(--accent-soft)}
.dz-idle{display:flex; flex-direction:column; align-items:center; gap:var(--s2); text-align:center}
.dz-idle .muted{max-width:48ch; font-size:var(--t-sm)}
.dz-busy{display:flex; align-items:center; justify-content:center; gap:var(--s2);
  color:var(--ink-2); font-size:var(--t-sm)}
.spin{width:14px; height:14px; border-radius:50%; display:inline-block;
  border:2px solid var(--line-soft); border-top-color:var(--accent); animation:ls-spin .8s linear infinite}
.dz-ok{font-size:var(--t-md); margin-bottom:var(--s2)}
.dz-bad{color:var(--danger); font-size:var(--t-sm); margin-bottom:var(--s3)}
/* Hairline rows, no box: the dashed zone is already the container. */
.dz-sample{margin:var(--s3) 0; max-height:240px; overflow-y:auto; text-align:left;
  border-top:1px solid var(--line-soft)}
.dz-sample .row{border-bottom:1px solid var(--line-soft)}
.dz-sample .when{width:88px; flex:none; font-size:var(--t-xs); color:var(--ink-3)}
.dz-sample .sub{font-size:var(--t-xs); color:var(--ink-3)}
.dropzone .frow{margin:var(--s2) 0; max-width:440px}
.dropzone .frow input{flex:1; min-width:0}
.dz-key-note{font-size:var(--t-xs); max-width:44ch}
.dz-via{display:inline-flex; height:22px; align-items:center; padding:0 10px; margin-bottom:var(--s2);
  font-size:var(--t-xs); color:var(--ink-3); border:1px solid var(--line-soft); border-radius:var(--r-pill)}
.dz-via.free{color:var(--ok); border-color:currentColor}

/* =========================================================================
   Charts
   ========================================================================= */
.viz-root{--grid:var(--line-soft); --axis-ink:var(--ink-3); --expected:var(--ink-3)}
.chart-fig{margin:0; padding:var(--s3) 0 0; background:none; border:0;
  border-top:1px solid var(--ink); border-radius:0}
.chart-fig figcaption{display:flex; align-items:center; gap:var(--s2); margin-bottom:var(--s3)}
.chart-fig .cap{font:400 22px/1.15 var(--serif); letter-spacing:-.01em; color:var(--ink)}
.chart-fig figcaption .allbtn{margin-left:auto}
.chart svg{display:block; width:100%; height:auto; overflow:visible}
.chart .grid line{stroke:var(--grid); stroke-width:1}
.chart .axis text{fill:var(--axis-ink); font-size:11px}
.chart .lbl{font-size:12px; font-weight:600}
.chart .hit{fill:transparent; cursor:crosshair}
.chart .cross{stroke:var(--ink-3); stroke-width:1; stroke-dasharray:2 3}
.chart-wrap{position:relative}
.chart-tip{position:absolute; pointer-events:none; z-index:30; white-space:nowrap;
  padding:6px 10px; font-size:var(--t-xs); background:var(--glass);
  border:1px solid var(--line-soft); border-radius:var(--r-sm); box-shadow:var(--shadow);
  -webkit-backdrop-filter:blur(16px); backdrop-filter:blur(16px)}
#chart-table table{border-collapse:collapse; font-size:var(--t-xs); width:100%}
#chart-table th,#chart-table td{text-align:left; padding:4px 8px 4px 0;
  border-bottom:1px solid var(--line-soft)}
#chart-table th{color:var(--ink-3); font-weight:600}
.bars{display:block; width:100%; height:auto; overflow:visible; margin-top:var(--s3)}
.bars .bar{fill:var(--accent)}
.bars .bar.miss{fill:var(--line-soft)}
.bars .tgt{stroke:var(--ink-3); stroke-width:1.5; stroke-dasharray:4 4}
.bars text{fill:var(--ink-3); font-size:11px}
.bars .val{fill:var(--ink); font-size:11px; font-weight:600}

/* =========================================================================
   Term
   ========================================================================= */
/* Bars, not a line: the week is the unit. Height is hours; a single hue with
   three steps carries the band, because red already means "overdue" and blue
   already means "now" everywhere else. */
.termcurve{display:flex; align-items:flex-end; gap:4px; height:220px; padding-top:var(--s4)}
.tw{flex:1 1 0; min-width:0; height:100%; display:flex; flex-direction:column;
  justify-content:flex-end; align-items:stretch; gap:6px; padding:0; border:0;
  background:none; cursor:pointer; position:relative; border-radius:var(--r-xs)}
.tw:hover{background:none}
.tw .bar{display:block; border-radius:3px 3px 0 0;
  background:color-mix(in srgb,var(--ink-3) 55%,var(--surface-2));
  transition:filter var(--fast) var(--ease)}
.tw.band-light .bar{background:color-mix(in srgb,var(--ink-3) 28%,var(--surface-2))}
.tw.band-heavy .bar{background:var(--ink-2)}
.tw.now .bar{background:var(--accent)}
.tw:hover .bar{filter:brightness(1.2)}
.tw .wk{font-size:11px; color:var(--ink-3); text-align:center;
  border:0; padding:0; margin:0; background:none; border-radius:0}
.tw.now .wk{color:var(--accent-ink); font-weight:700}
.tw .ex{position:absolute; top:-4px; left:50%; transform:translateX(-50%);
  width:8px; height:8px; border-radius:50%; background:var(--danger); font-size:0}
.termkey{margin-top:var(--s4)}
.termkey .band-light{background:color-mix(in srgb,var(--ink-3) 28%,var(--surface-2))}
.termkey .band-normal{background:color-mix(in srgb,var(--ink-3) 55%,var(--surface-2))}
.termkey .band-heavy{background:var(--ink-2)}
.termkey .band-now{background:var(--accent)}
.termkey .band-exam{background:var(--danger); width:8px; height:8px; border-radius:50%}

/* =========================================================================
   Training, money, habits
   ========================================================================= */
.tgt-edit{display:inline-flex; align-items:center; gap:6px; font-size:var(--t-xs);
  font-weight:400; color:var(--ink-3)}
.tgt-edit input{width:56px!important; height:28px!important; text-align:center; padding:0 4px!important}
.dl{align-items:baseline}
.wk{padding:var(--s3); margin-bottom:var(--s2); border:1px solid var(--line-soft);
  border-radius:var(--r-sm)}
.wk h3{font-size:var(--t-sm); margin-bottom:4px}
.wk.next{border-color:var(--accent); background:color-mix(in srgb,var(--accent) 6%,transparent)}
.wk .ex{display:flex; justify-content:space-between; gap:var(--s2); font-size:var(--t-xs);
  color:var(--ink-2); padding:3px 0}
.wk .ex .s{color:var(--ink-3)}
.wk .tagline{font-size:var(--t-xs); color:var(--accent-ink); font-weight:600}
.wk.edit{background:var(--surface-2)}
.wk .ex.head{gap:var(--s2); margin-bottom:var(--s1); align-items:center}
.wk .ex.head .dayname{flex:1; font-weight:600}
.wk .row-edit{display:flex; gap:6px; align-items:center; padding:3px 0}
.wk .row-edit input,.wk .ex.head input{height:30px!important; font-size:var(--t-xs)!important}
.wk .row-edit .exname{flex:1; min-width:0}
.wk .row-edit .exsets{width:56px}
.wk .row-edit .exreps{width:80px}
#prog-editor .sheet-act{flex-wrap:wrap}
#gym-templates{display:grid; gap:var(--s2)}
#gym-templates p{margin:0 0 var(--s1); color:var(--ink-2)}
.tpl{display:grid; grid-template-columns:1fr auto; gap:2px var(--s3); width:100%; height:auto;
  text-align:left; justify-items:start; padding:var(--s3); background:var(--surface-2);
  border:1px solid var(--line-soft)}
.tpl:hover{border-color:var(--accent)}
.tpl .tpl-n{font-size:var(--t-sm); font-weight:600}
.tpl .tpl-d{font-size:var(--t-xs); color:var(--ink-2); justify-self:end}
.tpl .tpl-a{grid-column:1 / -1; font-size:var(--t-xs); color:var(--ink-3); font-weight:400;
  white-space:normal; line-height:1.45}
.adapt{margin-top:var(--s3); padding:var(--s3); font-size:var(--t-sm); color:var(--ink-2);
  border-radius:var(--r-sm); box-shadow:inset 3px 0 0 var(--warn); background:var(--surface-2)}
.adapt.ok{box-shadow:inset 3px 0 0 var(--ok)}
.adapt strong{color:var(--ink)}
.macro{display:flex; align-items:center; gap:var(--s3); padding:6px 0; font-size:var(--t-sm)}
.macro .ml{width:60px; flex:none; color:var(--ink-2)}
.macro .mt{flex:1; height:8px}
.macro .mg{width:52px; text-align:right; font-weight:600; flex:none}
.macro .mp{width:40px; text-align:right; color:var(--ink-3); font-size:var(--t-xs); flex:none}

.mrow{align-items:baseline}
.mrow.past{opacity:.55}
.mrow .what{display:flex; align-items:baseline; gap:var(--s2); font-weight:500}
.mrow .cat,.habit .cat{display:inline-flex; align-items:center; height:20px; padding:0 8px; flex:none;
  font-size:var(--t-xs); font-weight:400; color:var(--ink-3);
  border:1px solid var(--line-soft); border-radius:var(--r-pill)}
.mrow .amt{font-weight:600; flex:none; text-align:right}
.mrow .amt.out{color:var(--ink)}
.mrow .amt.in{color:var(--ok)}
.mrow .amt .sub{display:block; font-size:var(--t-xs); font-weight:400; color:var(--ink-3)}
.habit{align-items:center; cursor:pointer}
.habit .txt{flex:1; min-width:0}
.habit.is-done .txt{color:var(--ink-3); text-decoration:line-through}
.habit .streak{font-size:var(--t-xs); color:var(--accent-ink); font-weight:600; flex:none}
.quick input.narrow{max-width:72px; text-align:center}

/* =========================================================================
   Small screens: one column, a 16px gutter, nothing wider than the viewport.
   ========================================================================= */
@media (max-width:760px){
  .dash{padding:var(--s4) var(--s4) var(--s7)}
  .pagehead,.statbar{width:calc(100% - var(--s4) * 2); padding-left:var(--s4); padding-right:var(--s4)}

  .course-main{padding:var(--s4) var(--s4) var(--s7)}
  .topbar{padding:0 var(--s2)}
  .navsearch input{width:120px}
  .navsearch input:focus{width:160px}
  .views .course-jump{width:92px}
  .strip{gap:var(--s3) var(--s5)}
  .strip .v{font-size:var(--t-xl)}
  .card{padding:var(--s3) var(--s4) var(--s4)}
  /* The page's own navigation drops to its own row, all together, rather
     than wrapping one arrow at a time. */
  .hero-head .spacer{flex-basis:100%; height:0}
  /* relative, and top:0 with it: a relative box keeps `top` as an OFFSET, so
     the sticky top:52px pushed the toolbar 52px down over the day names. */
  .subbar{padding:var(--s2); position:relative; top:0}
  .subbar-left,.subbar-right{flex-wrap:wrap}
  #show-all-wrap{display:none}
  /* The bar becomes two rows: the mark and the controls, then the nav. */
  .topbar{height:auto; flex-wrap:wrap; row-gap:6px; padding:var(--s2)}
  .topbar .brand{display:contents}
  .topbar .brandmark{order:1}
  .topbar .controls{order:2; margin-left:auto}
  .topbar .views{order:3; flex-basis:100%}
  .topbar .views > .views-links{flex:1 1 0}
  .topbar .views > .coursepick{display:none}
  .topbar .navsearch input,.topbar .navsearch input:focus{width:132px}
  .topbar .brandmark .word{display:inline}
  .tl .when{width:82px}
  .daynames > div{flex-direction:column; align-items:center; gap:0; padding:6px 2px; margin:0 2px} .daynames .dnum{font-size:var(--t-md)}
  .daynames,.allday{grid-template-columns:40px repeat(7,minmax(0,1fr))}
  .gutter{width:40px}
}

/* A deadline row on the dashboard: the flat form of a to-do, one line. */
label.todo{cursor:pointer; align-items:center}
.todo > .txt{flex:1}
.todo > .est,.todo > .due{flex:none; font-size:var(--t-xs); color:var(--ink-3)}
.todo > .due.urgent{color:var(--danger); font-weight:600}
.todo.urg-today > .due.urgent{color:var(--warn)}
.todo > .cat{flex:none; display:inline-flex; align-items:center; gap:6px; height:20px;
  padding:0 8px; font-size:var(--t-xs); color:var(--ink-2);
  border:1px solid var(--line-soft); border-radius:var(--r-pill)}
.todo > .cat::before{content:""; width:6px; height:6px; border-radius:50%; background:var(--ev)}

/* A link that wears a button's shape is still a link: no underline. */
a.allbtn{text-decoration:none; display:inline-flex; align-items:center}

/* A course with a warning waiting on its own page: an amber dot on the
   picker, and on that course in the picker's menu. */
.course-jump.has-warn{position:relative}
.course-jump.has-warn::before{content:""; position:absolute; top:-3px; right:-3px;
  width:9px; height:9px; border-radius:50%; background:var(--warn);
  box-shadow:0 0 0 2px var(--bg)}
.navhits.coursemenu .nh.has-warn .nh-label::after{content:""; display:inline-block;
  width:7px; height:7px; margin-left:6px; border-radius:50%; background:var(--warn);
  vertical-align:1px}

/* Loading placeholders: an empty content area in a card, or an empty stat
   strip, while the page has not rendered yet. Shaped like a few lines of
   what is coming, quiet, and gone the moment the data is. */
html.loading .card > div[id]:empty,
html.loading .chart-fig > div[id]:empty,
html.loading .side .panel div[id]:empty{
  min-height:88px; border-radius:var(--r-sm);
  background:
    linear-gradient(var(--surface-2) 0 0) 0 4px / 70% 12px no-repeat,
    linear-gradient(var(--surface-2) 0 0) 0 34px / 90% 12px no-repeat,
    linear-gradient(var(--surface-2) 0 0) 0 64px / 55% 12px no-repeat;
  animation:ls-breathe 1.6s var(--ease) infinite alternate}
html.loading .strip:empty{min-height:52px; width:320px; border-radius:var(--r-sm);
  background:
    linear-gradient(var(--surface-2) 0 0) 0 0 / 72px 12px no-repeat,
    linear-gradient(var(--surface-2) 0 0) 0 22px / 56px 24px no-repeat,
    linear-gradient(var(--surface-2) 0 0) 120px 0 / 72px 12px no-repeat,
    linear-gradient(var(--surface-2) 0 0) 120px 22px / 72px 24px no-repeat;
  animation:ls-breathe 1.6s var(--ease) infinite alternate}
@keyframes ls-breathe{from{opacity:.55} to{opacity:1}}

/* ---------- the palette (⌘K) ----------
   A floating layer, so it gets the glass and the shadow. Rows are the same
   height as a nav row; the selected one wears the accent fill the active
   page does, because it is the same idea: "this one". */
.palette-wrap{position:fixed; inset:0; z-index:120; display:flex; justify-content:center;
  align-items:flex-start; padding-top:14vh; background:rgba(8,10,14,.45);
  overscroll-behavior:contain}
:root[data-theme="light"] .palette-wrap{background:rgba(22,26,32,.25)}
.palette{width:min(600px,92vw); max-height:68vh; display:flex; flex-direction:column;
  background:var(--glass); border:1px solid var(--line-soft); border-radius:var(--r-md);
  box-shadow:var(--shadow), inset 0 1px 0 var(--hi);
  -webkit-backdrop-filter:blur(20px) saturate(1.3); backdrop-filter:blur(20px) saturate(1.3);
  animation:ls-pop var(--med) var(--ease); overflow:hidden}
.palette #palette-q{height:52px; border:0; border-radius:0; background:transparent;
  border-bottom:1px solid var(--line-soft); padding:0 var(--s5); font-size:var(--t-md);
  box-shadow:none}
.palette #palette-q:focus{box-shadow:none; border-bottom-color:var(--accent)}
.palette-list{overflow-y:auto; padding:6px}
.pal-g{padding:10px 10px 4px; font-size:var(--t-xs); font-weight:600; color:var(--ink-3)}
.pal-i{display:flex; align-items:center; gap:10px; height:36px; padding:0 10px;
  border-radius:var(--r-sm); cursor:pointer; color:var(--ink-2); font-size:var(--t-sm)}
.pal-i.on{background:var(--accent-soft); color:var(--accent-ink)}
.pal-i .ri{width:16px; height:16px; flex:none}
.pal-i .sw{width:10px; height:10px; border-radius:3px; flex:none; margin:0 3px}
.pal-dot{width:6px; height:6px; border-radius:50%; background:var(--ink-3); flex:none; margin:0 5px}
.pal-l{flex:none; max-width:60%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-weight:500; color:inherit}
.pal-i:not(.on) .pal-l{color:var(--ink)}
.pal-s{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  font-size:var(--t-xs); color:var(--ink-3); text-align:right}
.palette-foot{display:flex; gap:var(--s4); padding:8px var(--s5); font-size:var(--t-xs);
  color:var(--ink-3); border-top:1px solid var(--line-soft)}
.palette-foot kbd{display:inline-grid; place-items:center; min-width:18px; height:18px;
  padding:0 4px; margin-right:3px; border-radius:4px; font-size:11px;
  background:var(--surface-2); border:1px solid var(--line-soft); color:var(--ink-2)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .palette{background:var(--surface-solid)} }

/* =========================================================================
   Dashboard: tiles
   =========================================================================
   Chosen from three concepts on real data, after a widget grid and a
   Now | Later split were rejected ("unbalanced", "ugly"). A 12-column grid of
   rounded tiles in a few fixed sizes; each tile has a quiet label at the top
   and ONE big figure anchored to its bottom, so tiles of different sizes
   still line up on their baselines. `dense` packing closes the hole a hidden
   tile leaves. This page is deliberately sans-only and rounded: the tiles
   are the user's pick, and the serif/square language of the rest of the app
   read as "unfinished" here. Colour is still state: the accent is what is
   next or now, course colours are the course rings. */
.bento-page{--tile:var(--surface); --tile-2:var(--surface-2); --tr:var(--r-lg);
  max-width:1240px; gap:var(--s5); padding:var(--s7) var(--s7) var(--s8)}
.bt-head{padding:0 2px}
.bt-head h1{margin:0}
.bt-sub{margin:4px 0 0; font-size:var(--t-md); color:var(--ink-3)}
.bento{display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); grid-auto-rows:minmax(104px,auto);
  grid-auto-flow:row dense; gap:var(--s4)}
.tile{position:relative; display:flex; flex-direction:column; min-width:0; overflow:hidden;
  padding:20px 22px; border-radius:var(--tr); background:var(--tile); color:var(--ink);
  text-decoration:none; border:0}
a.tile:hover,.t-exam:hover{background:var(--tile-2)}
.t-exam{cursor:pointer}
.tk{display:flex; align-items:center; gap:4px; min-height:20px; margin:0;
  font:600 13px/1.4 var(--sans); color:var(--ink-2); letter-spacing:0}
.tk #h-due-n{color:var(--ink-2)}
.tk-link{margin-left:auto; color:var(--accent-ink); font-weight:500; text-decoration:none}
.tk-link:hover{color:var(--ink)}
.t-foot{margin-top:auto; padding-top:var(--s3); min-width:0}
.t-row{display:flex; align-items:center; gap:var(--s5)}
.huge{display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 10px;
  font:700 48px/1 var(--sans); letter-spacing:-.035em; font-variant-numeric:tabular-nums}
.huge small{font-size:17px; font-weight:600; letter-spacing:0; color:var(--ink-2)}
.t-line{margin-top:10px; font-size:17px; font-weight:600; color:var(--ink)}
.t-sub{margin-top:5px; font-size:var(--t-sm); color:var(--ink-2)}
.t-sub.q,.q{color:var(--ink-3)}
.t-sub.warn{color:var(--warn); font-weight:600}

/* sizes */
.t-next{grid-column:span 7; grid-row:span 2;
  background:linear-gradient(135deg, color-mix(in srgb,var(--accent) 26%,var(--tile)), var(--tile) 70%)}
.t-exam{grid-column:span 5; grid-row:span 2}
.t-due{grid-column:span 7; grid-row:span 2}
.t-free{grid-column:span 5; grid-row:span 2}
.t-courses{grid-column:span 4; grid-row:span 2}
.t-week{grid-column:span 3; grid-row:span 2}
.t-dl{grid-column:span 5; grid-row:span 2}
.t-cap{grid-column:span 7; grid-row:span 1; flex-direction:row; align-items:center; gap:var(--s2)}
.t-ideas{grid-column:span 5; grid-row:span 1}

/* rings: a conic fill with the label in a hole the tile's colour */
.ring{--p:0; --c:var(--accent); flex:none; position:relative; width:84px; height:84px; border-radius:50%;
  background:conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-soft) 0); display:grid; place-items:center}
.ring > span{width:70px; height:70px; border-radius:50%; background:var(--tile); display:grid; place-items:center;
  font:700 17px/1 var(--sans); color:var(--ink)}
a.tile:hover .ring > span,.t-exam:hover .ring > span{background:var(--tile-2)}
.t-ex{min-width:0}
.t-ex-n{font-size:19px; font-weight:700; letter-spacing:-.01em}
.rings{display:flex; flex-wrap:wrap; gap:var(--s4)}
.ringlink{display:flex; flex-direction:column; align-items:center; gap:6px; text-decoration:none; color:inherit}
.ringlink .ring{width:68px; height:68px}
.ringlink .ring > span{width:56px; height:56px; font-size:15px}
.ringlink .rl{font-size:var(--t-xs); font-weight:600; color:var(--ink-2)}
.ringlink:hover .rl{color:var(--ink)}

/* free time: one column per weekday */
.fbars{flex:1; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; padding-top:var(--s3);
  min-height:150px}
.fcol{display:flex; flex-direction:column; align-items:center; gap:6px; min-width:0}
.fv{font-size:var(--t-xs); font-weight:600; color:var(--ink-2)}
.fb{flex:1; width:100%; position:relative; border-radius:8px; background:var(--tile-2); overflow:hidden}
.fb i{position:absolute; left:0; right:0; bottom:0; border-radius:8px;
  background:color-mix(in srgb,var(--ink) 30%,var(--tile))}
.fd{font-size:var(--t-xs); color:var(--ink-3)}
.fcol.today .fb i{background:var(--accent)}
.fcol.today .fd,.fcol.today .fv{color:var(--accent-ink); font-weight:700}
.fcol.past{opacity:.45}

/* small lists inside a tile */
.trow{display:flex; align-items:center; gap:10px; min-height:38px; border-top:1px solid var(--line-soft);
  font-size:var(--t-sm); color:var(--ink); text-decoration:none; min-width:0}
.tile .trow:first-child{margin-top:var(--s2)}
.trow.q{color:var(--ink-3); font-size:var(--t-xs)}
.trow .tt{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500}
.trow .tr{margin-left:auto; flex:none; font-size:var(--t-xs); color:var(--ink-3)}
.trow .tr.urgent{color:var(--danger); font-weight:600}
a.trow:hover .tt{color:var(--accent-ink)}
.t-due .wl,.t-due > div{margin-top:var(--s2)}

/* capture: a field the tile's width */
.t-cap input{flex:1; min-width:0; height:40px; border-radius:var(--r-sm); padding:0 14px; font-size:var(--t-md);
  background:var(--field); border:1px solid var(--line-soft)}
.t-cap select{height:40px; width:auto; border-radius:var(--r-sm); background:var(--field); border:1px solid var(--line-soft)}
.t-cap button{height:40px; border-radius:var(--r-sm); padding:0 18px}

@media (max-width:1100px){
  .t-next,.t-due,.t-cap{grid-column:span 12}
  .t-exam,.t-free,.t-dl,.t-ideas{grid-column:span 6}
  .t-courses{grid-column:span 7} .t-week{grid-column:span 5}
}
@media (max-width:700px){
  .bento-page{padding:var(--s5) var(--s4) var(--s8)}
  .bento > .tile{grid-column:1 / -1}
  .huge{font-size:44px}
  .t-cap{flex-wrap:wrap} .t-cap input{flex-basis:100%}
}

/* =========================================================================
   The Apple layer
   =========================================================================
   Last in the file on purpose: it reshapes components defined above (the
   notebook pages, the course page, the chrome) into grouped cards, tinted
   buttons and SF titles without rewriting each section. Selectors here match
   or exceed the specificity of the rules they replace; grep this block
   before adding a rule above that fights it. */

/* ---- type ---- */
body{letter-spacing:-.003em}
.nb-head h1,.hero-head h1,.pagehead-left h1,.pagehead-left strong,.bt-head h1{
  font:700 34px/1.1 var(--sans); letter-spacing:-.022em}
.nb-h2,.card > h2,.card details.fold > summary,.course-side .panel > h2,.pweek-h,
.plan-col > h2,.chart-fig .cap,.nbform h3{
  font:600 20px/1.25 var(--sans); letter-spacing:-.012em; border-bottom:0; padding-bottom:0}
.nb-h2{margin-bottom:var(--s2)}
.nb-h2 .muted,.pweek-h .muted,.course-side .panel > h2 .muted{font:400 13px/1.4 var(--sans); letter-spacing:0}
.nb-sum{font-size:var(--t-md); margin-top:calc(var(--s2) * -1)}
.range{font:700 22px/1 var(--sans); letter-spacing:-.015em}

/* ---- buttons and fields: tinted, rounded, no outlines ---- */
button,.btn{border:0; background:var(--fill); border-radius:var(--r-sm); font-weight:500}
button:hover,.btn:hover{background:color-mix(in srgb,var(--ink) 14%,transparent); border:0}
button.primary,.btn.primary{background:var(--accent-fill); color:#fff; font-weight:600}
button.primary:hover,.btn.primary:hover{background:color-mix(in srgb,var(--accent-fill) 85%,#fff)}
button.ghost{background:transparent}
button.ghost:hover{background:var(--fill)}
.allbtn,.wkbtn{border:0; background:var(--fill); border-radius:8px; color:var(--ink)}
.allbtn:hover,.wkbtn:hover{background:color-mix(in srgb,var(--ink) 14%,transparent); border:0}
.wkbtn.wknow{background:var(--fill); color:var(--accent-ink); font-weight:600}
.wkbtn.wknow:hover:not(:disabled){background:color-mix(in srgb,var(--ink) 14%,transparent)}
.wkbtn.wknow:disabled{background:transparent; color:var(--ink-3); font-weight:500}
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"])),
select,textarea{border-color:var(--line-soft); border-radius:var(--r-sm)}

/* ---- chrome ---- */
.topbar::before{background:var(--glass); box-shadow:inset 0 -1px 0 var(--line-soft)}
.brandmark .word{font:600 17px/1 var(--sans); letter-spacing:.04em}
.view{border-radius:8px}
.view.on{background:var(--fill); color:var(--ink); font-weight:600}
.view.on::after{display:none}
.views .morebtn.on{background:var(--fill)}
.navhits,.detail{border-radius:14px}
.navsearch input,.coursepick{border-radius:var(--r-sm)}

/* ---- grouped cards: the notebook's ruled blocks become iOS lists ---- */
.nbk{--lh:40px}
.nbk .lines{background:var(--surface); border-radius:var(--r-md); padding:2px 14px}
.nbk .lines > .ln,.nbk .lines > details > summary.ln,.nbk .lines > .exd,.nbk .lines > .skipd,
.nbk .lines > form{border-bottom:1px solid var(--line-soft)}
.nbk .lines > :last-child,.nbk .lines > details:last-child > summary.ln{border-bottom:0}
.nbk .ln{font-size:13px}
.nbk .ln.prose{font-size:var(--t-sm); line-height:1.45; padding-top:10px; padding-bottom:10px}
.nbk button.ln:hover,.nbk summary.ln:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}

/* Week: each day is a card with its date on top. */
.nb{gap:var(--s4) var(--s3)}
.nbcol{gap:var(--s3)}
.nbday{background:var(--surface); border-radius:var(--r-md); padding:12px 12px 6px}
.nbday > .lines{background:none; padding:0; border-radius:0;
  min-height:calc(var(--lh) * 3)}
.nbday.short > .lines{min-height:var(--lh)}
.nbh{border-bottom:0; padding-bottom:6px}
.nbh .n{font:700 26px/1 var(--sans); letter-spacing:-.02em}
.nbh .d{font-size:13px}
.nbday.past{opacity:.72}
.nbday.today{box-shadow:inset 0 0 0 2px var(--accent)}
.nbday.today .nbh{box-shadow:none}
.nb-foot{gap:var(--s5) var(--s5)}

/* Today and To-Do. */
.planline,.todo-sheet{background:var(--surface); border-radius:var(--r-md); border:0}
.todo-sheet{padding:2px 14px}

/* Calendar heading: today's date in a filled circle, as Apple's Calendar. */
.daynames > div:not(:first-child){border-bottom:0}
.daynames .dnum{font:600 20px/1 var(--sans); padding:5px 7px; border-radius:999px; min-width:32px;
  text-align:center}
.daynames .is-today{box-shadow:none}
.daynames .is-today .dow{color:var(--accent-ink); font-weight:600}

/* Cards elsewhere. */
.card{border:0; border-radius:var(--r-md); background:var(--surface)}
.chart-fig{border-top:0; background:var(--surface); border-radius:var(--r-md); padding:16px 18px}
.pweek{background:var(--surface); border-radius:var(--r-md); padding:12px 16px 6px}
.pfold{background:var(--surface); border:0; border-radius:var(--r-md)}
.pfold > summary{border-radius:var(--r-md)}
.course-side .panel{background:var(--surface); border-radius:var(--r-md); padding:14px 16px 8px;
  margin-bottom:var(--s3)}
.dropzone{border-radius:var(--r-md)}
.sheet.nbform{border-radius:var(--r-lg); border:0}
.minitrack,.bigtrack,.cp .track,.goal .track,.macro .mt,
.minitrack .fill,.bigtrack .fill,.cp .fill,.goal .track .fill,.macro .mf{border-radius:999px}
.bigtrack{height:6px}
.cp .fill{background:var(--ink-3)}
.cp.done .fill{background:var(--ok)}
.fday .bar,.fday .bar .used{border-radius:var(--r-xs)}
/* Calendar heading reads "Mon 9", together, as Apple's Calendar does. */
.daynames > div{justify-content:flex-start; gap:6px; align-items:center}
.daynames .dow{order:1}
.daynames .dnum{order:2}
.statbar .bigtrack .fill,.bigtrack .fill{background:var(--accent)}
.statbar .bigtrack{height:6px; background:var(--surface)}

/* ---- now and today wear orange (rule 1) ---- */
.nbday.today{box-shadow:inset 0 0 0 2px var(--now)}
.nbday.today .nbh .n,.nbday.today .nbh .d{color:var(--now-ink)}
.daynames .is-today .dnum{background:var(--now); color:var(--on-now)}
.daynames .is-today .dow{color:var(--now-ink)}
.now{border-top-color:var(--now)}
.now::before{background:var(--now)}
.tl.is-now{box-shadow:inset 3px 0 0 var(--now)}
.tl.is-now .when,.today-page .ln.agl.is-now .t{color:var(--now-ink)}
.today-page .ln.agl.is-now{box-shadow:inset 2px 0 0 var(--now)}
.mcell.today .dn{background:var(--now); color:var(--on-now)}
.t-next{background:linear-gradient(135deg, color-mix(in srgb,var(--now) 30%,var(--tile)), var(--tile) 72%)}
.t-next .tk{color:var(--now-ink)}
.fcol.today .fb i{background:var(--now)}
.fcol.today .fd,.fcol.today .fv{color:var(--now-ink)}

/* ---- Today (the home page): tiles for now, exams, today, prepare ---- */
.home3 .t-next{grid-column:span 7; grid-row:span 2}
.home3 .t-exam{grid-column:span 5; grid-row:span 2}
.home3 .t-today{grid-column:span 7; grid-row:span 2}
.home3 .t-prep{grid-column:span 5; grid-row:span 2}
.home3 .t-due{grid-column:span 12; grid-row:auto}
.home3 .t-cap{grid-column:span 12}
.home3 .huge{font-size:44px}
.t-plan{margin-top:var(--s4); width:100%; height:40px; padding:0 14px; border-radius:var(--r-sm);
  background:color-mix(in srgb,var(--bg) 70%,transparent); border:1px solid var(--line-soft);
  font-size:var(--t-md)}
.xrow{display:grid; grid-template-columns:48px minmax(0,1fr) auto; align-items:center; gap:12px;
  min-height:58px; padding:6px 0; border-top:1px solid var(--line-soft); cursor:pointer}
.tile .xrow:first-child{border-top:0; margin-top:var(--s2)}
.xrow:hover .xt{color:var(--accent-ink)}
.xn{font:700 28px/1 var(--sans); letter-spacing:-.02em; text-align:right; font-variant-numeric:tabular-nums}
.xn.soon{color:var(--danger)}
.xm{display:flex; flex-direction:column; min-width:0}
.xt{font-size:15px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.xs{font-size:12px; color:var(--ink-3)}
.xd{font-size:12px; color:var(--ink-3); white-space:nowrap}
.hrow{display:flex; align-items:center; gap:10px; min-height:42px; padding:4px 0;
  border-top:1px solid var(--line-soft); font-size:var(--t-sm); color:var(--ink); text-decoration:none; min-width:0}
.tile .hrow:first-child{border-top:0; margin-top:var(--s2)}
.hrow .sw{width:3px; height:18px; border-radius:2px; flex:none; background:var(--ev, var(--ink-3))}
.hrow .t{width:92px; flex:none; font-size:13px; color:var(--ink-3); white-space:nowrap}
.hrow .c{min-width:0; display:flex; flex-direction:column; overflow:hidden}
.hrow .c b{font-weight:600}
.hrow .m{font-size:12px; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.hrow .r{margin-left:auto; flex:none; font-size:12px; color:var(--ink-3)}
.hrow.quiet{color:var(--ink-3); font-size:13px}
.hrow.skipped{color:var(--ink-3)} .hrow.skipped .c{text-decoration:line-through}
.hrow.is-past{opacity:.6}
.hrow.is-now .t{color:var(--now-ink); font-weight:600}
.hrow.is-now{box-shadow:inset 3px 0 0 var(--now); padding-left:8px}
a.hrow:hover .c{color:var(--accent-ink)}
.hrow.nudge .c{color:var(--ink-2)}
.hrow.nudge .r{color:var(--accent-ink); font-weight:600}
@media (max-width:1100px){
  .home3 .t-next,.home3 .t-exam,.home3 .t-today,.home3 .t-prep{grid-column:span 12; grid-row:auto}
}
.hrow .c{display:block; white-space:nowrap; text-overflow:ellipsis}
.hrow.prep .c{display:flex; flex-direction:column; white-space:normal}

/* ---- the course page: four figures and a roadmap ---- */
.statbar .nb-sum{font-size:var(--t-lg); color:var(--ink-2); margin:0; max-width:65ch}
/* With the drop zone open, it already says there is no plan: once is enough. */
#plan-drop:not([hidden]) ~ #rows > .nothing{display:none}
.cstats{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--s3); margin-top:var(--s4)}
.cstat{display:flex; flex-direction:column; gap:4px; min-width:0; padding:14px 16px 16px;
  background:var(--surface); border-radius:var(--r-md)}
.cstat .k{font-size:12px; font-weight:600; color:var(--ink-3)}
.cstat .v{font:700 24px/1.1 var(--sans); letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.cstat .s{font-size:13px; color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.cstat.now .k{color:var(--now-ink)}
.cstat.warn .v{color:var(--warn)}
.cbar{display:block; height:4px; margin-top:8px; border-radius:999px; background:var(--line-soft); overflow:hidden}
.cbar i{display:block; height:100%; border-radius:999px; background:var(--course, var(--accent))}
@media (max-width:900px){ .cstats{grid-template-columns:repeat(2,minmax(0,1fr))} }

.roadmap{background:var(--surface); border-radius:var(--r-md); padding:16px 0 6px; margin-bottom:var(--s6)}
.roadmap > h2{display:flex; align-items:baseline; gap:var(--s2); margin:0 0 4px; padding:0 18px;
  font:600 20px/1.2 var(--sans); letter-spacing:-.012em}
.roadmap > h2 .muted{font:400 13px/1 var(--sans); letter-spacing:0}
.rm-scroll{overflow-x:auto; scrollbar-width:thin; padding:0 18px 10px; scroll-behavior:smooth}
.rm{display:flex; list-style:none; margin:0; padding:0; min-width:max-content}
.rm-w{position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:2px;
  width:112px; flex:none; padding:0 8px 6px 0; cursor:pointer}
/* The track: a line through every stop, coloured as far as you have come. */
.rm-w::before{content:""; position:absolute; left:0; right:0; top:39px; height:3px; background:var(--line-soft)}
.rm-w.done::before,.rm-w.behind::before,.rm-w.quiet::before{background:var(--course)}
.rm-w.cur::before{background:linear-gradient(90deg, var(--course) 0 9px, var(--line-soft) 9px)}
.rm-w:first-child::before{left:6px}
.rm-w:last-child::before{right:auto; width:9px}
.rm-top{height:24px; display:flex; align-items:flex-end}
.rm-now{font-size:11px; font-weight:700; color:var(--on-now); background:var(--now);
  padding:2px 7px; border-radius:999px}
.rm-dot{position:relative; z-index:1; width:18px; height:18px; margin:5px 0 6px; border-radius:50%;
  background:var(--surface); box-shadow:inset 0 0 0 3px var(--line)}
.rm-w.done .rm-dot{background:var(--course); box-shadow:none}
.rm-w.done .rm-dot::after{content:""; position:absolute; left:6px; top:3px; width:4px; height:8px;
  border:solid var(--surface); border-width:0 2px 2px 0; transform:rotate(45deg)}
.rm-w.quiet .rm-dot{width:10px; height:10px; margin:9px 4px 10px; background:var(--course); box-shadow:none; opacity:.6}
.rm-w.behind .rm-dot{box-shadow:inset 0 0 0 3px var(--warn); background:conic-gradient(var(--warn) var(--fill), transparent 0)}
.rm-w.cur .rm-dot{box-shadow:0 0 0 4px var(--now-soft), inset 0 0 0 3px var(--now);
  background:conic-gradient(var(--now) var(--fill), var(--surface) 0)}
.rm-w.exam .rm-dot{border-radius:5px; box-shadow:inset 0 0 0 3px var(--danger); background:var(--surface)}
.rm-k{font-size:13px; font-weight:700}
.rm-w.cur .rm-k{color:var(--now-ink)}
.rm-w.future .rm-k,.rm-w.future .rm-d{color:var(--ink-3)}
.rm-d{font-size:12px; color:var(--ink-3)}
.rm-l{font-size:12px; color:var(--ink-2); max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rm-x{font-size:12px; font-weight:600; color:var(--ink-2); font-variant-numeric:tabular-nums}
.rm-w.done .rm-x{color:var(--ok)}
.rm-w.behind .rm-x{color:var(--warn)}
.rm-tags{display:flex; flex-wrap:wrap; gap:4px; margin-top:4px}
.rm-tag{font-size:11px; font-weight:600; padding:2px 7px; border-radius:999px; white-space:nowrap}
.rm-tag.lab{background:var(--fill); color:var(--ink-2)}
.rm-tag.exam{background:color-mix(in srgb,var(--danger) 22%,transparent); color:var(--danger)}
.rm-w:hover .rm-k{color:var(--accent-ink)}
.cstat.cnext .k{color:var(--now-ink)}

/* The roadmap fits the card: the whole course at a glance is the point. It
   scrolls only when the window is too narrow for every week. */
.rm{min-width:0; width:100%}
.rm-w{flex:1 1 0; min-width:62px; width:auto; padding-right:4px}
.rm-l{display:none}
.rm-tag{font-size:10px; padding:2px 6px}

/* The course header: a badge in the course colour carrying the code, the
   name large, one quiet line of facts under it. */
.course-main ~ .pagehead,.pagehead:has(#c-name){align-items:flex-start}
.pagehead-left:has(#c-name){align-items:center; row-gap:6px}
.c-badge{display:inline-flex; align-items:center; height:26px; padding:0 10px; border-radius:999px;
  font-size:13px; font-weight:700; letter-spacing:.01em; color:var(--ink);
  background:color-mix(in srgb,var(--course, var(--accent)) 30%,transparent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--course, var(--accent)) 60%,transparent)}
.pagehead-left #c-name{flex:0 1 auto}
.c-meta{flex-basis:100%; font-size:14px; color:var(--ink-3)}
.c-finish{height:32px; padding:0 14px; font-size:13px}

/* All / Open: a segmented control, as in Apple's apps. */
.seg{display:inline-flex; padding:2px; gap:2px; border-radius:9px; background:var(--fill); margin-left:var(--s3)}
.seg button{height:26px; padding:0 12px; border-radius:7px; background:transparent; font-size:13px;
  font-weight:500; color:var(--ink-2)}
.seg button:hover{background:transparent; color:var(--ink)}
.seg button.on{background:var(--surface-2); color:var(--ink); font-weight:600;
  box-shadow:0 1px 2px rgba(0,0,0,.2)}
.plan-col > h2{font:600 20px/1.2 var(--sans)}

/* Upcoming sessions: one compact line each. */
.usess{display:grid; grid-template-columns:auto auto 1fr; grid-template-rows:auto auto; column-gap:10px;
  padding:8px 0; border-top:1px solid var(--line-soft); font-size:13px; text-decoration:none; color:var(--ink)}
.course-side .panel .usess:first-child{border-top:0}
.usess .ud{font-weight:600}
.usess .ut{color:var(--ink-2)}
.usess .uk{justify-self:end; color:var(--ink-2)}
.usess .ur{grid-column:1 / -1; font-size:12px; color:var(--ink-3)}
.usess.skipped{color:var(--ink-3)} .usess.skipped .ud,.usess.skipped .ut{text-decoration:line-through; color:var(--ink-3)}
.usess.more{display:block; color:var(--accent-ink); font-weight:500}

.rm-w{min-width:36px}
.rm-d{display:none}
.rm-w.cur .rm-d,.rm-w.exam .rm-d{display:block}
.rm-k{font-size:12px}
.usess.note{display:block; color:var(--ink-3); font-size:12px}
.course-side{padding-top:0} .course-side .panel:first-child{margin-top:0}

/* =========================================================================
   To-Do, as Reminders reads
   ========================================================================= */
.todo2{max-width:880px; gap:var(--s5); padding:var(--s7) var(--s7) var(--s8)}
.t2-head{display:flex; align-items:flex-end; justify-content:space-between; gap:var(--s3)}
.t2-head h1{font:700 34px/1.1 var(--sans); letter-spacing:-.022em; margin:0}
.t2-card{background:var(--surface); border-radius:var(--r-md)}
/* Smart lists: four tiles, each a count and a name, the open one tinted. */
.t2-smart{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:var(--s3)}
.t2-list{display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; align-items:center;
  gap:6px 10px; height:auto; padding:12px 14px; border-radius:var(--r-md); background:var(--surface);
  text-align:left; justify-content:stretch}
.t2-list:hover{background:var(--surface-2)}
.t2-ic{width:28px; height:28px; border-radius:50%; background:var(--lc); grid-row:1}
.t2-n{justify-self:end; font:700 24px/1 var(--sans); letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.t2-l{grid-column:1 / -1; font-size:14px; font-weight:600; color:var(--ink-2)}
.t2-list.today{--lc:var(--now)} .t2-list.upcoming{--lc:var(--accent)}
.t2-list.anytime{--lc:#8e8e93} .t2-list.all{--lc:var(--ink-2)}
.t2-list.on{box-shadow:inset 0 0 0 2px var(--lc)}
.t2-list.on .t2-l{color:var(--ink)}
.t2-labels{display:flex; flex-wrap:wrap; gap:6px; margin-top:calc(var(--s2) * -1)}
.t2-labels:empty{display:none}
.t2-labels .chip{height:28px; padding:0 12px; border-radius:999px; font-size:13px; background:var(--fill)}
.t2-labels .chip[style]::before{content:""; width:8px; height:8px; border-radius:50%; background:var(--ev);
  display:inline-block; margin-right:6px}
.t2-labels .chip.on{background:var(--ink); color:var(--bg)}
/* The composer: one line to write in, the options under it. */
.t2-compose{padding:6px 10px 10px}
.t2-line{display:flex; align-items:center; gap:10px}
.t2-plus{width:24px; height:24px; flex:none; display:grid; place-items:center; border-radius:50%;
  background:var(--accent-fill); color:#fff; font-weight:700; line-height:1}
.t2-line input{flex:1; min-width:0; height:44px; border:0; background:transparent; font-size:16px; padding:0}
.t2-line input:focus{box-shadow:none}
.t2-opts{display:flex; flex-wrap:wrap; gap:6px; padding-left:34px}
.t2-opts input,.t2-opts select,.t2-opts .datebtn{height:30px; font-size:13px; border-radius:999px;
  background:var(--fill); border:0; padding:0 12px; width:auto}
.t2-opts .est{width:auto; min-width:12ch}
/* Sections and rows. */
.t2-sec{display:flex; flex-direction:column; gap:6px}
.t2-sec h3{display:flex; align-items:baseline; gap:8px; margin:var(--s2) 4px 0; font:700 17px/1.2 var(--sans)}
.t2-sec h3 span{font-size:13px; font-weight:500; color:var(--ink-3)}
.t2-sec.overdue h3{color:var(--danger)}
.t2-rows{padding:0 6px}
.todo2 .todo{display:flex; align-items:flex-start; gap:12px; padding:12px 8px; border-top:1px solid var(--line-soft);
  cursor:default; background:none; border-radius:0; box-shadow:none}
.todo2 .t2-rows .todo:first-child,.todo2 #todo-done .todo:first-child{border-top:0}
.todo2 .t2-check{appearance:none; -webkit-appearance:none; width:22px; height:22px; flex:none; margin:0;
  border-radius:50%; border:2px solid var(--line); background:transparent; cursor:pointer; display:grid; place-items:center;
  transition:background-color var(--fast) var(--ease), border-color var(--fast) var(--ease)}
.todo2 .t2-check:hover{border-color:var(--accent)}
.todo2 .t2-check:checked{background:var(--accent-fill); border-color:var(--accent-fill)}
.todo2 .t2-check:checked::after{content:""; width:5px; height:10px; margin-top:-2px; border:solid #fff;
  border-width:0 2px 2px 0; transform:rotate(45deg)}
.todo2 .todo.urg-overdue .t2-check{border-color:var(--danger)}
.todo2 .body{flex:1; min-width:0; display:flex; flex-direction:column; gap:4px}
.todo2 .txt{font-size:15px; font-weight:500; line-height:1.35; color:var(--ink); cursor:text}
.todo2 .meta{display:flex; flex-wrap:wrap; align-items:center; gap:6px}
.todo2 .meta > span{font-size:12px; color:var(--ink-3); cursor:pointer}
.todo2 .meta > span.empty{display:none}
.todo2 .todo:hover .meta > span.empty{display:inline; opacity:.7}
.todo2 .m-due.urgent{color:var(--danger); font-weight:600}
.todo2 .m-cat:not(.empty){display:inline-flex; align-items:center; gap:5px; padding:1px 8px; border-radius:999px;
  background:color-mix(in srgb,var(--ev) 22%,transparent); color:var(--ink-2); font-weight:500}
.todo2 .m-cat:not(.empty)::before{content:""; width:6px; height:6px; border-radius:50%; background:var(--ev)}
.todo2 .del{flex:none; width:28px; height:28px; padding:0; border-radius:50%; background:transparent;
  color:var(--ink-3); opacity:0; font-size:18px}
.todo2 .todo:hover .del,.todo2 .del:focus-visible{opacity:1}
.todo2 .del:hover{background:var(--fill); color:var(--danger)}
.todo2 .todo.is-done .txt{color:var(--ink-3); text-decoration:line-through}
.t2-done > summary{display:flex; align-items:center; justify-content:space-between; padding:14px 16px; list-style:none;
  cursor:pointer; font-weight:600; color:var(--ink-2)}
.t2-done > summary::-webkit-details-marker{display:none}
.t2-show{font-size:13px; font-weight:500; color:var(--accent-ink)}
.t2-done[open] .t2-show{font-size:0} .t2-done[open] .t2-show::after{content:"Hide"; font-size:13px}
.t2-done #todo-done{padding:0 6px}
.t2-done-foot{padding:8px 16px 14px}
.t2-allclear{padding:24px; text-align:center; color:var(--ink-2)}
.t2-empty{color:var(--ink-3); margin:0 4px}
.todo2 .cat-editor{padding:12px 16px}
@media (max-width:700px){ .t2-smart{grid-template-columns:repeat(2,minmax(0,1fr))} .todo2{padding:var(--s5) var(--s4) var(--s8)} }
main.dash.todo2,[data-shell="rail"] main.dash.todo2{max-width:880px}
.todo2 .todo{margin:0; border-bottom:0; border-radius:10px}
.todo2 .todo.urg-overdue,.todo2 .todo.urg-today,.todo2 .todo.urg-soon{box-shadow:none}
.todo2 .todo:hover{background:color-mix(in srgb,var(--ink) 4%,transparent)}
.todo2 .todo.urg-today .m-due{color:var(--now-ink)}
.t2-labels .chip.on{background:var(--accent-soft); color:var(--accent-ink); font-weight:600}

/* ---- Week: cards of equal height, the day's to-dos and free time in them ---- */
.week-page .wk-stats{margin-top:0}
.week-page .nb{align-items:stretch}
.week-page .nbcol{display:flex; flex-direction:column}
.week-page .nbcol > .nbday{flex:1}
.week-page .nbday{display:flex; flex-direction:column}
.week-page .nbday > .lines{flex:1; min-height:calc(var(--lh) * 2)}
.week-page .nbday.short > .lines{min-height:0}
.wtodo{gap:10px}
.wtodo .t2-check{appearance:none; -webkit-appearance:none; width:16px; height:16px; flex:none; margin:0;
  border-radius:50%; border:1.5px solid var(--line); cursor:pointer; display:grid; place-items:center; background:transparent}
.wtodo .t2-check:checked{background:var(--accent-fill); border-color:var(--accent-fill)}
.wtodo .t2-check:checked::after{content:""; width:3px; height:7px; margin-top:-1px; border:solid #fff;
  border-width:0 1.5px 1.5px 0; transform:rotate(45deg)}
.wtodo .wt{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500}
.wtodo .we{margin-left:auto; color:var(--ink-3); flex:none}
.wtodo.done .wt{color:var(--ink-3); text-decoration:line-through}
.dfree{display:flex; flex-direction:column; gap:2px; padding:8px 2px 6px; margin-top:6px;
  border-top:1px solid var(--line-soft); font-size:12px; color:var(--ink-3)}
.dfree .cbar{margin-top:2px; height:3px}
.dfree .cbar i,.cstat.free .cbar i{background:var(--ink-3)}
.nbday.today .dfree .cbar i{background:var(--now)}
.week-page .wtodo{height:auto; min-height:var(--lh); padding-top:8px; padding-bottom:8px; align-items:flex-start}
.week-page .wtodo .wt{white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; line-height:1.3}
.week-page .wtodo .t2-check{margin-top:1px}
/* "+ Plan" takes no room until you reach for it (today shows it). */
.week-page .nbday:not(.today) .ln.addplan{height:0; min-height:0; padding:0; overflow:hidden; border:0}
.week-page .nbday:not(.today):hover .ln.addplan,.week-page .nbday .ln.addplan:focus-visible{height:var(--lh); border-bottom:1px solid var(--line-soft)}
.week-page section:has(> div > #wk-also:empty),.week-page section:has(#wk-also .prose:only-child){display:none}

/* =========================================================================
   Accent styles: Classic (none), Aurora, Ink, Sunrise
   =========================================================================
   The user asked for "something that makes it stand out" and, shown three,
   wanted to switch between all of them. `data-accent` on <html>, set before
   first paint like the theme, chosen from the Style menu in the chrome
   (`life.accent` in localStorage). Each works on both themes. They change
   decoration only; colour still means the same state in all of them. */

/* Aurora: a soft colour field behind the top of the page, glass cards. */
:root[data-accent="aurora"] body::before{content:""; position:fixed; inset:0 0 auto 0; height:560px;
  z-index:-1; pointer-events:none;
  background:radial-gradient(520px 300px at 22% -40px, rgba(94,92,230,.36), transparent 70%),
    radial-gradient(520px 320px at 62% -60px, rgba(47,139,255,.30), transparent 70%),
    radial-gradient(460px 300px at 92% 10px, rgba(255,159,10,.24), transparent 70%)}
:root[data-theme="light"][data-accent="aurora"] body::before{opacity:.7}
:root[data-accent="aurora"] :is(.tile,.cstat,.t2-card,.nbday,.t2-list,.card,.roadmap,.course-side .panel,.pweek,.pfold){
  background:color-mix(in srgb,var(--surface) 76%,transparent);
  -webkit-backdrop-filter:blur(18px) saturate(1.4); backdrop-filter:blur(18px) saturate(1.4);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px color-mix(in srgb,var(--ink) 6%,transparent)}
:root[data-accent="aurora"] .rail{background:color-mix(in srgb,var(--rail-bg) 78%,transparent);
  -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px)}

/* Ink: a deep indigo sidebar, a blue-to-violet signature on what you press. */
:root[data-accent="ink"]{--sig:linear-gradient(135deg,#3b82f6,#8b5cf6)}
:root[data-accent="ink"] .rail{background:linear-gradient(180deg,#1d1f4a,#16173a); border-right-color:rgba(255,255,255,.06)}
:root[data-accent="ink"] .rail :is(.rl,.rc-title,.rc-tn,.brandmark .word){color:#ecebff}
:root[data-accent="ink"] .rail :is(.rc-sub,.rc-h,.rail-synced,.rc-x,.rc-done > summary){color:#aaabd8}
:root[data-accent="ink"] .rail :is(.rc:hover,.rl:hover){background:rgba(255,255,255,.12)}
:root[data-accent="ink"] .rail .rail-hl{background:rgba(255,255,255,.12)}
:root[data-accent="ink"] .rail .rail-next{background:rgba(255,255,255,.08); color:#fff}
:root[data-accent="ink"] .rail .rail-next .rn-w{color:#cfd0f5}
:root[data-accent="ink"] .rail .navsearch input{background-color:rgba(255,255,255,.08); border-color:transparent; color:#fff}
:root[data-accent="ink"] .rail .ghost{color:#cfd0f5}
:root[data-accent="ink"] :is(button.primary,.btn.primary,.t2-plus){background:var(--sig); border:0}
:root[data-accent="ink"] .t-next{background:linear-gradient(135deg,rgba(59,130,246,.45),rgba(139,92,246,.35) 60%,var(--surface))}
:root[data-accent="ink"] .t2-list.on{box-shadow:inset 0 0 0 2px #8b5cf6}
:root[data-theme="dark"][data-accent="ink"] :is(.bt-head h1,.t2-head h1,.nb-head h1){
  background:linear-gradient(90deg,#fff,#c7c6ff); -webkit-background-clip:text; background-clip:text; color:transparent}

/* Sunrise: one warm gradient, only where it means now. */
:root[data-accent="sunrise"]{--sig:linear-gradient(135deg,#ff9f0a,#ff375f)}
:root[data-accent="sunrise"] .t-next{background:var(--sig); color:#fff}
:root[data-accent="sunrise"] .t-next :is(.tk,.t-sub,.t-line,small,.huge){color:#fff}
:root[data-accent="sunrise"] .t-next .t-sub{opacity:.9}
:root[data-accent="sunrise"] .t-next .t-plan{background:rgba(0,0,0,.18); border-color:transparent; color:#fff}
:root[data-accent="sunrise"] .t-next .t-plan::placeholder{color:rgba(255,255,255,.85)}
:root[data-accent="sunrise"] :is(button.primary,.btn.primary,.t2-plus){background:var(--sig); border:0}
:root[data-accent="sunrise"] .rail .rail-hl{background:linear-gradient(90deg,rgba(255,159,10,.24),rgba(255,55,95,.12))}
:root[data-accent="sunrise"] .rail .rail-next{background:linear-gradient(135deg,rgba(255,159,10,.26),rgba(255,55,95,.18)); box-shadow:none}
:root[data-accent="sunrise"] :is(.rm-now,.t2-list.today .t2-ic){background:var(--sig)}
:root[data-accent="sunrise"] .nbday.today{box-shadow:inset 0 0 0 2px #ff6a3d}
:root[data-accent="sunrise"] .view.on{background:linear-gradient(90deg,rgba(255,159,10,.24),rgba(255,55,95,.14))}

/* The Style menu's swatches. */
.stylemenu .nh{display:flex; align-items:center; gap:10px}
.stylemenu .sw-a{width:18px; height:18px; border-radius:50%; flex:none; box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
.stylemenu .sw-a.classic{background:var(--surface-2)}
.stylemenu .sw-a.aurora{background:conic-gradient(#5e5ce6,#2f8bff,#ff9f0a,#5e5ce6)}
.stylemenu .sw-a.ink{background:linear-gradient(135deg,#1d1f4a,#8b5cf6)}
.stylemenu .sw-a.sunrise{background:linear-gradient(135deg,#ff9f0a,#ff375f)}
.stylemenu .nh.on{background:var(--fill)}
.stylemenu .nh-k{padding:8px 12px 4px; font-size:12px; font-weight:600; color:var(--ink-3)}
.stylemenu{padding:6px}
.stylemenu .nh{width:100%; height:36px; padding:0 10px; border:0; border-radius:8px; background:transparent;
  justify-content:flex-start; box-shadow:none; color:var(--ink); font-weight:500}
.stylemenu .nh:hover{background:var(--fill)}
.stylemenu .nh.on{background:var(--fill); color:var(--ink); box-shadow:none; font-weight:600}
.stylemenu .nh.on::after{content:"✓"; margin-left:auto; color:var(--accent-ink)}

/* One checkbox across the app: round, as Reminders draws it. */
.wkitem input[type=checkbox],.tick input[type=checkbox]{appearance:none; -webkit-appearance:none; width:18px; height:18px;
  flex:none; margin:0; border-radius:50%; border:1.5px solid var(--line); background:transparent; cursor:pointer;
  display:inline-grid; place-items:center; transition:background-color var(--fast) var(--ease)}
.wkitem input[type=checkbox]:hover,.tick input[type=checkbox]:hover{border-color:var(--accent)}
.wkitem input[type=checkbox]:checked,.tick input[type=checkbox]:checked{background:var(--accent-fill); border-color:var(--accent-fill)}
.wkitem input[type=checkbox]:checked::after,.tick input[type=checkbox]:checked::after{content:""; width:4px; height:8px; margin-top:-2px;
  border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg)}
.tick input[type=checkbox]{width:16px; height:16px}
.tick input[type=checkbox]:checked{background:var(--ok); border-color:var(--ok)}
.wkitem-d{color:var(--ink-3)}
.t2-head-btns{display:flex; gap:6px}
.t2-canvas{padding:16px 18px; display:flex; flex-direction:column; gap:10px}
.t2-canvas h2,.cat-editor h2{margin:0; font:600 17px/1.2 var(--sans)}
.cat-editor h2{margin-bottom:var(--s2)}
/* A label's colour is a round swatch the size of a control, not a bar. */
#cat-color{flex:none; width:var(--ctl-h); height:var(--ctl-h); padding:0; border:0; border-radius:50%;
  background:none; cursor:pointer; -webkit-appearance:none; appearance:none}
#cat-color::-webkit-color-swatch-wrapper{padding:0}
#cat-color::-webkit-color-swatch{border:0; border-radius:50%}
#cat-color::-moz-color-swatch{border:0; border-radius:50%}
.t2-canvas p{margin:0; font-size:13px; max-width:70ch}
.t2-canvas .frow{display:flex; gap:8px} .t2-canvas .frow input{flex:1; min-width:0}
.canvas-row{display:flex; align-items:center; gap:10px; font-size:14px}
.canvas-dot{width:8px; height:8px; border-radius:50%; background:var(--ok)}
.phone-box{margin:2px 6px 8px; padding:10px 12px; border-radius:10px; background:var(--fill);
  display:flex; flex-direction:column; gap:8px; font-size:13px; color:var(--ink-2); max-width:300px}
.phone-box p{margin:0; line-height:1.4}
.phone-box input{width:100%; font-size:12px}
.phone-btns{display:flex; gap:6px; flex-wrap:wrap}
.stylemenu{max-height:80vh; overflow-y:auto}
.phone-wrap{position:fixed; inset:0; z-index:90; display:grid; place-items:center; padding:16px;
  background:rgba(0,0,0,.45); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px)}
.phone-card{width:min(460px,100%); background:var(--surface-solid); border-radius:var(--r-lg);
  box-shadow:var(--shadow); padding:20px 22px 22px; display:flex; flex-direction:column; gap:12px}
.phone-top{display:flex; align-items:center; justify-content:space-between}
.phone-top h2{margin:0; font:700 20px/1.2 var(--sans)}
#phone-body{display:flex; flex-direction:column; gap:12px; font-size:14px; color:var(--ink-2)}
#phone-body p{margin:0; line-height:1.45}
.phone-steps{margin:0; padding-left:20px; display:flex; flex-direction:column; gap:6px; line-height:1.4}
#phone-url{width:100%; font-size:13px; font-family:var(--sans)}
.phone-btns{display:flex; gap:8px; flex-wrap:wrap}
.stylemenu .nh.acct{height:auto; padding:6px 10px; cursor:default; line-height:1.3; font-weight:600}
.stylemenu .nh.acct:hover{background:transparent}
.acct-mail{font-weight:400; font-size:12px; color:var(--ink-3)}

/* =========================================================================
   The welcome introduction (onboarding.js)
   ========================================================================= */
html.ob-open body{overflow:hidden}
.ob-wrap{position:fixed; inset:0; z-index:100; display:grid; place-items:start center; padding:min(12vh,96px) 16px 16px;
  background:color-mix(in srgb,var(--bg) 70%,transparent);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px)}
.ob-card{position:relative; width:min(560px,100%); max-height:calc(100dvh - min(12vh,96px) - 16px); overflow-y:auto;
  display:flex; flex-direction:column; gap:12px; padding:28px 28px 22px;
  background:var(--surface-solid); border-radius:24px; box-shadow:var(--shadow);
  animation:ob-in .28s var(--ease)}
@keyframes ob-in{from{opacity:0; transform:translateY(10px) scale(.98)} to{opacity:1; transform:none}}
.ob-progress{display:flex; gap:6px; margin:0 96px 6px 0}
.ob-progress span{flex:1; height:4px; border-radius:999px; background:var(--line-soft)}
.ob-progress span.past{background:var(--accent)}
.ob-progress span.cur{background:var(--accent)}
.ob-skip{position:absolute; top:22px; right:18px; height:auto; padding:4px 8px; border:0;
  background:transparent; color:var(--ink-3); font-size:13px}
.ob-skip:hover{color:var(--ink); background:transparent}
.ob-skip:empty{display:none}
.ob-icon{width:64px; height:64px; border-radius:var(--r-lg); display:grid; place-items:center;
  margin-top:8px; background:var(--accent-soft); color:var(--accent-ink)}
.ob-icon.ob-mark{background:none}
.ob-icon.ob-mark svg{width:64px; height:64px}
.ob-card h2{margin:6px 0 0; font:700 28px/1.15 var(--sans); letter-spacing:-.02em}
.ob-lead{margin:0; font-size:16px; line-height:1.45; color:var(--ink-2)}
.ob-body{display:flex; flex-direction:column; gap:12px; margin-top:6px}
.ob-points{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px}
.ob-points li{position:relative; padding-left:26px; font-size:15px; line-height:1.45; color:var(--ink-2)}
.ob-points li::before{content:"✓"; position:absolute; left:0; top:1px; width:18px; height:18px; border-radius:50%;
  display:grid; place-items:center; font-size:11px; font-weight:800; color:#fff; background:var(--ok)}
.ob-points b{color:var(--ink)}
.ob-row{display:flex; gap:8px} .ob-row input{flex:1; min-width:0; height:44px; font-size:15px}
.ob-row button{height:44px; padding:0 18px}
.ob-how{font-size:14px; color:var(--ink-2)}
.ob-how summary{cursor:pointer; color:var(--accent-ink); font-weight:600; list-style:none;
  display:inline-flex; align-items:center; gap:6px}
.ob-how summary::-webkit-details-marker{display:none}
.ob-caret{flex:none; transition:transform var(--fast) var(--ease)}
.ob-how[open] .ob-caret{transform:rotate(90deg)}
@media (prefers-reduced-motion:reduce){ .ob-caret{transition:none} }
.ob-how ol{margin:8px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:4px}
.ob-out:empty{display:none}
.ob-ok{color:var(--ok); font-weight:600; font-size:14px}
.ob-err{color:var(--danger); font-size:14px; line-height:1.4}
.ob-courses{display:flex; flex-wrap:wrap; gap:6px; margin-top:6px}
.ob-course{display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:13px;
  font-weight:700; background:color-mix(in srgb,var(--c) 26%,transparent)}
.ob-course span{font-weight:500; color:var(--ink-2)}
.ob-chips{display:flex; flex-wrap:wrap; gap:6px; max-height:180px; overflow-y:auto}
.ob-chip{height:34px; padding:0 14px; border-radius:999px; background:var(--fill); font-weight:600}
.ob-chip.on{background:var(--accent-fill); color:#fff}
.ob-note{margin:0; font-size:13px; color:var(--ink-3)}
.ob-nav{display:flex; align-items:center; gap:10px; margin-top:14px}
.ob-nav .ob-count{flex:1; text-align:center; font-size:13px; color:var(--ink-3)}
.ob-nav #ob-next{height:44px; padding:0 22px; font-size:15px}
.ob-nav #ob-back{height:44px; padding:0 22px; font-size:15px}
.ob-nav #ob-back[hidden]+.ob-count{text-align:left}
@media (max-width:500px){ .ob-card{padding:22px 18px 18px} .ob-card h2{font-size:24px} }

/* The signed-in account at the foot of the rail. */
.rail-acct[hidden]{display:none}
.acct-btn{display:flex; align-items:center; gap:10px; width:100%; height:auto; padding:8px; border-radius:12px;
  background:transparent; text-align:left; justify-content:flex-start}
.acct-btn:hover{background:var(--fill)}
.acct-av{width:32px; height:32px; flex:none; border-radius:50%; display:grid; place-items:center;
  font-size:13px; font-weight:700; color:#fff; background:linear-gradient(135deg,var(--accent),#7a5cff)}
.acct-who{display:flex; flex-direction:column; min-width:0}
.acct-name{font-size:14px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.acct-who .acct-mail{font-size:12px; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.acct-menu{padding:6px}
.acct-menu{display:flex; flex-direction:column; gap:2px}
.acct-item{display:flex; align-items:center; width:100%; height:36px; padding:0 10px; border:0; border-radius:8px;
  background:transparent; justify-content:flex-start; box-shadow:none; color:var(--ink); font-size:14px; font-weight:500;
  white-space:nowrap}
.acct-item:hover{background:var(--fill)}
.acct-out{color:var(--danger)!important}
.style-acct{display:none}
.acct-line{padding:2px 10px 6px; font-size:13px; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis}
@media (max-width:700px){ .style-acct{display:block} .rail-acct{display:none!important} }
/* The door: Sign out beside Sync, Style and the theme. Red on hover only,
   so the row stays calm. On a phone the Style menu carries Sign out. */
#chrome-signout:hover{color:var(--danger)}
@media (max-width:700px){ [data-shell="rail"] #chrome-signout{display:none} }

/* Shared plans on the course page (website only). */
.plan-shared{display:flex; flex-direction:column; gap:var(--s2); margin:var(--s2) 0 var(--s3);
  padding:var(--s3); border-radius:var(--r-md); background:var(--surface)}
.plan-shared[hidden]{display:none}
.ps-lead{margin:0; font-size:var(--t-md)}
.ps-row{display:flex; align-items:center; justify-content:space-between; gap:var(--s3); font-size:var(--t-sm)}
.ps-share{display:flex; align-items:center; gap:var(--s2); font-size:var(--t-sm)}
.ps-note{font-size:var(--t-xs)}
#ps-name{max-width:260px}
.dropzone .linkbtn{background:none; border:0; padding:0; height:auto; color:var(--accent-ink); font-weight:600; cursor:pointer}
.dz-result textarea#dz-table{width:100%; min-height:160px; font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; padding:var(--s2)}

/* Moving between pages: a short cross-fade instead of a blank flash, and the
   sidebar (named in shell-rail.css) stands still while the page changes.
   Same-origin navigations only; browsers without it simply navigate. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 140ms; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* A page appears whole: while it has not rendered from its data, its main
   column is not drawn (common.js, LS.ready), then fades in. Before, the
   skeleton showed and each part pushed the next down as it arrived. */
html.loading main{opacity:0}
main{transition:opacity 120ms var(--ease)}
@media (prefers-reduced-motion: reduce){ main{transition:none} }

/* The selected row's fill slides to the new selection on a page change
   (named in nav.js). Slightly longer than the page fade, so the eye follows
   the fill; the old and new fill cross over inside it. */
::view-transition-group(rail-hl){animation-duration:240ms; animation-timing-function:cubic-bezier(.2,0,0,1)}
::view-transition-old(rail-hl),::view-transition-new(rail-hl){animation-duration:240ms; height:100%}

/* The roadmap as a switchback (course.js renderRoadmap). */
.rm-road{padding:6px 18px 4px}
.rm-road svg{display:block; overflow:visible}
.rm-road-bg{fill:none; stroke:var(--line); stroke-width:3; stroke-linecap:round; stroke-linejoin:round}
.rm-road-done{fill:none; stroke:var(--course); stroke-opacity:.7; stroke-width:3; stroke-linecap:round; stroke-linejoin:round}
.rm-halo{fill:var(--surface)}
.rm-ring{fill:var(--bg); stroke:var(--line); stroke-width:2}
.rm-arc{fill:none; stroke-width:2.5; stroke-linecap:round}
.rm-now{fill:none; stroke:var(--now); stroke-width:1.5; opacity:.7}
.rm-check{fill:none; stroke:#fff; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.rm-exam{fill:var(--danger)}
.rm-flag{fill:#fff; stroke:#fff; stroke-width:1.6; stroke-linejoin:round}
.rm-n{text-anchor:middle; font:600 11px var(--sans); fill:var(--ink-2)}
.rm-n.cur{fill:var(--now-ink, var(--now))}
.rm-n.quiet,.rm-n.future{fill:var(--ink-3)}
.rm-t{text-anchor:middle; font:600 12px var(--sans); fill:var(--ink-2)}
.rm-s{text-anchor:middle; font:400 11px var(--sans); fill:var(--ink-3)}
.rm-t.cur{fill:var(--now-ink, var(--now))}
.rm-t.exam{fill:var(--danger)}
.rm-s.behind{fill:var(--warn)}
.rm-stop{cursor:pointer; outline:none}
.rm-stop:hover .rm-ring{stroke:var(--ink-3)}
.rm-stop:focus-visible .rm-halo{stroke:var(--accent); stroke-width:2}
.rm-passed{fill:none; stroke:var(--course); stroke-opacity:.7; stroke-width:2}
.rm-check.quiet{stroke:var(--course)}

/* =========================================================================
   The course page without the boxes (2026-11-17).

   "Everything is block on block": every part of the page sat in its own
   card, so nothing read as more important than anything else and the page
   looked like a stack of tiles. Apple's rule is that content stands on the
   page and a container is earned: only a group of rows that belong
   together gets one. So here the figures are one row divided by hairlines,
   the roadmap stands on the canvas, the plan's weeks are sections with a
   heading and hairline rows, and the sidebar is two plain lists.
   ========================================================================= */
body:has(> .course-main) .cstats{gap:0; margin-top:var(--s5); padding:var(--s3) 0;
  border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft)}
body:has(> .course-main) .cstat{background:none; border-radius:0; box-shadow:none; padding:4px var(--s5);
  border-left:1px solid var(--line-soft)}
body:has(> .course-main) .cstat:first-child{border-left:0; padding-left:0}
@media (max-width:900px){
  body:has(> .course-main) .cstats{grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:var(--s4)}
  body:has(> .course-main) .cstat:nth-child(odd){border-left:0; padding-left:0}
}
.course-main .roadmap{background:none; padding:0; margin-bottom:var(--s6)}
.course-main .roadmap > h2,.course-main .rm-road{padding-left:0; padding-right:0}
.course-main .pweek{background:none; border-radius:0; padding:0; margin-bottom:var(--s6)}
.course-main .pweek-h{border-bottom:1px solid var(--line); padding-bottom:var(--s2); margin-bottom:0}
.course-main .pfold{background:none; border:0; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
  border-radius:0; margin-bottom:var(--s6)}
.course-main .pfold > summary{border-radius:0; padding-left:0; padding-right:0}
.course-main .pfold > summary:hover{background:none; color:var(--ink)}
.course-main .pfold[open] > .pweek{padding:0}
.course-side .panel{background:none; border-radius:0; padding:0 0 var(--s6); margin:0}
.course-side .panel > h2{border-bottom:1px solid var(--line); padding-bottom:var(--s2); margin-bottom:0}
/* Exercises: a circle and a number, not a filled pill each. A week holds
   dozens of them, and dozens of pills were a wall of little boxes. */
.course-main .tick{background:none; border-color:transparent; padding:0 8px 0 4px}
.course-main .tick:hover{background:var(--fill); border-color:transparent}

/* The account in the rail's corner: initials in a round avatar (nav.js). */
.acct-avatar{border-radius:50% !important; font-size:11px; font-weight:700; letter-spacing:.02em; color:#fff;
  background:linear-gradient(135deg,var(--accent),#7a5cff) !important; width:28px !important; height:28px !important;
  min-width:28px; margin-left:auto}
.acct-menu .acct-head{display:flex; flex-direction:column; gap:2px; padding:8px 10px 10px; border-bottom:1px solid var(--line-soft); margin-bottom:4px}
.acct-menu .acct-head .acct-name{font-weight:600; font-size:14px}
.acct-menu .acct-head .acct-mail{font-size:12px; color:var(--ink-3)}
/* Sharing a plan is one line under the plan's heading, not a box. */
.course-main .plan-shared{background:none; border-radius:0; padding:0 0 var(--s3); margin:0 0 var(--s3);
  border-bottom:1px solid var(--line-soft); flex-direction:row; flex-wrap:wrap; align-items:center; gap:var(--s2) var(--s4)}
.course-main .plan-shared .ps-note{flex-basis:100%}
.course-main .plan-shared .ps-row{flex-basis:100%}

/* One column (the user chose it): the course page's sidebar is hidden; its
   two lists live on as the plan's Open count and the line of next sessions. */
body:has(> .course-main) .course-side{display:none}
.course-main .plan-col{max-width:none}
.rm-next{display:flex; flex-wrap:wrap; align-items:baseline; gap:6px var(--s4); margin-top:var(--s3);
  padding-top:var(--s3); border-top:1px solid var(--line-soft); font-size:13px; color:var(--ink-2)}
.rm-next[hidden]{display:none}
.rmn-k{font-weight:600; color:var(--ink-3)}
.rmn-s b{font-weight:600; color:var(--ink)}
.rmn-all{margin-left:auto; color:var(--accent-ink); font-weight:600; text-decoration:none}
.rmn-all:hover{text-decoration:underline}

.due-day{margin-top:var(--s3)}
.due-day .due-d{display:block; font-size:12px; font-weight:600; color:var(--ink-3); margin-bottom:2px}
.due-day.late .due-d{color:var(--warn)}
/* The rows size to what they hold: the old tile grid kept 104px rows and
   two-row spans, which left a blank band above Due once the boxes went. */
.home3 .bento{grid-auto-rows:auto}
.home3 .t-next,.home3 .t-exam,.home3 .t-today,.home3 .t-prep{grid-row:auto}
/* The per-course line outside the Week page's ruled sheet. */
.due-day .exd > summary{display:flex; align-items:center; gap:var(--s2); min-height:36px; cursor:pointer;
  border-bottom:1px solid var(--line-soft)}
.due-day .exd > summary .sw{width:8px; height:8px; border-radius:2px; flex:none}
.due-day .exd > summary .c{font-weight:600}
.due-day .exd-body{padding:var(--s2) 0 var(--s2) 16px}
.due-day .tick{background:none; border-color:transparent; padding:0 8px 0 4px}
.due-day .tick:hover{background:var(--fill)}


/* Section names on Today carry the hierarchy (HIG: weight, size and colour
   together): 17/600 in full ink, like an iOS headline, a clear step above
   the 15 px row titles and the 12-13 px details. "Next up" keeps its small
   label: inside the hero the time is the headline. */
.home3 .tile:not(.t-next) > .tk{font-size:17px; font-weight:600; color:var(--ink); letter-spacing:-.01em;
  margin-bottom:6px; align-items:baseline}
.home3 .tile:not(.t-next) > .tk #h-due-n{font-weight:500; color:var(--ink-3)}
.home3 .tile:not(.t-next) > .tk .tk-link{font-size:14px}

/* Today, steps 2-6 of the audit (2026-11-17, redesign-existing-projects + HIG):
   Exams and Prepare share one column (.t-side) so neither card is stretched
   to the height of its neighbour; Due puts the to-dos and the exercises side
   by side so a date sits next to the words it belongs to; one colour, one
   meaning: late is red (as on To-Do), a group heading is never coloured. */
@media (min-width:1101px){
  .home3 .t-next{grid-column:1 / span 7; grid-row:1}
  .home3 .t-today{grid-column:1 / span 7; grid-row:2; align-self:start}
  .home3 .t-side{grid-column:8 / span 5; grid-row:1 / span 2; display:flex; flex-direction:column;
    gap:var(--s4); min-width:0; align-self:start}
  .home3 .t-side > .tile{flex:none}
  .home3 .t-due{grid-column:1 / -1; grid-row:3}
  .home3 .t-cap{grid-column:1 / -1; grid-row:4}
  .home3 #h-due:has(> .wkgroup + .due-day){display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    column-gap:var(--s7); align-items:start}
  .home3 #h-due:has(> .wkgroup + .due-day) > .wkgroup{grid-column:1; grid-row:1 / span 50}
  .home3 #h-due:has(> .wkgroup + .due-day) > .due-day{grid-column:2}
  .home3 #h-due:has(> .wkgroup + .due-day) > .due-day:first-of-type{margin-top:0}
}
@media (max-width:1100px){ .home3 .t-side{display:contents} }
.home3 .t-today,.home3 .t-side > .tile{min-height:0}
.home3 .wkgroup-h.urgent{color:var(--ink-2)}
.wkitem .wkitem-d.late{color:var(--danger); font-weight:500}
.home3 .xn{text-align:left}
.home3 .hskip > summary{list-style:none; cursor:pointer}
.home3 .hskip > summary::-webkit-details-marker{display:none}
.home3 .hskip > summary:hover{color:var(--ink)}
.home3 .hskip > .hrow{opacity:.7}
@media (min-width:1101px){ .home3 #h-due > .wkgroup + .due-day{margin-top:0} }
@media (max-width:1100px){ .home3 #h-due > .wkgroup + .due-day{margin-top:var(--s5)} }
.home3 #h-due > .due-day .due-d{font-size:12px; font-weight:600; color:var(--ink-2); padding-bottom:6px}

/* The course page has no boxes, in every accent style. Aurora's glass
   re-boxed its figures, roadmap and weeks with no padding inside, so text
   and the roadmap's turns ran into the box edge and looked cut off. */
:root[data-accent="aurora"] body:has(> .course-main) :is(.cstat,.roadmap,.pweek,.pfold){
  background:none; -webkit-backdrop-filter:none; backdrop-filter:none; box-shadow:none}

/* A secret typed into a TEXT field shown as dots. A real type="password"
   made Chrome take the field before it for a user name and fill the saved
   sign-in email into the rail's search box on the calendar page. */
input.masked{-webkit-text-security:disc}

/* Today's capture box is ONE field, not three loose controls (the user:
   "not nice text, and clicking it does not look good"). The tile is the
   field; the input, the To-do/Idea picker and Save sit inside it without
   frames of their own; focus is a soft accent ring round the whole tile
   instead of a hard blue edge on the input. Typed in Roboto Mono. */
:root{--type-mono:"RobotoMono",ui-monospace,SFMono-Regular,Menlo,monospace}
.t-cap{gap:var(--s3); padding-top:var(--s3); padding-bottom:var(--s3);
  transition:box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease)}
.t-cap::before{content:"+"; font:500 18px/1 var(--type-mono); color:var(--ink-3); flex:none;
  transition:color var(--fast) var(--ease)}
.t-cap input,.t-cap input:focus{height:36px; padding:0; border:0; background:transparent; box-shadow:none;
  font:400 14px/1 var(--type-mono); letter-spacing:-.01em; color:var(--ink)}
.t-cap input::placeholder{color:var(--ink-3)}
.t-cap select,.t-cap select:focus{height:28px; padding:0 26px 0 10px; border:0; border-radius:var(--r-pill);
  background-color:var(--fill); font:500 12px/1 var(--type-mono); color:var(--ink-2); box-shadow:none}
.t-cap button{height:32px; padding:0 16px; border-radius:var(--r-pill); font:500 13px/1 var(--type-mono);
  transition:opacity var(--fast) var(--ease)}
.t-cap select{-webkit-appearance:none; appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%238e8e93'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 9px center; background-size:10px}
.t-cap select:hover{color:var(--ink)}
.t-cap input:placeholder-shown ~ button{opacity:.4}
.t-cap:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 28%,transparent)}
.t-cap:focus-within::before{color:var(--accent)}
@media (prefers-reduced-motion:reduce){ .t-cap,.t-cap::before,.t-cap button{transition:none} }

/* Font: Roboto Mono everywhere (Style menu, `life.font`, set before first
   paint as data-font="mono"). Mono is about a fifth wider, so the tight
   places (Week's day cards, the rail's course rows) clip with an ellipsis
   instead of running out of their card. */
:root[data-font="mono"]{--sans:var(--type-mono)}
:root[data-font="mono"] body{letter-spacing:-.015em}
.stylemenu .sw-font{display:grid; place-items:center; width:20px; height:20px; border-radius:50%;
  background:var(--fill); font-size:10px; font-weight:500; color:var(--ink-2)}

/* Background: Contours (Style menu, `life.bg`, set before first paint as
   data-bg="contours"; default none). A faint topographic map behind the
   ground, drawn as a MASK over --ink so one SVG works in both themes and
   every accent. Static. Only on Today, Week and To-Do: the course page has
   no boxes (its content stands on the ground) and the calendar's grid is its
   own background. Cards stay opaque, so no line ever crosses a card's text. */
:root[data-bg="contours"] body:has(> main:is(.home3,.today-page,.week-page,.todo2))::after{--bg-art:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 1000' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M1305 180 L1305 184 L1303 187 L1300 191 L1297 194 L1293 196 L1289 198 L1285 200 L1282 201 L1279 203 L1277 206 L1275 208 L1273 211 L1270 214 L1267 217 L1263 220 L1259 222 L1255 224 L1250 224 L1245 224 L1240 224 L1236 222 L1231 221 L1227 219 L1223 217 L1219 215 L1216 213 L1212 210 L1210 207 L1207 204 L1206 200 L1205 197 L1205 193 L1206 189 L1207 186 L1208 183 L1209 180 L1209 177 L1208 174 L1207 171 L1206 167 L1206 163 L1205 159 L1206 155 L1207 151 L1210 148 L1214 145 L1218 143 L1223 142 L1228 142 L1233 142 L1237 142 L1242 142 L1246 142 L1250 142 L1254 142 L1258 142 L1263 142 L1267 143 L1271 144 L1275 145 L1279 147 L1282 150 L1285 152 L1287 155 L1290 158 L1293 160 L1296 163 L1298 166 L1301 169 L1303 172 L1305 176 L1305 180Z'/%3E%3Cpath d='M1368 180 L1366 188 L1363 196 L1357 203 L1349 209 L1341 214 L1333 218 L1325 222 L1318 226 L1312 230 L1307 235 L1303 241 L1298 247 L1293 254 L1287 261 L1279 267 L1270 272 L1260 276 L1250 277 L1239 277 L1229 275 L1219 272 L1210 268 L1201 264 L1193 259 L1185 254 L1178 249 L1171 244 L1165 237 L1160 231 L1156 223 L1155 216 L1154 208 L1155 200 L1157 193 L1159 186 L1160 180 L1160 174 L1159 167 L1157 160 L1155 152 L1154 144 L1153 135 L1154 126 L1158 118 L1164 111 L1172 105 L1181 101 L1191 99 L1202 98 L1213 98 L1223 99 L1232 99 L1241 100 L1250 100 L1259 99 L1268 99 L1277 99 L1286 100 L1296 102 L1304 105 L1312 109 L1320 114 L1326 119 L1332 125 L1338 131 L1343 137 L1349 143 L1354 150 L1360 157 L1364 164 L1367 172 L1368 180Z'/%3E%3Cpath d='M1428 180 L1426 192 L1421 204 L1412 215 L1401 224 L1388 232 L1376 238 L1364 244 L1354 250 L1345 256 L1338 264 L1331 273 L1325 284 L1317 295 L1307 306 L1295 316 L1282 324 L1266 329 L1250 331 L1234 330 L1218 327 L1203 322 L1189 315 L1176 308 L1163 300 L1152 292 L1141 284 L1131 276 L1121 266 L1114 256 L1108 245 L1105 234 L1104 223 L1104 211 L1106 200 L1108 190 L1109 180 L1109 170 L1108 160 L1106 149 L1103 137 L1101 124 L1101 111 L1103 98 L1108 85 L1117 74 L1130 65 L1144 59 L1160 56 L1177 55 L1193 55 L1209 57 L1223 58 L1237 59 L1250 59 L1263 58 L1277 57 L1291 57 L1306 57 L1320 59 L1334 63 L1347 69 L1359 76 L1369 84 L1379 94 L1387 103 L1395 113 L1403 123 L1411 133 L1418 144 L1423 156 L1427 168 L1428 180Z'/%3E%3Cpath d='M1487 180 L1484 196 L1477 212 L1466 226 L1451 239 L1435 249 L1419 258 L1404 266 L1390 274 L1379 283 L1369 294 L1360 306 L1351 321 L1341 336 L1328 351 L1312 365 L1293 376 L1272 383 L1250 386 L1228 385 L1206 380 L1186 372 L1167 362 L1150 351 L1135 340 L1120 329 L1106 318 L1092 306 L1080 294 L1069 281 L1061 267 L1055 253 L1053 238 L1052 222 L1053 208 L1055 194 L1056 180 L1057 166 L1055 153 L1053 138 L1050 122 L1048 105 L1048 87 L1051 69 L1059 52 L1071 37 L1088 26 L1108 18 L1130 13 L1152 12 L1174 13 L1195 16 L1214 18 L1232 19 L1250 19 L1268 18 L1286 16 L1305 14 L1325 14 L1346 16 L1365 20 L1383 28 L1400 37 L1414 49 L1427 61 L1438 75 L1448 89 L1458 103 L1467 117 L1475 132 L1482 147 L1486 163 L1487 180Z'/%3E%3Cpath d='M1543 180 L1540 200 L1531 220 L1518 237 L1501 253 L1482 266 L1462 278 L1443 288 L1427 299 L1413 310 L1401 324 L1390 340 L1379 358 L1365 378 L1349 397 L1329 415 L1305 429 L1278 439 L1250 442 L1222 440 L1194 433 L1169 422 L1146 409 L1125 394 L1106 379 L1089 364 L1072 350 L1056 336 L1040 321 L1026 305 L1015 289 L1006 271 L1001 252 L999 234 L999 215 L1000 197 L1001 180 L1002 163 L1001 145 L998 126 L996 106 L994 84 L995 62 L1000 40 L1010 19 L1026 1 L1047 -13 L1072 -23 L1100 -28 L1128 -29 L1156 -28 L1181 -25 L1206 -22 L1228 -20 L1250 -20 L1272 -22 L1295 -25 L1320 -28 L1345 -29 L1371 -28 L1397 -23 L1421 -15 L1442 -3 L1461 11 L1477 28 L1490 45 L1502 64 L1512 82 L1522 101 L1531 120 L1538 139 L1542 160 L1543 180Z'/%3E%3Cpath d='M1597 180 L1593 204 L1583 227 L1569 248 L1550 267 L1528 284 L1506 298 L1484 311 L1465 324 L1448 338 L1433 355 L1420 375 L1406 397 L1390 421 L1370 444 L1346 466 L1317 483 L1284 495 L1250 499 L1215 496 L1182 486 L1152 472 L1125 455 L1101 436 L1079 417 L1059 398 L1040 381 L1020 364 L1002 347 L985 329 L969 310 L957 289 L949 268 L944 246 L943 223 L943 201 L944 180 L945 159 L944 137 L943 114 L941 90 L940 64 L942 38 L949 12 L962 -13 L982 -35 L1007 -52 L1037 -63 L1070 -69 L1104 -70 L1137 -68 L1168 -64 L1197 -60 L1224 -58 L1250 -59 L1276 -62 L1304 -66 L1334 -70 L1365 -73 L1397 -73 L1429 -68 L1459 -59 L1486 -45 L1509 -27 L1528 -7 L1544 16 L1556 38 L1567 62 L1577 85 L1585 108 L1592 132 L1597 156 L1597 180Z'/%3E%3Cpath d='M1648 180 L1644 208 L1634 234 L1618 259 L1598 281 L1575 301 L1550 318 L1526 334 L1504 350 L1484 367 L1467 387 L1452 410 L1435 436 L1416 464 L1392 492 L1363 517 L1329 538 L1291 550 L1250 555 L1209 551 L1171 539 L1136 521 L1105 500 L1077 476 L1053 453 L1030 431 L1008 410 L987 391 L965 372 L944 352 L924 330 L908 308 L896 283 L888 258 L884 232 L883 206 L884 180 L885 154 L886 129 L886 102 L885 74 L886 44 L891 14 L900 -16 L916 -44 L939 -69 L968 -89 L1003 -102 L1042 -109 L1081 -110 L1119 -108 L1155 -103 L1189 -99 L1220 -97 L1250 -98 L1281 -101 L1313 -107 L1348 -113 L1386 -118 L1424 -119 L1462 -114 L1498 -104 L1531 -88 L1558 -67 L1580 -42 L1598 -15 L1611 13 L1622 41 L1631 69 L1638 97 L1645 124 L1648 152 L1648 180Z'/%3E%3Cpath d='M1697 180 L1692 211 L1683 241 L1667 269 L1646 295 L1621 319 L1595 339 L1569 358 L1544 377 L1522 398 L1502 421 L1484 447 L1464 477 L1442 509 L1414 540 L1380 569 L1341 592 L1297 606 L1250 611 L1203 606 L1159 591 L1119 570 L1084 544 L1054 516 L1027 489 L1003 463 L978 439 L954 417 L928 396 L903 374 L879 351 L858 326 L842 299 L830 270 L823 240 L821 210 L821 180 L823 150 L826 120 L827 89 L829 58 L833 24 L840 -10 L852 -43 L871 -75 L897 -102 L931 -124 L970 -139 L1014 -148 L1058 -149 L1101 -147 L1142 -142 L1180 -137 L1216 -135 L1250 -137 L1285 -142 L1323 -149 L1363 -157 L1406 -163 L1451 -165 L1496 -161 L1539 -150 L1577 -131 L1609 -107 L1634 -78 L1653 -46 L1666 -12 L1676 21 L1684 54 L1690 86 L1694 117 L1697 149 L1697 180Z'/%3E%3Cpath d='M1743 180 L1739 214 L1730 248 L1714 280 L1694 309 L1669 336 L1641 361 L1613 383 L1586 406 L1562 429 L1539 456 L1517 485 L1494 519 L1468 554 L1436 589 L1397 620 L1353 645 L1303 661 L1250 666 L1198 660 L1148 643 L1103 618 L1065 587 L1031 555 L1002 523 L975 494 L949 467 L922 443 L893 420 L863 397 L834 372 L808 345 L786 315 L770 283 L760 249 L756 215 L756 180 L759 146 L764 111 L768 77 L774 41 L780 5 L790 -32 L805 -69 L827 -104 L857 -134 L895 -159 L939 -176 L986 -185 L1036 -188 L1084 -186 L1129 -181 L1171 -176 L1211 -174 L1250 -176 L1290 -183 L1332 -192 L1378 -202 L1427 -210 L1479 -213 L1531 -209 L1580 -197 L1623 -176 L1660 -148 L1688 -114 L1708 -76 L1721 -38 L1729 1 L1735 39 L1739 75 L1742 111 L1744 145 L1743 180Z'/%3E%3Cpath d='M1787 180 L1783 217 L1775 254 L1762 290 L1742 323 L1717 354 L1689 383 L1660 410 L1631 436 L1603 463 L1577 492 L1552 525 L1525 561 L1494 599 L1458 637 L1415 671 L1364 698 L1309 715 L1250 720 L1192 712 L1137 693 L1088 664 L1045 630 L1009 593 L978 557 L949 524 L920 494 L890 468 L857 444 L823 419 L788 393 L756 364 L729 332 L708 296 L695 258 L689 219 L689 180 L693 141 L701 102 L709 64 L718 25 L729 -15 L742 -55 L761 -94 L786 -131 L820 -164 L861 -191 L908 -211 L960 -222 L1013 -226 L1066 -224 L1116 -220 L1163 -216 L1207 -215 L1250 -217 L1294 -225 L1342 -236 L1393 -248 L1449 -257 L1507 -262 L1566 -258 L1622 -244 L1671 -221 L1711 -189 L1742 -150 L1763 -107 L1775 -63 L1782 -18 L1785 24 L1786 65 L1787 104 L1788 142 L1787 180Z'/%3E%3Cpath d='M1829 180 L1826 220 L1820 260 L1808 300 L1791 337 L1767 373 L1739 406 L1709 437 L1677 467 L1647 498 L1617 530 L1588 566 L1556 605 L1521 645 L1480 685 L1431 722 L1376 750 L1314 768 L1250 772 L1186 763 L1126 742 L1073 710 L1026 671 L987 630 L954 590 L923 554 L892 522 L858 493 L822 468 L782 442 L742 415 L703 384 L670 349 L644 310 L627 268 L619 224 L619 180 L626 136 L636 93 L649 51 L663 9 L678 -33 L696 -76 L719 -118 L747 -157 L784 -193 L828 -223 L879 -244 L934 -258 L991 -264 L1048 -264 L1103 -260 L1154 -257 L1202 -256 L1250 -260 L1299 -269 L1352 -281 L1409 -295 L1471 -306 L1536 -311 L1602 -307 L1663 -292 L1718 -266 L1763 -230 L1796 -186 L1817 -138 L1829 -87 L1833 -37 L1833 10 L1832 55 L1830 98 L1830 139 L1829 180Z'/%3E%3Cpath d='M378 900 L375 905 L371 910 L367 914 L363 918 L360 922 L357 926 L355 931 L354 936 L352 942 L350 947 L346 953 L341 957 L336 961 L329 964 L322 965 L314 965 L307 964 L300 963 L293 961 L287 958 L281 956 L275 954 L270 952 L264 949 L259 947 L254 943 L250 940 L247 936 L244 931 L242 927 L240 922 L238 918 L236 914 L233 909 L229 905 L226 900 L222 895 L219 889 L217 882 L217 876 L219 870 L222 864 L228 860 L234 856 L242 854 L250 852 L257 851 L265 851 L271 850 L277 850 L283 848 L288 847 L294 846 L300 844 L306 843 L313 843 L319 844 L325 845 L331 847 L336 850 L342 852 L347 855 L352 858 L358 861 L363 865 L368 868 L373 873 L377 878 L379 883 L380 889 L380 894 L378 900Z'/%3E%3Cpath d='M436 900 L431 909 L424 918 L417 925 L411 932 L406 939 L402 947 L399 955 L396 964 L393 974 L388 984 L382 994 L374 1002 L364 1009 L352 1014 L339 1016 L326 1016 L312 1014 L300 1011 L288 1006 L278 1002 L267 998 L257 993 L248 989 L238 985 L229 981 L221 976 L213 970 L206 963 L201 956 L196 948 L192 940 L188 933 L184 925 L179 917 L173 909 L167 900 L161 890 L156 880 L154 869 L153 857 L157 847 L163 837 L173 829 L185 823 L198 819 L212 816 L226 815 L238 814 L250 814 L260 812 L270 810 L280 808 L290 805 L300 802 L311 800 L322 799 L334 799 L345 801 L356 805 L366 809 L375 814 L384 820 L393 825 L402 831 L411 838 L420 845 L428 852 L434 861 L438 870 L440 880 L439 890 L436 900Z'/%3E%3Cpath d='M493 900 L486 913 L478 925 L469 936 L460 947 L453 957 L447 968 L442 980 L438 993 L434 1007 L428 1022 L419 1036 L407 1048 L392 1058 L375 1065 L356 1068 L337 1068 L318 1064 L300 1058 L283 1052 L268 1044 L254 1038 L240 1031 L227 1026 L213 1020 L200 1014 L188 1007 L176 999 L165 990 L156 980 L149 970 L142 959 L136 948 L130 936 L123 925 L116 913 L108 900 L100 886 L94 871 L90 855 L90 839 L95 824 L105 810 L119 798 L136 790 L155 784 L175 781 L194 779 L212 778 L229 778 L243 776 L257 773 L271 768 L285 764 L300 759 L316 755 L332 753 L349 753 L366 756 L381 760 L396 767 L410 775 L422 783 L435 792 L447 802 L458 811 L470 822 L480 833 L489 845 L495 858 L498 872 L497 886 L493 900Z'/%3E%3Cpath d='M549 900 L541 917 L531 933 L520 947 L510 961 L501 975 L493 989 L487 1005 L482 1022 L476 1041 L468 1060 L456 1078 L441 1095 L421 1108 L399 1117 L374 1120 L348 1119 L323 1114 L300 1106 L279 1096 L259 1086 L241 1076 L224 1068 L207 1060 L190 1053 L172 1046 L155 1038 L139 1029 L124 1018 L111 1006 L100 992 L91 978 L82 963 L74 948 L66 933 L57 917 L47 900 L38 882 L31 862 L27 842 L28 821 L35 801 L48 783 L66 769 L88 758 L113 750 L139 746 L164 744 L187 743 L208 742 L227 740 L245 735 L262 729 L281 722 L300 715 L321 710 L343 706 L365 705 L387 708 L408 715 L427 724 L445 734 L461 747 L476 759 L490 772 L505 785 L518 799 L531 814 L541 830 L549 847 L553 864 L553 882 L549 900Z'/%3E%3Cpath d='M604 900 L596 921 L585 940 L573 959 L561 976 L550 993 L541 1011 L534 1031 L527 1052 L519 1075 L508 1099 L494 1121 L474 1142 L450 1158 L422 1168 L391 1173 L360 1171 L329 1163 L300 1152 L274 1139 L250 1126 L229 1113 L208 1102 L187 1093 L167 1085 L145 1077 L123 1068 L102 1058 L83 1046 L65 1032 L50 1015 L37 998 L26 980 L16 961 L6 941 L-4 921 L-14 900 L-24 877 L-31 853 L-34 828 L-32 803 L-24 779 L-8 758 L14 740 L41 726 L71 717 L103 712 L133 710 L162 708 L187 707 L211 704 L232 698 L254 690 L276 681 L300 671 L326 663 L353 658 L382 657 L409 660 L435 668 L459 679 L481 693 L500 709 L518 726 L534 743 L550 760 L565 778 L579 796 L592 815 L601 835 L607 857 L608 878 L604 900Z'/%3E%3Cpath d='M659 900 L652 925 L640 948 L627 970 L614 991 L601 1012 L591 1034 L581 1058 L573 1083 L563 1110 L549 1138 L532 1165 L508 1189 L479 1207 L445 1220 L409 1224 L371 1221 L334 1212 L300 1198 L269 1182 L242 1165 L216 1149 L193 1136 L169 1125 L144 1116 L118 1108 L92 1099 L65 1088 L40 1074 L18 1058 L-2 1040 L-19 1019 L-33 997 L-45 974 L-56 950 L-66 926 L-76 900 L-86 873 L-92 845 L-95 815 L-91 786 L-80 758 L-62 733 L-36 712 L-5 696 L31 685 L67 678 L103 675 L137 674 L167 671 L194 667 L220 660 L245 651 L271 639 L300 627 L331 616 L364 609 L398 607 L432 610 L464 619 L492 634 L518 651 L539 672 L559 693 L577 714 L593 736 L610 757 L626 779 L640 801 L651 825 L659 849 L661 875 L659 900Z'/%3E%3Cpath d='M713 900 L707 928 L697 956 L683 982 L669 1007 L655 1032 L642 1058 L631 1085 L620 1115 L607 1146 L591 1177 L570 1208 L542 1235 L508 1257 L468 1270 L426 1275 L382 1271 L339 1260 L300 1243 L265 1223 L233 1203 L205 1184 L178 1169 L151 1156 L122 1146 L92 1138 L60 1129 L28 1118 L-3 1103 L-31 1086 L-56 1065 L-77 1041 L-94 1015 L-107 987 L-119 959 L-129 930 L-139 900 L-147 869 L-152 836 L-153 803 L-148 770 L-135 738 L-114 709 L-85 684 L-49 666 L-9 653 L32 645 L73 641 L111 638 L146 636 L177 631 L207 622 L236 610 L267 596 L300 581 L336 568 L375 559 L415 555 L455 559 L492 570 L526 588 L554 609 L579 634 L600 660 L618 686 L636 712 L653 737 L670 762 L685 788 L699 815 L709 842 L714 871 L713 900Z'/%3E%3Cpath d='M767 900 L763 932 L754 964 L741 995 L726 1024 L711 1053 L696 1083 L682 1114 L668 1147 L652 1182 L633 1217 L607 1251 L575 1281 L536 1305 L491 1320 L442 1325 L393 1320 L345 1307 L300 1287 L260 1264 L225 1240 L193 1219 L163 1201 L133 1187 L100 1177 L65 1168 L28 1159 L-10 1148 L-47 1133 L-82 1114 L-112 1090 L-137 1063 L-157 1033 L-172 1001 L-184 968 L-193 935 L-201 900 L-207 864 L-211 828 L-210 791 L-203 754 L-187 718 L-164 686 L-132 658 L-92 637 L-48 621 L-2 612 L43 606 L86 603 L125 599 L160 593 L194 582 L227 568 L262 552 L300 534 L342 518 L387 508 L433 504 L478 508 L521 521 L559 541 L591 567 L618 597 L640 628 L659 659 L677 689 L694 718 L712 746 L729 775 L745 805 L757 836 L765 867 L767 900Z'/%3E%3Cpath d='M822 900 L821 936 L814 972 L802 1008 L786 1042 L769 1075 L752 1109 L735 1144 L717 1180 L698 1218 L674 1257 L645 1294 L608 1326 L563 1352 L513 1368 L459 1374 L403 1368 L349 1353 L300 1330 L256 1304 L217 1277 L182 1253 L149 1233 L115 1218 L79 1207 L39 1198 L-4 1190 L-49 1179 L-93 1164 L-134 1143 L-170 1117 L-199 1086 L-222 1052 L-239 1015 L-250 978 L-258 939 L-264 900 L-267 860 L-268 820 L-264 779 L-255 739 L-237 700 L-211 664 L-177 633 L-135 608 L-87 590 L-37 578 L12 571 L59 566 L102 561 L142 553 L180 542 L217 525 L257 506 L300 486 L347 468 L398 456 L450 451 L502 456 L550 471 L592 495 L628 525 L657 560 L680 596 L699 632 L716 667 L733 700 L751 732 L770 763 L788 795 L804 829 L816 864 L822 900Z'/%3E%3C/g%3E%3C/svg%3E"); content:""; position:fixed; inset:0 0 0 var(--rail-w,0);
  z-index:-1; pointer-events:none;
  background:var(--ink); opacity:.07;
  -webkit-mask:var(--bg-art) center/cover no-repeat;
          mask:var(--bg-art) center/cover no-repeat}
:root[data-theme="light"][data-bg="contours"] body:has(> main:is(.home3,.today-page,.week-page,.todo2))::after{opacity:.09}
@media (max-width:700px){ :root[data-bg="contours"] body:has(> main:is(.home3,.today-page,.week-page,.todo2))::after{inset:0} }
:root[data-bg="contours"] body:has(> main:is(.home3,.today-page,.week-page,.todo2)) :is(.tile,.cstat,.t2-card,.nbday,.t2-list,.card){
  background-color:var(--surface-solid); -webkit-backdrop-filter:none; backdrop-filter:none}
.stylemenu .sw-bg{width:20px; height:20px; border-radius:50%; background:var(--fill)}
.stylemenu .sw-bg.contours{background:repeating-radial-gradient(circle at 70% 30%,
  transparent 0 2.4px, var(--ink-3) 2.4px 3.2px), var(--fill)}
