/* BrainWeave — the Vapor look. Everything here sits under :root[data-theme="vapor"].
   BrainWeave's own colours on the new layout: dark, saturated, flat. Fills and spacing do the work; each section is its
   own pane. Layers, darkest to lightest: side bar #120A24 · page #0B0B10 · pane #15121F · block #241A3A · raised #2E2250.

   Every colour means one thing (round 6):
   - Neon green #39FF14: the main action, a filled button, and nothing else. Silas's own sheet is a dark green
     (his colour in Ram's product); his name and "Being read" / "Pulled by Silas" are that green family.
   - Each place has its colour, used for its own head, headings and the cards on its page:
     Library periwinkle #8FA8FF (books, chapters) · Atlas violet #B48CFF (hubs, folders) · Scrapbooks pink #FF8FB1 ·
     Projects yellow #FFC857 · Needs you orange #FF9F5A · Find cyan #5CE1FF (notes found, tags).
     Home and Settings have no colour of their own (a pale lilac): Home's blocks wear the colour of where they lead.
   - States: orange is "it needs you" (Ready to finish, Waiting for you, the Needs-you count); mint #6FFFC1 is done or
     on (Finished, Came true, saved, a switch that is on); red is something failed or a delete. Everything else is plain.
   - Links are near-white and underlined, never a place's colour. Counts are plain ink.
   - Cards on a page take shades of that page's colour (data-hue picks one of six depths), never another place's colour.
   - A coloured top edge marks a pane only where it means something: the heads of Home and the reading pages, Home's
     Needs-you block (the one that asks something of you), and on a book what Silas flagged and removing it. */

/* ───────── 1. Tokens ───────── */
/* Numbers read at a glance. Syne draws its figures old-style and very wide, so "300" reads like "зоо". This family
   holds only the ten digits, taken from the plain face (the same file tokens.css already loads); it stands first in
   the title face below, so every number in a title, tile, count or year is drawn in Schibsted Grotesk while the words
   keep Syne. It has no space in it, so line heights still come from Syne. The name is vapor's own; no other look uses it. */
@font-face { font-family: "Vapor Digits"; src: url("../../fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0030-0039; }
:root[data-theme="vapor"] {
  color-scheme: dark;
  --paper: #0B0B10; --paper-sunk: #15121F;
  --surface: #241A3A; --surface-raised: #2E2250;
  --ink: #ECEAF4; --ink-2: #C9C3DD; --ink-3: #B4ADCF;
  --line: #2A2147; --line-strong: #7566AE;
  --accent: #39FF14; --accent-strong: #7CFF63; --accent-soft: #0F3A1C; --on-accent: #07060C;
  /* The core's second colour (a quote's rule, a date in a scrapbook, a starred thing, a step's number) is the colour of
     the place it is in, never a colour of its own. */
  --madder: var(--place); --madder-soft: color-mix(in srgb, var(--place) 20%, #15121F);
  --ok: #6FFFC1; --ok-soft: #0E3327;
  /* A warning asks the reader to look, so it is the orange of Needs you, never the yellow of Projects. */
  --warn: #FFB680; --warn-soft: #3A2414;
  --danger: #FF6B6B; --danger-soft: #4A1219;
  --mark: #5A4300; --scrim: rgba(4, 3, 10, .74);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5); --shadow-2: 0 20px 56px rgba(0, 0, 0, .62);
  /* A cover drawn from a book's title is cloth of the Library's blues, deep to bright, never a colour that means
     something else (a green cover is not the main action, an orange one does not need you). */
  --cloth-1: #2B3B8C; --cloth-2: #4150B0; --cloth-3: #1E3A6B; --cloth-4: #4A3F9C; --cloth-5: #2A5288; --cloth-6: #363F78;
  --font-display: "Vapor Digits", "Syne", "Schibsted Grotesk", system-ui, sans-serif;
  --font-ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --place: #ECE6FF;
  /* The look's own names */
  --v-side: #120A24; --v-deep: #07060C; --v-pane: #15121F; --v-block: #241A3A; --v-raised: #2E2250; --v-hover: #3A2D63; --v-chip: #22173D;
  --v-green: #39FF14; --v-pink: #FF8FB1; --v-violet: #B48CFF; --v-yellow: #FFC857;
  --v-peri: #8FA8FF; --v-mint: #6FFFC1; --v-cyan: #5CE1FF; --v-orange: #FF9F5A;
  --v-plain: #ECE6FF;
  /* A link: near-white, always underlined. */
  --v-link: #F4F1FF; --v-link-line: rgba(244, 241, 255, .5);
  --note: var(--place);
  /* Loading bars: purple with a brighter sweep (grey ones vanish on the dark page). Inside a page head they are a step
     lighter again, because the head's band is lighter than the page (section 4). */
  --skel: #221A3C; --skel-shine: #3A2D63;
  scrollbar-color: #3A2D63 transparent;
}
:root[data-theme="vapor"][data-place="library"] { --place: #8FA8FF; }
:root[data-theme="vapor"][data-place="atlas"] { --place: #B48CFF; }
:root[data-theme="vapor"][data-place="scrapbooks"] { --place: #FF8FB1; }
:root[data-theme="vapor"][data-place="projects"] { --place: #FFC857; }
:root[data-theme="vapor"][data-place="review"] { --place: #FF9F5A; }
:root[data-theme="vapor"][data-place="find"] { --place: #5CE1FF; }
/* Home, Settings, sign-in, join and welcome have no colour of their own: green stays for their one main button. */
:root[data-theme="vapor"][data-place="settings"] { --place: #D2CCEA; }

/* ───────── 2. Base: type, links, marks ───────── */
:root[data-theme="vapor"] body { background: #0B0B10; color: var(--ink); }
:root[data-theme="vapor"] ::selection { background: #5B3FD1; color: #FFFFFF; }
:root[data-theme="vapor"] :is(h1, h2, h3, .display) { font-family: var(--font-display); letter-spacing: -.015em; }
:root[data-theme="vapor"] h1 { font-weight: 800; letter-spacing: -.025em; }
:root[data-theme="vapor"] :is(h2, h3) { font-weight: 700; }
:root[data-theme="vapor"] a:not([class]) { color: var(--v-link); text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] a:not([class]):hover { color: #FFFFFF; text-decoration-color: currentColor; }
/* A word found by searching is lit in Find's cyan. */
:root[data-theme="vapor"] :is(mark, .find-mark) { background: #5CE1FF; color: #07060C; border-radius: 3px; padding: 0 2px; }
:root[data-theme="vapor"] kbd { background: #07060C; border-color: #3B2F66; color: var(--ink-2); }
:root[data-theme="vapor"] .eyebrow { color: var(--place); font-weight: 700; letter-spacing: .09em; }
:root[data-theme="vapor"] :is(.muted, .soft) { color: var(--ink-2); }

/* ───────── 3. The shell: side bar, top bar, tab bar ───────── */
:root[data-theme="vapor"] .frame {
  background:
    radial-gradient(900px 380px at 88% -120px, color-mix(in srgb, var(--place) 13%, transparent), transparent 72%) no-repeat,
    #0B0B10;
}
/* A place with no colour of its own glows the brand's deep violet instead of a grey haze. */
:root[data-theme="vapor"]:is([data-place="home"], [data-place="settings"], [data-place="welcome"], [data-place="signin"], [data-place="join"]) .frame {
  background: radial-gradient(900px 380px at 88% -120px, rgba(123, 92, 255, .17), transparent 72%) no-repeat, #0B0B10;
}
:root[data-theme="vapor"] .side { background: linear-gradient(180deg, #120A24 0%, #120A24 55%, #0A0616 100%); border-right-color: transparent; }
:root[data-theme="vapor"] .brand .word {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(90deg, #FF8FB1 18%, #39FF14 82%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="vapor"] .brand .lib { color: var(--ink-2); }
:root[data-theme="vapor"] .mark svg rect { fill: #2E2250; }
:root[data-theme="vapor"] .mark svg path:nth-child(1) { stroke: #39FF14; }
:root[data-theme="vapor"] .mark svg path:nth-child(2) { stroke: #FF8FB1; }
:root[data-theme="vapor"] .mark svg path:nth-child(3) { stroke: #39FF14; }
/* On a page with its own main button (a note, a hub, a book, the writing page, an error) the side bar's Add a book
   steps down (shell.css). Here it is a quiet dark fill like the other side bar rows, not an outlined box. */
:root[data-theme="vapor"] .side .btn.add.quiet { background: #22173D; border-color: transparent; color: var(--ink); box-shadow: none; }
:root[data-theme="vapor"] .side .btn.add.quiet:hover { background: #2E2250; border-color: transparent; color: #FFFFFF; }
:root[data-theme="vapor"] .findbtn { background: #07060C; border-color: #2A2147; color: var(--ink-2); }
:root[data-theme="vapor"] .findbtn:hover { background: #1A1230; border-color: #5CE1FF; color: var(--ink); }
:root[data-theme="vapor"] .nav-label { color: var(--ink-3); }
/* The side bar is calm: each place's icon is its colour (a small key to the colours), Ask Silas is a tool and plain,
   and the place you are in is a dark block with a bar of its colour, not a coloured fill that reads as a button. */
:root[data-theme="vapor"] .nav-item { color: var(--ink-2); font-weight: 600; --nav: var(--ink-2); }
:root[data-theme="vapor"] .nav-item[data-nav="home"] { --nav: #ECE6FF; }
:root[data-theme="vapor"] .nav-item[data-nav="library"] { --nav: #8FA8FF; }
:root[data-theme="vapor"] .nav-item[data-nav="atlas"] { --nav: #B48CFF; }
:root[data-theme="vapor"] .nav-item[data-nav="scrapbooks"] { --nav: #FF8FB1; }
:root[data-theme="vapor"] .nav-item[data-nav="projects"] { --nav: #FFC857; }
:root[data-theme="vapor"] .nav-item[data-nav="review"] { --nav: #FF9F5A; }
:root[data-theme="vapor"] button.nav-item { --nav: var(--ink-2); }
:root[data-theme="vapor"] .nav-item > svg:first-child { color: var(--nav); }
:root[data-theme="vapor"] .nav-item:hover { background: #1D1433; color: var(--ink); }
:root[data-theme="vapor"] .nav-item[aria-current="page"] { background: #241A3A; color: #FFFFFF; }
:root[data-theme="vapor"] .nav-item[aria-current="page"]::before { background: var(--nav); }
/* The Needs-you count is orange like everything that needs the reader: a tint on its row, solid on the phone's icon. */
:root[data-theme="vapor"] .badge.madder.count { background: #4A2A16; color: #FFB680; font-weight: 800; }
:root[data-theme="vapor"] .topbar .badge.madder.count { background: #FF9F5A; color: #1A0D03; box-shadow: 0 0 0 2px #0B0B10; }
:root[data-theme="vapor"] .account { color: var(--ink); }
:root[data-theme="vapor"] .account:hover { background: #22173D; }
:root[data-theme="vapor"] .account .who span { color: var(--ink-2); }
:root[data-theme="vapor"] .avatar { background: #3A2D63; color: #FFFFFF; font-weight: 800; }
:root[data-theme="vapor"] .topbar { background: rgba(11, 11, 16, .95); border-bottom-color: #2A2147; }
:root[data-theme="vapor"] .topbar .needs[aria-current="page"] { color: #FFB680; background: #3A2414; }
:root[data-theme="vapor"] .tabbar { background: #120A24; border-top-color: #2A2147; }
:root[data-theme="vapor"] .tabbar a { color: var(--ink-2); }
:root[data-theme="vapor"] .tabbar a[aria-current="page"] { color: var(--place); }
:root[data-theme="vapor"] .tabbar a[aria-current="page"]::before { background: var(--place); }
/* The tablet rail (720 to 1023px): shell.css shows each button's name in a tag beside it on hover and keyboard focus.
   Here the tag is a raised purple block with white words and a stripe on its left in the colour of what it names. */
@media (max-width: 1023px) and (min-width: 720px) and (min-height: 640px) {
  :root[data-theme="vapor"] .side :is(.nav-item:hover, .nav-item:focus-visible) > .label,
  :root[data-theme="vapor"] .side :is(.add:hover, .add:focus-visible) > .label,
  :root[data-theme="vapor"] .side :is(.findbtn:hover, .findbtn:focus-visible) > .grow,
  :root[data-theme="vapor"] .side :is(.account:hover, .account:focus-visible) > .who {
    --tag: var(--nav, #39FF14); background: #2E2250; color: #FFFFFF; padding-left: 14px; box-shadow: inset 4px 0 0 var(--tag), 0 16px 44px rgba(0, 0, 0, .6);
  }
  :root[data-theme="vapor"] .side :is(.findbtn:hover, .findbtn:focus-visible) > .grow { --tag: #5CE1FF; }
  :root[data-theme="vapor"] .side :is(.account:hover, .account:focus-visible) > .who { --tag: #ECE6FF; }
  :root[data-theme="vapor"] .side :is(.account:hover, .account:focus-visible) > .who span { color: var(--ink-2); }
}
/* The sample library's notice is a quiet raised strip, not a yellow (Projects') banner. */
:root[data-theme="vapor"] .samplebar { background: #2E2250; color: #FFFFFF; border-color: #4A3A7C; font-weight: 600; }
:root[data-theme="vapor"] .samplebar :is(a, button):not(.btn) { color: #FFFFFF; text-decoration-color: var(--v-link-line); }

/* ───────── 4. The page head: a band with presence ───────── */
:root[data-theme="vapor"] .page-head {
  position: relative; padding: 28px 30px 26px; border-radius: 18px;
  background:
    linear-gradient(90deg, var(--place), #7B5CFF) top left / 100% 3px no-repeat,
    radial-gradient(560px 240px at 100% 0%, color-mix(in srgb, var(--place) 22%, transparent), transparent 70%) no-repeat,
    #1A1230;
}
:root[data-theme="vapor"] .page-head h1 { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--fs-3xl) * var(--v-title, 1)); letter-spacing: -.03em; color: #FFFFFF; overflow-wrap: break-word; }
/* The title face is wide, so a long title steps down in size instead of filling the head. js/looks/vapor.js marks
   each page title with how long it is: 1 is over 22 letters, 2 over 36, 3 over 60. A short title stays full size. */
:root[data-theme="vapor"] .page-head h1[data-long="1"] { --v-title: .84; }
:root[data-theme="vapor"] .page-head h1[data-long="2"] { --v-title: .72; letter-spacing: -.025em; }
:root[data-theme="vapor"] .page-head h1[data-long="3"] { --v-title: .6; letter-spacing: -.02em; line-height: 1.2; }
:root[data-theme="vapor"] .page-head .eyebrow { color: var(--place); }
/* Home's greeting breaks after its comma when it needs two lines ("Good afternoon," then the name), never after "Good". */
:root[data-theme="vapor"] .home > .page-head h1 { text-wrap: wrap; }
:root[data-theme="vapor"] .page-head .lede { color: var(--ink-2); }
:root[data-theme="vapor"] .page-head .thread { border: 0; height: 4px; width: 72px; border-radius: 2px; background: var(--place); }
/* Home leads to every place, so its head carries all their colours: its top edge and the bar under the greeting run
   through the Library's, the Atlas's, the Scrapbooks', the Projects' and Needs you's colours, in the side bar's order.
   The new reader's Welcome, which introduces them all, carries the same. */
:root[data-theme="vapor"] .home > .page-head,
:root[data-theme="vapor"][data-place="welcome"] .page-head {
  background:
    linear-gradient(90deg, #8FA8FF, #B48CFF 26%, #FF8FB1 50%, #FFC857 74%, #FF9F5A) top left / 100% 3px no-repeat,
    radial-gradient(560px 240px at 100% 0%, rgba(123, 92, 255, .26), transparent 70%) no-repeat,
    #1A1230;
}
:root[data-theme="vapor"] :is(.home > .page-head, [data-place="welcome"] .page-head) .thread { background: linear-gradient(90deg, #8FA8FF 0 20%, #B48CFF 20% 40%, #FF8FB1 40% 60%, #FFC857 60% 80%, #FF9F5A 80%); }
:root[data-theme="vapor"] .home > .page-head .eyebrow { color: #E4DCFF; }
:root[data-theme="vapor"] .crumbs { color: var(--ink-3); }
:root[data-theme="vapor"] .crumbs a { color: var(--ink-2); }
:root[data-theme="vapor"] .crumbs a:hover { color: #FFFFFF; }

/* ───────── 4b. The top page of each place: a slim strip ─────────
   The big band above is kept where it earns its place: Home and the pages you read (a book, a hub, a note, a scrapbook,
   a project, the writing page). The top page of each other place (Library, Atlas, Scrapbooks, Projects, Find, Needs you,
   Settings) opens with a slim strip instead: no coloured top rule, the place's colour glowing in from the left, its bar
   stood upright as a lit neon tube, and from 1200px the title, the line about the page and the action on one row.
   Told apart the way prism tells them: these heads have no trail (a loading head's trail is a bar, its first child). */
:root[data-theme="vapor"]: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))) {
  gap: 6px; padding: 18px 26px 18px 48px; border-radius: 16px;
  background:
    radial-gradient(360px 150px at 0% 50%, color-mix(in srgb, var(--place) 24%, transparent), transparent 74%) no-repeat,
    radial-gradient(480px 180px at 100% 0%, color-mix(in srgb, var(--place) 10%, transparent), transparent 70%) no-repeat,
    #1A1230;
}
:root[data-theme="vapor"]: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: calc(2rem * var(--v-title, 1)); line-height: 1.06; letter-spacing: -.03em; }
:root[data-theme="vapor"]: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 {
  position: absolute; left: 24px; top: 20px; bottom: 20px; width: 4px; height: auto; border-radius: 2px;
  box-shadow: 0 0 6px var(--place), 0 0 18px color-mix(in srgb, var(--place) 55%, transparent);
}
:root[data-theme="vapor"]: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: 1rem; line-height: 1.5; max-width: 84ch; }
:root[data-theme="vapor"]: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; height: 34px; }
@media (min-width: 1200px) {
  /* One row: the title on the left; the label (Needs you's "From Silas") over the line about the page beside it; the
     action at the right. The second row is the flexible one, so the title's own height never pushes the line down. */
  :root[data-theme="vapor"]: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 minmax(0, 1fr) auto; grid-template-rows: auto 1fr;
    grid-template-areas: "title eye act" "title lede act"; column-gap: 32px; row-gap: 2px; align-items: center; min-height: 84px;
  }
  :root[data-theme="vapor"]: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="vapor"]: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="vapor"]: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; align-self: end; }
  :root[data-theme="vapor"]: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="vapor"]: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; }
}
@media (max-width: 1199px) {
  :root[data-theme="vapor"]: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 22px 16px 46px; }
  :root[data-theme="vapor"]: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 { top: 18px; bottom: 18px; }
}

/* ───────── 5. Sections: each one its own pane ───────── */
/* A pane is a flat fill with its heading in its colour: no top rule and no dot by default. */
:root[data-theme="vapor"] .section {
  --line: #3B2F66; --paper-sunk: #1D1733;
  padding: 22px 24px 24px; border-radius: 16px;
  background: #15121F;
}
/* Colour by meaning, never by position. A section wears the colour of the place it is in. On Home each section
   wears the colour of the place it leads to: orange for Needs you, periwinkle for the Library, yellow for Projects,
   violet for the Atlas, cyan for the note you left off in. On a book, what Silas flagged is orange like Needs you,
   and removing the book is red. Picked out by data-section (section 5d), never by the heading's words. */
:root[data-theme="vapor"] .section:is([data-section="needs"], [data-section="flagged"]) { --note: #FF9F5A; }
:root[data-theme="vapor"][data-place="home"] .section:is([data-section="reading"], [data-section="finished"], [data-section="numbers"]) { --note: #8FA8FF; }
:root[data-theme="vapor"][data-place="home"] .section[data-section="projects"] { --note: #FFC857; }
:root[data-theme="vapor"][data-place="home"] .section[data-section="hubs"] { --note: #B48CFF; }
:root[data-theme="vapor"][data-place="home"] .section[data-section="left-off"] { --note: #5CE1FF; }
:root[data-theme="vapor"] .section[data-section="remove"] { --note: #FF7A7A; }
/* The top rule is kept only where it marks something: the block that asks something of the reader (Needs you on Home,
   what Silas flagged on a book) and the one that deletes. */
:root[data-theme="vapor"] .section:is([data-section="needs"], [data-section="flagged"], [data-section="remove"]) { background: linear-gradient(var(--note), var(--note)) top left / 100% 2px no-repeat, #15121F; }
:root[data-theme="vapor"] .section .section { padding: 0; border-radius: 0; background: none; }
/* One level of box. A pane never holds just one box: where a block's whole content is a single card, one of the two
   goes. "Pick up where you left off" is the card alone, with no pane round it; Settings' groups, the book's "Where it
   stands" and the new reader's "Getting started" are the pane alone, their rows and words set straight on it. */
:root[data-theme="vapor"] .section[data-section="left-off"] { padding: 0; border-radius: 0; background: none; }
:root[data-theme="vapor"] .section > :is(.set-card, .lib-standing, .home-start) { padding: 0; border-radius: 0; background: none; border: 0; box-shadow: none; }
:root[data-theme="vapor"] .section > .set-card > :is(.set-row, .set-field):first-child { padding-top: 0; }
:root[data-theme="vapor"] .section > .set-card > .set-field:first-child > .set-status { top: 0; }
:root[data-theme="vapor"] .section > .set-card > :is(.set-row, .set-field):last-child { padding-bottom: 0; }
:root[data-theme="vapor"] .section-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; line-height: 1.25; letter-spacing: -.01em; color: var(--note); }
/* A block's title keeps one line; when the words beside it do not fit, they go under it instead of both breaking in two. */
:root[data-theme="vapor"] .section-head { flex-wrap: wrap; row-gap: 4px; }
/* "Open Needs you", "All projects", "Open the Atlas": links, so near-white and underlined like every link. */
:root[data-theme="vapor"] :is(.section-head .more, .more) { color: var(--v-link); font-weight: 600; text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] :is(.section-head .more, .more):hover { color: #FFFFFF; text-decoration-color: currentColor; }

/* ───────── 6. Blocks: cards, lists, tiles ───────── */
:root[data-theme="vapor"] .card { --line: #3B2F66; --v-chip: #3A2D63; --paper-sunk: #1B1430; background: #241A3A; border-color: transparent; box-shadow: none; }
:root[data-theme="vapor"] .card.sunk { background: #1D1733; }
:root[data-theme="vapor"] .section .card.sunk { background: #241A3A; }
:root[data-theme="vapor"] .card.accent { background: linear-gradient(120deg, #33265C 0%, #241A3A 70%) border-box; border-color: transparent; border-left: 4px solid var(--place); }
:root[data-theme="vapor"] :is(a.card, button.card):hover { background: #2E2250; border-color: transparent; }
:root[data-theme="vapor"] .card h3 { color: var(--note); }
:root[data-theme="vapor"] .list { --line: #3B2F66; --v-chip: #3A2D63; background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] .list-row .title { color: var(--ink); font-weight: 650; }
:root[data-theme="vapor"] .list-row .sub { color: var(--ink-2); }
:root[data-theme="vapor"] .list-row .lead { color: var(--note); }
:root[data-theme="vapor"] .list-row .chev { color: var(--note); }
:root[data-theme="vapor"] :is(a.list-row, button.list-row):hover { background: #2E2250; }
/* A card's shade. The app hands each Atlas folder, scrapbook and project one of six numbers (data-hue), spread so
   neighbours differ. Here the number picks a depth of the page's own colour, deep to pale, never another colour:
   every folder is a violet of the Atlas, every scrapbook a pink, every project a yellow. A hub's page carries its
   folder's number, and shows that same shade beside its kind. */
:root[data-theme="vapor"] :is(.atlas-folder, .sbk-card, .proj-card, .hub-screen) { --v-shade: var(--place); }
:root[data-theme="vapor"] :is(.atlas-folder, .sbk-card, .proj-card, .hub-screen)[data-hue="1"] { --v-shade: color-mix(in srgb, var(--place) 72%, #241A3A); }
:root[data-theme="vapor"] :is(.atlas-folder, .sbk-card, .proj-card, .hub-screen)[data-hue="2"] { --v-shade: color-mix(in srgb, var(--place) 55%, #FFFFFF); }
:root[data-theme="vapor"] :is(.atlas-folder, .sbk-card, .proj-card, .hub-screen)[data-hue="3"] { --v-shade: color-mix(in srgb, var(--place) 52%, #241A3A); }
:root[data-theme="vapor"] :is(.atlas-folder, .sbk-card, .proj-card, .hub-screen)[data-hue="4"] { --v-shade: color-mix(in srgb, var(--place) 78%, #FFFFFF); }
:root[data-theme="vapor"] :is(.atlas-folder, .sbk-card, .proj-card, .hub-screen)[data-hue="5"] { --v-shade: color-mix(in srgb, var(--place) 86%, #241A3A); }
/* What kind of thing it is. Each kind wears the colour of the place it lives in: a book the Library's periwinkle,
   a hub the Atlas's violet, a scrapbook pink, a project yellow; a note found by searching is Find's cyan. */
:root[data-theme="vapor"] [data-kind="book"] { --note: #8FA8FF; }
:root[data-theme="vapor"] [data-kind="note"] { --note: #5CE1FF; }
:root[data-theme="vapor"] [data-kind="hub"] { --note: #B48CFF; }
:root[data-theme="vapor"] [data-kind="scrapbook"] { --note: #FF8FB1; }
:root[data-theme="vapor"] [data-kind="project"] { --note: #FFC857; }
:root[data-theme="vapor"] [data-kind="page"] { --note: #C9C3DD; }
/* A chapter is part of a book: the Library's periwinkle, like the book. */
:root[data-theme="vapor"] [data-kind="chapter"] { --note: #8FA8FF; }
/* A row's leading icon says what the row is: a hub in the Atlas is violet, a note on a hub's page is cyan. */
:root[data-theme="vapor"] .atlas-list .lead .icon { color: #B48CFF; }
:root[data-theme="vapor"] .hub-screen .atlas-list .lead .icon { color: #5CE1FF; }
/* Cards are filled blocks with no rule of their own along the top: the shade sits on the card's icon tile instead. */
:root[data-theme="vapor"] :is(.atlas-folder, .sbk-card, .proj-card) { background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] :is(a.atlas-folder, a.sbk-card, a.proj-card, .atlas-folder, .sbk-card, .proj-card):hover { background: #2E2250; border-color: transparent; }
/* A count is plain ink, whatever it counts. */
:root[data-theme="vapor"] .stat .n { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #FFFFFF; letter-spacing: -.02em; }
:root[data-theme="vapor"] .lib-row { --line: #3B2F66; --v-chip: #3A2D63; background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] a.lib-row:hover, :root[data-theme="vapor"] .lib-row:hover { background: #2E2250; border-color: transparent; }
:root[data-theme="vapor"] .stat .l { color: var(--ink-2); }
:root[data-theme="vapor"] .cover { box-shadow: none; }

/* ───────── 7. Buttons, chips, badges, fields ───────── */
:root[data-theme="vapor"] .btn { background: #2E2250; border-color: transparent; color: var(--ink); font-weight: 700; }
:root[data-theme="vapor"] .btn:hover { background: #3A2D63; border-color: transparent; }
:root[data-theme="vapor"] .btn.primary { background: #39FF14; color: #07060C; border-color: transparent; }
:root[data-theme="vapor"] .btn.primary:hover { background: #7CFF63; }
:root[data-theme="vapor"] .btn.ghost { background: transparent; color: var(--ink); }
:root[data-theme="vapor"] .btn.ghost:hover { background: #22173D; }
:root[data-theme="vapor"] .btn.danger { background: #FF5C5C; color: #1A0508; border-color: transparent; }
:root[data-theme="vapor"] .btn.danger:hover { background: #FF7A7A; }
:root[data-theme="vapor"] :is(.card, .list, .review-item, .lib-row, .sbk-piece) .btn:not(.primary):not(.ghost):not(.danger) { background: #3A2D63; }
:root[data-theme="vapor"] :is(.card, .list, .review-item, .lib-row, .sbk-piece) .btn:not(.primary):not(.ghost):not(.danger):hover { background: #4A3A7C; }
/* One colour for the main action, everywhere: neon green. No block repaints its main button. */
:root[data-theme="vapor"] .chip { background: var(--v-chip); border-color: transparent; color: var(--ink); font-weight: 600; }
:root[data-theme="vapor"] :is(a.chip, button.chip):hover { background: #4A3A7C; border-color: transparent; color: #FFFFFF; }
:root[data-theme="vapor"] .chip:is([aria-pressed="true"], .on) { background: var(--place); border-color: transparent; color: #07060C; }
/* A count inside the chosen chip is dark like the chip's own words, not the pale grey of a count elsewhere. */
:root[data-theme="vapor"] .chip:is([aria-pressed="true"], .on) :is(.muted, .soft, .num) { color: inherit; }
/* Pills are plain unless the state means something: orange needs you, green is Silas at work, mint is done, red failed. */
:root[data-theme="vapor"] .badge { background: var(--v-chip); border-color: transparent; color: var(--ink); }
:root[data-theme="vapor"] .badge.accent { background: #0F3A1C; color: #7CFF63; }
:root[data-theme="vapor"] .badge.madder { background: #2E2250; color: #E4DCFF; font-weight: 700; }
:root[data-theme="vapor"] .badge.ok { background: #0E3327; color: #6FFFC1; }
:root[data-theme="vapor"] .badge.warn { background: #3A2D63; color: #FFFFFF; font-weight: 700; }
:root[data-theme="vapor"] .badge.danger { background: #4A1219; color: #FFA3A3; }
/* A book's pill, by its state (data-state), the same pill in every place it shows (Home, the Library's covers and
   list, the book page, Find anything). "Ready to finish" and "Waiting for you" are the orange of Needs you; "Being
   read" is Silas's green; "Finished" the mint of done; "Stopped" and "Couldn't be read" red; the rest plain. */
:root[data-theme="vapor"] .badge:is([data-state="ready"], [data-state="waiting"]) { background: #4A2A16; color: #FFB680; font-weight: 700; }
:root[data-theme="vapor"] .badge[data-state="reading"] { background: #0F3A1C; color: #7CFF63; }
:root[data-theme="vapor"] .badge[data-state="finished"] { background: #0E3327; color: #6FFFC1; }
:root[data-theme="vapor"] .badge:is([data-state="stopped"], [data-state="unreadable"]) { background: #4A1219; color: #FFA3A3; font-weight: 700; }
:root[data-theme="vapor"] .badge:is([data-state="queued"], [data-state="paused"], [data-state="pausing"]) { background: #3A2D63; color: #FFFFFF; font-weight: 700; }
:root[data-theme="vapor"] dialog.palette .opt .sub[data-state="ready"] { color: #FFB680; font-weight: 650; }
/* How much a note says about a hub: five marks in the Atlas's violet, because it is about hubs. */
:root[data-theme="vapor"] .level { color: var(--ink); }
:root[data-theme="vapor"] .level .stitches i { background: #4A3A7C; }
:root[data-theme="vapor"] .level[data-level="1"] .stitches i:nth-child(-n+1),
:root[data-theme="vapor"] .level[data-level="2"] .stitches i:nth-child(-n+2),
:root[data-theme="vapor"] .level[data-level="3"] .stitches i:nth-child(-n+3),
:root[data-theme="vapor"] .level[data-level="4"] .stitches i:nth-child(-n+4),
:root[data-theme="vapor"] .level[data-level="5"] .stitches i:nth-child(-n+5) { background: #B48CFF; }
:root[data-theme="vapor"] :is(.input, .textarea, .select) { background-color: #0D0A18; border-color: #5A4C8A; color: var(--ink); }
:root[data-theme="vapor"] :is(.input, .textarea, .select):hover { border-color: #7566AE; }
:root[data-theme="vapor"] :is(.input, .textarea, .select):focus { border-color: #39FF14; }
:root[data-theme="vapor"] :is(.input, .textarea)::placeholder { color: #A39BC4; opacity: 1; }
:root[data-theme="vapor"] .field > label, :root[data-theme="vapor"] .field .label { color: var(--ink); font-weight: 650; }
:root[data-theme="vapor"] .field .hint { color: var(--ink-2); }
/* A switch that is on, a ticked box, a chosen option: the mint of "on", never the green of the main action. */
:root[data-theme="vapor"] .switch input:checked { background: #6FFFC1; }
:root[data-theme="vapor"] :is(.check, .choice) input { accent-color: #6FFFC1; }
:root[data-theme="vapor"] .tab { color: var(--ink-2); font-weight: 600; }
:root[data-theme="vapor"] .tab:is([aria-selected="true"], [aria-current="page"], .on) { color: #FFFFFF; border-color: var(--place); }
:root[data-theme="vapor"] .segmented { background: #07060C; border-color: #2A2147; }
:root[data-theme="vapor"] .segmented button { color: var(--ink-2); }
:root[data-theme="vapor"] .segmented button[aria-pressed="true"] { background: var(--place); color: #07060C; }
/* How far Silas has read: his green. */
:root[data-theme="vapor"] .progress { background: #07060C; }
:root[data-theme="vapor"] .progress > i { background: linear-gradient(90deg, #39FF14, #7CFF63); }
:root[data-theme="vapor"] .steps i { background: #3A2D63; }
:root[data-theme="vapor"] .steps i.done { background: #6FFFC1; }
:root[data-theme="vapor"] .steps i.now { background: #FFFFFF; }
:root[data-theme="vapor"] .banner { background: #241A3A; border-color: transparent; color: var(--ink); }
:root[data-theme="vapor"] .banner .icon { color: var(--ink-2); }
:root[data-theme="vapor"] .banner.ok { background: #0E3327; }
:root[data-theme="vapor"] .banner.ok .icon { color: #6FFFC1; }
:root[data-theme="vapor"] .banner.danger { background: #4A1219; }
:root[data-theme="vapor"] .banner.danger .icon { color: #FF7A7A; }
:root[data-theme="vapor"] .synopsis { background: #1D1733; border-color: transparent; border-left: 4px solid var(--place); color: var(--ink); }
:root[data-theme="vapor"] .synopsis .eyebrow { color: var(--place); }
:root[data-theme="vapor"] .table th { color: var(--place); }
:root[data-theme="vapor"] .state { color: var(--ink-2); }
/* An empty page's message is a pane like every section: the same fill and corners. A failed one carries a red rule. */
:root[data-theme="vapor"] .page > .state { background: #15121F; border-radius: 16px; border-color: transparent; }
:root[data-theme="vapor"] .page > .state.error { background: linear-gradient(#FF5C5C, #FF5C5C) top left / 100% 2px no-repeat, #15121F; }
/* Inside a pane, the same message is a filled block, not a dashed outline. */
:root[data-theme="vapor"] :not(.page) > .state { border-color: transparent; background: #1D1733; }
:root[data-theme="vapor"] .state :is(h2, h3) { color: #FFFFFF; }
:root[data-theme="vapor"] .state-art { color: var(--place); }
:root[data-theme="vapor"] .state.error .state-art { color: #FF7A7A; }
:root[data-theme="vapor"] .spinner { border-color: #3A2D63; border-top-color: #ECE6FF; }

/* ───────── 8. Dialogs, menus, the Find palette, toasts ───────── */
/* A dialog is a raised block with a deep shadow and no coloured rule. Find anything carries Find's cyan along its top,
   Silas's sheet his green (section 9). */
:root[data-theme="vapor"] :is(dialog.dialog, dialog.sheet, dialog.palette) {
  --line: #3B2F66; --v-chip: #3A2D63; --paper-sunk: #120A24;
  background: #1A1230;
  border-color: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px #2E2250, 0 24px 72px rgba(0, 0, 0, .7);
}
:root[data-theme="vapor"] dialog.palette { background: linear-gradient(90deg, #5CE1FF, color-mix(in srgb, #5CE1FF 25%, #1A1230)) top left / 100% 3px no-repeat, #1A1230; }
:root[data-theme="vapor"] :is(.dialog-head, .dialog-foot) { border-color: #3B2F66; }
:root[data-theme="vapor"] .dialog-head :is(h2, h3) { font-family: var(--font-display); color: #FFFFFF; }
:root[data-theme="vapor"] .menu { --line: #4A3A7C; background: #2E2250; border-color: transparent; box-shadow: 0 16px 44px rgba(0, 0, 0, .6); }
:root[data-theme="vapor"] .menu-item { color: var(--ink); }
:root[data-theme="vapor"] .menu-item:is(:hover, :focus-visible, [aria-selected="true"]) { background: #3A2D63; color: #FFFFFF; }
:root[data-theme="vapor"] .menu-label { color: var(--ink-2); }
:root[data-theme="vapor"] .menu .hint { color: var(--ink-2); }
:root[data-theme="vapor"] dialog.palette .search { border-color: #3B2F66; }
:root[data-theme="vapor"] dialog.palette .search .input { background-color: transparent; }
:root[data-theme="vapor"] dialog.palette .group { color: var(--ink-2); }
:root[data-theme="vapor"] dialog.palette .opt { color: var(--ink); }
/* The chosen row is lit with a bar of its own kind's colour (a book periwinkle, a hub violet, a note cyan). */
:root[data-theme="vapor"] dialog.palette .opt[aria-selected="true"] { background: #3A2D63; box-shadow: inset 4px 0 0 var(--note, #ECE6FF); color: #FFFFFF; }
:root[data-theme="vapor"] dialog.palette .foot { background: #120A24; border-color: #3B2F66; color: var(--ink-2); }
/* A toast says something is done: a raised block with a mint edge. One that failed is red. */
:root[data-theme="vapor"] .toast { background: #2E2250; color: var(--ink); border-left: 4px solid #6FFFC1; box-shadow: 0 16px 44px rgba(0, 0, 0, .6); }
:root[data-theme="vapor"] .toast :is(a, button):not(.btn) { color: #FFFFFF; text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .toast .btn { background: #4A3A7C; color: #FFFFFF; }
:root[data-theme="vapor"] .toast .btn:hover { background: #5A4A8E; }
:root[data-theme="vapor"] .toast.danger { background: #4A1219; color: #FFE3E3; border-left-color: #FF5C5C; }
:root[data-theme="vapor"] .toast.danger :is(a, button):not(.btn) { color: #FFFFFF; }
:root[data-theme="vapor"] .toast.danger .btn { background: #6E1E2A; }

/* ───────── 9. Silas: his own dark green block ───────── */
:root[data-theme="vapor"] dialog.sheet.silas-sheet {
  --line: #1E5232; --line-strong: #3E8A5A; --v-chip: #123A22;
  background: linear-gradient(90deg, #39FF14, #6FFFC1) top left / 100% 3px no-repeat, #0B2416;
}
:root[data-theme="vapor"] .silas-sheet :is(.dialog-head, .dialog-foot) { border-color: #1E5232; }
:root[data-theme="vapor"] .silas-who { color: #39FF14; font-weight: 700; }
:root[data-theme="vapor"] .silas-turn.reader .silas-who { color: #FFFFFF; }
:root[data-theme="vapor"] .silas-turn.silas .silas-bubble { background: #123A22; color: var(--ink); border-color: transparent; }
:root[data-theme="vapor"] .silas-turn.reader .silas-bubble { background: #2E2250; color: var(--ink); border-color: transparent; }
:root[data-theme="vapor"] .silas-bubble.silas-fail { background: #45161F; color: #FFD0D0; }
:root[data-theme="vapor"] .silas-card { background: #0F3020; border-color: transparent; }
:root[data-theme="vapor"] .silas-card-title { color: #FFFFFF; }
:root[data-theme="vapor"] .silas-changed { color: #6FFFC1; }
:root[data-theme="vapor"] .silas-starters .chip { background: #123A22; color: #E4FFE8; }
:root[data-theme="vapor"] .silas-starters .chip:hover { background: #1B5231; }
:root[data-theme="vapor"] .silas-input { background-color: #06150C; border-color: #3E8A5A; color: var(--ink); }
:root[data-theme="vapor"] .silas-label { color: var(--ink); }

/* ───────── 10. Home and Needs you ───────── */
/* Where you left off is a note, so the card wears the note's cyan, not the green of the main action. */
:root[data-theme="vapor"] .card.accent.home-left { border-left-color: var(--note); }
:root[data-theme="vapor"] .home-left .eyebrow { color: var(--note); }
:root[data-theme="vapor"] .home-left-title { font-family: var(--font-display); font-weight: 700; color: #FFFFFF; letter-spacing: -.015em; }
:root[data-theme="vapor"] .home-left-go { color: var(--note); font-weight: 700; }
:root[data-theme="vapor"] .home-stats > .home-stat { background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] .home-stats > a.home-stat:hover { background: #2E2250; }
:root[data-theme="vapor"] .home-stats-note { color: var(--ink-2); }
/* A count must always fit its tile, however big the library gets. In the narrow column beside the page the three
   tiles stack as rows: the number, then what it counts. */
:root[data-theme="vapor"] .home-stat .stat .n { overflow-wrap: normal; white-space: nowrap; }
@media (min-width: 1200px) {
  :root[data-theme="vapor"] .home-cols:not(.one) .home-side .home-stats { flex-direction: column; }
  :root[data-theme="vapor"] .home-cols:not(.one) .home-side .home-stat { flex: none; padding: 12px 16px; border-radius: 12px; }
  :root[data-theme="vapor"] .home-cols:not(.one) .home-side .home-stat .stat { flex-direction: row; align-items: baseline; gap: 12px; }
  :root[data-theme="vapor"] .home-cols:not(.one) .home-side .home-stat .stat .n { flex: none; min-width: 4.6ch; text-align: right; }
}
@media (max-width: 719px) {
  :root[data-theme="vapor"] .home-stat { padding: 12px; }
  :root[data-theme="vapor"] .home-stat .stat .n { font-size: 1.25rem; }
}
/* Newest hubs: plain rows, each hub's name in white and its count beside it. */
:root[data-theme="vapor"] .home-hubs a { color: #FFFFFF; }
:root[data-theme="vapor"] .home-hubs a:hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .home-hubs a .num { color: var(--ink-2); }
:root[data-theme="vapor"] .home-note { color: var(--ink-2); }
:root[data-theme="vapor"] .checklist .item .title { color: var(--ink); }
:root[data-theme="vapor"] .checklist .item .sub { color: var(--ink-2); }
:root[data-theme="vapor"] .review-tools { background: #15121F; border-radius: 16px; padding: 20px 24px; }
/* Needs you, kept calm: every book is a plain block, its title white, the answers plain blocks, and the one green
   button is "Finish this book" in its head. The head is held at the top while its block is on screen (home.css):
   held, it reaches the block's edges with the block's own fill and a rule of Needs you's orange under it. */
:root[data-theme="vapor"] .review-group {
  --line: #3B2F66; --v-chip: #2E2250; --review-head-fill: #15121F; --v-gutter: 24px;
  padding: 22px var(--v-gutter); border-radius: 16px; background: #15121F;
}
:root[data-theme="vapor"] .review-group-head { border-bottom-color: transparent; margin-inline: calc(-1 * var(--v-gutter)); padding-inline: var(--v-gutter); }
:root[data-theme="vapor"] .review-group-head[data-stuck="true"] { box-shadow: inset 0 -2px 0 color-mix(in srgb, #FF9F5A 70%, #15121F), 0 18px 24px -18px rgba(0, 0, 0, .9); }
:root[data-theme="vapor"] .review-group-head h2 { color: #FFFFFF; }
:root[data-theme="vapor"] .review-group-head h2 a:hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .review-group-line { color: var(--ink-2); }
:root[data-theme="vapor"] .review-item .btn:not(.primary):not(.ghost):not(.danger) { background: #2E2250; }
:root[data-theme="vapor"] .review-item .btn:not(.primary):not(.ghost):not(.danger):hover { background: #3A2D63; }
/* A long list of questions repeats its label and its "Delete" on every row. Both are quiet here, so twenty rows stay
   calm and the one green button still leads. The "are you sure" box keeps the solid red. */
:root[data-theme="vapor"] .review-item .btn.danger { background: #45161F; color: #FFB3B3; }
:root[data-theme="vapor"] .review-item .btn.danger:hover { background: #5E1D2B; color: #FFFFFF; }
:root[data-theme="vapor"] .review-kinds-label { color: var(--ink-2); }
:root[data-theme="vapor"] .review-count { color: var(--ink-2); }
:root[data-theme="vapor"] .review-where { color: var(--ink-2); }
:root[data-theme="vapor"] .review-says { color: var(--ink); }
:root[data-theme="vapor"] .review-meta { color: var(--ink-2); }

/* ───────── 11. Library and a book ───────── */
:root[data-theme="vapor"] :is(.lib-row-title, .lib-reading-title) { font-family: var(--font-display); font-weight: 700; color: #FFFFFF; letter-spacing: -.015em; }
/* A book on the reading table is a filled block like every other row: no outline. */
:root[data-theme="vapor"] .lib-reading { --line: #3B2F66; --v-chip: #3A2D63; background: #241A3A; border-color: transparent; border-radius: 14px; }
/* "Up next": the books waiting their turn are short rows, filled and titled like the books on the reading table. */
:root[data-theme="vapor"] .lib-queued { --line: #3B2F66; --v-chip: #3A2D63; background: #241A3A; border-color: transparent; border-radius: 14px; }
:root[data-theme="vapor"] .lib-queued-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); color: #FFFFFF; letter-spacing: -.01em; }
:root[data-theme="vapor"] .lib-queued .btn:not(.primary):not(.ghost):not(.danger) { background: #3A2D63; }
:root[data-theme="vapor"] .lib-queued .btn:not(.primary):not(.ghost):not(.danger):hover { background: #4A3A7C; }
/* A book's title as a link underlines when pointed at, like any link. */
:root[data-theme="vapor"] :is(.lib-reading-title, .lib-queued-title):hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .lib-queue-note { color: var(--ink-2); }
:root[data-theme="vapor"] :is(.shelf-item .title, .lib-ch-title, .lib-list .title, .write-lib-title, .proj-page .title, .note-hubrow-title) { font-family: var(--font-ui); font-weight: 650; color: var(--ink); }
:root[data-theme="vapor"] :is(.lib-row-by, .lib-row-meta, .lib-count, .lib-pct, .shelf-item .sub) { color: var(--ink-2); }
:root[data-theme="vapor"] .lib-row-text { color: var(--ink); }
:root[data-theme="vapor"] .lib-standing { background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] .lib-standing-head { color: var(--place); }
:root[data-theme="vapor"] .lib-part { color: var(--place); font-family: var(--font-display); }
:root[data-theme="vapor"] details.lib-chapter { --line: #3B2F66; background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] details.lib-chapter > summary:hover { background: #2E2250; }
:root[data-theme="vapor"] .lib-ch-n { color: var(--place); font-weight: 800; }
:root[data-theme="vapor"] .lib-ch-count { color: var(--ink-2); }
:root[data-theme="vapor"] .lib-notes { background: #1B1430; }
:root[data-theme="vapor"] a.lib-note:hover { background: #2E2250; }
:root[data-theme="vapor"] .lib-note-title { color: var(--ink); }
:root[data-theme="vapor"] .lib-note-syn { color: var(--ink-2); }
:root[data-theme="vapor"] .lib-facts dt { color: var(--ink-3); }
:root[data-theme="vapor"] .lib-drop { background: #0D0A18; border-color: #7566AE; color: var(--ink-2); }
:root[data-theme="vapor"] .lib-drop.over { background: #0F3A1C; border-color: #39FF14; color: var(--ink); }
:root[data-theme="vapor"] :is(.lib-err, .wel-err, .proj-form-fail, .auth-problem) { color: #FFA3A3; }

/* ───────── 12. The note (reading page) ───────── */
:root[data-theme="vapor"] .note-body { color: #ECEAF4; }
:root[data-theme="vapor"] .note-body :is(h2, h3) { color: #FFFFFF; }
/* Links to hubs come every few words, so at rest they are quiet: a faint lavender tint on the words and a fine dotted
   line of low contrast set well below them, so a sentence reads as a sentence while every hub is still plainly a link.
   Pointing at one, or reaching it with the keyboard, makes it white with a solid violet line. */
:root[data-theme="vapor"] a.note-hub { color: #E6DDFF; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: rgba(180, 140, 255, .55); text-decoration-thickness: 1px; text-underline-offset: .3em; }
:root[data-theme="vapor"] a.note-hub:is(:hover, :focus-visible) { text-decoration-style: solid; }
:root[data-theme="vapor"] a.note-hub:is(:hover, :focus-visible) { color: #FFFFFF; text-decoration-color: #B48CFF; text-decoration-thickness: 2px; background: rgba(180, 140, 255, .2); }
:root[data-theme="vapor"] :is(.note-meta, .note-era, .note-skip, .note-context, .note-none, .note-cited-lede) { color: var(--ink-2); }
/* An era keeps its dot: when the line is full the two go to the next line together. */
:root[data-theme="vapor"] .note-meta .note-era { white-space: nowrap; }
:root[data-theme="vapor"] .note-quote { border-color: var(--place); color: #FFFFFF; }
:root[data-theme="vapor"] .note-see-label { color: #B48CFF; }
/* The reading page's small controls and other links are not the main action, so none of them is green: footnotes and
   plain links are near-white and underlined like every link, the "25 hubs, 23 tags" fold and "More" are the place's
   colour, and what is pointed at turns white. */
:root[data-theme="vapor"] .note-body a:not(.note-hub) { color: var(--v-link); text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .note-cited a { color: var(--v-link); text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .note-fn button { color: var(--v-link); }
:root[data-theme="vapor"] .note-fn button:hover { background: #2E2250; }
:root[data-theme="vapor"] .note-cited-n { color: var(--ink-2); }
:root[data-theme="vapor"] :is(.note-jump, .note-syn-more) { color: var(--place); }
:root[data-theme="vapor"] .note-jump:hover { background: #22173D; }
:root[data-theme="vapor"] .note-turn:hover .note-turn-title,
:root[data-theme="vapor"] .note-tocrow:hover,
:root[data-theme="vapor"] .note-hubrow:hover .note-hubrow-title,
:root[data-theme="vapor"] .note-tag-link:hover .note-tag-leaf { color: #FFFFFF; }
:root[data-theme="vapor"] .note-turns > .note-turn { background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] .note-turns > .note-turn:hover { background: #2E2250; }
:root[data-theme="vapor"] .note-turn-label { color: var(--ink-2); }
:root[data-theme="vapor"] .note-turn.next .note-turn-label { color: var(--place); }
:root[data-theme="vapor"] .note-turn-title { font-family: var(--font-display); font-weight: 700; color: #FFFFFF; }
:root[data-theme="vapor"] .note-side-title { font-family: var(--font-display); font-weight: 700; color: var(--place); }
:root[data-theme="vapor"] .note-box { --line: #3B2F66; --v-chip: #2E2250; background: #15121F; border-color: transparent; border-radius: 14px; padding: 16px; }
/* From 1440px "In this note" is one card of its own (reader.css), so the boxes inside it are plain blocks that line up
   with its title instead of a second inset box of the same colour. */
@media (min-width: 1440px) {
  :root[data-theme="vapor"] .note-side .note-box { padding: 0; background: none; border-radius: 0; }
}
/* The side boxes are coloured by what they hold: hubs are the Atlas's violet; tags open Find, so they are Find's cyan. */
:root[data-theme="vapor"] .note-box h3 { color: var(--place); }
:root[data-theme="vapor"] .note-box[data-section="hubs"] h3 { color: #B48CFF; }
:root[data-theme="vapor"] .note-box[data-section="tags"] h3 { color: #5CE1FF; }
:root[data-theme="vapor"] .note-count { color: var(--ink-2); }
:root[data-theme="vapor"] .note-hubgroup h4 { color: #B48CFF; }
:root[data-theme="vapor"] .note-tocrow[aria-current="true"] { color: #FFFFFF; background: #22173D; background: color-mix(in srgb, var(--place) 18%, #15121F); }
/* A tag is a way into Find: a chip of Find's cyan, dark, with pale cyan words. */
:root[data-theme="vapor"] :is(.note-tag, .find-tag) { background: #12303A; color: #C4F4FF; border-color: transparent; }
:root[data-theme="vapor"] a.find-tag:hover { background: #1C4655; color: #FFFFFF; }
:root[data-theme="vapor"] :is(.note-tag-link, .note-tag-leaf) { color: #C4F4FF; }
:root[data-theme="vapor"] .note-tag-path { color: #B4ADCF; }
:root[data-theme="vapor"] .note-size .label { font-family: var(--font-ui); }

/* ───────── 13. Atlas, a hub, Find ───────── */
/* A folder card: its name in the Atlas's violet, its count plain, and its folder icon on a tile of its own shade. */
:root[data-theme="vapor"] .atlas-folder-name { font-family: var(--font-display); font-weight: 700; color: var(--place); letter-spacing: -.01em; }
:root[data-theme="vapor"] .atlas-folder-n { color: #FFFFFF; font-weight: 700; }
:root[data-theme="vapor"] .atlas-folder .atlas-folder-top .icon { flex: none; width: 28px; height: 28px; padding: 5px; margin-top: -3px; border-radius: 8px; background: var(--v-shade); color: #07060C; }
:root[data-theme="vapor"] :is(.atlas-folder-taste, .atlas-taste, .atlas-aka, .hub-aka, .hub-book) { color: var(--ink-2); }
:root[data-theme="vapor"] details.hub-level { --line: #3B2F66; background: #15121F; border-color: transparent; }
:root[data-theme="vapor"] details.hub-level > summary:hover { background: #241A3A; }
:root[data-theme="vapor"] .hub-level-name { color: #FFFFFF; font-family: var(--font-display); font-weight: 700; }
:root[data-theme="vapor"] .hub-chev { color: var(--place); }
/* A starred hub or piece: the star takes the colour of the page it is on. */
:root[data-theme="vapor"] :is(.hub-star, .sbk-star)[aria-pressed="true"] { color: var(--place); }
:root[data-theme="vapor"] .hub-syn { color: var(--ink); }
/* A hub's kind (Person, Place…) carries a small tile of its folder's shade, the same tile as on the folder's card. */
:root[data-theme="vapor"] .hub-screen[data-hue] .page-head .eyebrow::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; vertical-align: 0; background: var(--v-shade); }
/* A hub's synopsis on a phone: its "More" is a small link, near-white and underlined like every link, never green. */
:root[data-theme="vapor"] .hub-lede-more { color: var(--v-link); text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .hub-lede-more:hover { color: #FFFFFF; text-decoration-color: currentColor; }
:root[data-theme="vapor"] .find-input { background-color: #15121F; border-color: #5CE1FF; }
:root[data-theme="vapor"] .find-tag-on { background: #5CE1FF; color: #07060C; }
:root[data-theme="vapor"] .find-tag-n { color: inherit; }
:root[data-theme="vapor"] .find-group-name { color: #FFFFFF; }
/* Find, by kind: a note's title is cyan, a hub is violet, a book is periwinkle, on the card, the chips and their labels. */
:root[data-theme="vapor"] .find-side h3 { color: var(--place); }
:root[data-theme="vapor"] .find-side > div:has(.chip[data-kind="book"]) h3 { color: #8FA8FF; }
:root[data-theme="vapor"] .find-side > div:has(.chip[data-kind="hub"]) h3 { color: #B48CFF; }
:root[data-theme="vapor"] .find-side .chip[data-kind] { background: #1F1836; background: color-mix(in srgb, var(--note) 20%, #1A1230); color: #FFFFFF; }
:root[data-theme="vapor"] .find-side :is(a.chip, button.chip)[data-kind]:hover { background: #3A2D63; background: color-mix(in srgb, var(--note) 38%, #1A1230); color: #FFFFFF; }
:root[data-theme="vapor"] .find-side .chip[data-kind][aria-pressed="true"] { background: var(--note); color: #07060C; }
:root[data-theme="vapor"] .card.accent.find-hub { border-left-color: var(--note); }
:root[data-theme="vapor"] .find-hub .eyebrow { color: var(--note); }
:root[data-theme="vapor"] dialog.palette .opt[data-kind] > svg { color: var(--note); }
:root[data-theme="vapor"] :is(.find-hit-title, .find-hub-title) { font-family: var(--font-display); font-weight: 700; color: var(--note); }
:root[data-theme="vapor"] .find-hit-from { color: var(--ink-2); }
:root[data-theme="vapor"] .find-hit-text { color: var(--ink); }

/* ───────── 14. Scrapbooks ───────── */
:root[data-theme="vapor"] :is(.sbk-by, .sbk-count, .sbk-about, .sbk-from, .sbk-who, .sbk-context, .sbk-when, .sbk-taste-from, .sbk-none, .sbk-row-book) { color: var(--ink-2); }
:root[data-theme="vapor"] :is(.sbk-words, .sbk-taste-words, .sbk-quote) { color: var(--ink); }
:root[data-theme="vapor"] .sbk-piece { --line: #3B2F66; --v-chip: #3A2D63; background: #241A3A; border-color: transparent; }
/* A dated piece is a filled block here, so it needs room inside: the date must not sit on the block's edge. */
:root[data-theme="vapor"] .sbk-pieces.is-dated { gap: var(--s3); }
:root[data-theme="vapor"] .sbk-pieces.is-dated .sbk-piece { padding: var(--s4) var(--s5); border-width: 0; border-radius: 14px; }
:root[data-theme="vapor"] .sbk-pieces.is-dated .sbk-when { color: var(--place); }
:root[data-theme="vapor"] .sbk-pieces.is-dated .sbk-when.rough { color: var(--ink-2); }
:root[data-theme="vapor"] .sbk-title { color: #FFFFFF; }
:root[data-theme="vapor"] .sbk-year { font-family: var(--font-display); font-weight: 800; color: var(--place); }
/* A piece's note and book are links: near-white and underlined, each with its icon. */
:root[data-theme="vapor"] :is(.sbk-note-link, .sbk-book-link, .sbk-link, .wel-link) { color: var(--v-link); text-decoration: underline; text-decoration-color: var(--v-link-line); text-underline-offset: .2em; }
:root[data-theme="vapor"] :is(.sbk-note-link, .sbk-book-link, .sbk-link, .wel-link):hover { color: #FFFFFF; text-decoration-color: currentColor; }
:root[data-theme="vapor"] .sbk-fact { background: var(--v-chip); color: var(--ink); border-color: transparent; }
/* While the filter bar is held at the top, the band behind it is the page's own colour, glow and all, so no strip of
   flat black shows across the glow at the top of the window. */
:root[data-theme="vapor"] .sbk-band { background: #0B0B10; }

/* ───────── 15. Projects and the writing page ───────── */
:root[data-theme="vapor"] .proj-card h2 { color: var(--place); }
/* A project's latest page sits on a strip of the card's own shade of yellow. */
:root[data-theme="vapor"] .proj-latest { background: #1B1430; border-left-color: var(--v-shade, var(--place)); }
:root[data-theme="vapor"] .proj-latest-name { color: var(--ink-2); }
:root[data-theme="vapor"] :is(.proj-excerpt, .proj-last) { color: var(--ink); }
:root[data-theme="vapor"] :is(.proj-meta, .proj-about, .proj-carry, .proj-facts, .proj-none, .proj-step-text) { color: var(--ink-2); }
:root[data-theme="vapor"] .proj-carry { color: #FFFFFF; font-weight: 650; }
:root[data-theme="vapor"] .proj-step { background: #241A3A; border-color: transparent; }
:root[data-theme="vapor"] .proj-step-n { color: var(--place); font-family: var(--font-display); font-weight: 800; }
:root[data-theme="vapor"] .proj-step-art { color: var(--place); }
:root[data-theme="vapor"] .proj-step-title { color: #FFFFFF; }
:root[data-theme="vapor"] .write-title { font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em; color: #FFFFFF; background: transparent; }
:root[data-theme="vapor"] :is(.write-meta, .write-count, .write-status) { color: var(--ink-2); }
:root[data-theme="vapor"] .write-status.is-error { color: #FFA3A3; }
:root[data-theme="vapor"] .write-bar { background: #15121F; border-color: transparent; border-radius: 12px; padding-inline: 10px; }
:root[data-theme="vapor"] .write-tool { color: var(--ink); }
:root[data-theme="vapor"] .write-tool:hover { background: #2E2250; }
/* A tool that is on (bold, a heading) is a lit block in the page's colour, not the green of the main action. */
:root[data-theme="vapor"] .write-tool[aria-pressed="true"] { background: #3A2D63; background: color-mix(in srgb, var(--place) 26%, #2E2250); color: #FFFFFF; box-shadow: inset 0 -2px 0 var(--place); }
:root[data-theme="vapor"] .write-sep { background: #3B2F66; }
:root[data-theme="vapor"] .write-text { color: #ECEAF4; }
:root[data-theme="vapor"] .write-text :is(blockquote, .pj-clip) { border-color: var(--place); color: #FFFFFF; }
:root[data-theme="vapor"] .write-text .pj-cs { color: var(--ink-2); }
:root[data-theme="vapor"] .write-side { --line: #3B2F66; background: #15121F; border-color: transparent; border-radius: 16px; padding: 18px; }
:root[data-theme="vapor"] .write-side-title { color: var(--place); font-family: var(--font-display); font-weight: 700; }
:root[data-theme="vapor"] .write-lib-list > li { background: #241A3A; border-color: transparent; }

/* ───────── 16. Sign in, join, welcome, settings ───────── */
:root[data-theme="vapor"] .gate { background: #0B0B10; }
:root[data-theme="vapor"] .gate-art {
  color: #ECEAF4;
  background:
    radial-gradient(640px 460px at 12% 8%, rgba(180, 140, 255, .42), transparent 62%),
    radial-gradient(560px 460px at 96% 100%, rgba(57, 255, 20, .2), transparent 62%),
    radial-gradient(420px 320px at 80% 12%, rgba(255, 143, 177, .2), transparent 65%),
    #120A24;
}
:root[data-theme="vapor"] .gate-art blockquote { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; color: #FFFFFF; }
:root[data-theme="vapor"] .gate-art .points { color: #DAD5EA; }
:root[data-theme="vapor"] .gate-art .points li::marker { color: #ECE6FF; }
:root[data-theme="vapor"] .gate-form > .inner {
  padding: 30px 28px; border-radius: 18px;
  background: linear-gradient(90deg, #ECE6FF, #7B5CFF) top left / 100% 3px no-repeat, #15121F;
}
:root[data-theme="vapor"] .gate-form h1 { color: #FFFFFF; }
:root[data-theme="vapor"] .auth-aside h2 { color: #FFFFFF; }
:root[data-theme="vapor"] :is(.auth-foot, .auth-count) { color: var(--ink-2); }
:root[data-theme="vapor"] .auth-count.ok { color: #6FFFC1; }
:root[data-theme="vapor"] :is(.auth-stop-art, .wel-point-art) { color: var(--note); }
/* auth.css tints each Welcome point's disc with --kind-tint: a book is the Library's periwinkle, a hub the Atlas's
   violet, Silas his green. None is the main action's solid green. */
:root[data-theme="vapor"] .wel-points li[data-kind="book"] { --kind-tint: #8FA8FF; }
:root[data-theme="vapor"] .wel-points li[data-kind="hub"] { --kind-tint: #B48CFF; }
:root[data-theme="vapor"] .wel-points li[data-kind="silas"] { --note: #7CFF63; --kind-tint: #39FF14; }
:root[data-theme="vapor"] .wel-point-art { background: #1D1733; background: color-mix(in srgb, var(--note) 18%, #15121F); }
:root[data-theme="vapor"] .wel-points li[data-kind] .wel-point-art { background: color-mix(in srgb, var(--kind-tint) 18%, #15121F); }
:root[data-theme="vapor"] .wel { background: #0B0B10; }
:root[data-theme="vapor"] .wel-text { font-family: var(--font-display); font-weight: 700; color: #FFFFFF; letter-spacing: -.02em; }
:root[data-theme="vapor"] .wel-points li { background: #15121F; border-color: transparent; border-radius: 14px; }
/* The welcome's setup block is a filled block like the rest, not an outlined box. */
:root[data-theme="vapor"] :is(.wel-ask, .wel-fail) { border-color: transparent; border-radius: 16px; }
:root[data-theme="vapor"] :is(.wel-quiet, .wel-count, .wel-foot) { color: var(--ink-2); }
:root[data-theme="vapor"] .wel-fail-art { color: #FF7A7A; }
:root[data-theme="vapor"] .set-card { --note: var(--place); }
:root[data-theme="vapor"] .set-title { color: #FFFFFF; font-weight: 650; }
:root[data-theme="vapor"] :is(.set-hint, .set-value) { color: var(--ink-2); }
:root[data-theme="vapor"] .set-figure { font-family: var(--font-display); font-weight: 800; color: #FFFFFF; }
:root[data-theme="vapor"] .set-status.ok { color: #6FFFC1; }
:root[data-theme="vapor"] .set-status.bad { color: #FFA3A3; }

/* ───────── 17. Fixes from looking at the pictures ───────── */
:root[data-theme="vapor"] :is(h1, h2, h3) a:not([class]) { color: inherit; text-decoration-color: transparent; }
:root[data-theme="vapor"] :is(h1, h2, h3) a:not([class]):hover { color: #FFFFFF; text-decoration-color: currentColor; }
:root[data-theme="vapor"] .proj-card h2 a { color: var(--place); }
/* The writing page's title is a page title like any other: the same face, weight and size, and it steps down the same way. */
:root[data-theme="vapor"] .write-head h1 .write-title { font-size: inherit; font-weight: inherit; letter-spacing: inherit; line-height: inherit; }
:root[data-theme="vapor"] .sbk-tools { background: #15121F; border-color: transparent; border-radius: 14px; padding: 12px 14px; }
:root[data-theme="vapor"] .lib-chapters { border-color: transparent; }
:root[data-theme="vapor"] .lib-chapters .lib-chapter summary .lib-ch-title { font-family: var(--font-ui); font-weight: 700; color: #FFFFFF; }
/* A scrapbook card: its name in the Scrapbooks' pink, its count white, its icon on a tile of its own shade of pink. */
:root[data-theme="vapor"] .sbk-card .sbk-card-count .num { color: #FFFFFF; }
:root[data-theme="vapor"] .sbk-card .sbk-taste-lead { color: var(--place); }
:root[data-theme="vapor"] .sbk-count b, :root[data-theme="vapor"] .sbk-count strong { color: #FFFFFF; }
:root[data-theme="vapor"] .hub-aka-more { color: var(--v-link); text-decoration-color: var(--v-link-line); }
:root[data-theme="vapor"] .hub-level .list { background: #241A3A; }
/* Sign in and join: the form is already a pane, so its heading sits flat inside it. */
:root[data-theme="vapor"] .gate-form .page-head { padding: 0; border-radius: 0; background: none; }
/* Welcome: each point is a padded block with air between them. */
:root[data-theme="vapor"] .wel-points li { padding: 14px 16px; }
:root[data-theme="vapor"] .wel-points li + li { margin-top: 10px; }
/* Empty, loading and error states take the colour of the place they are in. */
:root[data-theme="vapor"] .state .state-art { background: #1D1733; background: color-mix(in srgb, var(--place) 18%, #15121F); }
:root[data-theme="vapor"] .state.error .state-art { background: #45161F; }
:root[data-theme="vapor"] .sbk-card .sbk-card-icon { background: var(--v-shade); color: #07060C; }
:root[data-theme="vapor"] .sbk-card :is(.sbk-card-name, .sbk-card-link) { color: var(--place); }
:root[data-theme="vapor"] .sbk-card .sbk-card-link:hover { color: #FFFFFF; }
:root[data-theme="vapor"] .sbk-card .sbk-card-open { color: #FFFFFF; }
:root[data-theme="vapor"] .stat .n { font-variant-numeric: lining-nums; }
/* Buttons in the page head take a tint of the place, so they stand out from the band they sit on. */
:root[data-theme="vapor"] .page-head .actions .btn:not(.primary):not(.ghost):not(.danger) { background: #3A2D63; background: color-mix(in srgb, var(--place) 24%, #2E2250); color: #FFFFFF; }
:root[data-theme="vapor"] .page-head .actions .btn:not(.primary):not(.ghost):not(.danger):hover { background: #4A3A7C; background: color-mix(in srgb, var(--place) 36%, #2E2250); }
/* Loading: the bars take the tokens --skel and --skel-shine (section 1). On a lighter fill (the head's band, a card,
   a filled block) they step lighter too, so a bar never reads as a dark hole in the thing it sits in. */
:root[data-theme="vapor"] :is(.page-head, .card, .sbk-piece, .lib-reading, .note-box, .write-side) { --skel: #30254F; --skel-shine: #4A3A7C; }
/* Home's loading blocks cannot know which block comes where (Needs you, where you left off, the numbers), so their
   heading bars are a quiet violet rather than any place's colour. */
:root[data-theme="vapor"][data-place="home"] [role="status"] .section:not([data-section]) { --note: #5A4C8A; }
/* The scrapbook's loading toolbar is a filled strip like the real one. (Every loading head is skeletonHead() now, drawn
   by section 4 and 4b like a real head, so no loading shape needs a band of its own.) */
:root[data-theme="vapor"] [role="status"] .sbk-skel-tools { padding: 12px 14px; border-bottom: 0; border-radius: 14px; background: #15121F; }
/* Needs you: the line that counts what waits is a filled strip with an orange edge (section 17), so its loading bar
   takes that strip's shape. The width is set on the bar itself, so only !important reaches it. */
:root[data-theme="vapor"] [role="status"] > .page.review > .skel.line { width: 100% !important; height: 44px; border-left: 4px solid var(--place); border-radius: 12px; }
/* Projects: the cards load as plain filled blocks; a project's pages load inside their pane. */
:root[data-theme="vapor"] .proj-grid .skel.proj-skel-card { border-radius: 16px; }
:root[data-theme="vapor"] .proj-skel-rows { padding: 22px 24px 24px; border-radius: 16px; background: #15121F; }
/* Step labels: plain and readable, not the wide display face. */
:root[data-theme="vapor"] .proj-step-n { font-family: var(--font-ui); font-weight: 700; letter-spacing: .08em; }
:root[data-theme="vapor"] .proj-step-art { background: #1B1430; background: color-mix(in srgb, var(--place) 16%, #241A3A); }
/* Option cards: filled, not outlined; the chosen one has a pale ring. */
:root[data-theme="vapor"] .choice { background: #2E2250; border-color: transparent; }
:root[data-theme="vapor"] .choice:hover { background: #3A2D63; border-color: transparent; }
:root[data-theme="vapor"] .choice:has(input:checked) { background: #3A2D63; border-color: #ECE6FF; box-shadow: inset 0 0 0 1px #ECE6FF; }
/* Silas's messages are rounded blocks with room inside. */
:root[data-theme="vapor"] .silas-turn.silas .silas-bubble { padding: 12px 16px; border-radius: 4px 14px 14px 14px; }
/* The question box at the foot of Silas's sheet stays in his green, not the purple of other dialogs. */
:root[data-theme="vapor"] .silas-sheet :is(.dialog-foot, .silas-form) { background: #081A10; }
/* Three things that floated on the bare page now have a block of their own.
   A hub's opening is one pane: what it is, its other names, and its counts as tiles. */
:root[data-theme="vapor"] .hub-intro { padding: 22px 24px 24px; border-radius: 16px; background: #15121F; }
:root[data-theme="vapor"] .hub-intro .synopsis { background: #241A3A; }
:root[data-theme="vapor"] .hub-intro .stats { gap: 12px; }
:root[data-theme="vapor"] .hub-intro .stats > .stat { min-width: 128px; padding: 14px 18px; border-radius: 12px; background: #241A3A; }
/* Find: the Books, People and Themes chips are one pane beside (or above) the notes. */
:root[data-theme="vapor"] .find-side { padding: 18px; border-radius: 16px; background: #15121F; }
/* Above the notes (tablet and phone) the pane is two tight rows, People then Themes, not two rows far apart. */
@media (max-width: 1023px) {
  :root[data-theme="vapor"] .find-side { gap: 6px; padding: 10px 12px; }
}
/* Needs you: the line that counts what waits is a filled strip with the place colour on its edge. */
:root[data-theme="vapor"] .review-count { padding: 12px 24px; border-radius: 12px; border-left: 4px solid var(--place); background: #15121F; color: var(--ink); }
/* Writing page: the page you write on is its own sheet (wider screens; phones keep the full width). */
@media (min-width: 720px) {
  :root[data-theme="vapor"] .write-text { margin-top: 12px; padding: 28px 32px 64px; border-radius: 16px; background: #15121F; }
  :root[data-theme="vapor"] .write-text:focus-visible { border-radius: 16px; box-shadow: inset 0 2px 0 var(--place); }
  :root[data-theme="vapor"] .write-text[data-empty]::before { left: 32px; top: 28px; }
}

/* ───────── 18. Phones ───────── */
@media (max-width: 719px) {
  /* Titles keep the display weight on a phone: the very wide 800 is the look's signature, so it is the size that steps
     down, not the weight. */
  :root[data-theme="vapor"] .page-head h1 { font-weight: 800; font-size: calc(clamp(1.35rem, 5.9vw, 1.8rem) * var(--v-title, 1)); line-height: 1.12; letter-spacing: -.03em; }
  :root[data-theme="vapor"] .page-head h1[data-long="1"] { --v-title: .92; }
  :root[data-theme="vapor"] .page-head h1[data-long="2"] { --v-title: .82; }
  :root[data-theme="vapor"] .page-head h1[data-long="3"] { --v-title: .72; line-height: 1.2; }
  :root[data-theme="vapor"] .review-tools { padding: 16px 12px; border-radius: 14px; }
  :root[data-theme="vapor"] .review-group { --v-gutter: 12px; padding: 16px var(--v-gutter); border-radius: 14px; }
  :root[data-theme="vapor"] .page { padding-inline: 12px; }
  /* The phone's first screen: the head and each pane keep their fill and corners but give back their padding, so the
     first note, result, book or piece starts in the top half of the screen. */
  :root[data-theme="vapor"] .page-head { padding: 16px; border-radius: 14px; }
  /* The slim strip on a phone: its upright bar keeps to the left edge, the words start just past it. */
  :root[data-theme="vapor"]: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: 12px 14px 14px 32px; border-radius: 14px; }
  :root[data-theme="vapor"]: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: calc(clamp(1.35rem, 5.9vw, 1.75rem) * var(--v-title, 1)); line-height: 1.1; }
  :root[data-theme="vapor"]: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 { left: 14px; top: 14px; bottom: 14px; }
  :root[data-theme="vapor"]: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: var(--lh-snug); }
  :root[data-theme="vapor"] .section { padding: 14px 12px; border-radius: 14px; }
  :root[data-theme="vapor"] .hub-intro { padding: 16px 12px; border-radius: 14px; }
  :root[data-theme="vapor"] .hub-intro .stats > .stat { flex: 1 1 0; min-width: 0; padding: 12px; }
  :root[data-theme="vapor"] .find-side { padding: 10px 12px; border-radius: 14px; }
  :root[data-theme="vapor"] .review-count { padding: 12px; }
  :root[data-theme="vapor"] .gate-form > .inner { padding: 22px 16px; }
  :root[data-theme="vapor"] .write-side { padding: 14px 12px; }
  /* The writing toolbar is a block inside the page gutter, not a strip running off the edges. */
  :root[data-theme="vapor"] .write-bar { margin-inline: 0; padding-inline: 6px; }
  /* "Up next" on a phone: each waiting book's name sits beside its Pause, and a line about it, when it has one, runs
     under the name across the row, so four waiting books stay short rows. Layout only: nothing is moved in the page. */
  :root[data-theme="vapor"] .lib-queued { grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-areas: "cov title act" "cov text text"; row-gap: 4px; column-gap: 12px; padding: 10px 12px; }
  :root[data-theme="vapor"] .lib-queued > .lib-queued-cover { grid-area: cov; align-self: center; }
  :root[data-theme="vapor"] .lib-queued > .lib-queued-main { display: contents; }
  :root[data-theme="vapor"] .lib-queued-title { grid-area: title; align-self: center; }
  :root[data-theme="vapor"] .lib-queued-text { grid-area: text; }
  :root[data-theme="vapor"] .lib-queued > .lib-queued-acts { grid-area: act; align-self: center; }
}

/* ───────── 19. The ruler: neon ticks; the part you are reading is lit in the colour of the place ─────────
   Two things stand out and never look alike: the title under the pointer is white and big; the title of the part
   being read is the place colour, with a glow and a soft beam behind it. Only the hooks css/ruler.css offers. */
:root[data-theme="vapor"] .ruler {
  --ruler-here: var(--place);
  /* Titles at rest are a little larger than the default: easier to read, and on a book with twenty chapters each
     one keeps to a single line with air around it instead of two packed lines. */
  --ruler-size: 13.5px;
  --ruler-ink: #C9C3DD;
  --ruler-ink-near: #FFFFFF;
  --ruler-ink-here: color-mix(in srgb, var(--place) 80%, #FFFFFF);
  --ruler-tick: #8E7FC4;
  --ruler-tick-near: #FFFFFF;
  --ruler-tick-h-here: 4px;
  --ruler-glow: 0 0 4px var(--place), 0 0 14px var(--place), 0 0 30px color-mix(in srgb, var(--place) 55%, transparent);
  --ruler-scale: #5A4C8A;
  --ruler-fill-slim: #1A1230;
  --ruler-panel-fill: #241A3A;
  --ruler-panel-shadow: 0 24px 72px rgba(0, 0, 0, .7);
  /* The slim strip's contents mark: the pale ink of a title at rest, so the closed strip reads as contents. */
  --ruler-cue: #C9C3DD;
}
:root[data-theme="vapor"] .ruler-mark[aria-current] {
  background: linear-gradient(270deg, color-mix(in srgb, var(--place) 26%, transparent), color-mix(in srgb, var(--place) 9%, transparent) 55%, transparent);
}
/* A glow on the title itself. It is a filter, not a text shadow, because the title's own box cuts a shadow off. */
:root[data-theme="vapor"] .ruler-mark[aria-current] .ruler-title { filter: drop-shadow(0 0 7px color-mix(in srgb, var(--place) 60%, transparent)); }
