/* BrainWeave — the Prism look. Bright, light and colour-blocked.
   Everything here sits under :root[data-theme="prism"], so nothing leaks into the other looks.
   The idea: a cool near-white page, a near-black side bar, white panes, and one saturated colour per place
   (--place) used in big blocks: the page-head band, section headers, the active nav item, counts, the main button.
   Private helpers start --pz-.  --pz-on is the text colour that sits on --place; --pz-inv is the text that sits on --pz-on. */

/* ───────── tokens ───────── */
:root[data-theme="prism"] {
  color-scheme: light;
  --pz-violet: #6C3BFF; --pz-cobalt: #1F5BFF; --pz-teal: #00B89E; --pz-pink: #DB1471; --pz-orange: #FF6B1A; --pz-amber: #FFB800; --pz-night: #0C0E1F; --pz-slate: #475072;
  --place: #6C3BFF; --pz-on: #FFFFFF; --pz-inv: #4319C9; --pz-glow: #A58BFF; --pz-shape: rgba(12, 14, 31, .16);
  --pz-read: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pz-pane: 0 1px 0 rgba(12, 14, 31, .05), 0 14px 34px -22px rgba(12, 14, 31, .38);

  --font-display: "Bricolage Grotesque", "Schibsted Grotesk", system-ui, sans-serif;
  --font-read: "Bricolage Grotesque", "Schibsted Grotesk", system-ui, sans-serif;
  --font-ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 20px;

  --paper: #F1F3F9;
  --paper-sunk: #E3E7F2;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --ink: #0C0E1F;
  --ink-2: #33384F;
  --ink-3: #5B617A;
  --line: #DFE3EE;
  --line-strong: #7C849F;
  --accent: #5B2BEB;
  --accent-strong: #4319C9;
  --accent-soft: color-mix(in srgb, var(--place) 13%, #FFFFFF);
  --on-accent: #FFFFFF;
  --madder: #C40F62;
  --madder-soft: #FFE1EE;
  --ok: #0B7A4B; --ok-soft: #D7F5E6;
  --warn: #8A5A00; --warn-soft: #FFF0C2;
  --danger: #C8102E; --danger-soft: #FFE0E4;
  --mark: #FFE45C;
  --scrim: rgba(12, 14, 31, .55);
  --shadow-1: 0 1px 2px rgba(12, 14, 31, .06), 0 8px 18px -12px rgba(12, 14, 31, .28);
  --shadow-2: 0 28px 64px -22px rgba(12, 14, 31, .48), 0 4px 12px rgba(12, 14, 31, .08);
  --cloth-1: #6C3BFF; --cloth-2: #DB1471; --cloth-3: #007D72; --cloth-4: #CF4500; --cloth-5: #1F5BFF; --cloth-6: #12142A;
  /* loading bars: a light tint of the place, with a brighter tint running across it */
  --skel: color-mix(in srgb, var(--place) 16%, #FFFFFF);
  --skel-shine: color-mix(in srgb, var(--place) 32%, #FFFFFF);
  /* a coloured strip along one edge of a rounded block (a lid): the corners on that edge are rounded no more than the strip
     is thick, so the strip follows the curve and the block never bulges past it */
  --pz-lid: 8px;
}
/* each place owns a colour */
:root[data-theme="prism"][data-place="library"] { --place: #1F5BFF; --pz-on: #FFFFFF; --pz-inv: #0F3CC0; --pz-glow: #7CA2FF; --accent: #1750EB; --accent-strong: #0F3CC0; }
:root[data-theme="prism"][data-place="atlas"] { --place: #00B89E; --pz-on: #04211D; --pz-inv: #FFFFFF; --pz-glow: #2FE0C4; --pz-shape: rgba(255, 255, 255, .28); --accent: #00776A; --accent-strong: #005F55; }
:root[data-theme="prism"][data-place="scrapbooks"] { --place: #DB1471; --pz-on: #FFFFFF; --pz-inv: #9C0A4D; --pz-glow: #FF6FAE; --accent: #C40F62; --accent-strong: #9C0A4D; --madder: #5B2BEB; --madder-soft: #ECE6FF; }
:root[data-theme="prism"][data-place="projects"] { --place: #FF6B1A; --pz-on: #2A0E00; --pz-inv: #FFFFFF; --pz-glow: #FF9A5C; --pz-shape: rgba(255, 255, 255, .26); --accent: #B8410A; --accent-strong: #933205; }
:root[data-theme="prism"][data-place="review"] { --place: #FFB800; --pz-on: #231800; --pz-inv: #FFFFFF; --pz-glow: #FFC933; --pz-shape: rgba(255, 255, 255, .34); --accent: #8A5A00; --accent-strong: #6E4700; }
:root[data-theme="prism"][data-place="find"] { --place: #12142A; --pz-on: #FFFFFF; --pz-inv: #12142A; --pz-glow: #FFFFFF; --pz-shape: rgba(255, 255, 255, .07); --accent: #5B2BEB; --accent-strong: #4319C9; --accent-soft: #ECE6FF; }
:root[data-theme="prism"][data-place="settings"] { --place: #475072; --pz-on: #FFFFFF; --pz-inv: #2A3150; --pz-glow: #B9C0DA; --accent: #3B4468; --accent-strong: #2A3150; }

/* ───────── base: type, focus ───────── */
:root[data-theme="prism"] h1, :root[data-theme="prism"] h2, :root[data-theme="prism"] h3, :root[data-theme="prism"] .display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-variation-settings: normal; }
:root[data-theme="prism"] h2 { font-size: 1.375rem; letter-spacing: -0.025em; }
:root[data-theme="prism"] h3 { font-weight: 700; letter-spacing: -0.015em; }
:root[data-theme="prism"] .eyebrow { font-weight: 800; letter-spacing: .1em; color: var(--ink-2); }
:root[data-theme="prism"] strong, :root[data-theme="prism"] b { font-weight: 700; }
:root[data-theme="prism"] a { text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--place) 60%, transparent); }
:root[data-theme="prism"] :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--place) 32%, transparent); }
:root[data-theme="prism"] ::selection { background: color-mix(in srgb, var(--place) 34%, transparent); }
:root[data-theme="prism"] kbd { border: 0; background: var(--paper-sunk); color: var(--ink); font-weight: 700; border-radius: 6px; padding: 4px 7px; }
:root[data-theme="prism"] hr { border-top: 2px solid var(--line); }

/* ───────── shell: the side bar is its own, near-black layer ───────── */
:root[data-theme="prism"] .side { background: var(--pz-night); border-right: 0; color: #FFFFFF; padding: var(--s5) var(--s3) var(--s3); gap: var(--s4); }
:root[data-theme="prism"] .side :focus-visible, :root[data-theme="prism"] .topbar :focus-visible, :root[data-theme="prism"] .tabbar :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 6px rgba(255, 255, 255, .22); }
:root[data-theme="prism"] .side .brand, :root[data-theme="prism"] .side .brand:hover, :root[data-theme="prism"] .topbar .brand, :root[data-theme="prism"] .topbar .brand:hover { color: #FFFFFF; }
:root[data-theme="prism"] .brand .word { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.04em; font-variation-settings: normal; }
:root[data-theme="prism"] .side .brand .lib, :root[data-theme="prism"] .topbar .brand .lib { color: #B4BAD6; }
:root[data-theme="prism"] .side .btn.add { background: #FFFFFF; border-color: #FFFFFF; color: var(--pz-night); font-weight: 800; }
:root[data-theme="prism"] .side .btn.add:hover { background: var(--pz-glow); border-color: var(--pz-glow); color: var(--pz-night); box-shadow: none; }
/* stepped down (the page has its own main button): the same button, quieter. Still a filled block with bold white words, never an outline. */
:root[data-theme="prism"] .side .btn.add.quiet { background: rgba(255, 255, 255, .17); border-color: transparent; color: #FFFFFF; font-weight: 800; }
:root[data-theme="prism"] .side .btn.add.quiet:hover { background: rgba(255, 255, 255, .28); border-color: transparent; color: #FFFFFF; box-shadow: none; }
:root[data-theme="prism"] .findbtn { background: rgba(255, 255, 255, .09); border: 0; color: #D5D9EC; font-weight: 600; }
:root[data-theme="prism"] .findbtn:hover { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
:root[data-theme="prism"] .findbtn kbd { background: rgba(255, 255, 255, .14); color: #FFFFFF; }
:root[data-theme="prism"] .side .nav { gap: 4px; }
:root[data-theme="prism"] .side .nav-label { color: #A2A9C8; }
:root[data-theme="prism"] .nav-item { --pz-dot: #C9CEE6; color: #D5D9EC; font-weight: 700; min-height: 44px; padding: 0 var(--s2); border-radius: 14px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease); }
:root[data-theme="prism"] .nav-item[data-nav="home"] { --pz-dot: #A58BFF; }
:root[data-theme="prism"] .nav-item[data-nav="library"] { --pz-dot: #7CA2FF; }
:root[data-theme="prism"] .nav-item[data-nav="atlas"] { --pz-dot: #2FE0C4; }
:root[data-theme="prism"] .nav-item[data-nav="scrapbooks"] { --pz-dot: #FF6FAE; }
:root[data-theme="prism"] .nav-item[data-nav="projects"] { --pz-dot: #FF9A5C; }
:root[data-theme="prism"] .nav-item[data-nav="review"] { --pz-dot: #FFC933; }
:root[data-theme="prism"] .nav-item .icon { width: 30px; height: 30px; padding: 5px; border-radius: 9px; background: color-mix(in srgb, var(--pz-dot) 20%, transparent); color: var(--pz-dot); }
:root[data-theme="prism"] .nav-item:hover { background: rgba(255, 255, 255, .09); color: #FFFFFF; }
:root[data-theme="prism"] .nav-item[aria-current="page"] { background: var(--place); color: var(--pz-on); box-shadow: none; }
:root[data-theme="prism"] .nav-item[aria-current="page"]::before { display: none; }
:root[data-theme="prism"] .nav-item[aria-current="page"] .icon { background: color-mix(in srgb, var(--pz-on) 16%, transparent); color: var(--pz-on); }
:root[data-theme="prism"] .side .nav-item .badge.count, :root[data-theme="prism"] .topbar .needs .badge.count { background: #FFB800; color: #231800; font-weight: 800; }
:root[data-theme="prism"] .side .nav-item[aria-current="page"] .badge.count, :root[data-theme="prism"] .topbar .needs[aria-current="page"] .badge.count { background: #231800; color: #FFFFFF; }
:root[data-theme="prism"] .account { border-top: 0; border-radius: 14px; background: rgba(255, 255, 255, .07); padding: var(--s2); color: #FFFFFF; }
:root[data-theme="prism"] .account:hover { background: rgba(255, 255, 255, .14); }
:root[data-theme="prism"] .account .who span { color: #B4BAD6; }
:root[data-theme="prism"] .account .chev { color: #B4BAD6; }
:root[data-theme="prism"] .avatar { background: var(--pz-pink); color: #FFFFFF; font-weight: 800; border-radius: 10px; }
:root[data-theme="prism"] .samplebar { background: #FFB800; color: #231800; border-bottom: 0; font-weight: 700; }
:root[data-theme="prism"] .samplebar .btn { background: #231800; border-color: #231800; color: #FFFFFF; }

/* the tablet's icon rail: the core (shell.css) shows each button's name in a tag beside it on hover and keyboard focus,
   and puts the Needs-you count on its icon. Prism only dresses the tag: the side bar's own night colour, bold words. */
@media (min-width: 720px) and (max-width: 1023px) and (min-height: 640px) {
  :root[data-theme="prism"] .side :is(.nav-item:hover, .nav-item:focus-visible) > .label,
  :root[data-theme="prism"] .side :is(.add:hover, .add:focus-visible) > .label,
  :root[data-theme="prism"] .side :is(.findbtn:hover, .findbtn:focus-visible) > .grow,
  :root[data-theme="prism"] .side :is(.account:hover, .account:focus-visible) > .who { border-radius: 10px; background: var(--pz-night); color: #FFFFFF; font-weight: 800; box-shadow: 0 10px 24px -10px rgba(12, 14, 31, .6); }
  :root[data-theme="prism"] .side :is(.account:hover, .account:focus-visible) > .who b { font-weight: 800; }
  :root[data-theme="prism"] .side :is(.account:hover, .account:focus-visible) > .who span { color: #C9CEE6; font-weight: 600; }
}
@media (max-width: 719px) {
  :root[data-theme="prism"] .topbar { background: var(--pz-night); border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; color: #FFFFFF; }
  :root[data-theme="prism"] .topbar .btn.ghost { color: #E6E9F7; }
  :root[data-theme="prism"] .topbar .btn.ghost:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; }
  :root[data-theme="prism"] .topbar .needs[aria-current="page"] { background: #FFB800; color: #231800; }
  :root[data-theme="prism"] .tabbar { background: var(--pz-night); border-top: 0; }
  :root[data-theme="prism"] .tabbar a { color: #B4BAD6; font-weight: 700; }
  :root[data-theme="prism"] .tabbar a[aria-current="page"] { color: #FFFFFF; }
  /* the tab you are on is marked inside the bar: its icon sits on a pill of the place's colour, like the side bar's
     current item. Every tab's icon keeps the same box, so nothing moves when the pill comes and goes. */
  :root[data-theme="prism"] .tabbar a .icon { width: 54px; height: 30px; padding: 5px 17px; border-radius: 999px; }
  :root[data-theme="prism"] .tabbar a[aria-current="page"] .icon { background: var(--place); color: var(--pz-on); }
  :root[data-theme="prism"] .tabbar a[aria-current="page"]::before { display: none; }
}

/* ───────── buttons ───────── */
:root[data-theme="prism"] .btn { border: 2px solid color-mix(in srgb, var(--ink) 16%, var(--surface)); background: var(--surface); color: var(--ink); font-weight: 700; border-radius: 12px; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), color var(--fast) var(--ease); }
:root[data-theme="prism"] .btn:hover { background: var(--surface); border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--place) 70%, transparent); }
:root[data-theme="prism"] .btn:active { transform: translateY(1px); box-shadow: none; }
:root[data-theme="prism"] .btn.primary { background: var(--place); border-color: var(--place); color: var(--pz-on); font-weight: 800; }
:root[data-theme="prism"] .btn.primary:hover { background: var(--place); border-color: var(--place); color: var(--pz-on); box-shadow: 0 10px 20px -10px var(--place), 0 0 0 3px color-mix(in srgb, var(--place) 26%, transparent); }
:root[data-theme="prism"] .btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
:root[data-theme="prism"] .btn.ghost:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); box-shadow: none; }
:root[data-theme="prism"] .btn.danger { border-color: var(--danger); color: var(--danger); }
:root[data-theme="prism"] .btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #FFFFFF; box-shadow: none; }
:root[data-theme="prism"] .btn.sm { border-radius: 10px; }
:root[data-theme="prism"] .btn.lg { border-radius: 14px; }
:root[data-theme="prism"] .btn[disabled], :root[data-theme="prism"] .btn[aria-disabled="true"] { transform: none; box-shadow: none; }

/* ───────── fields ───────── */
:root[data-theme="prism"] .field > label, :root[data-theme="prism"] .field-label { font-weight: 700; }
:root[data-theme="prism"] .input, :root[data-theme="prism"] .textarea, :root[data-theme="prism"] .select { border: 2px solid var(--line-strong); border-radius: 12px; background-color: var(--surface); padding: 8px var(--s3); }
:root[data-theme="prism"] .select { padding-right: 36px; }
:root[data-theme="prism"] .search > .input { padding-left: 40px; }
:root[data-theme="prism"] .input:hover, :root[data-theme="prism"] .textarea:hover, :root[data-theme="prism"] .select:hover { border-color: var(--accent); }
:root[data-theme="prism"] .input:focus-visible, :root[data-theme="prism"] .textarea:focus-visible, :root[data-theme="prism"] .select:focus-visible { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); border-radius: 12px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--place) 30%, transparent); }
:root[data-theme="prism"] .switch input:checked { background: var(--accent); }
:root[data-theme="prism"] .choice { border: 2px solid var(--line); border-radius: 16px; background: var(--surface); }
:root[data-theme="prism"] .choice:hover { border-color: var(--line-strong); }
:root[data-theme="prism"] .choice:has(input:checked) { border-color: var(--accent); box-shadow: none; background: var(--accent-soft); }
:root[data-theme="prism"] .choice .choice-title { font-weight: 800; }

/* ───────── page head: a filled colour band ───────── */
@media (min-width: 720px) {
  :root[data-theme="prism"] .page { gap: var(--s6); padding-top: var(--s6); }
}
:root[data-theme="prism"] .page-head { position: relative; isolation: isolate; overflow: hidden; background: var(--place); color: var(--pz-on); padding: 30px 34px 32px; border-radius: 28px; gap: var(--s3); box-shadow: 0 18px 36px -24px var(--place); }
:root[data-theme="prism"] .page-head::before { content: ""; position: absolute; z-index: -1; right: -70px; top: -110px; width: 300px; height: 300px; border-radius: 50%; background: var(--pz-shape); }
:root[data-theme="prism"] .page-head::after { content: ""; position: absolute; z-index: -1; right: 150px; bottom: -120px; width: 190px; height: 190px; border-radius: 34px; transform: rotate(28deg); background: var(--pz-shape); opacity: .7; }
:root[data-theme="prism"] .page-head h1 { font-size: clamp(2.125rem, 1.2rem + 2.6vw, 3.5rem); font-weight: 800; line-height: .98; letter-spacing: -0.045em; color: inherit; font-family: var(--font-display); }
:root[data-theme="prism"] .page-head .lede { color: var(--pz-on); font-size: var(--fs-lg); font-weight: 500; max-width: 58ch; }
:root[data-theme="prism"] .page-head .eyebrow { color: var(--pz-on); }
:root[data-theme="prism"] .page-head .muted, :root[data-theme="prism"] .page-head .soft { color: var(--pz-on); }
:root[data-theme="prism"] .page-head .thread { width: 52px; height: 6px; border: 0; border-radius: 3px; background: var(--pz-on); opacity: 1; }
:root[data-theme="prism"] .page-head .crumbs { color: var(--pz-on); font-weight: 600; }
:root[data-theme="prism"] .page-head .crumbs a { color: var(--pz-on); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--pz-on) 45%, transparent); }
:root[data-theme="prism"] .page-head .crumbs a:hover { color: var(--pz-on); text-decoration-color: var(--pz-on); }
:root[data-theme="prism"] .page-head .crumbs .sep { color: var(--pz-on); opacity: .6; }
:root[data-theme="prism"] .page-head a { color: var(--pz-on); }
:root[data-theme="prism"] .page-head :focus-visible { outline-color: var(--pz-on); box-shadow: 0 0 0 6px color-mix(in srgb, var(--pz-on) 25%, transparent); }
/* an outlined button in the band is filled with the band's own colour, so a picture behind it never shows through its words */
:root[data-theme="prism"] .page-head .btn { background: var(--place); border-color: var(--pz-on); color: var(--pz-on); }
:root[data-theme="prism"] .page-head .btn:hover { background: var(--pz-on); border-color: var(--pz-on); color: var(--pz-inv); box-shadow: none; }
:root[data-theme="prism"] .page-head .btn.primary { background: var(--pz-on); border-color: var(--pz-on); color: var(--pz-inv); }
:root[data-theme="prism"] .page-head .btn.primary:hover { background: var(--pz-on); color: var(--pz-inv); box-shadow: 0 10px 22px -10px rgba(12, 14, 31, .6); }
:root[data-theme="prism"] .page-head .actions > .btn:only-child:not(.ghost):not(.hub-star) { background: var(--pz-on); border-color: var(--pz-on); color: var(--pz-inv); font-weight: 800; }
:root[data-theme="prism"] .page-head .actions > .btn:only-child:not(.ghost):not(.hub-star):hover { box-shadow: 0 10px 22px -10px rgba(12, 14, 31, .6); }
:root[data-theme="prism"] .page-head .btn.ghost { border-color: transparent; color: var(--pz-on); }
:root[data-theme="prism"] .page-head .btn.ghost:hover { background: color-mix(in srgb, var(--pz-on) 16%, transparent); border-color: transparent; color: var(--pz-on); }
/* an icon-only button in the banner (a project's "…") is drawn like the band's other outlined buttons: the band's own
   colour inside a ring of its ink, so it reads plainly as a button and the stripes behind never show through it */
:root[data-theme="prism"] .page-head .btn.ghost.icon-only { background: var(--place); border-color: var(--pz-on); color: var(--pz-on); }
:root[data-theme="prism"] .page-head .btn.ghost.icon-only:hover, :root[data-theme="prism"] .page-head .btn.ghost.icon-only[aria-expanded="true"] { background: var(--pz-on); border-color: var(--pz-on); color: var(--pz-inv); }
:root[data-theme="prism"] .page-head .badge { background: var(--pz-on); color: var(--pz-inv); }
/* The big band earns its place on Home and on the pages you read (a book, a hub, a note, a scrapbook, a project, a page of
   writing). Home keeps its full size; a book, a hub, a scrapbook and a project a little smaller. */
:root[data-theme="prism"] .home .page-head { padding: 22px 30px 24px; gap: 10px; }
:root[data-theme="prism"] .home .page-head h1 { font-size: clamp(2.125rem, 1.2rem + 2.6vw, 3.5rem); }
:root[data-theme="prism"] .page-head:has(> .crumbs) { padding: 26px 32px 28px; }
:root[data-theme="prism"] .page-head:has(> .crumbs) h1 { font-size: clamp(2rem, 1.1rem + 2.1vw, 3rem); }
/* The top page of each place (Library, Atlas, Scrapbooks, Projects, Find, Needs you, Settings: a head with no trail, and
   its loading shape, whose first bar is not a trail) is a list or a tool, so its band is a slim strip and the list starts
   sooner. From 1200px the title and the line about the page sit side by side, the bar standing upright between them. */
:root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) { padding: 16px 26px 18px; gap: 8px; border-radius: 22px; box-shadow: 0 14px 28px -24px var(--place); }
:root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) h1 { font-size: clamp(1.75rem, 1.25rem + 1vw, 2.25rem); line-height: 1; }
:root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) .lede { font-size: var(--fs-md); line-height: 1.45; max-width: 68ch; }
:root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) .thread { width: 40px; height: 5px; }
@media (min-width: 1200px) {
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) { display: grid; grid-template-columns: auto 6px minmax(0, 1fr) auto; grid-template-areas: "eye eye eye eye" "title bar lede act"; column-gap: 20px; row-gap: 0; align-items: center; min-height: 80px; }
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > .top { display: contents; }
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > :is(.eyebrow, .eyebrow-bar) { grid-area: eye; margin-bottom: 6px; }
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > .top > :is(h1, .skel.title) { grid-area: title; }
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > .top > .skel.title { width: 200px; }
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > .thread { grid-area: bar; width: 6px; height: auto; min-height: 32px; align-self: stretch; }
  /* with no line about the page (a page that failed to load), the title stands alone, with no bar beside it */
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))):not(:has(> .lede, > .skel.line:last-child)) > .thread,
  :root[data-theme="prism"] .page > .page-head:not(:has(> .crumbs)):has(+ .state:not(.error):last-child) > .thread { visibility: hidden; }
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > :is(.lede, .skel.line:last-child:not(.eyebrow-bar)) { grid-area: lede; }
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > .top > .actions { grid-area: act; max-width: none; justify-self: end; }
}
/* Words never run over the place's picture. Each picture keeps to a lane at the strip's right (--pz-lane, measured from the
   strip's inner edge); stacked (720 to 1199px) the line about the page stops short of it, and side by side (1200px up) the
   last column, where the action sits, is never narrower than the lane. */
:root[data-theme="prism"] { --pz-lane: 172px; }
:root[data-theme="prism"][data-place="library"] { --pz-lane: 224px; }
@media (min-width: 720px) and (max-width: 1199px) {
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) > :is(.lede, .skel.line:last-child:not(.eyebrow-bar)) { max-width: min(68ch, calc(100% - var(--pz-lane))); }
}
@media (min-width: 1200px) {
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) { grid-template-columns: auto 6px minmax(0, 1fr) minmax(var(--pz-lane), max-content); }
}
/* each place has its own shape in the band, drawn behind the words. Home keeps the circle and the tilted square. */
/* Library: a row of books on a shelf, one leaning */
:root[data-theme="prism"][data-place="library"] .page-head::before { right: 64px; top: auto; bottom: 0; width: 178px; height: 78%; border-radius: 0; background:
  linear-gradient(var(--pz-shape), var(--pz-shape)) 0 100% / 28px 64% no-repeat,
  linear-gradient(var(--pz-shape), var(--pz-shape)) 34px 100% / 18px 92% no-repeat,
  linear-gradient(var(--pz-shape), var(--pz-shape)) 58px 100% / 34px 76% no-repeat,
  linear-gradient(var(--pz-shape), var(--pz-shape)) 98px 100% / 22px 100% no-repeat,
  linear-gradient(var(--pz-shape), var(--pz-shape)) 126px 100% / 16px 58% no-repeat,
  linear-gradient(var(--pz-shape), var(--pz-shape)) 148px 100% / 30px 84% no-repeat; }
:root[data-theme="prism"][data-place="library"] .page-head::after { right: 30px; bottom: 0; width: 22px; height: 50%; border-radius: 3px 3px 0 0; transform: rotate(-11deg); transform-origin: bottom right; opacity: 1; }
/* a note's band is narrow and its title can run long, so the books stand smaller there, clear of the words */
:root[data-theme="prism"][data-place="library"] .note-top .page-head::before { right: 46px; transform: scale(.55); transform-origin: bottom right; }
:root[data-theme="prism"][data-place="library"] .note-top .page-head::after { right: 27px; width: 12px; height: 28%; }
/* Atlas: rings round a point, like a map */
:root[data-theme="prism"][data-place="atlas"] .page-head::before { right: -130px; top: 50%; width: 420px; height: 420px; margin-top: -210px; border-radius: 50%; background: repeating-radial-gradient(circle, var(--pz-shape) 0 10px, transparent 11px 24px, var(--pz-shape) 25px 37px, transparent 38px 52px); -webkit-mask-image: radial-gradient(circle, #000 0 38%, transparent 70%); mask-image: radial-gradient(circle, #000 0 38%, transparent 70%); }
:root[data-theme="prism"][data-place="atlas"] .page-head::after { display: none; }
/* Scrapbooks: two cards pinned at a tilt */
:root[data-theme="prism"][data-place="scrapbooks"] .page-head::before { right: 48px; top: -34px; width: 150px; height: 190px; border-radius: 18px; transform: rotate(12deg); }
:root[data-theme="prism"][data-place="scrapbooks"] .page-head::after { right: 176px; top: 34px; bottom: auto; width: 130px; height: 170px; border-radius: 18px; transform: rotate(-9deg); opacity: .7; }
/* Projects: slanted stripes that fade towards the words */
:root[data-theme="prism"][data-place="projects"] .page-head::before { right: 0; top: 0; width: 230px; height: 100%; border-radius: 0; background: repeating-linear-gradient(115deg, var(--pz-shape) 0 16px, transparent 16px 42px); -webkit-mask-image: linear-gradient(to left, #000 20%, transparent); mask-image: linear-gradient(to left, #000 20%, transparent); }
:root[data-theme="prism"][data-place="projects"] .page-head::after { display: none; }
/* Needs you: a field of dots, one for each small thing waiting */
:root[data-theme="prism"][data-place="review"] .page-head::before { right: 0; top: 0; width: 340px; height: 100%; border-radius: 0; background: radial-gradient(circle at center, var(--pz-shape) 0 5px, transparent 5.5px) 0 0 / 26px 26px; -webkit-mask-image: linear-gradient(to left, #000 30%, transparent); mask-image: linear-gradient(to left, #000 30%, transparent); }
:root[data-theme="prism"][data-place="review"] .page-head::after { display: none; }
/* Find: a lens. Ring and handle are one solid colour, so where they meet no darker seam shows. */
:root[data-theme="prism"][data-place="find"] { --pz-lens: color-mix(in srgb, var(--pz-violet) 72%, #12142A); }
:root[data-theme="prism"][data-place="find"] .page-head::before { right: 40px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: transparent; border: 22px solid var(--pz-lens); }
:root[data-theme="prism"][data-place="find"] .page-head::after { right: 199px; top: 85px; bottom: auto; width: 22px; height: 70px; border-radius: 11px; transform: rotate(45deg); background: var(--pz-lens); opacity: 1; }
/* Settings: three sliders, each knob a colour of the app */
:root[data-theme="prism"][data-place="settings"] .page-head::before { right: 30px; top: 50%; margin-top: -37px; width: 150px; height: 74px; border-radius: 0; background:
  radial-gradient(circle at center, #FFB800 0 8px, transparent 8.5px) 98px 0 / 18px 18px no-repeat,
  radial-gradient(circle at center, #2FE0C4 0 8px, transparent 8.5px) 28px 28px / 18px 18px no-repeat,
  radial-gradient(circle at center, #FF6FAE 0 8px, transparent 8.5px) 72px 56px / 18px 18px no-repeat,
  linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .2)) 0 5px / 100% 8px no-repeat,
  linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .2)) 0 33px / 100% 8px no-repeat,
  linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .2)) 0 61px / 100% 8px no-repeat; }
:root[data-theme="prism"][data-place="settings"] .page-head::after { display: none; }
/* in the slim strip of a list page the shapes are drawn smaller, whole inside the band: the lens with its handle, the pinned cards */
@media (min-width: 720px) {
  :root[data-theme="prism"][data-place="find"] .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar)))::before { right: 86px; top: 8px; width: 58px; height: 58px; border-width: 12px; }
  :root[data-theme="prism"][data-place="find"] .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar)))::after { right: 136px; top: 51px; width: 12px; height: 26px; border-radius: 6px; }
  :root[data-theme="prism"][data-place="scrapbooks"] .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar)))::before { right: 44px; top: 12px; width: 74px; height: 94px; border-radius: 12px; }
  :root[data-theme="prism"][data-place="scrapbooks"] .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar)))::after { right: 116px; top: 24px; width: 64px; height: 84px; border-radius: 12px; }
  /* the rings, the stripes and the dots keep to the strip's lane (--pz-lane) */
  :root[data-theme="prism"][data-place="atlas"] .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar)))::before { right: -110px; width: 320px; height: 320px; margin-top: -160px; }
  :root[data-theme="prism"][data-place="review"] .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar)))::before { width: 230px; }
}
/* Words never run over the band's picture on the big bands either (Home, a book, a note, a hub, a scrapbook, a project, a
   page of writing, welcome): the trail, the label, the title and the lines under it stop short of the picture's lane
   (--pz-blane, measured from the band's inner edge). A button that stands over the picture is filled with the band's own
   colour, so the picture never shows through its words. */
:root[data-theme="prism"] { --pz-blane: 210px; }
:root[data-theme="prism"][data-place="library"] { --pz-blane: 222px; }
:root[data-theme="prism"][data-place="library"] .note-top { --pz-blane: 128px; }
:root[data-theme="prism"][data-place="atlas"] { --pz-blane: 246px; }
:root[data-theme="prism"][data-place="projects"] { --pz-blane: 172px; }
:root[data-theme="prism"] .wel { --pz-blane: 120px; }
@media (min-width: 720px) {
  :root[data-theme="prism"] :is(.page-head:has(> .crumbs), .home .page-head, .note-top .page-head, .wel .page-head) > :not(.top, .thread, .lede),
  :root[data-theme="prism"] :is(.page-head:has(> .crumbs), .home .page-head, .note-top .page-head, .wel .page-head) > .top > h1 { max-width: calc(100% - var(--pz-blane)); }
  :root[data-theme="prism"] :is(.page-head:has(> .crumbs), .home .page-head, .note-top .page-head, .wel .page-head) > .lede { max-width: min(58ch, calc(100% - var(--pz-blane))); }
  /* welcome: the circle keeps to the top corner, above the words */
  :root[data-theme="prism"] .wel .page-head::before { right: -46px; top: -84px; width: 176px; height: 176px; }
}
/* under 1440px a scrapbook's band is narrower, so its two cards are drawn smaller, in the corner */
@media (min-width: 720px) and (max-width: 1439px) {
  :root[data-theme="prism"][data-place="scrapbooks"] .page-head:has(> .crumbs)::before { right: 36px; top: -24px; width: 110px; height: 140px; border-radius: 16px; }
  :root[data-theme="prism"][data-place="scrapbooks"] .page-head:has(> .crumbs)::after { right: 134px; top: 26px; width: 92px; height: 120px; border-radius: 16px; }
}
@media (min-width: 1440px) {
  :root[data-theme="prism"][data-place="scrapbooks"] { --pz-blane: 296px; }
}
/* a band about 720px wide beside the ruler (1200 to 1439px): two worded buttons stand one above the other at the right,
   so a long title keeps the room for three lines, not four */
@media (min-width: 1200px) and (max-width: 1439px) {
  :root[data-theme="prism"] .page-head:has(> .crumbs) > .top > .actions:has(> .btn + .btn:not(.icon-only)) { flex-direction: column; align-items: stretch; }
}
/* Home: the tilted square stands smaller at the foot of the band from 1200px, and is left out on a narrower band */
@media (min-width: 720px) and (max-width: 1199px) {
  :root[data-theme="prism"] .home .page-head::after { display: none; }
}
@media (min-width: 1200px) {
  :root[data-theme="prism"] .home .page-head::after { right: 96px; bottom: -96px; width: 150px; height: 150px; border-radius: 28px; }
  :root[data-theme="prism"] .home { --pz-blane: 250px; }
}
/* outside a head (sign in, dialogs) the little rule is a chunky bar of the place colour */
:root[data-theme="prism"] .thread { width: 52px; height: 6px; border: 0; border-radius: 3px; background: var(--place); opacity: 1; }
:root[data-theme="prism"] .crumbs a { font-weight: 700; }
:root[data-theme="prism"] .crumbs .sep { color: var(--ink-3); }

/* ───────── sections: every one its own pane ───────── */
:root[data-theme="prism"] .section { background: var(--surface); border-radius: 24px; padding: 0 var(--s6) var(--s6); gap: var(--s5); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .section:not(:has(> .section-head)) { padding-top: calc(var(--s6) + var(--pz-lid)); border-radius: var(--pz-lid) var(--pz-lid) 24px 24px; background: linear-gradient(var(--place), var(--place)) top / 100% var(--pz-lid) no-repeat, var(--surface); }
:root[data-theme="prism"] .section > .section-head { margin: 0 calc(-1 * var(--s6)); padding: 16px var(--s6) 14px; border-radius: 24px 24px 0 0; background: var(--accent-soft); align-items: center; border-bottom: 3px solid var(--place); }
:root[data-theme="prism"] .section-head h2 { display: flex; align-items: center; gap: 12px; font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); min-width: 0; }
:root[data-theme="prism"] .section-head h2::before { content: ""; flex: none; width: 13px; height: 13px; border-radius: 3px; transform: rotate(45deg); background: var(--place); }
:root[data-theme="prism"] .section-head .more { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--accent-strong); font-weight: 800; text-decoration: none; transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease); }
:root[data-theme="prism"] .section-head .more:hover { background: var(--place); color: var(--pz-on); transform: translateY(-1px); }
/* in the narrow Home column the title stays on one line and the link drops under it */
:root[data-theme="prism"] .home-side .section-head { flex-wrap: wrap; row-gap: 8px; }
:root[data-theme="prism"] .home-side .section-head h2 { white-space: nowrap; }
/* a section inside a pane, a card or a dialog is not a second pane */
:root[data-theme="prism"] .section .section, :root[data-theme="prism"] .card .section, :root[data-theme="prism"] dialog .section { background: transparent; box-shadow: none; padding: 0; border: 0; border-radius: 0; }
:root[data-theme="prism"] .section .section > .section-head, :root[data-theme="prism"] .card .section > .section-head, :root[data-theme="prism"] dialog .section > .section-head { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; }

/* ───────── cards and lists: fills, not outlines ───────── */
:root[data-theme="prism"] .card { border: 0; background: var(--surface); border-radius: 22px; box-shadow: var(--pz-pane); }
:root[data-theme="prism"] a.card, :root[data-theme="prism"] button.card { transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease); }
:root[data-theme="prism"] a.card:hover, :root[data-theme="prism"] button.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--place), 0 18px 30px -18px color-mix(in srgb, var(--place) 80%, transparent); }
:root[data-theme="prism"] .card.sunk { background: var(--paper-sunk); box-shadow: none; }
:root[data-theme="prism"] .card.accent { background: linear-gradient(var(--place), var(--place)) left / var(--pz-lid) 100% no-repeat, var(--accent-soft); box-shadow: none; border-radius: var(--pz-lid) 22px 22px var(--pz-lid); }
:root[data-theme="prism"] .section .card { background: var(--paper); box-shadow: none; }
:root[data-theme="prism"] .section .card.accent { background: linear-gradient(var(--place), var(--place)) left / var(--pz-lid) 100% no-repeat, var(--accent-soft); box-shadow: none; }
/* a card with a lid keeps its corners while it has the keyboard focus, so the ring follows the same shape */
:root[data-theme="prism"] a.card.accent:focus-visible { border-radius: var(--pz-lid) 22px 22px var(--pz-lid); }
:root[data-theme="prism"] .section a.card:hover, :root[data-theme="prism"] .section button.card:hover { background: var(--surface); box-shadow: 0 0 0 3px var(--place), 0 18px 30px -18px color-mix(in srgb, var(--place) 80%, transparent); }
:root[data-theme="prism"] .list { border: 0; border-radius: 20px; background: var(--surface); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .section .list { background: var(--paper); box-shadow: none; }
:root[data-theme="prism"] .list.plain { background: transparent; box-shadow: none; border-radius: 0; }
:root[data-theme="prism"] .list-row { border-top: 2px solid var(--surface); }
:root[data-theme="prism"] .list:not(.plain) .list-row { border-top-color: color-mix(in srgb, var(--ink) 7%, transparent); }
:root[data-theme="prism"] a.list-row, :root[data-theme="prism"] button.list-row { transition: background var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
:root[data-theme="prism"] a.list-row:hover, :root[data-theme="prism"] button.list-row:hover { background: var(--accent-soft); box-shadow: inset 5px 0 0 var(--place); }
:root[data-theme="prism"] .list-row .title { font-weight: 700; }
:root[data-theme="prism"] .list-row .lead { color: var(--accent); }
:root[data-theme="prism"] .table-wrap { border: 0; border-radius: 20px; box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .table th { color: var(--ink-2); font-weight: 800; border-bottom: 3px solid var(--place); }

/* ───────── book covers: flat colour blocks ───────── */
:root[data-theme="prism"] .cover { border-radius: 12px; color: #FFFFFF; box-shadow: 0 10px 22px -14px rgba(12, 14, 31, .55); padding: 14% 11% 10% 12%; }
:root[data-theme="prism"] .cover::after { background: linear-gradient(152deg, transparent 0 66%, rgba(12, 14, 31, .2) 66% 100%), radial-gradient(circle at 100% 0, rgba(255, 255, 255, .2) 0 34%, transparent 34.5%); }
:root[data-theme="prism"] .cover .cover-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; font-variation-settings: normal; position: relative; z-index: 1; }
:root[data-theme="prism"] .cover .cover-author { font-weight: 700; opacity: 1; position: relative; z-index: 1; }
:root[data-theme="prism"] .lib-page .cover { box-shadow: 0 10px 22px -14px rgba(12, 14, 31, .55); }
:root[data-theme="prism"] .shelf-item .title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
:root[data-theme="prism"] .shelf-item:hover .cover { transform: translateY(-5px) rotate(-1.2deg); box-shadow: 0 22px 30px -18px rgba(12, 14, 31, .6); }
:root[data-theme="prism"] .shelf-item:hover .title { color: var(--accent-strong); }
:root[data-theme="prism"] .home-cover .cover { padding: 0; border-radius: 6px; box-shadow: none; }

/* ───────── chips, badges, levels ───────── */
:root[data-theme="prism"] .chip { border: 0; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; min-height: 30px; padding: 0 12px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease); }
:root[data-theme="prism"] a.chip:hover, :root[data-theme="prism"] button.chip:hover { background: var(--place); color: var(--pz-on); transform: translateY(-1px); }
:root[data-theme="prism"] .chip[aria-pressed="true"], :root[data-theme="prism"] .chip.on { background: var(--place); color: var(--pz-on); }
:root[data-theme="prism"] .section .chip, :root[data-theme="prism"] .card .chip { background: var(--accent-soft); }
/* the chosen chip stays solid inside a pane too (the shelf's All / Being read / Finished), and its count takes the same ink */
:root[data-theme="prism"] .section .chip[aria-pressed="true"], :root[data-theme="prism"] .card .chip[aria-pressed="true"], :root[data-theme="prism"] .section .chip.on, :root[data-theme="prism"] .card .chip.on { background: var(--place); color: var(--pz-on); }
:root[data-theme="prism"] .chip[aria-pressed="true"] .muted, :root[data-theme="prism"] .chip.on .muted, :root[data-theme="prism"] a.chip:hover .muted, :root[data-theme="prism"] button.chip:hover .muted { color: inherit; }
/* colour by meaning, never by where a thing falls in a list.
   data-kind says what a thing is: a book is cobalt, a note violet, a hub teal, a scrapbook pink, a project orange, a plain page slate.
   (data-hue, the six colours the page hands to an Atlas folder, a kind of scrapbook or a project, is not used in Prism:
   each of those wears its own place's colour.)
   --pz-k: ink on the soft tint.  --pz-ks: the soft tint.  --pz-kf: the full colour.  --pz-ko: ink on the full colour. */
:root[data-theme="prism"] [data-kind="book"] { --pz-k: #0F3CC0; --pz-ks: #E0E9FF; --pz-kf: #1F5BFF; --pz-ko: #FFFFFF; }
:root[data-theme="prism"] [data-kind="note"] { --pz-k: #4319C9; --pz-ks: #ECE6FF; --pz-kf: #6C3BFF; --pz-ko: #FFFFFF; }
:root[data-theme="prism"] [data-kind="hub"] { --pz-k: #005F55; --pz-ks: #D3F5EE; --pz-kf: #00B89E; --pz-ko: #04211D; }
:root[data-theme="prism"] [data-kind="scrapbook"] { --pz-k: #9C0A4D; --pz-ks: #FFE1EE; --pz-kf: #DB1471; --pz-ko: #FFFFFF; }
:root[data-theme="prism"] [data-kind="project"] { --pz-k: #933205; --pz-ks: #FFE7D9; --pz-kf: #FF6B1A; --pz-ko: #2A0E00; }
:root[data-theme="prism"] [data-kind="page"] { --pz-k: #2A3150; --pz-ks: #E3E7F2; --pz-kf: #475072; --pz-ko: #FFFFFF; }
:root[data-theme="prism"] .chip[data-kind] { background: var(--pz-ks); color: var(--pz-k); }
:root[data-theme="prism"] a.chip[data-kind]:hover, :root[data-theme="prism"] button.chip[data-kind]:hover, :root[data-theme="prism"] .chip[data-kind][aria-pressed="true"] { background: var(--pz-kf); color: var(--pz-ko); }
:root[data-theme="prism"] .badge { font-weight: 800; background: var(--paper-sunk); color: var(--ink); }
:root[data-theme="prism"] .badge.accent { background: var(--accent-soft); color: var(--accent-strong); }
:root[data-theme="prism"] .badge.madder { background: var(--madder-soft); color: var(--madder); }
:root[data-theme="prism"] .badge.ok { background: var(--ok-soft); color: var(--ok); }
:root[data-theme="prism"] .badge.warn { background: var(--warn-soft); color: var(--warn); }
:root[data-theme="prism"] .badge.danger { background: var(--danger-soft); color: var(--danger); }
/* "Ready to finish" is one pill everywhere it shows (the shelf, a book, Home, Needs you, Find anything): solid Needs-you amber, dark ink */
:root[data-theme="prism"] .badge[data-state="ready"], :root[data-theme="prism"] .palette .opt .sub[data-state="ready"] { background: #FFB800; color: #231800; font-weight: 800; }
:root[data-theme="prism"] .palette .opt .sub[data-state="ready"] { flex: none; border-radius: 999px; padding: 2px 10px; font-size: var(--fs-xs); line-height: 1.5; }
:root[data-theme="prism"] .palette .opt[aria-selected="true"] .sub[data-state="ready"] { color: #231800; }
/* the count on a hub's level is the hub page's own colour, like the level's stitches beside it */
:root[data-theme="prism"] .hub-level .badge { background: var(--place); color: var(--pz-on); }
:root[data-theme="prism"] .level { font-weight: 700; color: var(--ink); }
:root[data-theme="prism"] .level .stitches { gap: 3px; }
:root[data-theme="prism"] .level .stitches i { width: 6px; height: 16px; border-radius: 3px; background: var(--line-strong); opacity: .35; }
:root[data-theme="prism"] .level[data-level="5"] .stitches i, :root[data-theme="prism"] .level[data-level="4"] .stitches i:nth-child(-n+4), :root[data-theme="prism"] .level[data-level="3"] .stitches i:nth-child(-n+3), :root[data-theme="prism"] .level[data-level="2"] .stitches i:nth-child(-n+2), :root[data-theme="prism"] .level[data-level="1"] .stitches i:nth-child(-n+1) { background: var(--place); opacity: 1; }

/* ───────── tabs, segmented ───────── */
:root[data-theme="prism"] .tabs { border-bottom: 3px solid var(--line); gap: var(--s6); }
:root[data-theme="prism"] .tab { font-weight: 800; color: var(--ink-3); }
:root[data-theme="prism"] .tab[aria-selected="true"], :root[data-theme="prism"] .tab[aria-current="page"] { color: var(--ink); }
:root[data-theme="prism"] .tab[aria-selected="true"]::after, :root[data-theme="prism"] .tab[aria-current="page"]::after { bottom: -3px; height: 5px; background: var(--place); border-radius: 3px; }
:root[data-theme="prism"] .segmented { border: 0; background: var(--paper-sunk); border-radius: 14px; padding: 4px; flex-wrap: wrap; max-width: 100%; }
:root[data-theme="prism"] .segmented button { border-radius: 10px; font-weight: 700; }
:root[data-theme="prism"] .segmented button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; box-shadow: none; }

/* ───────── states ───────── */
:root[data-theme="prism"] .state { border: 0; border-radius: var(--pz-lid) var(--pz-lid) 24px 24px; background: linear-gradient(var(--place), var(--place)) top / 100% var(--pz-lid) no-repeat, var(--surface); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .section .state, :root[data-theme="prism"] .card .state, :root[data-theme="prism"] dialog .state { background: var(--paper); box-shadow: none; border-radius: 20px; }
:root[data-theme="prism"] .state .state-art { width: 68px; height: 68px; border-radius: 22px; background: var(--place); color: var(--pz-on); transform: rotate(-6deg); }
:root[data-theme="prism"] .state.error { background: linear-gradient(var(--danger), var(--danger)) top / 100% var(--pz-lid) no-repeat, var(--surface); }
:root[data-theme="prism"] :is(.section, .card, dialog) .state.error { background: linear-gradient(var(--danger), var(--danger)) top / 100% var(--pz-lid) no-repeat, var(--paper); border-radius: var(--pz-lid) var(--pz-lid) 20px 20px; }
:root[data-theme="prism"] .state.error .state-art { background: var(--danger); color: #FFFFFF; }
:root[data-theme="prism"] .state h2 { font-size: 1.625rem; }
/* One pattern for a place that has nothing in it yet (Library, Atlas, Scrapbooks, Projects, Needs you): the band is the
   place's name alone, and the card under it says what the place is and what to do. Only the card's main button carries
   an icon, the way the error card's "Try again" does. */
:root[data-theme="prism"] .page > .page-head:not(:has(> .crumbs)):has(+ .state:not(.error):last-child) > .lede { display: none; }
:root[data-theme="prism"] .state > .actions > .btn:not(.primary):not(.icon-only) > .icon:first-child { display: none; }
/* Loading bars take the place's tint (--skel, --skel-shine on :root). While a page loads its head is already the colour band,
   and the bars in it are a veil of the band's own ink, so the loading head is the band itself. On a tinted header the bars
   are a step deeper than the tint. */
:root[data-theme="prism"] .skel { border-radius: 10px; }
:root[data-theme="prism"] .skel.block { border-radius: 22px; }
:root[data-theme="prism"] .page-head { --skel: color-mix(in srgb, var(--pz-on) 20%, transparent); --skel-shine: color-mix(in srgb, var(--pz-on) 36%, transparent); }
:root[data-theme="prism"] .page-head .skel.title { height: 44px; border-radius: 14px; --skel: color-mix(in srgb, var(--pz-on) 28%, transparent); --skel-shine: color-mix(in srgb, var(--pz-on) 44%, transparent); }
:root[data-theme="prism"] :is(.section-head, .review-group-head, .note-box h3) { --skel: color-mix(in srgb, var(--place) 30%, #FFFFFF); --skel-shine: color-mix(in srgb, var(--place) 46%, #FFFFFF); }
:root[data-theme="prism"] .progress { height: 10px; background: var(--paper-sunk); }
:root[data-theme="prism"] .section .progress, :root[data-theme="prism"] .card .progress { background: color-mix(in srgb, var(--ink) 10%, transparent); }
:root[data-theme="prism"] .progress > i { background: var(--place); }
:root[data-theme="prism"] .banner { border: 0; border-radius: 6px 16px 16px 6px; background: linear-gradient(var(--place), var(--place)) left / 6px 100% no-repeat, var(--accent-soft); padding: var(--s4) var(--s4) var(--s4) calc(var(--s5) + 2px); font-weight: 600; }
:root[data-theme="prism"] .banner.warn { background: linear-gradient(#FFB800, #FFB800) left / 6px 100% no-repeat, var(--warn-soft); }
:root[data-theme="prism"] .banner.danger { background: linear-gradient(var(--danger), var(--danger)) left / 6px 100% no-repeat, var(--danger-soft); }
:root[data-theme="prism"] .banner.ok { background: linear-gradient(var(--ok), var(--ok)) left / 6px 100% no-repeat, var(--ok-soft); }

/* ───────── dialogs, sheets, menus, palette, toasts ───────── */
:root[data-theme="prism"] dialog.dialog { border: 0; border-radius: 26px; }
:root[data-theme="prism"] .dialog-head { background: var(--place); color: var(--pz-on); padding: var(--s5) var(--s6); align-items: center; }
:root[data-theme="prism"] .dialog-head h2 { font-size: 1.625rem; color: inherit; }
:root[data-theme="prism"] .dialog-head p, :root[data-theme="prism"] .dialog-head .muted, :root[data-theme="prism"] .dialog-head .soft, :root[data-theme="prism"] .dialog-head .eyebrow { color: var(--pz-on); }
:root[data-theme="prism"] .dialog-head .btn { background: transparent; border-color: transparent; color: var(--pz-on); }
:root[data-theme="prism"] .dialog-head .btn:hover { background: color-mix(in srgb, var(--pz-on) 18%, transparent); color: var(--pz-on); box-shadow: none; }
:root[data-theme="prism"] .dialog-head :focus-visible { outline-color: var(--pz-on); box-shadow: 0 0 0 6px color-mix(in srgb, var(--pz-on) 25%, transparent); }
/* a title that takes focus when its dialog opens is not a button and not a link: no box round it, no line under it */
:root[data-theme="prism"] .dialog-head h2:focus-visible { outline: none; box-shadow: none; }
:root[data-theme="prism"] .dialog-body { padding-top: var(--s5); }
:root[data-theme="prism"] .dialog-foot { border-top: 0; background: var(--paper); }
/* the button that deletes is the main button of its dialog: filled, not outlined */
:root[data-theme="prism"] .dialog-foot:not(:has(.btn.primary)) .btn.danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
:root[data-theme="prism"] .dialog-foot:not(:has(.btn.primary)) .btn.danger:hover { background: #A30D25; border-color: #A30D25; color: #FFFFFF; }
:root[data-theme="prism"] dialog.sheet { border-left: 0; }
:root[data-theme="prism"] .silas-sheet .dialog-head { border-bottom: 0; padding-bottom: var(--s5); }
:root[data-theme="prism"] .menu { border: 0; border-radius: 18px; padding: 8px; }
:root[data-theme="prism"] .menu-item { font-weight: 700; border-radius: 11px; }
:root[data-theme="prism"] .menu-item:hover, :root[data-theme="prism"] .menu-item:focus-visible { background: var(--accent-soft); color: var(--accent-strong); }
:root[data-theme="prism"] .menu-item.danger:hover, :root[data-theme="prism"] .menu-item.danger:focus-visible { background: var(--danger-soft); color: var(--danger); }
:root[data-theme="prism"] .menu-sep { height: 2px; }
:root[data-theme="prism"] dialog.palette { border: 0; border-radius: 10px 10px 26px 26px; padding-top: 10px; background: linear-gradient(var(--place), var(--place)) top / 100% 10px no-repeat, var(--surface-raised); }
/* the palette's field is a filled block; with the cursor in it, it turns white inside a ring of the place colour */
:root[data-theme="prism"] .palette .search { margin: 8px 10px 4px; }
:root[data-theme="prism"] .palette .search > .input { border: 3px solid transparent; border-radius: 16px; background: var(--paper-sunk); min-height: 60px; font-size: 1.25rem; font-weight: 600; padding-left: 48px; }
:root[data-theme="prism"] .palette .search > .input:focus-visible { outline: none; border-color: var(--accent); border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 5px color-mix(in srgb, var(--place) 30%, transparent); }
:root[data-theme="prism"] .palette .search > .icon { left: 17px; color: var(--accent); }
:root[data-theme="prism"] .palette .opt { border-radius: 12px; font-weight: 600; }
:root[data-theme="prism"] .palette .opt[aria-selected="true"] { background: var(--ink); color: #FFFFFF; }
:root[data-theme="prism"] .palette .opt[aria-selected="true"] .sub, :root[data-theme="prism"] .palette .opt[aria-selected="true"] .icon { color: #D5D9EC; }
/* each row's icon sits on a tile in the colour of what the row is: a book, a note, a hub, a project, a plain page */
:root[data-theme="prism"] .palette .opt[data-kind] > .icon { flex: none; width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: var(--pz-ks); color: var(--pz-k); }
:root[data-theme="prism"] .palette .opt[data-kind][aria-selected="true"] > .icon { background: var(--pz-kf); color: var(--pz-ko); }
:root[data-theme="prism"] .palette .foot { border-top: 0; background: var(--paper); }
/* a fine light ring keeps a toast apart from the dark bars it can sit over (the phone's top bar, a dialog's scrim) */
:root[data-theme="prism"] .toast { background: var(--pz-night); color: #FFFFFF; border-radius: 16px; font-weight: 700; padding: var(--s3) var(--s5); box-shadow: var(--shadow-2), 0 0 0 1.5px rgba(255, 255, 255, .22); }
/* a dot in the place colour leads each message; white on the red one */
:root[data-theme="prism"] .toast::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pz-glow); }
:root[data-theme="prism"] .toast .btn { border-color: rgba(255, 255, 255, .5); background: transparent; color: #FFFFFF; }
:root[data-theme="prism"] .toast.danger { background: var(--danger); color: #FFFFFF; box-shadow: var(--shadow-2); }
:root[data-theme="prism"] .toast.danger::before { background: #FFFFFF; }

/* ───────── stats, steps, checklist ───────── */
:root[data-theme="prism"] .stat .n { font-family: var(--font-display); font-size: 2.75rem; font-weight: 800; letter-spacing: -0.05em; line-height: .95; color: var(--accent-strong); }
:root[data-theme="prism"] .stat .l { font-weight: 700; color: var(--ink-2); }
:root[data-theme="prism"] .steps i { height: 8px; border-radius: 4px; background: var(--paper-sunk); }
:root[data-theme="prism"] .steps i.done { background: var(--place); }
/* the step you are on is filled like the finished ones, with a soft halo to mark it */
:root[data-theme="prism"] .steps i.now { background: var(--place); box-shadow: 0 0 0 3px color-mix(in srgb, var(--place) 26%, transparent); }
:root[data-theme="prism"] .checklist .item { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .checklist .item:first-child { border-top: 0; }
:root[data-theme="prism"] .checklist .tick { width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .checklist .item.todo .tick { color: var(--accent-strong); }
:root[data-theme="prism"] .checklist .item.done .tick { background: var(--ok); color: #FFFFFF; }
:root[data-theme="prism"] .checklist .title { font-weight: 800; }

/* ───────── prose: long text stays calm and easy ───────── */
:root[data-theme="prism"] .prose, :root[data-theme="prism"] .read { font-family: var(--pz-read); font-variation-settings: normal; line-height: 1.72; color: #171A2C; }
:root[data-theme="prism"] .prose h1, :root[data-theme="prism"] .prose h2, :root[data-theme="prism"] .prose h3 { font-family: var(--font-display); }
:root[data-theme="prism"] .prose blockquote { border-left: 6px solid var(--place); padding: .5em 0 .5em 1em; font-style: normal; color: var(--ink); }
:root[data-theme="prism"] .prose th, :root[data-theme="prism"] .prose td { border: 2px solid var(--line); }
:root[data-theme="prism"] .synopsis { border-left: 0; border-radius: var(--pz-lid) 20px 20px var(--pz-lid); padding: var(--s5) var(--s6) var(--s5) calc(var(--s6) + var(--pz-lid)); background: linear-gradient(var(--place), var(--place)) left / var(--pz-lid) 100% no-repeat, var(--accent-soft); font-size: var(--fs-lg); font-weight: 500; line-height: 1.55; }
:root[data-theme="prism"] .synopsis .eyebrow { color: var(--accent-strong); margin-bottom: 6px; }

/* ═════════ screens ═════════ */

/* ───────── Home ───────── */
:root[data-theme="prism"] .home-cols, :root[data-theme="prism"] .home-main, :root[data-theme="prism"] .home-side { gap: var(--s6); }
:root[data-theme="prism"] .home-stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
:root[data-theme="prism"] .home-stat { display: block; min-width: 0; border: 0; border-radius: 18px; padding: 14px var(--s5); background: var(--pz-slate); color: #FFFFFF; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
:root[data-theme="prism"] .home-stat .stat { display: flex; flex-direction: row; align-items: baseline; gap: 12px; min-width: 0; }
:root[data-theme="prism"] .home-stat .stat .n { font-size: 2.5rem; }
:root[data-theme="prism"] .home-stat .stat .l { font-size: var(--fs-md); font-weight: 800; }
/* number tiles away from Home (a hub's page, a book's page) are the same solid blocks, in the colour of the place they sit in */
:root[data-theme="prism"] .stats:not(.home-stats) > * { background: var(--place); color: var(--pz-on); border-radius: 18px; padding: 14px var(--s5); }
:root[data-theme="prism"] .stats:not(.home-stats) > * .n, :root[data-theme="prism"] .stats:not(.home-stats) > * .l { color: inherit; }
:root[data-theme="prism"] .stats:not(.home-stats) > * .l { font-weight: 800; }
/* Home's tiles say what they count (data-kind): books cobalt, notes violet, hubs teal, the colours those things have everywhere */
:root[data-theme="prism"] .home-stat[data-kind="book"] { background: var(--pz-cobalt); }
:root[data-theme="prism"] .home-stat[data-kind="note"] { background: var(--pz-violet); }
:root[data-theme="prism"] .home-stat[data-kind="hub"] { background: var(--pz-teal); color: #04211D; }
:root[data-theme="prism"] .home-stat:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 18px 26px -18px rgba(12, 14, 31, .7); color: #FFFFFF; }
:root[data-theme="prism"] .home-stat[data-kind="hub"]:hover { color: #04211D; }
:root[data-theme="prism"] .home-stat .stat .n, :root[data-theme="prism"] .home-stat .stat .l { color: inherit; }
:root[data-theme="prism"] .home-left-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-size: 1.5rem; line-height: 1.12; }
:root[data-theme="prism"] .home-left-go { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .home-hubs li + li { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .home-hubs a { font-weight: 700; }
:root[data-theme="prism"] .home-hubs a:hover { color: var(--accent-strong); }
:root[data-theme="prism"] .home-hubs a .num { font-weight: 800; color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }
:root[data-theme="prism"] .home-words h3 .icon { color: var(--accent); }
:root[data-theme="prism"] .home-start { padding-top: var(--s2); padding-bottom: var(--s2); }

/* ───────── Needs you ───────── */
:root[data-theme="prism"] .review-tools { background: var(--surface); border-radius: 24px; padding: var(--s5) var(--s6); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .review-kinds-label { font-weight: 800; color: var(--ink); }
:root[data-theme="prism"] .review-groups { gap: var(--s6); }
/* a book's block clips its round corners with overflow: clip, never hidden, so its head can be held in sight (home.css) */
:root[data-theme="prism"] .review-groups > * { background: var(--surface); border-radius: 24px; padding: 0 var(--s6) var(--s3); box-shadow: var(--pz-pane); overflow: clip; overflow-clip-margin: 1px; }
/* The book's head is a tinted band with the place's rule under it, from edge to edge of the block, at rest and while it
   is held at the top of the window as the reader goes down the questions (data-stuck: the same band, with a shadow). */
:root[data-theme="prism"] .review-group { --review-head-fill: var(--accent-soft); }
:root[data-theme="prism"] .review-group-head { margin: 0 calc(-1 * var(--s6)); padding: var(--s4) var(--s6); background: var(--accent-soft); border-bottom: 3px solid var(--place); align-items: center; }
:root[data-theme="prism"] .review-group-head[data-stuck="true"] { box-shadow: 0 14px 22px -16px rgba(12, 14, 31, .45); }
:root[data-theme="prism"] .review-group-head h2 a:hover { color: var(--accent-strong); }
:root[data-theme="prism"] .review-group-advice { color: var(--ink-2); font-weight: 600; }
/* while it loads, the rows stand clear of the head's rule, as the questions do */
:root[data-theme="prism"] .review-group-head + .stack { padding: var(--s4) 0 var(--s3); }
/* "Finish this book" is the main action of its book. On the pale head an amber button would sink in,
   so it takes the dark fill the main button has on the banner: the strongest shape on the page. */
:root[data-theme="prism"] .review-group-head .btn.primary { background: var(--pz-on); border-color: var(--pz-on); color: var(--pz-inv); font-weight: 800; }
:root[data-theme="prism"] .review-group-head .btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #FFFFFF; box-shadow: 0 10px 20px -10px var(--accent-strong); }
/* a question with three answers (Open, Keep it there, Delete) puts them on a line of their own under its words where the
   block is narrower than a desktop's, so the words are never squeezed into a column of three or four to a line */
@media (min-width: 720px) and (max-width: 1199px) {
  /* where the advice and the button drop under the book's name, they span the head: the advice at the left, the button
     at the right edge, where it stands on a wide screen */
  :root[data-theme="prism"] .review-group-finish:has(> .review-group-advice) { flex: 1 1 100%; }
  :root[data-theme="prism"] .review-group-finish:has(> .review-group-advice) > .btn { margin-left: auto; }
  :root[data-theme="prism"] .review-item:has(> .review-acts.three) { flex-wrap: wrap; }
  :root[data-theme="prism"] .review-item:has(> .review-acts.three) > .review-body { flex: 1 1 100%; }
  :root[data-theme="prism"] .review-item:has(> .review-acts.three) > .review-acts { margin-left: auto; }
}
:root[data-theme="prism"] .review-item { border-bottom: 2px solid var(--line); }
:root[data-theme="prism"] .review-list > :last-child { border-bottom: 0; }
:root[data-theme="prism"] .review-where { font-weight: 700; color: var(--ink-2); }

/* ───────── Library, a book ───────── */
:root[data-theme="prism"] .lib-reading, :root[data-theme="prism"] .lib-queued { border: 0; border-radius: 20px; background: var(--paper); }
:root[data-theme="prism"] .lib-reading-title, :root[data-theme="prism"] .lib-queued-title, :root[data-theme="prism"] .lib-list .title, :root[data-theme="prism"] .lib-ch-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
:root[data-theme="prism"] .lib-reading-title:hover, :root[data-theme="prism"] .lib-queued-title:hover { color: var(--accent-strong); }
/* Up next: each waiting book is a short row; its little cover is a flat slip of cloth, not a rounded tile */
:root[data-theme="prism"] .lib-queued { border-radius: 16px; }
:root[data-theme="prism"] .lib-queued-cover .cover { padding: 0; border-radius: 5px; box-shadow: none; }
:root[data-theme="prism"] .lib-queue-note { color: var(--ink-2); }
:root[data-theme="prism"] .lib-list > li + li { border-top: 2px solid color-mix(in srgb, var(--ink) 7%, transparent); }
:root[data-theme="prism"] .lib-tools .lib-count { font-weight: 700; color: var(--ink-2); }
:root[data-theme="prism"] .lib-book-side { background: var(--surface); border-radius: 24px; padding: var(--s5); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .lib-facts dt { font-weight: 700; }
:root[data-theme="prism"] .lib-part { color: var(--accent-strong); font-weight: 800; }
/* an open chapter is marked by a strip down its left edge, so the list's left corners are no rounder than the strip is wide */
:root[data-theme="prism"] .lib-chapters { border: 0; border-radius: 6px 20px 20px 6px; background: var(--paper); }
:root[data-theme="prism"] .lib-chapter + .lib-chapter { border-top: 2px solid var(--surface); }
:root[data-theme="prism"] .lib-chapter > summary:hover { background: var(--accent-soft); }
:root[data-theme="prism"] .lib-chapter[open] > summary { background: var(--accent-soft); box-shadow: inset 6px 0 0 var(--place); }
:root[data-theme="prism"] .lib-ch-n { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .lib-ch-count { font-weight: 700; }
:root[data-theme="prism"] .lib-notes { border-top: 0; background: var(--surface); }
:root[data-theme="prism"] .lib-notes > li + li { border-top: 2px solid var(--paper); }
:root[data-theme="prism"] .lib-note:hover { background: var(--accent-soft); box-shadow: inset 6px 0 0 var(--place); }
:root[data-theme="prism"] .lib-note-title { font-weight: 700; }
:root[data-theme="prism"] .lib-remove { border: 0; border-radius: 20px; background: var(--danger-soft); }
:root[data-theme="prism"] .lib-remove p { color: var(--ink); }
:root[data-theme="prism"] .lib-warnings { border: 0; border-radius: 6px 16px 16px 6px; background: linear-gradient(#FFB800, #FFB800) left / 6px 100% no-repeat, var(--warn-soft); padding-left: calc(var(--s4) + 6px); }
:root[data-theme="prism"] .lib-drop { border: 3px dashed var(--line-strong); border-radius: 20px; background: var(--paper); }
:root[data-theme="prism"] .lib-drop.over { border-color: var(--accent); background: var(--accent-soft); }
:root[data-theme="prism"] .lib-drop-title { font-weight: 800; }

/* ───────── The note (reading page) ───────── */
/* A note's band is its title and nothing else, so it is compact: the reading starts high on the screen. */
:root[data-theme="prism"] .note-top .page-head { padding: 16px 24px 18px; gap: 8px; border-radius: 22px; box-shadow: 0 14px 28px -24px var(--place); }
:root[data-theme="prism"] .note-top .page-head .thread { display: none; }
:root[data-theme="prism"] .note-top .page-head h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 0.9rem + 1.3vw, 2.125rem); line-height: 1.04; }
@media (min-width: 720px) {
  :root[data-theme="prism"] .note-page { padding-top: var(--s4); }
  :root[data-theme="prism"] .note-main { gap: var(--s3); }
  :root[data-theme="prism"] .note-top { gap: var(--s2); }
  /* the synopsis label runs into its first line */
  :root[data-theme="prism"] .note-syn { display: block; padding: 12px 22px 14px calc(20px + var(--pz-lid)); font-size: var(--fs-md); line-height: 1.6; }
  :root[data-theme="prism"] .note-syn > .eyebrow { display: inline; margin: 0 10px 0 0; }
  :root[data-theme="prism"] .note-syn > .note-syn-text { display: inline; }
}
:root[data-theme="prism"] .note-size .label { font-family: var(--font-display); font-weight: 800; }
:root[data-theme="prism"] .note-meta { font-weight: 600; color: var(--ink-2); }
:root[data-theme="prism"] .note-meta .note-era { color: var(--ink-2); }
:root[data-theme="prism"] .note-meta .note-era::before { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--place); }
:root[data-theme="prism"] .note-jump { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .note-body { background: var(--surface); border-radius: 24px; padding: var(--s8) var(--s10); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .note-body > h2, :root[data-theme="prism"] .note-body > h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
:root[data-theme="prism"] .note-body > h3 { color: var(--ink); }
:root[data-theme="prism"] .note-body ul > li::before { background: var(--place); width: .4em; height: .4em; border-radius: 2px; transform: rotate(45deg); top: .68em; }
:root[data-theme="prism"] .note-body ul ul > li::before { background: transparent; box-shadow: inset 0 0 0 2px var(--place); }
:root[data-theme="prism"] .note-body a.note-hub, :root[data-theme="prism"] .note-cited a { text-decoration-color: color-mix(in srgb, var(--place) 70%, transparent); text-decoration-thickness: 2px; }
:root[data-theme="prism"] .note-body a.note-hub:hover { color: var(--accent-strong); background: var(--accent-soft); text-decoration-color: var(--place); }
:root[data-theme="prism"] .note-see-label { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .note-quote { border-left: 6px solid var(--place); background: var(--accent-soft); border-radius: 0 16px 16px 0; padding: .8em 1.1em; }
:root[data-theme="prism"] .note-quote blockquote { font-style: normal; font-weight: 500; }
:root[data-theme="prism"] .note-quote figcaption { font-weight: 800; }
:root[data-theme="prism"] .note-break { height: 4px; width: 56px; border-radius: 2px; background: var(--place); }
:root[data-theme="prism"] .note-cited { border-top: 3px solid var(--line); }
:root[data-theme="prism"] .note-cited h2 { font-family: var(--font-display); }
:root[data-theme="prism"] .note-cited li { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .note-cited-n { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .note-turns { border-top: 0; padding-top: 0; }
:root[data-theme="prism"] .note-turn { border: 0; border-radius: 22px; background: var(--surface); box-shadow: var(--pz-pane); padding: var(--s5); transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
:root[data-theme="prism"] .note-turn:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--place), 0 18px 30px -18px color-mix(in srgb, var(--place) 80%, transparent); }
:root[data-theme="prism"] .note-turn-label { font-weight: 800; color: var(--ink-2); }
:root[data-theme="prism"] .note-turn-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
:root[data-theme="prism"] .note-turn.next { background: var(--place); color: var(--pz-on); }
:root[data-theme="prism"] .note-turn.next .note-turn-label, :root[data-theme="prism"] .note-turn.next:hover .note-turn-title { color: var(--pz-on); }
:root[data-theme="prism"] .note-turn.next:hover { color: var(--pz-on); box-shadow: 0 18px 30px -16px var(--place); }
:root[data-theme="prism"] .note-turn:hover .note-turn-title { color: var(--accent-strong); }
:root[data-theme="prism"] .note-fold { background: var(--surface); }
:root[data-theme="prism"] .note-fold .label { font-weight: 800; }
:root[data-theme="prism"] .note-box { background: var(--surface); border-radius: 20px; padding: 0 var(--s4) var(--s4); box-shadow: var(--pz-pane); overflow: hidden; }
:root[data-theme="prism"] .note-box h3 { margin: 0 calc(-1 * var(--s4)); padding: 12px var(--s4) 10px; background: var(--accent-soft); border-bottom: 3px solid var(--place); color: var(--ink); font-family: var(--font-ui); font-weight: 800; letter-spacing: .08em; }
:root[data-theme="prism"] .note-count { color: var(--accent-strong); }
:root[data-theme="prism"] .note-side-title { font-family: var(--font-display); font-weight: 800; }
:root[data-theme="prism"] .note-tocrow { border-left: 4px solid var(--line); font-weight: 600; }
:root[data-theme="prism"] .note-tocrow:hover { border-left-color: var(--line-strong); color: var(--accent-strong); }
:root[data-theme="prism"] .note-tocrow[aria-current="true"] { border-left-color: var(--place); font-weight: 800; background: var(--accent-soft); }
:root[data-theme="prism"] .note-hubrow { margin-inline: 0; padding-inline: var(--s2); }
:root[data-theme="prism"] .note-hubrow:hover, :root[data-theme="prism"] .note-tag-link:hover, :root[data-theme="prism"] .note-backrow:hover { background: var(--accent-soft); }
:root[data-theme="prism"] .note-hubrow-title { font-weight: 600; }
:root[data-theme="prism"] .note-hubgroup h4 { font-weight: 800; }
:root[data-theme="prism"] .note-tag-link { margin-left: 0; }
:root[data-theme="prism"] .note-backrow { margin-inline: 0; }
:root[data-theme="prism"] .note-tag-link > .icon, :root[data-theme="prism"] .note-backrow > .icon { color: var(--accent); }
:root[data-theme="prism"] .note-skip:focus { border: 0; }
@media (min-width: 1024px) {
  :root[data-theme="prism"] .note-body { padding-top: var(--s6); }
}
@media (min-width: 1440px) {
  :root[data-theme="prism"] .note-side-title { font-family: var(--font-display); }
}

/* ───────── Atlas, a hub, Find ───────── */
:root[data-theme="prism"] .atlas-list > li + li > .list-row { border-top: 2px solid color-mix(in srgb, var(--ink) 7%, transparent); }
:root[data-theme="prism"] .atlas-folder { min-height: 112px; }
:root[data-theme="prism"] .atlas-folder-name { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; font-size: 1.25rem; line-height: 1.12; }
:root[data-theme="prism"] .atlas-folder-n { color: var(--pz-on); background: var(--place); border-radius: 999px; padding: 2px 10px; font-weight: 800; }
/* A colour means a place: every folder card is the Atlas's own, teal from top to bottom (its lid, its folder icon on a
   pale teal tile, its count). The six colours the page hands each folder (data-hue) are not used here. */
:root[data-theme="prism"] .atlas-folder, :root[data-theme="prism"] .section .atlas-folder { border-radius: var(--pz-lid) var(--pz-lid) 20px 20px; background: linear-gradient(var(--place), var(--place)) top / 100% var(--pz-lid) no-repeat, var(--paper); box-shadow: none; padding-top: calc(var(--s4) + var(--pz-lid)); }
:root[data-theme="prism"] .atlas-folder .atlas-folder-n { background: var(--place); color: var(--pz-on); }
:root[data-theme="prism"] .atlas-folder .atlas-folder-top .icon { flex: none; width: 28px; height: 28px; padding: 5px; margin-top: -3px; border-radius: 8px; background: #C4F1E8; color: var(--accent-strong); }
:root[data-theme="prism"] a.atlas-folder:focus-visible { border-radius: var(--pz-lid) var(--pz-lid) 20px 20px; }
:root[data-theme="prism"] a.atlas-folder:hover, :root[data-theme="prism"] .section a.atlas-folder:hover { background: linear-gradient(var(--place), var(--place)) top / 100% var(--pz-lid) no-repeat, var(--surface); box-shadow: 0 0 0 3px var(--place), 0 18px 30px -18px rgba(12, 14, 31, .5); }
:root[data-theme="prism"] .hub-star[aria-pressed="true"] { background: var(--pz-on); border-color: var(--pz-on); color: var(--pz-inv); }
/* a hub's kind (Person, Place, Idea…) is a pill over its title in the band's own ink, so it belongs to the teal band
   (the folder it lives in is named in the trail above it) */
:root[data-theme="prism"] .hub-screen .page-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; width: max-content; max-width: 100%; background: var(--pz-on); color: var(--pz-glow); padding: 5px 12px; border-radius: 999px; }
/* on a phone the synopsis is the band's own line; its "More" is in the band's ink, like the trail's links */
:root[data-theme="prism"] .page-head .hub-lede-more { color: var(--pz-on); font-weight: 800; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--pz-on) 50%, transparent); }
:root[data-theme="prism"] .page-head .hub-lede-more:hover { color: var(--pz-on); text-decoration-color: var(--pz-on); }
:root[data-theme="prism"] .hub-level { border: 0; border-radius: 20px; background: var(--surface); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .section .hub-level { background: var(--paper); box-shadow: none; }
:root[data-theme="prism"] .hub-level > summary { min-height: 58px; padding: var(--s3) var(--s5); }
:root[data-theme="prism"] .hub-level > summary:hover { background: var(--accent-soft); }
:root[data-theme="prism"] .hub-level[open] > summary { background: var(--accent-soft); border-bottom: 3px solid var(--place); }
:root[data-theme="prism"] .hub-level-name .level { font-weight: 800; }
:root[data-theme="prism"] .hub-level-body { border-top: 0; }
:root[data-theme="prism"] .hub-level-body .list { border-radius: 0; background: transparent; }
:root[data-theme="prism"] .hub-chev { color: var(--accent); }
:root[data-theme="prism"] .hub-aka-more { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .find-search > .find-input { min-height: 64px; border: 3px solid var(--ink); border-radius: 20px; font-size: 1.25rem; font-weight: 600; padding-left: 54px; box-shadow: 6px 6px 0 var(--pz-violet); }
:root[data-theme="prism"] .find-search > .find-input:focus-visible { border-color: var(--ink); outline: 3px solid var(--pz-violet); outline-offset: 2px; border-radius: 20px; box-shadow: 6px 6px 0 var(--pz-violet); }
:root[data-theme="prism"] .find-search > .icon { color: var(--ink); }
:root[data-theme="prism"] .find-search { padding-right: 6px; }
:root[data-theme="prism"] .find-tag, :root[data-theme="prism"] .find-tag-on { border-radius: 14px; }
:root[data-theme="prism"] .find-tag-leaf { color: inherit; font-weight: 700; }
:root[data-theme="prism"] .find-tag-n { color: inherit; font-weight: 700; opacity: .85; }
:root[data-theme="prism"] .find-group-name { font-weight: 800; color: var(--ink); }
:root[data-theme="prism"] .find-hits { background: var(--surface); border-radius: 24px; padding: var(--s3) var(--s6); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .section .find-hits { background: transparent; border-radius: 0; padding: 0; box-shadow: none; }
:root[data-theme="prism"] .find-hit { border-top: 2px solid var(--line); padding: var(--s4) 0; }
:root[data-theme="prism"] .find-hit:first-child { border-top: 0; padding-top: var(--s4); }
:root[data-theme="prism"] .find-hit-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; font-size: 1.25rem; }
:root[data-theme="prism"] .find-hit-title:hover { color: var(--accent-strong); }
:root[data-theme="prism"] .find-hit-from { font-weight: 600; }
:root[data-theme="prism"] .find-mark { background: var(--mark); font-weight: 700; padding: 1px 3px; }
:root[data-theme="prism"] .find-hit-tags .chip { border-radius: 999px; }
:root[data-theme="prism"] .find-hub-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
/* the hub that matches a search is a hub first: it wears the hub colour, not the colour of the Find page */
:root[data-theme="prism"] .find-hub[data-kind] { --place: var(--pz-kf); --pz-on: var(--pz-ko); --accent: var(--pz-k); --accent-strong: var(--pz-k); --accent-soft: var(--pz-ks); }
:root[data-theme="prism"] .find-side { background: var(--surface); border-radius: 24px; padding: var(--s5); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .find-side h3 { font-weight: 800; }

/* ───────── Scrapbooks ───────── */
:root[data-theme="prism"] .sbk-card { border-radius: 24px; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
/* A colour means a place: scrapbook cards and project cards wear their place's colour (pink, orange), so a project card
   is never Atlas teal. */
:root[data-theme="prism"] .sbk-card { border-radius: 10px 10px 24px 24px; background: linear-gradient(var(--place), var(--place)) top / 100% 10px no-repeat, var(--surface); box-shadow: var(--pz-pane); padding-top: calc(var(--s6) + 10px); }
:root[data-theme="prism"] .sbk-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--place), 0 20px 32px -18px rgba(12, 14, 31, .5); }
:root[data-theme="prism"] .sbk-card-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--place); color: var(--pz-on); transform: rotate(-5deg); }
:root[data-theme="prism"] .sbk-card-name h2 { font-size: 1.5rem; line-height: 1.08; }
:root[data-theme="prism"] .sbk-card:hover .sbk-card-link { color: var(--accent-strong); }
:root[data-theme="prism"] .sbk-card-open { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .sbk-card-count .num { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .sbk-taste { border-top: 0; gap: var(--s2); }
:root[data-theme="prism"] .sbk-taste li { border-bottom: 0; background: var(--paper); border-radius: 6px 14px 14px 6px; padding: var(--s3) var(--s4) var(--s3) calc(var(--s4) + 6px); }
:root[data-theme="prism"] .sbk-taste li::before { left: 0; top: 0; bottom: 0; width: 6px; border-radius: 0; background: var(--place); }
:root[data-theme="prism"] .sbk-taste li { overflow: hidden; }
:root[data-theme="prism"] .sbk-taste-lead { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .sbk-taste-words, :root[data-theme="prism"] .sbk-words { font-family: var(--pz-read); }
:root[data-theme="prism"] .sbk-taste-none { border-top: 0; }
:root[data-theme="prism"] .sbk-meta { font-weight: 600; margin-top: 0; }
:root[data-theme="prism"] .sbk-tools { background: var(--surface); border-bottom: 0; border-radius: 18px; padding: var(--s3) var(--s4); box-shadow: var(--pz-pane); top: var(--s2); }
:root[data-theme="prism"] .sbk-count { margin-top: 0; font-weight: 700; color: var(--ink-2); }
:root[data-theme="prism"] .sbk-out { margin-top: 0; }
:root[data-theme="prism"] .sbk-piece { border: 0; border-radius: 22px; background: var(--surface); box-shadow: var(--pz-pane); }
/* each piece card wears the place colour along its top edge, like the scrapbook it came from */
:root[data-theme="prism"] .sbk-pieces:not(.is-dated) .sbk-piece { border-radius: var(--pz-lid) var(--pz-lid) 22px 22px; background: linear-gradient(var(--place), var(--place)) top / 100% var(--pz-lid) no-repeat, var(--surface); padding-top: calc(var(--s5) + var(--pz-lid)); }
:root[data-theme="prism"] .sbk-title { font-size: 1.25rem; }
:root[data-theme="prism"] .sbk-quote { border-left: 6px solid var(--place); padding-left: var(--s4); }
:root[data-theme="prism"] .sbk-quote .sbk-words { font-weight: 500; }
:root[data-theme="prism"] .sbk-who { font-weight: 800; }
:root[data-theme="prism"] .sbk-when { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .sbk-when.rough { color: var(--ink-3); }
:root[data-theme="prism"] .sbk-piece-foot { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .sbk-from a { font-weight: 700; color: var(--accent-strong); }
:root[data-theme="prism"] .sbk-from .sbk-book-link { color: var(--ink-2); font-weight: 600; }
:root[data-theme="prism"] .sbk-star[aria-pressed="true"] { color: var(--pz-amber); }
:root[data-theme="prism"] .sbk-star[aria-pressed="true"] .icon { stroke: #8A5A00; }
:root[data-theme="prism"] .sbk-year { font-size: 2rem; border-bottom: 0; padding: 0; display: flex; align-items: center; gap: 12px; }
:root[data-theme="prism"] .sbk-year::after { content: ""; flex: 1 1 auto; height: 6px; border-radius: 3px; background: var(--place); }
:root[data-theme="prism"] .sbk-pieces.is-dated { gap: var(--s3); }
:root[data-theme="prism"] .sbk-pieces.is-dated .sbk-piece { border: 0; border-radius: 20px; background: var(--surface); padding: var(--s4) var(--s5); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .sbk-pieces.is-dated .sbk-when { background: var(--accent-soft); border-radius: 10px; padding: 6px 10px; align-self: start; justify-self: start; }
:root[data-theme="prism"] .sbk-rows { border: 0; border-radius: 20px; box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .sbk-row { border-top: 2px solid var(--paper); }
:root[data-theme="prism"] .sbk-row:first-child { border-top: 0; }
:root[data-theme="prism"] .sbk-row-main:hover { background: var(--accent-soft); }
:root[data-theme="prism"] .sbk-row-lead { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .sbk-row-title { font-weight: 600; }
:root[data-theme="prism"] .sbk-pics img { border: 0; border-radius: 16px; }

/* ───────── Projects, a project ───────── */
:root[data-theme="prism"] .proj-card { border: 0; border-radius: 10px 10px 22px 22px; background: linear-gradient(var(--place), var(--place)) top / 100% 10px no-repeat, var(--surface); box-shadow: var(--pz-pane); padding-top: calc(var(--s5) + 10px); transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
:root[data-theme="prism"] .proj-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--place), 0 20px 32px -18px rgba(12, 14, 31, .5); }
:root[data-theme="prism"] .proj-card h2 { font-size: 1.625rem; line-height: 1.06; }
:root[data-theme="prism"] .proj-card:hover h2 a { color: var(--accent-strong); }
:root[data-theme="prism"] .proj-latest { border-left: 0; border-radius: 6px 16px 16px 6px; background: linear-gradient(var(--place), var(--place)) left / 6px 100% no-repeat, var(--paper); padding-left: calc(var(--s4) + 6px); }
:root[data-theme="prism"] .proj-latest-name { font-weight: 800; color: var(--ink); }
:root[data-theme="prism"] .proj-excerpt { font-family: var(--pz-read); line-height: 1.5; }
:root[data-theme="prism"] .proj-foot { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .proj-carry { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .proj-last { font-family: var(--font-ui); font-style: normal; font-weight: 600; }
:root[data-theme="prism"] .proj-meta { font-weight: 600; }
:root[data-theme="prism"] .proj-step { border: 0; border-radius: 18px; background: var(--paper); }
:root[data-theme="prism"] .proj-step-art { background: var(--place); color: var(--pz-on); border-radius: 14px; transform: rotate(-5deg); }
:root[data-theme="prism"] .proj-step-n { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .proj-step-title { font-weight: 800; }
:root[data-theme="prism"] .proj-step + .proj-step::before { background: var(--place); height: 4px; border-radius: 2px; }
:root[data-theme="prism"] .proj-facts { font-weight: 600; color: var(--pz-on); }
:root[data-theme="prism"] .proj-page { border-top: 2px solid color-mix(in srgb, var(--ink) 7%, transparent); }
:root[data-theme="prism"] .proj-page:first-child { border-top: 0; }
:root[data-theme="prism"] .proj-page > .list-row, :root[data-theme="prism"] .list:not(.plain) .proj-page > .list-row { border-top: 0; }
:root[data-theme="prism"] .proj-page > .list-row .title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: 1.25rem; }
:root[data-theme="prism"] .proj-form-fail { border-radius: 14px; }
@media (max-width: 719px) {
  :root[data-theme="prism"] .proj-step + .proj-step::before { width: 4px; height: var(--s3); background: var(--place); }
}

/* ───────── The writing page ───────── */
:root[data-theme="prism"] .write-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; color: inherit; }
:root[data-theme="prism"] .write-title::placeholder { color: var(--pz-on); opacity: .75; }
:root[data-theme="prism"] .write-bar { background: var(--surface); border-bottom: 0; border-radius: 16px; padding: 4px var(--s3); margin-top: var(--s3); box-shadow: var(--pz-pane), 0 0 0 2px var(--line); top: var(--s2); }
:root[data-theme="prism"] .write-tools { margin-left: 0; }
:root[data-theme="prism"] .write-tool { border-radius: 10px; color: var(--ink); }
:root[data-theme="prism"] .write-tool:hover { background: var(--accent-soft); color: var(--accent-strong); }
:root[data-theme="prism"] .write-tool[aria-pressed="true"] { background: var(--place); color: var(--pz-on); box-shadow: none; }
:root[data-theme="prism"] .write-sep { width: 2px; }
:root[data-theme="prism"] .write-status { font-weight: 700; color: var(--ink-2); }
:root[data-theme="prism"] .write-status.is-error { color: var(--danger); }
:root[data-theme="prism"] .write-text { font-family: var(--pz-read); background: var(--surface); border-radius: 24px; padding: var(--s8) var(--s10) var(--s16); margin-top: var(--s3); max-width: none; box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .write-text[data-empty]::before { left: var(--s10); top: var(--s8); }
:root[data-theme="prism"] .write-text:focus-visible { border-radius: 24px; box-shadow: var(--pz-pane), inset 0 6px 0 var(--place); }
:root[data-theme="prism"] .write-text h2, :root[data-theme="prism"] .write-text h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; }
:root[data-theme="prism"] .write-text blockquote, :root[data-theme="prism"] .write-text .pj-clip { border-left: 6px solid var(--place); background: var(--accent-soft); border-radius: 0 14px 14px 0; padding: var(--s3) var(--s4) var(--s3) var(--s5); color: var(--ink); }
:root[data-theme="prism"] .write-text td, :root[data-theme="prism"] .write-text th { border: 2px solid var(--line); }
:root[data-theme="prism"] .write-lib-list > li { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .write-lib-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
:root[data-theme="prism"] .write-lib-title:hover { color: var(--accent-strong); }
@media (max-width: 1023px) {
  :root[data-theme="prism"] .write-text { padding-top: calc(var(--hit) + var(--s2)); }
  :root[data-theme="prism"] .write-text[data-empty]::before { top: calc(var(--hit) + var(--s2)); }
}
@media (min-width: 1600px) {
  :root[data-theme="prism"] .write-side { border-left: 0; background: linear-gradient(var(--place), var(--place)) top / 100% var(--pz-lid) no-repeat, var(--surface); border-radius: var(--pz-lid) var(--pz-lid) 24px 24px; padding: calc(var(--s5) + var(--pz-lid)) var(--s5) var(--s5); box-shadow: var(--pz-pane); }
  :root[data-theme="prism"] .write-side-title { color: var(--ink); font-weight: 800; }
}

/* ───────── sign in, join, welcome ───────── */
:root[data-theme="prism"] .gate-art { background: var(--pz-violet); color: #FFFFFF; }
:root[data-theme="prism"] .gate-art::before { inset: 0; background:
  radial-gradient(circle at 100% 42%, #DB1471 0 150px, transparent 151px),
  radial-gradient(circle at 104% 100%, #1F5BFF 0 240px, transparent 241px),
  radial-gradient(circle at 88% 6%, #FFB800 0 46px, transparent 47px),
  linear-gradient(150deg, rgba(12, 14, 31, .22) 0 30%, transparent 30.2%); }
:root[data-theme="prism"] .gate-art blockquote { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.75rem, 3.1vw, 3rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 14ch; font-variation-settings: normal; margin-inline: 0; }
:root[data-theme="prism"] .gate-art .points { color: #FFFFFF; font-weight: 600; max-width: 34ch; }
:root[data-theme="prism"] .gate-art :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25); }
/* stacked (tablet and phone): the line starts under the brand, on the same left edge as the form */
@media (max-width: 899px) {
  :root[data-theme="prism"] .auth-gate .gate-art blockquote { max-width: var(--form-max); }
}
:root[data-theme="prism"] .gate-form { background: var(--paper); }
:root[data-theme="prism"] .gate-form > .inner { background: var(--surface); border-radius: 28px; padding: var(--s8); box-shadow: var(--pz-pane); max-width: calc(var(--form-max) + var(--s16)); }
:root[data-theme="prism"] .gate-form .page-head { background: transparent; color: var(--ink); padding: 0; border-radius: 0; box-shadow: none; overflow: visible; }
:root[data-theme="prism"] .gate-form .page-head::before, :root[data-theme="prism"] .gate-form .page-head::after { display: none; }
:root[data-theme="prism"] .gate-form .page-head h1 { font-size: clamp(2.125rem, 1.2rem + 2.6vw, 3.5rem); }
:root[data-theme="prism"] .gate-form .page-head .lede { color: var(--ink-2); font-size: var(--fs-lg); }
:root[data-theme="prism"] .gate-form .page-head .eyebrow { color: var(--accent-strong); }
:root[data-theme="prism"] .gate-form .page-head .thread { background: var(--place); }
:root[data-theme="prism"] .gate-form .page-head a { color: var(--accent); }
/* welcome and setup keep the colour band, a little smaller because the column is narrow */
:root[data-theme="prism"] .wel .page-head { padding: 26px 28px 28px; border-radius: 24px; }
:root[data-theme="prism"] .wel .page-head h1 { font-size: clamp(1.875rem, 1.2rem + 2vw, 2.75rem); line-height: 1.02; }
:root[data-theme="prism"] .wel .page-head .lede { font-size: var(--fs-lg); }
:root[data-theme="prism"] .wel .page-head::after { display: none; }
:root[data-theme="prism"] .auth-aside { border-top: 3px solid var(--line); }
:root[data-theme="prism"] .auth-aside h2 { font-family: var(--font-ui); font-weight: 800; }
:root[data-theme="prism"] .auth-foot a { font-weight: 800; }
:root[data-theme="prism"] .auth-stop-art, :root[data-theme="prism"] .wel-point-art { border-radius: 16px; background: var(--place); color: var(--pz-on); transform: rotate(-5deg); }
:root[data-theme="prism"] .wel-top { background: var(--pz-night); color: #FFFFFF; }
:root[data-theme="prism"] .wel-top .brand, :root[data-theme="prism"] .wel-top .brand:hover { color: #FFFFFF; }
:root[data-theme="prism"] .wel-top .btn { background: transparent; border-color: rgba(255, 255, 255, .5); color: #FFFFFF; }
:root[data-theme="prism"] .wel-top :focus-visible { outline-color: #FFFFFF; }
:root[data-theme="prism"] .wel-points li { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .wel-points li:first-child { border-top: 0; }
/* the three promises sit in their own pane, each with the colour of the place it talks about */
:root[data-theme="prism"] .wel-points { background: var(--surface); border-radius: 24px; padding: var(--s6); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .wel-points li[data-kind="book"] .wel-point-art { background: var(--pz-cobalt); color: #FFFFFF; }
:root[data-theme="prism"] .wel-points li[data-kind="hub"] .wel-point-art { background: var(--pz-teal); color: #04211D; }
:root[data-theme="prism"] .wel-points li[data-kind="silas"] .wel-point-art { background: var(--pz-amber); color: #231800; }
:root[data-theme="prism"] .wel-ask, :root[data-theme="prism"] .wel-fail { border: 0; border-radius: var(--pz-lid) var(--pz-lid) 24px 24px; box-shadow: var(--pz-pane); background: linear-gradient(var(--place), var(--place)) top / 100% var(--pz-lid) no-repeat, var(--surface); padding-top: calc(var(--s6) + var(--pz-lid)); }
:root[data-theme="prism"] .wel-text { font-family: var(--pz-read); }
:root[data-theme="prism"] .wel-foot { border-top: 3px solid var(--line); }
/* the questions of a setup step sit in their own white pane, apart from the words that lead into them */
:root[data-theme="prism"] .wel-form { background: var(--surface); border-radius: 24px; padding: var(--s6); box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .wel .chips .chip[aria-pressed="true"] { background: var(--place); color: var(--pz-on); font-weight: 800; }
:root[data-theme="prism"] .wel-check { border: 2px solid var(--line-strong); border-radius: 16px; }
:root[data-theme="prism"] .wel-wait { border-radius: 20px; background: var(--accent-soft); }
:root[data-theme="prism"] .wel-folders { border: 0; border-radius: 18px; box-shadow: var(--pz-pane); }
:root[data-theme="prism"] .wel-folders li { border-top: 2px solid var(--paper); }
:root[data-theme="prism"] .wel-link { color: var(--accent-strong); font-weight: 800; }
:root[data-theme="prism"] .wel-fail-art { border-radius: 16px; }

/* ───────── Settings ───────── */
:root[data-theme="prism"] .set-row, :root[data-theme="prism"] .set-field { border-top: 2px solid var(--line); }
:root[data-theme="prism"] .set-card > :first-child { border-top: 0; }
:root[data-theme="prism"] .section .set-card { background: var(--surface); padding: 0; }
:root[data-theme="prism"] .set-title { font-weight: 800; font-size: var(--fs-md); }
:root[data-theme="prism"] .set-status { font-weight: 800; }
/* each block of Settings wears the colour of what it is about: you are violet, your library cobalt, your plan teal; the account stays slate.
   Everything inside a block follows it: the header, the switch, the bar, the focus ring. */
:root[data-theme="prism"] .set .section[data-section="you"] { --place: #6C3BFF; --pz-on: #FFFFFF; --accent: #5B2BEB; --accent-strong: #4319C9; --accent-soft: #ECE6FF; }
:root[data-theme="prism"] .set .section[data-section="library"] { --place: #1F5BFF; --pz-on: #FFFFFF; --accent: #1750EB; --accent-strong: #0F3CC0; --accent-soft: #E0E9FF; }
:root[data-theme="prism"] .set .section[data-section="plan"] { --place: #00B89E; --pz-on: #04211D; --accent: #00776A; --accent-strong: #005F55; --accent-soft: #D3F5EE; }
/* a number is a solid tile; the email, which can't be changed, is a filled chip */
:root[data-theme="prism"] .set-figure { font-family: var(--font-display); font-weight: 800; font-size: 1.625rem; line-height: 1.1; letter-spacing: -0.04em; background: var(--place); color: var(--pz-on); padding: 8px 14px; border-radius: 14px; }
:root[data-theme="prism"] .set-figure span { color: inherit; font-weight: 700; letter-spacing: 0; }
:root[data-theme="prism"] .set-value { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; padding: 6px 12px; border-radius: 10px; }
/* the Look picker: five white tiles in a tray. Each carries a band in the two main colours of the look it stands for
   (each tile says which look it is, data-value); the one in use is filled with the block's colour. */
:root[data-theme="prism"] .set-look .segmented { gap: 4px; padding: 5px; border-radius: 16px; }
:root[data-theme="prism"] .set-look .segmented button { background: var(--surface); color: var(--ink); border-radius: 9px 9px 11px 11px; min-height: 62px; padding-top: 14px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
:root[data-theme="prism"] .set-look .segmented button:hover { box-shadow: 0 0 0 2px var(--place); }
:root[data-theme="prism"] .set-look .segmented button[aria-pressed="true"] { background: var(--place); color: var(--pz-on); }
:root[data-theme="prism"] .set-look .segmented button[data-value] { background-image: linear-gradient(90deg, var(--pz-la, transparent) 0 50%, var(--pz-lb, transparent) 50%); background-size: 100% 9px; background-position: top; background-repeat: no-repeat; }
:root[data-theme="prism"] .set-look .segmented button[data-value="vapor"] { --pz-la: #0B0B10; --pz-lb: #39FF14; }
:root[data-theme="prism"] .set-look .segmented button[data-value="prism"] { --pz-la: #F1F3F9; --pz-lb: #6C3BFF; }
:root[data-theme="prism"] .set-look .segmented button[data-value="aurora"] { --pz-la: #070A16; --pz-lb: #5EE6FF; }
:root[data-theme="prism"] .set-look .segmented button[data-value="paper"] { --pz-la: #F6F3EC; --pz-lb: #2A3B8F; }
:root[data-theme="prism"] .set-look .segmented button[data-value="midnight"] { --pz-la: #15140F; --pz-lb: #AEB9FF; }

/* ───────── Ask Silas ───────── */
:root[data-theme="prism"] .silas-who { font-weight: 800; color: var(--ink-2); }
:root[data-theme="prism"] .silas-turn.silas .silas-bubble { font-family: var(--pz-read); border-left: 0; background: var(--paper); border-radius: 6px 18px 18px 6px; padding: var(--s3) var(--s4); background: linear-gradient(var(--place), var(--place)) left / 6px 100% no-repeat, var(--paper); padding-left: calc(var(--s4) + 6px); }
:root[data-theme="prism"] .silas-turn.reader .silas-bubble { background: var(--place); color: var(--pz-on); border-radius: 18px; border-bottom-right-radius: 6px; font-weight: 600; }
:root[data-theme="prism"] .silas-turn.silas .silas-bubble.silas-fail { background: linear-gradient(#FFB800, #FFB800) left / 6px 100% no-repeat, var(--paper); }
:root[data-theme="prism"] .silas-card-title { font-weight: 800; }
:root[data-theme="prism"] .silas-label { font-weight: 800; color: var(--ink); }

/* ───────── the ruler: its own block in the colour of the place ─────────
   Full (1280px up): a tinted pane with a band of the place colour along its top, like every other pane here.
   The part being read wears a filled pill in the place colour; its tick is the pill's stem.
   Slim (1024px to 1279px): a solid rail of the place colour with light ticks; opened, it is the same tinted pane. */
:root[data-theme="prism"] .ruler {
  --pz-rule-tint: color-mix(in srgb, var(--place) 18%, #FFFFFF);
  --ruler-here: var(--place);
  --ruler-ink: var(--ink-2); --ruler-ink-near: var(--ink); --ruler-ink-here: var(--pz-on);
  --ruler-tick: var(--accent-strong); --ruler-tick-near: var(--ink);
  --ruler-tick-h-here: 4px; --ruler-glow: none;
  /* a shorter longest tick (28px, not 36): the magnified title and the pill of the part being read get the room instead */
  --ruler-tick-w: 28px;
  --ruler-scale: color-mix(in srgb, var(--accent) 60%, transparent);
  --ruler-font-near: var(--font-display);
  --ruler-fill: linear-gradient(var(--place), var(--place)) top / 100% 8px no-repeat, var(--pz-rule-tint);
  /* the ruler measures its own inner height, so the padding stays small: the room under the last part is a shadow of the same tint.
     The sides are slim too, so the titles get the panel's width (the scale keeps 6px of air at the right edge). */
  --ruler-radius: var(--pz-lid) var(--pz-lid) 20px 20px; --ruler-pad: 14px 6px 0 8px; --ruler-shadow: 0 12px 0 0 var(--pz-rule-tint);
  --ruler-fill-slim: linear-gradient(var(--place), var(--place)) top / 100% 6px no-repeat, color-mix(in srgb, var(--place) 24%, #FFFFFF);
  --ruler-panel-fill: linear-gradient(var(--place), var(--place)) top / 100% 8px no-repeat, var(--pz-rule-tint);
  --ruler-panel-shadow: var(--shadow-2);
}
/* the title under the pointer or the keys takes the deep shade of the place; the part being read keeps its pill */
:root[data-theme="prism"] .ruler.is-pointing .ruler-row.is-near .ruler-mark:not([aria-current]) .ruler-title { color: var(--accent-strong); }
/* the pill is drawn on the title itself (a fill and a shadow the same colour), so the title's own box is untouched.
   It keeps the title's own weight and size: the pill is already the strongest shape on the ruler. (ruler.js measures the
   part being read in rows that carry aria-current and .is-here, so type set here would be measured right; type set on
   .is-pointing, .is-open, .is-dense, .is-grouped, .is-lead, .is-off, .is-ring-*, :hover or :focus-within would not.) */
:root[data-theme="prism"] .ruler-mark[aria-current] .ruler-title { background: var(--place); color: var(--pz-on); border-radius: 7px; box-shadow: -7px 0 0 2px var(--place), 0 0 0 2px var(--place); }
:root[data-theme="prism"] .ruler-row.is-one .ruler-mark[aria-current] .ruler-title { box-shadow: -7px 0 0 2px var(--place), 7px 0 0 2px var(--place); }
/* keyboard focus: a ring in the deep shade of the place, which shows on the tint and beside the pill alike. It is drawn
   just inside the button's edge, so the titles of the parts above and below keep their air. */
:root[data-theme="prism"] .ruler .ruler-group:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; box-shadow: none; }
/* the slim strip: a narrow ruler of its own, the same tint with a cap of the place colour, deep ticks, and the part being read
   a long tick of the place colour with a halo */
:root[data-theme="prism"] .ruler[data-mode="slim"] { padding-top: 18px; }
:root[data-theme="prism"] .ruler[data-mode="slim"]:not(.is-open) { --ruler-radius: 6px 6px 12px 12px; --ruler-tick: var(--accent-strong); --ruler-tick-near: var(--ink); --ruler-here: var(--place); --ruler-glow: 0 0 0 2px color-mix(in srgb, var(--place) 35%, transparent); }
/* the writing page before its first heading: the quiet line stands in a short ruler of its own, in the same tinted panel
   (ruler.css draws it with the tokens above; nothing of its own here) */

/* ───────── the preview's look switch ───────── */
:root[data-theme="prism"] .lookpill { border: 0; background: var(--pz-night); color: #FFFFFF; font-weight: 800; box-shadow: var(--shadow-2); }

/* ───────── phones ───────── */
@media (max-width: 719px) {
  /* A phone's first screen belongs to the page's first real item. The core keeps the page's top and the gaps between its blocks
     at 12px; here every band is compact: small padding, the line about the page at 15px (two lines at most, from the core), and
     no bar under the title, except on Home, sign-in and welcome, where nothing waits under the band. */
  :root[data-theme="prism"] .page { padding-left: var(--s3); padding-right: var(--s3); }
  :root[data-theme="prism"] .page-head, :root[data-theme="prism"] .note-top .page-head { padding: 14px 18px 16px; border-radius: 20px; gap: var(--s2); }
  :root[data-theme="prism"] .page-head:has(> .crumbs) { padding: 12px 16px 14px; border-radius: 20px; gap: var(--s2); }
  /* Home's and welcome's circle keeps to the top corner, clear of a greeting that fills the line */
  :root[data-theme="prism"] .page-head::before { width: 110px; height: 110px; right: -42px; top: -56px; }
  :root[data-theme="prism"] .page-head::after { display: none; }
  :root[data-theme="prism"] .page-head h1, :root[data-theme="prism"] .page-head:has(> .crumbs) h1 { font-size: 1.875rem; line-height: 1.02; }
  :root[data-theme="prism"] .page-head .lede { font-size: var(--fs-md); }
  :root[data-theme="prism"] .page-head .thread { display: none; }
  :root[data-theme="prism"] :is(.home, .wel, .gate-form) .page-head .thread { display: block; }
  :root[data-theme="prism"] .home .page-head { padding: 18px 18px 20px; }
  :root[data-theme="prism"] .home .page-head h1 { font-size: 2.125rem; }
  /* the slim strip of a list page */
  :root[data-theme="prism"]:is([data-place="library"], [data-place="atlas"], [data-place="scrapbooks"], [data-place="projects"], [data-place="find"], [data-place="review"], [data-place="settings"]) .page > .page-head:not(:has(> .crumbs)):not(:has(> .skel.line:first-child:not(.eyebrow-bar))) { padding: 14px 18px 16px; border-radius: 20px; }
  /* a hub's folder pill keeps to its words in the phone's grid head */
  :root[data-theme="prism"] .hub-screen .page-head .eyebrow { justify-self: start; padding: 3px 10px; }
  /* the rings keep to the top corner, clear of the line under the title (and behind a hub's Star) */
  :root[data-theme="prism"][data-place="atlas"] .page-head::before { right: -150px; top: -150px; width: 300px; height: 300px; margin-top: 0; -webkit-mask-image: radial-gradient(circle, #000 0 30%, transparent 46%); mask-image: radial-gradient(circle, #000 0 30%, transparent 46%); }
  :root[data-theme="prism"][data-place="scrapbooks"] .page-head::before { right: 20px; top: -58px; width: 92px; height: 116px; border-radius: 14px; }
  /* on a phone the words and the button run the full width of the band (Library, a book), so the books move up to a small shelf
     in the top corner, clear of both. A note's band is only its title, which can fill every line, so it carries no shelf. */
  :root[data-theme="prism"][data-place="library"] .page-head::before { right: 0; top: 8px; bottom: auto; width: 116px; height: 44px; transform: scale(.85); transform-origin: top right; background:
    linear-gradient(var(--pz-shape), var(--pz-shape)) 0 calc(100% - 5px) / 14px 24px no-repeat,
    linear-gradient(var(--pz-shape), var(--pz-shape)) 17px calc(100% - 5px) / 9px 35px no-repeat,
    linear-gradient(var(--pz-shape), var(--pz-shape)) 29px calc(100% - 5px) / 17px 29px no-repeat,
    linear-gradient(var(--pz-shape), var(--pz-shape)) 49px calc(100% - 5px) / 11px 39px no-repeat,
    linear-gradient(var(--pz-shape), var(--pz-shape)) 63px calc(100% - 5px) / 8px 22px no-repeat,
    linear-gradient(var(--pz-shape), var(--pz-shape)) 74px calc(100% - 5px) / 15px 32px no-repeat,
    linear-gradient(var(--pz-shape), var(--pz-shape)) 0 100% / 100% 5px no-repeat; }
  :root[data-theme="prism"][data-place="library"] .page-head::after { display: block; right: 7px; top: 14px; bottom: auto; width: 9px; height: 27px; border-radius: 2px 2px 0 0; transform: rotate(-13deg); transform-origin: bottom right; opacity: 1; }
  :root[data-theme="prism"][data-place="library"] .note-top .page-head::before, :root[data-theme="prism"][data-place="library"] .note-top .page-head::after { display: none; }
  /* the stripes and the dots keep to the top corner on a phone, clear of the words under the title */
  :root[data-theme="prism"][data-place="projects"] .page-head::before { width: 120px; height: 52px; -webkit-mask-image: radial-gradient(circle 96px at 100% 0, #000 40%, transparent 100%); mask-image: radial-gradient(circle 96px at 100% 0, #000 40%, transparent 100%); }
  :root[data-theme="prism"][data-place="review"] .page-head::before { width: 150px; height: 84px; -webkit-mask-image: radial-gradient(circle 86px at 100% 0, #000 45%, transparent 100%); mask-image: radial-gradient(circle 86px at 100% 0, #000 45%, transparent 100%); }
  /* the lens stands whole in the strip's right end, handle and all */
  :root[data-theme="prism"][data-place="find"] .page-head::before { right: 46px; top: 7px; width: 34px; height: 34px; border-width: 8px; }
  :root[data-theme="prism"][data-place="find"] .page-head::after { display: block; right: 75px; top: 31px; width: 8px; height: 18px; border-radius: 4px; }
  :root[data-theme="prism"][data-place="settings"] .page-head::before { right: 14px; top: 16px; margin-top: 0; transform: scale(.6); transform-origin: top right; }
  :root[data-theme="prism"][data-place="scrapbooks"] .page-head::after { display: none; }
  :root[data-theme="prism"] .wel .page-head { padding: 22px 20px 24px; border-radius: 22px; }
  :root[data-theme="prism"] .wel .page-head h1 { font-size: 1.875rem; }
  :root[data-theme="prism"] .wel-form { padding: var(--s5) var(--s4); border-radius: 20px; }
  :root[data-theme="prism"] .section { padding: 0 var(--s4) var(--s4); border-radius: 20px; gap: var(--s3); }
  :root[data-theme="prism"] .section:not(:has(> .section-head)) { padding-top: calc(var(--s4) + var(--pz-lid)); border-radius: var(--pz-lid) var(--pz-lid) 20px 20px; }
  :root[data-theme="prism"] .section > .section-head { margin: 0 calc(-1 * var(--s4)); padding: 12px var(--s4) 10px; border-radius: 20px 20px 0 0; }
  :root[data-theme="prism"] .state { border-radius: var(--pz-lid) var(--pz-lid) 20px 20px; }
  :root[data-theme="prism"] .section-head h2 { font-size: 1.25rem; }
  :root[data-theme="prism"] .home-cols, :root[data-theme="prism"] .home-main, :root[data-theme="prism"] .home-side { gap: var(--s4); }
  :root[data-theme="prism"] .stat .n, :root[data-theme="prism"] .home-stat .stat .n { font-size: 2.125rem; }
  :root[data-theme="prism"] .note-body { padding: var(--s5) var(--s4); border-radius: 20px; }
  :root[data-theme="prism"] .write-text { padding-left: var(--s4); padding-right: var(--s4); border-radius: 20px; }
  :root[data-theme="prism"] .write-text[data-empty]::before { left: var(--s4); }
  :root[data-theme="prism"] .write-bar { margin-left: 0; margin-right: 0; padding-left: var(--s2); padding-right: var(--s2); top: calc(var(--topbar-h) + var(--s2)); }
  :root[data-theme="prism"] .review-tools, :root[data-theme="prism"] .review-groups > * { padding-left: var(--s4); padding-right: var(--s4); border-radius: 20px; }
  :root[data-theme="prism"] .review-tools { padding-top: var(--s3); padding-bottom: var(--s3); }
  /* held under the top bar, the head is one compact row: the name at 20px, and the button keeps its whole width */
  :root[data-theme="prism"] .review-group-head { margin: 0 calc(-1 * var(--s4)); padding: var(--s3) var(--s4); }
  :root[data-theme="prism"] .review-group-head h2 { font-size: 1.25rem; line-height: 1.12; }
  :root[data-theme="prism"] .review-group-finish { flex: none; }
  :root[data-theme="prism"] .find-hits { padding: 0 var(--s4) var(--s2); border-radius: 20px; }
  :root[data-theme="prism"] .find-hit:first-child { padding-top: var(--s3); }
  :root[data-theme="prism"] .find-search > .find-input { min-height: 52px; font-size: 1.125rem; padding-left: 50px; box-shadow: 4px 4px 0 var(--pz-violet); }
  :root[data-theme="prism"] .find-search > .find-input:focus-visible { box-shadow: 4px 4px 0 var(--pz-violet); }
  :root[data-theme="prism"] .find-side { padding: var(--s3) var(--s4); border-radius: 18px; }
  :root[data-theme="prism"] .gate-form > .inner { padding: var(--s5) var(--s4); border-radius: 22px; }
  :root[data-theme="prism"] .gate-art::before { background:
    radial-gradient(circle at 100% 0, #DB1471 0 90px, transparent 91px),
    radial-gradient(circle at 72% 0, #FFB800 0 26px, transparent 27px); }
  :root[data-theme="prism"] .sbk-tools { top: calc(var(--topbar-h) + var(--s2)); padding: 8px 10px; border-radius: 16px; }
  :root[data-theme="prism"] .lib-book-side { padding: var(--s4); border-radius: 20px; }
  /* a dialog docks to the bottom of a phone: round only its top, and line its colour head up with the body */
  :root[data-theme="prism"] dialog.dialog { border-radius: 26px 26px 0 0; }
  :root[data-theme="prism"] .dialog-head { padding: var(--s5) var(--s4); }
}

/* ───────── calm for people who ask for less motion ───────── */
@media (prefers-reduced-motion: reduce) {
  :root[data-theme="prism"] .btn:hover, :root[data-theme="prism"] a.card:hover, :root[data-theme="prism"] button.card:hover, :root[data-theme="prism"] .home-stat:hover, :root[data-theme="prism"] .shelf-item:hover .cover, :root[data-theme="prism"] .note-turn:hover, :root[data-theme="prism"] .sbk-card:hover, :root[data-theme="prism"] .proj-card:hover, :root[data-theme="prism"] .section-head .more:hover, :root[data-theme="prism"] a.chip:hover, :root[data-theme="prism"] button.chip:hover { transform: none; }
}
