/* BrainWeave — the Aurora look: dark glass and glow. Everything here sits under :root[data-theme="aurora"]. */

/* ───────── tokens ───────── */
:root[data-theme="aurora"] {
  color-scheme: dark;
  --paper: #070A16;
  --paper-sunk: #0D1226;
  --surface: #121832;
  --surface-raised: #1B2347;
  --ink: #F3F6FF;
  --ink-2: #CDD4EE;
  --ink-3: #B6BFE0;
  --line: #262E55;
  --line-strong: #6570A6;
  --accent: #5EE6FF;
  --accent-strong: #A6F3FF;
  --accent-soft: #12304A;
  --on-accent: #041018;
  --madder: #FF8AD0;
  --madder-soft: #3A1634;
  --ok: #6FF2B8; --ok-soft: #0F3328;
  --warn: #FFD27A; --warn-soft: #3A2C0E;
  --danger: #FF8FA0; --danger-soft: #401722;
  --mark: #4B3AA6;
  --scrim: rgba(3, 5, 14, .74);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 24px 60px -12px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06);
  --cloth-1: #3B4FD8; --cloth-2: #B8347F; --cloth-3: #0B7567; --cloth-4: #7A46E0; --cloth-5: #A8481A; --cloth-6: #176A9C;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-ui: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --place: #5EE6FF;
  /* the look's own helpers */
  --au-violet: #8B7BFF;
  --au-sig: linear-gradient(100deg, #5EE6FF 0%, #8B7BFF 100%);
  --au-glass: color-mix(in srgb, var(--surface) 76%, transparent);
  --au-edge: rgba(255, 255, 255, .09);
  --au-hi: inset 0 1px 0 rgba(255, 255, 255, .11);
  background: #070A16;
}
:root[data-theme="aurora"][data-place="home"] { --place: #5EE6FF; }
:root[data-theme="aurora"][data-place="library"] { --place: #A78BFF; }
:root[data-theme="aurora"][data-place="atlas"] { --place: #6FF2B8; }
:root[data-theme="aurora"][data-place="scrapbooks"] { --place: #FF8AD0; }
:root[data-theme="aurora"][data-place="projects"] { --place: #FFC56B; }
:root[data-theme="aurora"][data-place="review"] { --place: #FF9E8C; }
:root[data-theme="aurora"][data-place="find"] { --place: #7FB6FF; }
:root[data-theme="aurora"][data-place="settings"] { --place: #B9C3EC; }
:root[data-theme="aurora"][data-place="signin"], :root[data-theme="aurora"][data-place="join"], :root[data-theme="aurora"][data-place="welcome"] { --place: #A78BFF; }

/* ───────── the aurora itself: a fixed layer behind everything ───────── */
:root[data-theme="aurora"] body { background: transparent; }
:root[data-theme="aurora"] body::before {
  content: ""; position: fixed; inset: -12%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 38% at 20% 14%, rgba(139, 123, 255, .48), transparent 70%),
    radial-gradient(36% 32% at 84% 10%, rgba(94, 230, 255, .32), transparent 70%),
    radial-gradient(40% 38% at 72% 92%, rgba(111, 242, 184, .27), transparent 70%),
    radial-gradient(30% 30% at 10% 90%, rgba(255, 138, 208, .27), transparent 70%),
    radial-gradient(34% 32% at 48% 54%, color-mix(in srgb, var(--place) 14%, transparent), transparent 70%),
    #070A16;
}
@keyframes au-drift { from { transform: translate3d(-2%, -1%, 0) rotate(0deg); } to { transform: translate3d(2%, 2%, 0) rotate(4deg); } }
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  :root[data-theme="aurora"] body::before { animation: au-drift 48s ease-in-out infinite alternate; will-change: transform; }
}

/* ───────── type ───────── */
:root[data-theme="aurora"] h1, :root[data-theme="aurora"] h2, :root[data-theme="aurora"] h3 { font-family: var(--font-display); letter-spacing: -0.025em; font-weight: 600; font-variation-settings: normal; }
:root[data-theme="aurora"] .brand .word { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; font-variation-settings: normal; color: var(--accent-strong); }
/* The name is the signature itself: cyan through violet, ending in the old pink. Plain pale cyan where a browser cannot clip a fill to letters.
   Restraint: glow is kept for what matters (the main button, the part being read, where you are), so the name and the
   figures are clean colour with no halo. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  :root[data-theme="aurora"] .brand .word { background: linear-gradient(95deg, #5EE6FF 0%, #9D8CFF 56%, #FF8AD0 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
:root[data-theme="aurora"] .shelf-item .title, :root[data-theme="aurora"] .stat .n, :root[data-theme="aurora"] .cover .cover-title { font-family: var(--font-display); font-variation-settings: normal; }
:root[data-theme="aurora"] .stat .n { font-weight: 600; color: var(--place); }
:root[data-theme="aurora"] ::selection { background: #5B49C9; color: #fff; }

/* ───────── side bar: its own darker glass layer ───────── */
:root[data-theme="aurora"] .side { background: rgba(5, 7, 18, .78); border-right: 1px solid var(--au-edge); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .03), 12px 0 40px -20px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
:root[data-theme="aurora"] .findbtn { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); color: var(--ink-3); box-shadow: var(--au-hi); }
:root[data-theme="aurora"] .findbtn:hover { border-color: var(--accent); color: var(--ink); }
:root[data-theme="aurora"] .nav-item { color: var(--ink-2); font-weight: 500; }
:root[data-theme="aurora"] .nav-item:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
/* Where you are: a wash of the room's colour fading to the right, and the long mark at its left edge. No outline and no
   halo, so it never reads as a second filled button beside a page's own main button. */
:root[data-theme="aurora"] .nav-item[aria-current="page"] { background: linear-gradient(90deg, color-mix(in srgb, var(--place) 22%, transparent), color-mix(in srgb, var(--place) 3%, transparent)); color: #fff; font-weight: 600; box-shadow: none; }
/* The six rooms, each in its own colour: a short mark at the left edge of every one, the same marks the ruler draws.
   The room you are in is the long one, at full strength and glowing; the others wait at about half. */
:root[data-theme="aurora"] [data-nav="home"] { --nav: #5EE6FF; }
:root[data-theme="aurora"] [data-nav="library"] { --nav: #A78BFF; }
:root[data-theme="aurora"] [data-nav="atlas"] { --nav: #6FF2B8; }
:root[data-theme="aurora"] [data-nav="scrapbooks"] { --nav: #FF8AD0; }
:root[data-theme="aurora"] [data-nav="projects"] { --nav: #FFC56B; }
:root[data-theme="aurora"] [data-nav="review"] { --nav: #FF9E8C; }
:root[data-theme="aurora"] .nav-item[data-nav]::before { content: ""; position: absolute; left: -12px; top: 50%; bottom: auto; width: 7px; height: 3px; margin-top: -1.5px; border-radius: 0 3px 3px 0; background: var(--nav); opacity: .55; }
:root[data-theme="aurora"] .nav-item[data-nav]:hover::before { opacity: 1; }
:root[data-theme="aurora"] .nav-item[data-nav][aria-current="page"]::before { width: 12px; opacity: 1; box-shadow: 0 0 14px 1px var(--nav), 0 0 4px var(--nav); }
:root[data-theme="aurora"] .nav-item[data-nav] .icon { color: color-mix(in srgb, var(--nav) 62%, var(--ink-2)); }
:root[data-theme="aurora"] .nav-item[aria-current="page"] .icon { color: var(--place); }
@media (max-width: 1023px) and (min-width: 720px) {
  :root[data-theme="aurora"] .nav-item[data-nav]::before { left: -10px; width: 6px; }
  :root[data-theme="aurora"] .nav-item[data-nav][aria-current="page"]::before { width: 10px; }
}
/* The rail's name tags (shell.css places them) are the same dark glass as a menu, white words, and a room's tag carries
   that room's mark on its left edge. */
@media (max-width: 1023px) and (min-width: 720px) and (min-height: 640px) {
  :root[data-theme="aurora"] .side :is(.nav-item:hover, .nav-item:focus-visible) > .label,
  :root[data-theme="aurora"] .side :is(.add:hover, .add:focus-visible) > .label,
  :root[data-theme="aurora"] .side :is(.findbtn:hover, .findbtn:focus-visible) > .grow,
  :root[data-theme="aurora"] .side :is(.account:hover, .account:focus-visible) > .who {
    background: #161C3A; color: #fff; border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: inset 3px 0 0 var(--nav, transparent), inset 0 1px 0 rgba(255, 255, 255, .12), 0 18px 40px -12px rgba(0, 0, 0, .9);
  }
  :root[data-theme="aurora"] .side :is(.nav-item:hover, .nav-item:focus-visible) > .label { padding-left: 15px; }
  :root[data-theme="aurora"] .side :is(.account:hover, .account:focus-visible) > .who span { color: var(--ink-2); }
}
:root[data-theme="aurora"] .account { border-top-color: var(--au-edge); }
:root[data-theme="aurora"] .account:hover { background: rgba(255, 255, 255, .06); }
:root[data-theme="aurora"] .avatar { background: linear-gradient(135deg, #FF8AD0, #8B7BFF); color: #12081F; }
:root[data-theme="aurora"] .samplebar { background: linear-gradient(90deg, rgba(255, 210, 122, .16), rgba(255, 138, 208, .14)), rgba(10, 13, 28, .85); border-bottom-color: rgba(255, 210, 122, .25); color: var(--ink); }

/* ───────── page head: straight on the aurora, no pane of its own ─────────
   The label, the title, the mark under it and the line about the page stand on the background itself; the blocks of the
   page below are the panes, so the head never reads as one more box. The mark under the title is the ruler in small, the
   same marks the ruler and the way in draw: one long glowing mark in the place's colour running into violet, then a short
   scale of ticks that fades away. */
@media (min-width: 720px) {
  :root[data-theme="aurora"] .page { gap: var(--s6); }
  /* A close-set head: label, title, mark and line about the page as one group, no taller than about 140px on a list page. */
  :root[data-theme="aurora"] .page-head { gap: var(--s2); }
  :root[data-theme="aurora"] .page-head .eyebrow { line-height: 1.25; }
  :root[data-theme="aurora"] .page-head h1 { line-height: 1.1; }
  :root[data-theme="aurora"] .page-head .lede { line-height: 1.42; }
}
:root[data-theme="aurora"] .page-head { position: relative; }
:root[data-theme="aurora"] .page-head .eyebrow { color: color-mix(in srgb, var(--place) 70%, #fff); }
:root[data-theme="aurora"] .page-head h1 { font-weight: 700; letter-spacing: -0.035em; color: #fff; }
:root[data-theme="aurora"] .page-head .lede { color: var(--ink-2); }
:root[data-theme="aurora"] .thread { width: 232px; max-width: 100%; height: 9px; border-radius: 0; opacity: 1;
  background:
    linear-gradient(90deg, var(--place), var(--au-violet)) 0 50% / 100px 4px no-repeat,
    repeating-linear-gradient(90deg, #B4A9FF 0 2px, transparent 2px 9px) 110px 50% / 122px 9px no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 0 110px, rgba(0, 0, 0, .75) 120px, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0 110px, rgba(0, 0, 0, .75) 120px, transparent 100%); }
/* Home and the way in wear all six rooms at once: the bar under the title is six short marks, one in each room's colour. */
:root[data-theme="aurora"][data-place="home"] .page-head .thread,
:root[data-theme="aurora"] .gate-form .page-head .thread,
:root[data-theme="aurora"] .wel .page-head .thread { width: 174px; height: 4px; -webkit-mask-image: none; mask-image: none; background: linear-gradient(90deg, #5EE6FF 0 24px, transparent 24px 30px, #A78BFF 30px 54px, transparent 54px 60px, #6FF2B8 60px 84px, transparent 84px 90px, #FF8AD0 90px 114px, transparent 114px 120px, #FFC56B 120px 144px, transparent 144px 150px, #FF9E8C 150px 174px); box-shadow: none; filter: none; }
:root[data-theme="aurora"] .crumbs a:hover { color: var(--place); }
:root[data-theme="aurora"] .crumbs .sep { color: var(--ink-3); }

/* ───────── sections: each one its own glass pane ───────── */
:root[data-theme="aurora"] .section { position: relative; padding: var(--s6); border-radius: 20px; border: 1px solid var(--au-edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012) 120px), var(--au-glass);
  box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
/* Every pane's top edge is the edge of a ruler: a short solid mark in the place's colour, then a scale of fine ticks
   hanging from the edge and fading away. The same marks as under the page's title and down the ruler itself, drawn
   flat, with no glow. (Needs you's book blocks wear the same edge, further down.) It is declared on the mark itself, so
   a block that wears another room's colour (Home's) draws its edge in that colour. */
:root[data-theme="aurora"] .section::before, :root[data-theme="aurora"] .review-group::before {
  content: ""; position: absolute; top: -1px; left: 22px; width: min(154px, 46%); height: 6px; border-radius: 0; box-shadow: none; pointer-events: none;
  background:
    linear-gradient(90deg, var(--place), color-mix(in srgb, var(--place) 45%, var(--au-violet))) 0 0 / 34px 2px no-repeat,
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--place) 60%, var(--au-violet)) 0 2px, transparent 2px 8px) 42px 0 / calc(100% - 42px) 6px no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 0 58px, rgba(0, 0, 0, .7) 74px, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0 58px, rgba(0, 0, 0, .7) 74px, transparent 100%); }
/* Colour by meaning, never by where a block falls on the page. On Home each block wears the colour of the room it leads to:
   its top line, the bar beside its heading, its link, its hover washes and its figures all follow. */
:root[data-theme="aurora"] .home .section:has(> .section-head .more[href$="/library"]), :root[data-theme="aurora"] .home-stat[href$="/library"] { --place: #A78BFF; }
:root[data-theme="aurora"] .home .section:has(> .section-head .more[href$="/atlas"]), :root[data-theme="aurora"] .home-stat[href$="/atlas"] { --place: #6FF2B8; }
:root[data-theme="aurora"] .home .section:has(> .section-head .more[href$="/scrapbooks"]) { --place: #FF8AD0; }
:root[data-theme="aurora"] .home .section:has(> .section-head .more[href$="/projects"]) { --place: #FFC56B; }
:root[data-theme="aurora"] .home .section:has(> .section-head .more[href$="/review"]) { --place: #FF9E8C; }
:root[data-theme="aurora"] .home .section-head .more { color: var(--place); }
:root[data-theme="aurora"] .section .section, :root[data-theme="aurora"] .card .section, :root[data-theme="aurora"] dialog .section { padding: 0; border: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; }
:root[data-theme="aurora"] .section .section::before, :root[data-theme="aurora"] .card .section::before, :root[data-theme="aurora"] dialog .section::before { display: none; }
:root[data-theme="aurora"] .section-head h2, :root[data-theme="aurora"] .section-head h3 { padding-left: 14px; background: linear-gradient(180deg, var(--place), var(--au-violet)) no-repeat left center / 4px 78%; border-radius: 2px; color: #fff; }
:root[data-theme="aurora"] .section-head .more { color: var(--accent); text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
:root[data-theme="aurora"] .section-head .more:hover { text-decoration-color: currentColor; }
/* On a narrow card the hint beside a heading drops under it as one line, so the heading itself never breaks in two. */
:root[data-theme="aurora"] .section-head { flex-wrap: wrap; row-gap: 2px; }

/* ───────── one level of box ─────────
   A page's blocks are the panes, and nothing inside a block is boxed again: a list, a group of settings, where a book
   stands, its chapters and a hub's levels lose their own edge and fill, and their rows are set off by dividers. Where a
   block is a grid of cards (the Atlas's folders) it is the other way round: the cards are the blocks, on the background. */
:root[data-theme="aurora"] .section .list,
:root[data-theme="aurora"] .section .card:not(a):not(button):not(.sbk-card):not(.proj-card),
:root[data-theme="aurora"] .section .lib-chapters,
:root[data-theme="aurora"] .section .lib-remove,
:root[data-theme="aurora"] .section .hub-level,
:root[data-theme="aurora"] .section .table-wrap { background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-theme="aurora"] .section .card:not(a):not(button):not(.sbk-card):not(.proj-card), :root[data-theme="aurora"] .section .lib-remove { padding: 0; }
:root[data-theme="aurora"] .section .list-row, :root[data-theme="aurora"] .section .atlas-list > li + li > .list-row,
:root[data-theme="aurora"] .section .lib-list > li + li, :root[data-theme="aurora"] .lib-chapter + .lib-chapter { border-top-color: rgba(255, 255, 255, .09); }
/* A block that only holds one card (where you left off) or a grid of them (the Atlas's folders) draws no pane round it. */
:root[data-theme="aurora"] .section[data-section="left-off"],
:root[data-theme="aurora"] .atlas-screen .section:has(> .atlas-folders),
:root[data-theme="aurora"] .lib-page .section:has(> .lib-table) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-theme="aurora"] .section[data-section="left-off"]::before,
:root[data-theme="aurora"] .atlas-screen .section:has(> .atlas-folders)::before,
:root[data-theme="aurora"] .lib-page .section:has(> .lib-table)::before { display: none; }
/* The books on the reading table are its cards, on the background like the Atlas's folders. */
:root[data-theme="aurora"] .lib-reading { border-color: rgba(255, 255, 255, .10); border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), color-mix(in srgb, var(--surface-raised) 88%, transparent); box-shadow: var(--au-hi), 0 14px 34px -22px rgba(0, 0, 0, .85); }
@media (max-width: 719px) { :root[data-theme="aurora"] .lib-reading { background: #141A36; } }
/* "Up next" is a pane like "Your shelf", and the books waiting their turn are rows inside it, set off by dividers, in
   two columns where there is room: one level of box, the same shape in every library. */
:root[data-theme="aurora"] .lib-queue { column-gap: var(--s8); row-gap: 0; }
:root[data-theme="aurora"] .lib-queued { padding: var(--s3) 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .09); border-radius: 0; background: none; box-shadow: none; }

/* ───────── cards: the third layer, brighter and edged ───────── */
:root[data-theme="aurora"] .card { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), color-mix(in srgb, var(--surface-raised) 90%, transparent); border: 1px solid rgba(255, 255, 255, .10); box-shadow: var(--au-hi), 0 14px 34px -22px rgba(0, 0, 0, .85); }
:root[data-theme="aurora"] a.card:hover, :root[data-theme="aurora"] button.card:hover { border-color: color-mix(in srgb, var(--place) 60%, transparent); box-shadow: var(--au-hi), 0 0 0 1px color-mix(in srgb, var(--place) 30%, transparent), 0 18px 40px -22px rgba(0, 0, 0, .9); transform: translateY(-2px); }
:root[data-theme="aurora"] .card.sunk { background: rgba(4, 6, 16, .5); border-color: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 12px rgba(0, 0, 0, .4); }
:root[data-theme="aurora"] .card.accent { background: linear-gradient(135deg, color-mix(in srgb, var(--place) 22%, transparent), rgba(139, 123, 255, .16)), var(--surface-raised); border-color: color-mix(in srgb, var(--place) 45%, transparent); box-shadow: var(--au-hi), 0 14px 34px -22px rgba(0, 0, 0, .85); }
:root[data-theme="aurora"] .list { background: rgba(5, 8, 20, .5); border-color: var(--au-edge); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
:root[data-theme="aurora"] .list.plain { background: transparent; box-shadow: none; }
:root[data-theme="aurora"] .list-row { border-top-color: rgba(255, 255, 255, .07); }
:root[data-theme="aurora"] a.list-row:hover, :root[data-theme="aurora"] button.list-row:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--place) 14%, transparent), transparent 70%); }
:root[data-theme="aurora"] a.list-row:hover .chev, :root[data-theme="aurora"] button.list-row:hover .chev { color: var(--place); }
:root[data-theme="aurora"] .table-wrap { background: rgba(5, 8, 20, .5); border-color: var(--au-edge); }

/* ───────── buttons ───────── */
:root[data-theme="aurora"] .btn { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); color: var(--ink); box-shadow: var(--au-hi); font-weight: 600; }
:root[data-theme="aurora"] .btn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .28); color: #fff; }
/* The main button is the signature's gradient, lit by a highlight on its top edge and a short soft shadow under it, not a
   halo: it stands out by colour, the one gradient fill on the page. */
:root[data-theme="aurora"] .btn.primary { background: var(--au-sig); border-color: transparent; color: #041018; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 18px -10px rgba(110, 160, 255, .75); }
:root[data-theme="aurora"] .btn.primary:hover { background: linear-gradient(100deg, #8DEEFF 0%, #A79BFF 100%); border-color: transparent; color: #041018; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 10px 22px -10px rgba(110, 160, 255, .9); }
:root[data-theme="aurora"] .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none; }
:root[data-theme="aurora"] .btn.ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
:root[data-theme="aurora"] .btn.danger { background: rgba(255, 143, 160, .08); border-color: rgba(255, 143, 160, .55); color: var(--danger); }
:root[data-theme="aurora"] .btn.danger:hover { background: var(--danger-soft); color: #FFC2CB; }

/* ───────── fields ───────── */
:root[data-theme="aurora"] .input, :root[data-theme="aurora"] .textarea, :root[data-theme="aurora"] .select { background-color: rgba(4, 6, 16, .6); border-color: rgba(255, 255, 255, .20); color: var(--ink); box-shadow: inset 0 1px 6px rgba(0, 0, 0, .35); }
:root[data-theme="aurora"] .input:hover, :root[data-theme="aurora"] .textarea:hover, :root[data-theme="aurora"] .select:hover { border-color: rgba(255, 255, 255, .38); }
/* A hint inside an empty field ("My library", "Search events") is a quieter grey than a typed value, so it never reads as
   one, and still well over 4.5:1 on the field. */
:root[data-theme="aurora"] .input::placeholder, :root[data-theme="aurora"] .textarea::placeholder { color: #8E97BD; }
:root[data-theme="aurora"] .input:focus-visible, :root[data-theme="aurora"] .textarea:focus-visible, :root[data-theme="aurora"] .select:focus-visible { outline: 2px solid var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(94, 230, 255, .16); }
:root[data-theme="aurora"] .switch input { background: #3A4370; }
:root[data-theme="aurora"] .switch input::after { background: #E8ECFF; }
:root[data-theme="aurora"] .switch input:checked { background: var(--au-sig); box-shadow: none; }
:root[data-theme="aurora"] .switch input:checked::after { background: #041018; }
:root[data-theme="aurora"] .choice { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); }
:root[data-theme="aurora"] .choice:hover { border-color: rgba(255, 255, 255, .34); }
:root[data-theme="aurora"] .choice:has(input:checked) { background: linear-gradient(135deg, rgba(94, 230, 255, .14), rgba(139, 123, 255, .14)); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ───────── chips, badges, tabs, levels, progress ───────── */
:root[data-theme="aurora"] .chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .13); color: var(--ink-2); }
:root[data-theme="aurora"] a.chip:hover, :root[data-theme="aurora"] button.chip:hover { border-color: var(--place); color: #fff; }
:root[data-theme="aurora"] .chip[aria-pressed="true"], :root[data-theme="aurora"] .chip.on { background: linear-gradient(100deg, rgba(94, 230, 255, .22), rgba(139, 123, 255, .22)); border-color: var(--accent); color: #fff; box-shadow: none; }
:root[data-theme="aurora"] .badge { background: rgba(255, 255, 255, .09); color: var(--ink-2); }
:root[data-theme="aurora"] .badge.accent { background: rgba(94, 230, 255, .16); color: var(--accent-strong); }
:root[data-theme="aurora"] .badge.madder { background: rgba(255, 138, 208, .16); color: #FFB3E0; }
/* A colour means one thing: the Needs-you count wears the colour of Needs you (the coral of its room and of the "Ready to
   finish" pill) wherever it shows, side bar, rail or top bar; a count of notes is a plain figure; and on Needs you the label
   of a question wears the room's own coral. Pink is left to the Scrapbooks. */
:root[data-theme="aurora"] .badge.madder.count { background: rgba(255, 158, 140, .20); color: #FFD3C9; box-shadow: inset 0 0 0 1px rgba(255, 158, 140, .38); }
:root[data-theme="aurora"] .hub-level .badge.madder { background: rgba(255, 255, 255, .09); color: var(--ink); }
:root[data-theme="aurora"] .review-item .badge.madder { background: color-mix(in srgb, var(--place) 15%, transparent); color: color-mix(in srgb, var(--place) 42%, #fff); }
:root[data-theme="aurora"] .badge.ok { background: rgba(111, 242, 184, .15); color: var(--ok); }
:root[data-theme="aurora"] .badge.warn { background: rgba(255, 210, 122, .15); color: var(--warn); }
:root[data-theme="aurora"] .badge.danger { background: rgba(255, 143, 160, .16); color: #FFB1BD; }
/* A book waiting for its reader's last step: one look on every screen (Home, the Library, the book's page, Find anything),
   in the colour of Needs you, where that step is taken, with a lit dot before the words. */
:root[data-theme="aurora"] .badge[data-state="ready"] { gap: 6px; background: rgba(255, 158, 140, .14); color: #FFC9BD; box-shadow: inset 0 0 0 1px rgba(255, 158, 140, .42); }
:root[data-theme="aurora"] .badge[data-state="ready"]::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #FF9E8C; box-shadow: 0 0 6px #FF9E8C; }
:root[data-theme="aurora"] .palette .opt .sub[data-state="ready"] { color: #FFC9BD; }
:root[data-theme="aurora"] .level .stitches i { background: #56608F; opacity: .6; }
:root[data-theme="aurora"] .level[data-level="5"] .stitches i, :root[data-theme="aurora"] .level[data-level="4"] .stitches i:nth-child(-n+4), :root[data-theme="aurora"] .level[data-level="3"] .stitches i:nth-child(-n+3), :root[data-theme="aurora"] .level[data-level="2"] .stitches i:nth-child(-n+2), :root[data-theme="aurora"] .level[data-level="1"] .stitches i:nth-child(-n+1) { background: linear-gradient(180deg, #5EE6FF, #8B7BFF); opacity: 1; box-shadow: none; }
:root[data-theme="aurora"] .tabs { border-bottom-color: var(--au-edge); }
:root[data-theme="aurora"] .tab[aria-selected="true"], :root[data-theme="aurora"] .tab[aria-current="page"] { color: #fff; }
:root[data-theme="aurora"] .tab[aria-selected="true"]::after, :root[data-theme="aurora"] .tab[aria-current="page"]::after { height: 3px; background: var(--au-sig); box-shadow: none; }
:root[data-theme="aurora"] .segmented { background: rgba(4, 6, 16, .55); border-color: var(--au-edge); }
:root[data-theme="aurora"] .segmented button[aria-pressed="true"] { background: linear-gradient(100deg, rgba(94, 230, 255, .28), rgba(139, 123, 255, .30)); color: #fff; box-shadow: inset 0 0 0 1px rgba(94, 230, 255, .45); }
/* A meter (how far Silas is through a book, how many books a plan holds) is measured the ruler's way: a scale of ticks,
   the part done drawn in the signature's colours, the rest a faint scale still to go. */
:root[data-theme="aurora"] .progress { height: 10px; border-radius: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .20) 0 2px, transparent 2px 6px); }
:root[data-theme="aurora"] .progress > i { border-radius: 0; background: linear-gradient(90deg, var(--place), var(--au-violet)); box-shadow: none;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 6px); mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 6px); }
:root[data-theme="aurora"] .steps i { background: rgba(255, 255, 255, .12); }
:root[data-theme="aurora"] .steps i.done { background: var(--au-sig); }
:root[data-theme="aurora"] .steps i.now { background: #FF8AD0; box-shadow: none; }
:root[data-theme="aurora"] .checklist .item { border-top-color: rgba(255, 255, 255, .08); }
:root[data-theme="aurora"] .checklist .item.done .tick { background: var(--ok); border-color: var(--ok); color: #04130D; box-shadow: none; }

/* ───────── covers ───────── */
:root[data-theme="aurora"] .cover { border-radius: 4px 9px 9px 4px; background: linear-gradient(155deg, var(--cloth, var(--cloth-1)) 10%, color-mix(in srgb, var(--cloth, var(--cloth-1)) 58%, #05060F)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 5px 0 0 rgba(0, 0, 0, .22), 0 14px 26px -14px rgba(0, 0, 0, .9), 0 6px 14px -6px rgba(0, 0, 0, .7); }
:root[data-theme="aurora"] .cover::after { background: linear-gradient(120deg, rgba(255, 255, 255, .16), transparent 38%); }
:root[data-theme="aurora"] .cover .cover-title { font-weight: 600; letter-spacing: -0.02em; }
:root[data-theme="aurora"] .shelf-item:hover .cover { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 5px 0 0 rgba(0, 0, 0, .22), 0 20px 34px -14px rgba(0, 0, 0, .95), 0 6px 14px -6px rgba(0, 0, 0, .7); }
:root[data-theme="aurora"] .shelf-item .title { font-weight: 600; letter-spacing: -0.015em; }

/* ───────── states ───────── */
:root[data-theme="aurora"] .state { position: relative; border: 1px solid var(--au-edge); background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--place) 12%, transparent), transparent 70%), rgba(255, 255, 255, .035); box-shadow: var(--au-hi); }
:root[data-theme="aurora"] .state .state-art { background: linear-gradient(135deg, rgba(94, 230, 255, .25), rgba(139, 123, 255, .3)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
:root[data-theme="aurora"] .state.error .state-art { background: rgba(255, 143, 160, .2); color: var(--danger); box-shadow: none; }
/* An empty or failed page hangs the ruler from the top edge of its card: a scale of ticks that swells to its longest over
   the middle, the way the ruler swells round the part being read, in the place's colour (a failure in the colour of a
   fault). It is a picture only, drawn in the card's own top padding. */
:root[data-theme="aurora"] .state::before { content: ""; position: absolute; top: -1px; left: 50%; width: 178px; margin-left: -89px; height: 20px; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--place) 30%, transparent), var(--place) 40% 60%, color-mix(in srgb, var(--au-violet) 30%, transparent));
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 8px), linear-gradient(180deg, #000 0 5px, transparent 5px), radial-gradient(64px 20px at 50% 0, #000 0 98%, transparent 100%);
  mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 8px), linear-gradient(180deg, #000 0 5px, transparent 5px), radial-gradient(64px 20px at 50% 0, #000 0 98%, transparent 100%);
  -webkit-mask-composite: source-in, source-over; mask-composite: intersect, add; }
:root[data-theme="aurora"] .state.error::before { background: linear-gradient(90deg, rgba(255, 143, 160, .3), var(--danger) 40% 60%, rgba(255, 143, 160, .3)); }
:root[data-theme="aurora"] .state.compact::before { height: 14px; }
/* Loading bars: a faint white bar with a violet light running across it (the core's two tokens). */
:root[data-theme="aurora"] { --skel: rgba(255, 255, 255, .09); --skel-shine: rgba(139, 123, 255, .28); }
:root[data-theme="aurora"] .banner { background: linear-gradient(100deg, rgba(94, 230, 255, .14), rgba(139, 123, 255, .12)), rgba(12, 16, 36, .7); border-color: rgba(94, 230, 255, .3); }
:root[data-theme="aurora"] .banner.warn { background: rgba(255, 210, 122, .12); border-color: rgba(255, 210, 122, .35); }
:root[data-theme="aurora"] .banner.danger { background: rgba(255, 143, 160, .12); border-color: rgba(255, 143, 160, .4); }
:root[data-theme="aurora"] .banner.ok { background: rgba(111, 242, 184, .11); border-color: rgba(111, 242, 184, .35); }

/* ───────── reading: long text on a calm solid pane ───────── */
:root[data-theme="aurora"] .prose { color: #E9EDFA; }
:root[data-theme="aurora"] .prose a { color: var(--accent); }
/* A note links a dozen hubs in a paragraph: at rest those links keep the text's own colour over a faint cyan hairline set a
   little lower than usual, so the page reads as prose; under the pointer or the keyboard the line comes up to full cyan
   with a wash behind the words. */
:root[data-theme="aurora"] .note-body a.note-hub { color: inherit; text-decoration-color: rgba(94, 230, 255, .30); text-decoration-thickness: 1px; text-underline-offset: .26em; }
:root[data-theme="aurora"] .note-body a.note-hub:hover,
:root[data-theme="aurora"] .note-body a.note-hub:focus-visible { color: #fff; text-decoration-color: var(--accent); background: rgba(94, 230, 255, .14); }
:root[data-theme="aurora"] .prose blockquote { border-left-color: #FF8AD0; color: var(--ink-2); }
:root[data-theme="aurora"] .synopsis { border-left: 3px solid var(--accent); background: linear-gradient(100deg, rgba(94, 230, 255, .12), rgba(139, 123, 255, .08)), rgba(10, 14, 32, .8); }
:root[data-theme="aurora"] mark { background: var(--mark); color: #fff; border-radius: 3px; }

/* ───────── dialogs, sheets, menus, palette, toasts ───────── */
:root[data-theme="aurora"] dialog.dialog, :root[data-theme="aurora"] dialog.palette, :root[data-theme="aurora"] dialog.sheet { background: linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 140px), rgba(17, 22, 48, .94); border-color: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 40px 90px -20px rgba(0, 0, 0, .85); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); }
:root[data-theme="aurora"] dialog.dialog::backdrop, :root[data-theme="aurora"] dialog.palette::backdrop, :root[data-theme="aurora"] dialog.sheet::backdrop { background: radial-gradient(60% 50% at 50% 30%, rgba(60, 40, 140, .35), transparent 70%), var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
:root[data-theme="aurora"] .dialog-foot { background: rgba(4, 6, 16, .4); border-top-color: var(--au-edge); }
:root[data-theme="aurora"] .palette .search > .input { background: transparent; box-shadow: none; border-bottom-color: var(--au-edge); }
/* The Find box shows focus as one lit line under the field, not a ring cut off by the box's own edges. */
:root[data-theme="aurora"] .palette .search > .input:focus-visible { outline: none; border-bottom-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
:root[data-theme="aurora"] .palette .opt[aria-selected="true"] { background: linear-gradient(90deg, rgba(94, 230, 255, .2), rgba(139, 123, 255, .16)); color: #fff; box-shadow: inset 0 0 0 1px rgba(94, 230, 255, .35); }
:root[data-theme="aurora"] .palette .foot { background: rgba(4, 6, 16, .4); border-top-color: var(--au-edge); }
:root[data-theme="aurora"] .menu { background: rgba(22, 28, 58, .96); border-color: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 24px 60px -14px rgba(0, 0, 0, .85); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
:root[data-theme="aurora"] .menu-item:hover, :root[data-theme="aurora"] .menu-item:focus-visible { background: linear-gradient(90deg, rgba(94, 230, 255, .2), rgba(139, 123, 255, .16)); color: #fff; }
:root[data-theme="aurora"] .menu-item.danger { color: var(--danger); }
:root[data-theme="aurora"] .menu-sep { background: var(--au-edge); }
:root[data-theme="aurora"] .toast { background: linear-gradient(100deg, rgba(94, 230, 255, .16), rgba(139, 123, 255, .20)), #1A2148; color: var(--ink); border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 20px 50px -14px rgba(0, 0, 0, .85); }
:root[data-theme="aurora"] .toast .btn { color: var(--accent-strong); border-color: rgba(94, 230, 255, .4); background: transparent; }
:root[data-theme="aurora"] .toast.danger { background: #4A1524; color: #FFE1E6; border-color: rgba(255, 143, 160, .5); }

/* ───────── signed-out screens ───────── */
:root[data-theme="aurora"] .gate-art { color: #F4F6FF; border-right: 1px solid var(--au-edge);
  background:
    radial-gradient(90% 70% at 0% 0%, #2A3BD0 0%, transparent 62%),
    radial-gradient(80% 70% at 100% 100%, #6A25C4 0%, transparent 62%),
    radial-gradient(55% 45% at 90% 8%, #0A6C7A 0%, transparent 65%),
    radial-gradient(50% 40% at 10% 100%, #8A1F6A 0%, transparent 65%),
    #0A0E24; }
/* The way in carries the ruler: a spine of marks down the left edge, running through the six rooms' colours, swelling
   around one mark at full strength the way the ruler swells around the part being read. It replaces the plain grid. */
:root[data-theme="aurora"] .gate-art::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 44px; pointer-events: none; opacity: .8;
  background: linear-gradient(180deg, #5EE6FF 0, #A78BFF 225px, #6FF2B8 46%, #FF8AD0 64%, #FFC56B 82%, #FF9E8C 100%);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 3px, transparent 3px 16px), linear-gradient(90deg, #000 0 12px, transparent 12px), radial-gradient(44px 120px at 0 225.5px, #000 0 98%, transparent 100%);
  mask-image: repeating-linear-gradient(180deg, #000 0 3px, transparent 3px 16px), linear-gradient(90deg, #000 0 12px, transparent 12px), radial-gradient(44px 120px at 0 225.5px, #000 0 98%, transparent 100%);
  -webkit-mask-composite: source-in, source-over; mask-composite: intersect, add; }
:root[data-theme="aurora"] .gate-art::before { inset: auto; left: 0; top: 224px; width: 44px; height: 3px; border-radius: 0 3px 3px 0; background: #C9BBFF; box-shadow: 0 0 16px 1px #A78BFF, 0 0 5px #A78BFF; -webkit-mask-image: none; mask-image: none; }
@media (max-width: 899px) {
  /* Stacked: the same marks lie along the bottom edge of the band, between the name and the form. */
  :root[data-theme="aurora"] .gate-art::after { top: auto; right: 0; width: auto; height: 20px;
    background: linear-gradient(90deg, #5EE6FF 0, #A78BFF 20%, #6FF2B8 40%, #FF8AD0 60%, #FFC56B 80%, #FF9E8C 100%);
    -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 14px), linear-gradient(0deg, #000 0 7px, transparent 7px), radial-gradient(90px 20px at 71.5px 100%, #000 0 98%, transparent 100%);
    mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 14px), linear-gradient(0deg, #000 0 7px, transparent 7px), radial-gradient(90px 20px at 71.5px 100%, #000 0 98%, transparent 100%); }
  :root[data-theme="aurora"] .gate-art::before { top: auto; bottom: 0; left: 70px; width: 3px; height: 20px; border-radius: 3px 3px 0 0; }
  /* The band is that much deeper at the bottom, so the marks have clear air under the headline. */
  :root[data-theme="aurora"] .gate-art { padding-bottom: calc(var(--s6) + 24px); }
}
:root[data-theme="aurora"] .gate-art blockquote { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; font-variation-settings: normal; color: #fff; }
:root[data-theme="aurora"] .gate-art .points { color: #E3E8FF; }
:root[data-theme="aurora"] .gate-form > .inner { padding: var(--s8); border-radius: 24px; border: 1px solid rgba(255, 255, 255, .10); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)), color-mix(in srgb, var(--surface) 84%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 40px 80px -40px rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }

/* ───────── phone and tablet: lighter glass, no drift ───────── */
@media (max-width: 719px) {
  /* Solid enough that a line scrolling under it never shows through behind the name and buttons. */
  :root[data-theme="aurora"] .topbar { background: rgba(7, 10, 22, .97); border-bottom-color: var(--au-edge); }
  :root[data-theme="aurora"] .tabbar { background: #090C1C; -webkit-backdrop-filter: none; backdrop-filter: none; border-top-color: rgba(255, 255, 255, .10); box-shadow: 0 -12px 30px -16px rgba(0, 0, 0, .8); }
  :root[data-theme="aurora"] .tabbar a { color: var(--ink-3); }
  :root[data-theme="aurora"] .tabbar a[aria-current="page"] { color: var(--place); }
  /* The mark over the tab you are on sits inside the bar, a little below its top edge, and its glow stays in the bar:
     nothing of it is drawn over the page above. */
  :root[data-theme="aurora"] .tabbar { overflow: hidden; }
  :root[data-theme="aurora"] .tabbar a[aria-current="page"]::before { top: 5px; left: 34%; right: 34%; border-radius: 3px; background: var(--place); box-shadow: 0 1px 10px var(--place); }
  :root[data-theme="aurora"] .topbar .needs[aria-current="page"] { color: var(--place); background: rgba(255, 255, 255, .08); }
  :root[data-theme="aurora"] .section { gap: var(--s3); padding: var(--s3) var(--s4) var(--s4); border-radius: 16px; -webkit-backdrop-filter: none; backdrop-filter: none; background: #10162E; }
  :root[data-theme="aurora"] .section .section, :root[data-theme="aurora"] .card .section { padding: 0; background: none; }
  :root[data-theme="aurora"] .gate-form > .inner { padding: var(--s5); -webkit-backdrop-filter: none; backdrop-filter: none; background: #121832; }
  :root[data-theme="aurora"] body::before { inset: 0; }
}

/* ───────── solid fallback where glass is not supported ───────── */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme="aurora"] .side { background: #060814; }
  :root[data-theme="aurora"] .section { background: #10162E; }
  :root[data-theme="aurora"] .gate-form > .inner { background: #121832; }
  :root[data-theme="aurora"] dialog.dialog, :root[data-theme="aurora"] dialog.palette, :root[data-theme="aurora"] dialog.sheet { background: #131935; }
  :root[data-theme="aurora"] .menu { background: #161C3A; }
}

@media (prefers-reduced-motion: reduce) {
  :root[data-theme="aurora"] body::before { animation: none; }
  :root[data-theme="aurora"] a.card:hover, :root[data-theme="aurora"] button.card:hover, :root[data-theme="aurora"] .shelf-item:hover .cover { transform: none; }
}

/* ═════════ screen by screen: nothing left in the paper look ═════════ */

/* titles and labels that were still set in the reading serif */
:root[data-theme="aurora"] .lib-list .title, :root[data-theme="aurora"] .lib-reading-title, :root[data-theme="aurora"] .lib-queued-title, :root[data-theme="aurora"] .lib-ch-title,
:root[data-theme="aurora"] .atlas-folder-name, :root[data-theme="aurora"] .find-hit-title, :root[data-theme="aurora"] .find-hub-title, :root[data-theme="aurora"] .home-left-title,
:root[data-theme="aurora"] .note-side-title, :root[data-theme="aurora"] .note-turn-title, :root[data-theme="aurora"] .note-cited h2, :root[data-theme="aurora"] .proj-page .title,
:root[data-theme="aurora"] .write-title, :root[data-theme="aurora"] .write-lib-title, :root[data-theme="aurora"] .set-figure, :root[data-theme="aurora"] .write-text h2, :root[data-theme="aurora"] .write-text h3 { font-family: var(--font-display); font-variation-settings: normal; letter-spacing: -0.02em; font-weight: 600; }

/* ───────── Home ───────── */
/* The numbers are not boxes inside their block: three figures side by side in one row with a divider between them, each
   in the colour of what it counts (books the Library's violet, notes blue, hubs the Atlas's mint) and each under its own
   short mark, the marks the side bar and the ruler draw. The line about who has read them sits under the row. */
:root[data-theme="aurora"] .home-stat { position: relative; padding: var(--s4) var(--s3) var(--s2); border: 0; border-radius: var(--r); background: none; box-shadow: none; }
:root[data-theme="aurora"] .home-stat + .home-stat { border-left: 1px solid rgba(255, 255, 255, .10); border-radius: 0 var(--r) var(--r) 0; }
:root[data-theme="aurora"] .home-stat::before { content: ""; position: absolute; top: 0; left: var(--s3); width: 22px; height: 3px; border-radius: 3px; background: var(--kind, var(--place)); pointer-events: none; }
:root[data-theme="aurora"] .home-stat:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--kind, var(--place)) 14%, transparent), transparent 80%); box-shadow: none; }
:root[data-theme="aurora"] .home-stat .stat .n { color: color-mix(in srgb, var(--kind, var(--place)) 55%, #fff); font-size: var(--fs-xl); letter-spacing: -0.03em; text-shadow: none; }
:root[data-theme="aurora"] .home-stat .stat .l { font-size: var(--fs-xs); color: var(--ink-2); }
:root[data-theme="aurora"] .home-stats-note { color: var(--ink-2); }
:root[data-theme="aurora"] .home-left-title { color: #fff; }
:root[data-theme="aurora"] .review-item { border-bottom-color: rgba(255, 255, 255, .07); }

/* ───────── Library and a book ───────── */
/* The shelf: each book stands on a short lit edge in the signature's cyan into violet, so the covers read as books on a
   shelf, and the edge brightens under the book the pointer is on. */
:root[data-theme="aurora"] .lib-shelf .shelf-item { gap: var(--s4); }
:root[data-theme="aurora"] .lib-shelf .cover-wrap { position: relative; }
:root[data-theme="aurora"] .lib-shelf .cover-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 3px; border-radius: 3px; background: var(--au-sig); opacity: .7; pointer-events: none; transition: opacity var(--fast) var(--ease); }
:root[data-theme="aurora"] .lib-shelf .shelf-item:hover .cover-wrap::after { opacity: 1; }
:root[data-theme="aurora"] .lib-ch-title { font-size: var(--fs-lg); color: var(--ink); }
/* An open chapter's notes hang under it on a line in the place's colour, with no fill of their own. */
:root[data-theme="aurora"] .lib-notes { background: none; border-top-color: rgba(255, 255, 255, .08); box-shadow: inset 2px 0 0 color-mix(in srgb, var(--place) 45%, transparent); }
:root[data-theme="aurora"] .lib-notes > li + li { border-top-color: rgba(255, 255, 255, .07); }
:root[data-theme="aurora"] .lib-note:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--place) 16%, transparent), transparent 70%); }
:root[data-theme="aurora"] .lib-drop { background: linear-gradient(135deg, rgba(94, 230, 255, .07), rgba(139, 123, 255, .08)); border-color: rgba(94, 230, 255, .5); }

/* ───────── Atlas, a hub, Find ───────── */
:root[data-theme="aurora"] .atlas-folder-name { color: #fff; }
:root[data-theme="aurora"] .atlas-folder-n { color: var(--place); }
:root[data-theme="aurora"] .atlas-folder-top .icon, :root[data-theme="aurora"] .atlas-list .lead .icon { color: var(--place); }
/* A hub's levels are groups inside the notes block, not boxes: a divider between them, the open one's notes under a line. */
:root[data-theme="aurora"] .hub-levels { gap: 0; }
:root[data-theme="aurora"] .hub-level + .hub-level { border-top: 1px solid rgba(255, 255, 255, .10); }
:root[data-theme="aurora"] .hub-level > summary { border-radius: var(--r); }
:root[data-theme="aurora"] .hub-level > summary:hover { background: rgba(255, 255, 255, .05); }
:root[data-theme="aurora"] .hub-level-body { border-top-color: rgba(255, 255, 255, .08); background: none; }
:root[data-theme="aurora"] .hub-star[aria-pressed="true"] { background: color-mix(in srgb, var(--place) 16%, transparent); border-color: var(--place); color: color-mix(in srgb, var(--place) 45%, #fff); box-shadow: none; }
:root[data-theme="aurora"] .find-search > .find-input { background-color: rgba(10, 14, 32, .82); border-color: rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 44px -28px rgba(0, 0, 0, .9); }
:root[data-theme="aurora"] .find-search > .find-input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(94, 230, 255, .16); }
:root[data-theme="aurora"] .find-hit { border-top-color: rgba(255, 255, 255, .08); }
:root[data-theme="aurora"] .find-hit-title { color: #fff; }
:root[data-theme="aurora"] .find-hit-title:hover { color: var(--place); }
:root[data-theme="aurora"] .find-mark { background: rgba(139, 123, 255, .5); color: #fff; }
:root[data-theme="aurora"] .find-group-name { color: var(--place); }

/* ───────── Scrapbooks ───────── */
:root[data-theme="aurora"] .sbk-card:hover { border-color: color-mix(in srgb, var(--place) 60%, transparent); box-shadow: var(--au-hi), 0 18px 40px -22px rgba(0, 0, 0, .9); }
:root[data-theme="aurora"] .sbk-card-icon { background: linear-gradient(135deg, color-mix(in srgb, var(--place) 34%, transparent), rgba(139, 123, 255, .26)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
:root[data-theme="aurora"] .sbk-card-count .num { color: var(--place); }
:root[data-theme="aurora"] .sbk-card-open { color: var(--place); }
:root[data-theme="aurora"] .sbk-tools { padding: var(--s3); border: 1px solid var(--au-edge); border-radius: 16px; background: rgba(8, 11, 26, .84); box-shadow: var(--au-hi), 0 18px 40px -26px rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
/* While the filter bar is held at the top of the window, the band behind it (scrapbook.js sizes it: from the window's
   top edge to 8px under the bar, 8px wider each side) becomes the bar's own tray: solid dark glass, open at the top,
   rounded and edged at the foot, with a soft shadow under it. The bar itself then draws nothing, so the tray and the
   controls read as one held bar, not as a dark slab cut into the aurora with a box inside it. */
:root[data-theme="aurora"] .sbk-band[data-on="true"] { background: #0A0E20; border: 1px solid var(--au-edge); border-top: 0; border-radius: 0 0 20px 20px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .03), 0 18px 34px -22px rgba(0, 0, 0, .95); }
:root[data-theme="aurora"] .sbk-band[data-on="true"] + .sbk-tools { border-color: transparent; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-theme="aurora"] .sbk-pieces:not(.is-dated) .sbk-piece { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), color-mix(in srgb, var(--surface-raised) 90%, transparent); border-color: rgba(255, 255, 255, .10); box-shadow: var(--au-hi), 0 14px 34px -22px rgba(0, 0, 0, .85); }
:root[data-theme="aurora"] .sbk-row-main:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--place) 14%, transparent), transparent 70%); }

/* ───────── Projects and the writing page ───────── */
:root[data-theme="aurora"] .proj-card { border-color: rgba(255, 255, 255, .10); }
:root[data-theme="aurora"] .proj-card:hover { border-color: color-mix(in srgb, var(--place) 60%, transparent); box-shadow: var(--au-hi), 0 18px 40px -22px rgba(0, 0, 0, .9); }
:root[data-theme="aurora"] .proj-card:hover h2 a { color: #fff; }
/* The first words of the last page are a quotation inside the card, set off by a rule in the card's colour, not a box. */
:root[data-theme="aurora"] .proj-latest { padding-block: var(--s1); border-left-color: var(--place); border-radius: 0; background: none; }
:root[data-theme="aurora"] .proj-latest-name .icon, :root[data-theme="aurora"] .proj-carry { color: var(--place); }
:root[data-theme="aurora"] .proj-carry:hover { color: #fff; }
:root[data-theme="aurora"] .proj-foot { border-top-color: rgba(255, 255, 255, .08); }
:root[data-theme="aurora"] .proj-step-n { color: var(--place); }
:root[data-theme="aurora"] .write-title { font-weight: 700; letter-spacing: -0.035em; color: #fff; }
:root[data-theme="aurora"] .write-bar { margin-top: var(--s3); padding: var(--s1) var(--s3) var(--s1) var(--s4); border: 1px solid var(--au-edge); border-radius: 14px; background: rgba(8, 11, 26, .86); box-shadow: var(--au-hi), 0 18px 40px -26px rgba(0, 0, 0, .9); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
:root[data-theme="aurora"] .write-tool:hover { background: rgba(255, 255, 255, .09); color: #fff; }
:root[data-theme="aurora"] .write-tool[aria-pressed="true"] { background: linear-gradient(135deg, rgba(94, 230, 255, .25), rgba(139, 123, 255, .28)); color: #fff; box-shadow: inset 0 0 0 1px rgba(94, 230, 255, .45); }
:root[data-theme="aurora"] .write-sep { background: rgba(255, 255, 255, .14); }
:root[data-theme="aurora"] .write-text { max-width: none; margin-top: var(--s4); padding-left: var(--s8); padding-right: var(--s8); border: 1px solid var(--au-edge); border-radius: 20px; background: #0D1226; color: #E9EDFA; box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); }
:root[data-theme="aurora"] .write-text[data-empty]::before { left: var(--s8); }
:root[data-theme="aurora"] .write-text:focus-visible { border-radius: 20px; border-color: rgba(94, 230, 255, .55); box-shadow: var(--au-hi), 0 0 0 1px rgba(94, 230, 255, .35); }
/* While the toolbar is stuck, the band behind it is the writing pane's own colour and exactly the pane's width, so the
   pane reads as running up to the top of the window with the toolbar on it, not as a dark slab cut into the aurora. */
:root[data-theme="aurora"] .write-band[data-on="true"]::before { left: 0; right: 0; background: #0D1226; }
@media (max-width: 719px) {
  :root[data-theme="aurora"] .write-band[data-on="true"]::before { left: calc(-1 * var(--s4)); right: calc(-1 * var(--s4)); background: #0A0E20; }
}
:root[data-theme="aurora"] .write-side-title { color: var(--place); font-family: var(--font-display); letter-spacing: -0.02em; }
:root[data-theme="aurora"] .write-lib-list > li { border-top-color: rgba(255, 255, 255, .08); }
:root[data-theme="aurora"] .write-lib-title { color: #fff; }
@media (min-width: 1600px) {
  :root[data-theme="aurora"] .write-side { padding: var(--s5); border: 1px solid var(--au-edge); border-radius: 20px; background: rgba(9, 12, 28, .64); box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
}

/* ───────── a note: the text on a calm solid pane, the rail on its own glass ───────── */
:root[data-theme="aurora"] .note-body { padding: var(--s8); border: 1px solid var(--au-edge); border-radius: 20px; background: #0D1226; color: #E9EDFA; box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); }
:root[data-theme="aurora"] .note-body ul > li::before { background: var(--place); }
:root[data-theme="aurora"] .note-body ul ul > li::before { background: transparent; box-shadow: inset 0 0 0 1px var(--place); }
:root[data-theme="aurora"] .note-cited, :root[data-theme="aurora"] .note-cited li { border-top-color: rgba(255, 255, 255, .10); }
:root[data-theme="aurora"] .note-turn { border-color: rgba(255, 255, 255, .10); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), color-mix(in srgb, var(--surface-raised) 90%, transparent); box-shadow: var(--au-hi); }
:root[data-theme="aurora"] .note-turn:hover { border-color: color-mix(in srgb, var(--place) 60%, transparent); box-shadow: var(--au-hi); }
:root[data-theme="aurora"] .note-side { padding: var(--s1) var(--s4) var(--s2); border: 1px solid var(--au-edge); border-radius: 20px; background: rgba(9, 12, 28, .68); box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
:root[data-theme="aurora"] .note-side:has(.note-fold[aria-expanded="true"]) { padding-bottom: var(--s5); }
:root[data-theme="aurora"] .note-side-title { color: #fff; }
:root[data-theme="aurora"] .note-box h3 { border-bottom-color: rgba(255, 255, 255, .10); }
:root[data-theme="aurora"] .note-tocrow { border-left-color: rgba(255, 255, 255, .14); }
:root[data-theme="aurora"] .note-tocrow[aria-current="true"] { color: #fff; border-left-color: var(--accent); background: linear-gradient(90deg, rgba(94, 230, 255, .14), transparent 80%); }
/* Pink is the Scrapbooks' colour (and a quotation's rule, since quotations are what scrapbooks hold), so on a note it marks
   nothing else: counts are plain figures in the text's colour, the "See" label and the numbers of the cited notes are
   quiet labels, and an era's mark is a small diamond in the grey of the other separators. */
:root[data-theme="aurora"] .note-count { color: var(--ink-2); font-weight: 600; }
:root[data-theme="aurora"] .note-see-label { color: var(--ink-3); }
:root[data-theme="aurora"] .note-cited-n { color: var(--ink-2); }
:root[data-theme="aurora"] .note-meta .note-era::before { width: 5px; height: 5px; border-radius: 1px; background: var(--ink-3); transform: rotate(45deg); }
@media (min-width: 1440px) {
  :root[data-theme="aurora"] .note-side, :root[data-theme="aurora"] .note-side:has(.note-fold[aria-expanded="true"]) { padding: var(--s5) var(--s5) var(--s6); }
}

/* ───────── Settings, welcome, signed-out bits, Ask Silas ───────── */
:root[data-theme="aurora"] .set-row { border-top-color: rgba(255, 255, 255, .09); }
/* The group is not a box of its own here, so its first row starts right under the heading and its last ends the block. */
:root[data-theme="aurora"] .section .set-card > .set-row:first-child { padding-top: var(--s1); }
:root[data-theme="aurora"] .section .set-card > .set-row:last-child { padding-bottom: 0; }
:root[data-theme="aurora"] .set-row .segmented { flex-wrap: wrap; max-width: 100%; }
:root[data-theme="aurora"] .wel { background: transparent; }
:root[data-theme="aurora"] .wel-ask { border: 1px solid rgba(255, 255, 255, .10); background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)), color-mix(in srgb, var(--surface) 84%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 40px 80px -40px rgba(0, 0, 0, .9); }
:root[data-theme="aurora"] .auth-aside { border-top-color: rgba(255, 255, 255, .10); }
/* A book's cover and dates are their own block beside the sections. */
:root[data-theme="aurora"] .lib-book-side { padding: var(--s4); border: 1px solid var(--au-edge); border-radius: 20px; background: rgba(9, 12, 28, .62); box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
@media (min-width: 900px) {
  /* That block has its own padding, so its column is that much wider: the cover keeps its size, and a date or "Right away" stays on one line. */
  :root[data-theme="aurora"] .lib-book { grid-template-columns: 242px minmax(0, 1fr); gap: var(--s8); }
}
@media (max-width: 899px) {
  /* Cover beside the dates (phone and tablet): the dates and the cover button sit level with the middle of the cover, not
     hung from its top with a gap below. */
  :root[data-theme="aurora"] .lib-book-side { align-items: center; }
}
@media (max-width: 719px) {
  :root[data-theme="aurora"] .lib-book-side { padding: var(--s3); border-radius: 16px; -webkit-backdrop-filter: none; backdrop-filter: none; background: #0B0F22; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme="aurora"] .lib-book-side { background: #0B0F22; }
}
:root[data-theme="aurora"] .wel-points li:not(:first-child) { padding-top: var(--s4); }
:root[data-theme="aurora"] .wel-points li:not(:last-child) { padding-bottom: var(--s4); }
:root[data-theme="aurora"] .wel-points { padding: var(--s5) var(--s6); border: 1px solid var(--au-edge); border-radius: 20px; background: rgba(9, 12, 28, .62); box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
:root[data-theme="aurora"] .wel-points li { border-top-color: rgba(255, 255, 255, .08); }
:root[data-theme="aurora"] .wel-point-art { background: linear-gradient(135deg, rgba(94, 230, 255, .22), rgba(139, 123, 255, .28)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
/* Each point wears the colour of what it is about: books the Library's violet, hubs the Atlas's mint, Silas the signature cyan. */
:root[data-theme="aurora"] .wel-points li[data-kind="silas"] { --kind: #5EE6FF; }
:root[data-theme="aurora"] .wel-points li[data-kind] .wel-point-art { background: linear-gradient(135deg, color-mix(in srgb, var(--kind) 34%, transparent), rgba(139, 123, 255, .18)); color: var(--kind); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
@media (max-width: 719px) {
  :root[data-theme="aurora"] .wel-points { padding: var(--s4); border-radius: 16px; -webkit-backdrop-filter: none; backdrop-filter: none; background: #0B0F22; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme="aurora"] .wel-points { background: #0B0F22; }
}
/* Welcome on a screen of laptop height: the three cards close up, so the card with the two choices shows whole at 1440 by 900
   and at 1280 by 800 instead of running off the bottom. Taller screens keep the roomier spacing. */
@media (min-width: 720px) and (max-height: 959px) {
  :root[data-theme="aurora"] .wel-main.wel-intro { gap: var(--s4); padding-top: var(--s3); }
  :root[data-theme="aurora"] .wel-points { padding-top: var(--s4); padding-bottom: var(--s4); }
  :root[data-theme="aurora"] .wel-points li:not(:first-child) { padding-top: var(--s3); }
  :root[data-theme="aurora"] .wel-points li:not(:last-child) { padding-bottom: var(--s3); }
  :root[data-theme="aurora"] .wel-intro .wel-ask { padding: var(--s5) var(--s6); gap: var(--s3); }
}
/* Shorter still (1280 by 800): one more notch, so the card with the two choices ends well clear of the bottom of the window
   and the page has nothing left to scroll. */
@media (min-width: 720px) and (max-height: 839px) {
  :root[data-theme="aurora"] .wel-main.wel-intro { padding-top: 0; padding-bottom: var(--s8); }
  :root[data-theme="aurora"] .wel-points li:not(:first-child) { padding-top: var(--s2); }
  :root[data-theme="aurora"] .wel-points li:not(:last-child) { padding-bottom: var(--s2); }
  :root[data-theme="aurora"] .wel-intro .wel-ask { padding-top: var(--s4); padding-bottom: var(--s4); }
}
:root[data-theme="aurora"] .silas-turn.reader .silas-bubble { background: linear-gradient(135deg, rgba(94, 230, 255, .20), rgba(139, 123, 255, .24)); color: #fff; }

/* ───────── Needs you and Find: the filters, each book's questions and the side column are blocks ───────── */
:root[data-theme="aurora"] .review-tools,
:root[data-theme="aurora"] .review-group { position: relative; padding: var(--s6); border: 1px solid var(--au-edge); border-radius: 20px; box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); }
:root[data-theme="aurora"] .review-tools { padding: var(--s5) var(--s6); background: rgba(9, 12, 28, .7); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
/* A book's block is a calm solid pane, like a note's text, since its questions are read and answered here. Its head,
   held at the top of the window while the block is on screen (home.css), wears exactly the pane's own colour and reaches
   the pane's side edges, so it reads as the top of the same pane, not a strip laid over it. (Its top edge carries the
   ruler's mark like every pane: see the pane rule near the top of this file.) */
:root[data-theme="aurora"] .review-group { --au-gut: var(--s6); --review-head-fill: #0F142B; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 140px), #0F142B; }
:root[data-theme="aurora"] .review-groups { gap: var(--s6); }
:root[data-theme="aurora"] .review-group .review-item:last-child { border-bottom: 0; padding-bottom: 0; }
/* At rest the head's divider runs between the pane's side padding, like the dividers between questions. */
:root[data-theme="aurora"] .review-group-head { margin-inline: calc(-1 * var(--au-gut)); padding-inline: var(--au-gut); border-bottom: 0;
  background: linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)) var(--au-gut) 100% / calc(100% - 2 * var(--au-gut)) 1px no-repeat; }
/* Held, the head is the ruler held at the top of the window: a full-width divider with the pane's own mark standing on
   it at the left (the solid mark in Needs you's coral, then ticks fading away), and a soft shadow under it over the
   questions passing beneath. */
:root[data-theme="aurora"] .review-group-head[data-stuck="true"] {
  background:
    linear-gradient(90deg, rgba(15, 20, 43, 0), #0F142B) 64px calc(100% - 1px) / 112px 6px no-repeat,
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--place) 60%, var(--au-violet)) 0 2px, transparent 2px 8px) 64px calc(100% - 1px) / 112px 6px no-repeat,
    linear-gradient(90deg, var(--place), color-mix(in srgb, var(--place) 45%, var(--au-violet))) 22px 100% / 34px 2px no-repeat,
    linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14)) 0 100% / 100% 1px no-repeat,
    var(--review-head-fill);
  box-shadow: 0 12px 16px -10px rgba(8, 11, 26, .9); }
/* Under 1200px a book's head takes two rows (home.css): its name and line, then the advice and Finish this book. That
   second row spans the head, the advice at the left and the button at the right edge, where it stands on a wide screen.
   A question with three controls (open, keep, delete) would squeeze its words into a narrow column: there the words take
   the whole width and the controls sit in one row under them, the link's words in line with the question's. Close
   calls, with two controls, keep their row. */
@media (min-width: 720px) and (max-width: 1199px) {
  :root[data-theme="aurora"] .review-group-finish:has(> .review-group-advice) { flex: 1 1 100%; }
  :root[data-theme="aurora"] .review-group-finish:has(> .review-group-advice) > .btn { margin-left: auto; }
  :root[data-theme="aurora"] .review-item:has(> .review-acts.three) { flex-wrap: wrap; }
  :root[data-theme="aurora"] .review-item:has(> .review-acts.three) > .review-body { flex: 1 1 100%; }
  :root[data-theme="aurora"] .review-acts.three > .btn.ghost.sm:first-child { margin-left: calc(-1 * var(--s3) - 1px); }
}
:root[data-theme="aurora"] .find-side { padding: var(--s5); border: 1px solid var(--au-edge); border-radius: 20px; background: rgba(9, 12, 28, .66); box-shadow: var(--au-hi), 0 24px 50px -30px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
:root[data-theme="aurora"] .find-side h3 { color: var(--place); }
/* What a hub is: the card that matters most on its page, so it is the bright layer, washed in the colour of the folder the hub lives in. */
:root[data-theme="aurora"] .hub-intro { padding: var(--s5) var(--s6); border: 1px solid rgba(255, 255, 255, .13); border-radius: 20px;
  background: radial-gradient(70% 150% at 0% 0%, color-mix(in srgb, var(--place) 20%, transparent), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)), color-mix(in srgb, var(--surface-raised) 92%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 24px 50px -30px rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
/* Inside that card the synopsis is its opening line, set off by a rule in the folder's colour, not a box within the box. */
:root[data-theme="aurora"] .hub-intro .synopsis { padding: var(--s1) 0 var(--s1) var(--s4); border-left-color: var(--place); border-radius: 0; background: none; color: #fff; }
:root[data-theme="aurora"] .hub-intro .stat .n { color: #fff; text-shadow: none; }
@media (max-width: 1023px) {
  /* Above the results the filters are a slim solid strip, so the first note stays on the first screen. */
  :root[data-theme="aurora"] .find-side { padding: var(--s2) var(--s3); border-radius: 16px; -webkit-backdrop-filter: none; backdrop-filter: none; background: #0B0F22; }
}

/* ───────── phone: the new panes without blur ───────── */
@media (max-width: 719px) {
  :root[data-theme="aurora"] .review-tools { padding: var(--s4); border-radius: 16px; -webkit-backdrop-filter: none; backdrop-filter: none; background: #0D1226; }
  :root[data-theme="aurora"] .review-group { --au-gut: var(--s4); padding: var(--s4); border-radius: 16px; }
  /* On a phone the filters fold behind one Filter button, which is its own box: no pane round it. */
  :root[data-theme="aurora"] .review-tools { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  :root[data-theme="aurora"] .review-tools.is-open { gap: var(--s3); }
  /* A question's link to its hub or note has a row to itself: its words line up with the question above, not indented
     by the padding of a button that draws no box. */
  :root[data-theme="aurora"] .review-acts.three > .btn.ghost { margin-left: calc(-1 * var(--s4)); }
  :root[data-theme="aurora"] .review-acts.three > .btn.ghost.sm { margin-left: calc(-1 * var(--s3) - 1px); }
  :root[data-theme="aurora"] .hub-intro { padding: var(--s3); border-radius: 16px; -webkit-backdrop-filter: none; backdrop-filter: none; background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--place) 20%, transparent), transparent 70%), #1B2347; }
  :root[data-theme="aurora"] .note-body { padding: var(--s4) var(--s3); border-radius: 16px; }
  :root[data-theme="aurora"] .note-side { -webkit-backdrop-filter: none; backdrop-filter: none; background: #0B0F22; border-radius: 16px; }
  :root[data-theme="aurora"] .sbk-tools { padding: var(--s2); border-radius: 14px; -webkit-backdrop-filter: none; backdrop-filter: none; background: #0A0E20; }
  :root[data-theme="aurora"] .write-bar { margin-top: var(--s2); padding: var(--s1) var(--s4); border-width: 0 0 1px; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; background: #0A0E20; box-shadow: none; }
  :root[data-theme="aurora"] .write-text { padding-left: var(--s4); padding-right: var(--s4); border-radius: 16px; }
  :root[data-theme="aurora"] .write-text[data-empty]::before { left: var(--s4); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme="aurora"] .note-side, :root[data-theme="aurora"] .write-side, :root[data-theme="aurora"] .find-side, :root[data-theme="aurora"] .review-tools { background: #0B0F22; }
  :root[data-theme="aurora"] .hub-intro { background: #1B2347; }
  :root[data-theme="aurora"] .sbk-tools, :root[data-theme="aurora"] .write-bar { background: #0A0E20; }
}

/* ───────── colour by meaning ─────────
   The six room colours are the look's thread, and each means its room and nothing else. So a card never borrows one for
   decoration: an Atlas folder, a scrapbook and a project wear the colour of the room they are in (the Atlas's mint, the
   Scrapbooks' pink, the Projects' amber), and a hub's page the Atlas's mint like its folder's card. The page's data-hue
   is left unused in this look. data-kind says what a result is, and each kind wears the colour of the room it lives in. */
:root[data-theme="aurora"] .atlas-folder[data-hue], :root[data-theme="aurora"] .sbk-card[data-hue], :root[data-theme="aurora"] .proj-card[data-hue] { --hue: var(--place); }
:root[data-theme="aurora"] .atlas-folder[data-hue], :root[data-theme="aurora"] .sbk-card[data-hue], :root[data-theme="aurora"] .proj-card[data-hue] { background: radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--hue) 13%, transparent), transparent 62%), linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), color-mix(in srgb, var(--surface-raised) 90%, transparent); }
/* Each of these cards carries its room's colour as a short glowing mark on its left edge, level with its name: the same
   mark the side bar gives each room and the ruler gives each part. */
:root[data-theme="aurora"] .atlas-folder[data-hue], :root[data-theme="aurora"] .proj-card[data-hue], :root[data-theme="aurora"] .sbk-card[data-hue] { position: relative; }
:root[data-theme="aurora"] .atlas-folder[data-hue]::before, :root[data-theme="aurora"] .proj-card[data-hue]::before, :root[data-theme="aurora"] .sbk-card[data-hue]::before {
  content: ""; position: absolute; left: -1px; top: var(--au-mark-top, 28px); width: 12px; height: 3px; margin-top: -1.5px; border-radius: 0 3px 3px 0;
  background: var(--hue); box-shadow: none; pointer-events: none; }
:root[data-theme="aurora"] .proj-card[data-hue] { --au-mark-top: 34px; }
:root[data-theme="aurora"] .sbk-card[data-hue] { --au-mark-top: 44px; }
@media (max-width: 719px) { :root[data-theme="aurora"] .sbk-card[data-hue] { --au-mark-top: 40px; } }
:root[data-theme="aurora"] [data-kind="book"] { --kind: #A78BFF; }
:root[data-theme="aurora"] [data-kind="note"] { --kind: #7FB6FF; }
:root[data-theme="aurora"] [data-kind="hub"] { --kind: #6FF2B8; }
:root[data-theme="aurora"] [data-kind="scrapbook"] { --kind: #FF8AD0; }
:root[data-theme="aurora"] [data-kind="project"], :root[data-theme="aurora"] [data-kind="page"] { --kind: #FFC56B; }
:root[data-theme="aurora"] [data-kind="chapter"] { --kind: #A78BFF; }
/* A count is in the colour of what it counts, the same on Home, a book's page and anywhere else a number tile shows. */
:root[data-theme="aurora"] .stat[data-kind] .n { color: color-mix(in srgb, var(--kind) 70%, #fff); text-shadow: none; }
:root[data-theme="aurora"] .find-hub[data-kind], :root[data-theme="aurora"] .find-hit[data-kind], :root[data-theme="aurora"] .find-side .chip[data-kind] { --place: var(--kind); }
:root[data-theme="aurora"] .find-hub[data-kind] .icon { color: var(--kind); }
:root[data-theme="aurora"] .find-side .chip[data-kind]:not([aria-pressed="true"]) { border-color: color-mix(in srgb, var(--kind) 36%, transparent); }
:root[data-theme="aurora"] .find-side .chip[data-kind]:not([aria-pressed="true"]):hover { border-color: var(--kind); }
:root[data-theme="aurora"] .find-side .stack:has(> .chips .chip[data-kind="hub"]) > h3 { color: #6FF2B8; }
:root[data-theme="aurora"] .find-side .stack:has(> .chips .chip[data-kind="book"]) > h3 { color: #A78BFF; }
/* Find, both the page and the box that opens over any page: the magnifier is lit, and every result's icon says what it is. */
:root[data-theme="aurora"] .palette .search > .icon { color: var(--accent); }
:root[data-theme="aurora"] .find-search > .icon { color: var(--place); }
:root[data-theme="aurora"] .palette .opt[data-kind] > .icon { color: var(--kind); }
:root[data-theme="aurora"] .palette .opt[data-kind][aria-selected="true"] { box-shadow: inset 3px 0 0 var(--kind), inset 0 0 0 1px rgba(94, 230, 255, .35); }
:root[data-theme="aurora"] .palette .opt[aria-selected="true"] .sub { color: var(--ink-2); }

/* ───────── tick boxes and round choices: drawn by the look, never the browser's own grey box ───────── */
:root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]), :root[data-theme="aurora"] input[type="radio"] { -webkit-appearance: none; appearance: none; position: relative; width: 18px; height: 18px; flex: none; border: 1.5px solid rgba(255, 255, 255, .5); border-radius: 6px; background: rgba(4, 6, 16, .6); box-shadow: inset 0 1px 4px rgba(0, 0, 0, .4); cursor: pointer; transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
:root[data-theme="aurora"] input[type="radio"] { border-radius: 50%; }
:root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]):hover, :root[data-theme="aurora"] input[type="radio"]:hover { border-color: var(--accent); }
:root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]):checked { border-color: transparent; background: var(--au-sig) border-box; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
:root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]):checked::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 10px; border: solid #041018; border-width: 0 2px 2px 0; transform: rotate(45deg); }
:root[data-theme="aurora"] input[type="radio"]:checked { border-color: var(--accent); background: radial-gradient(circle, #5EE6FF 0 3.5px, transparent 4.5px), rgba(4, 6, 16, .6); box-shadow: none; }
:root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]):focus-visible, :root[data-theme="aurora"] input[type="radio"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
:root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]):disabled, :root[data-theme="aurora"] input[type="radio"]:disabled { opacity: .55; cursor: default; }
:root[data-theme="aurora"] .wel-check { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .14); }
:root[data-theme="aurora"] .wel-check:has(input:checked) { background: linear-gradient(135deg, rgba(94, 230, 255, .14), rgba(139, 123, 255, .14)); border-color: var(--accent); }
@media (forced-colors: active) {
  :root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]), :root[data-theme="aurora"] input[type="radio"] { -webkit-appearance: auto; appearance: auto; }
  :root[data-theme="aurora"] input[type="checkbox"]:not([role="switch"]):checked::after { content: none; }
}

/* ───────── the ruler: every mark in the colour of the place, the part being read at full strength and glowing ───────── */
:root[data-theme="aurora"] .ruler {
  --ruler-here: var(--place);
  --ruler-tick: color-mix(in srgb, var(--place) 78%, transparent);
  --ruler-tick-near: var(--place);
  --ruler-tick-h: 3px;
  --ruler-tick-h-here: 3px;
  --ruler-glow: 0 0 14px var(--place), 0 0 4px var(--place);
  --ruler-scale: color-mix(in srgb, var(--place) 42%, transparent);
  --ruler-ink: #D7DDF3;
  --ruler-ink-near: #fff;
  /* Titles at rest a half step up from the shared size, so a hub's level names (drawn half a pixel smaller) still read at
     the shared 12.5px, in this look's wide grotesque. */
  --ruler-size: 13px;
  /* This look's grotesque is wide, so the ticks are a little shorter and the titles set a touch closer (below): a title
     next to the part being read on a crowded ruler then keeps its number and two whole words at 1280px. */
  --ruler-tick-w: 32px;
  --ruler-ink-here: #fff;
  /* The slim strip's contents mark, in a pale tint of the place's colour, like the strip's own ticks. */
  --ruler-cue: color-mix(in srgb, var(--place) 55%, #fff);
  --ruler-fill-slim: rgba(13, 18, 40, .72);
  --ruler-panel-fill: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 140px), rgba(17, 22, 48, .80);
  --ruler-panel-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 30px 70px -18px rgba(0, 0, 0, .85);
}
/* Set on every title, the measuring rows' too, so ruler.js fits each title to the width it is really drawn at. */
:root[data-theme="aurora"] .ruler .ruler-title { letter-spacing: -.018em; }
/* The keyboard's ring is drawn just inside its button's edge (the mark's own 3px above and below keep it off the words),
   so on a tightly packed ruler the titles outside the button keep clear air from it. */
:root[data-theme="aurora"] .ruler .ruler-group:focus-visible { outline: 2px solid var(--ruler-here); outline-offset: -2px; }
/* The row being read carries a soft wash of the place colour behind its title, ending at the glowing tick. */
:root[data-theme="aurora"] .ruler:not([data-mode="slim"]) .ruler-mark[aria-current],
:root[data-theme="aurora"] .ruler.is-open .ruler-mark[aria-current] { background: linear-gradient(270deg, color-mix(in srgb, var(--place) 26%, transparent), transparent 82%); }
/* The slim strip (1024px to 1279px): a sliver of glass at rest. Opened, it is the same glass card as every other aurora pane,
   and keeps the ruler's own edge in the place colour, which sets it above the side bar it covers. */
:root[data-theme="aurora"] .ruler[data-mode="slim"]:not(.is-open) { box-shadow: inset 0 0 0 1px var(--au-edge); }
:root[data-theme="aurora"] .ruler[data-mode="slim"].is-open { -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
:root[data-theme="aurora"] .ruler[data-mode="slim"].is-open::before { content: ""; position: absolute; z-index: 1; top: 0; left: 14px; right: 14px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--place) 22%, var(--au-violet) 78%, transparent); box-shadow: none; pointer-events: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme="aurora"] .ruler { --ruler-panel-fill: #131935; --ruler-fill-slim: #0D1226; }
}
