/* Theme styles for schnews.

   A theme is a *style* (shape: borders, bevels, button treatment) plus a
   *palette* (colour). Each style ships a light and a dark palette; Classic has
   many. The root element carries three attributes:

     data-style   which style      (classic, mac, win95, ...)
     data-theme   which palette    (light, nord, mac-dark, ...)
     data-mode    light | dark     (what the palette resolved to)

   Classic's palettes live in themes.css. Everything else is here, one section
   per style. Styles only set design tokens; app.css reads them, so a new style
   usually needs no selectors beyond a little flair at the end of its section.

   The theme picker draws each theme as a thumbnail whose elements carry their
   own data-style and data-theme, so tokens must never be inherited from the
   page. The block below therefore sets every token on any [data-style] element
   and each style overrides what it needs. Palette-only helpers (--hi, --lo,
   --bar-a, ...) are only ever read by the style that owns the palette. */

/* ── Token defaults (= Classic) ───────────────────────── */
:root, [data-style] {
  --radius: 10px;
  --r-ctl: var(--radius);      /* inputs, buttons, sidebar rows */
  --r-btn: 6px;                /* .btn, list rows, option buttons */
  --r-tab: 8px;
  --r-icon: var(--radius);     /* square icon buttons */
  --r-pill: 999px;             /* counters, search, floating pills */
  --r-round: 50%;              /* avatars, back-to-top */

  --bw: 1px;                   /* control and card borders */
  --bwp: 1px;                  /* window and popover borders */
  --bsp: solid;
  --raised-bc: var(--border);  /* border colour(s) of a raised control */
  --raised-sh: none;
  --sunken-bc: var(--border);  /* ...of inputs and pressed controls */
  --sunken-sh: none;
  --panel-bc: var(--border);
  --panel-sh: 0 18px 50px rgba(0, 0, 0, 0.35);
  --pop-sh: 0 12px 30px rgba(0, 0, 0, 0.25);
  --float-sh: 0 2px 10px rgba(0, 0, 0, 0.28);
  --tn-sh: none;

  --hover-bc: var(--primary);
  --hover-fg: var(--primary);
  --tab-accent: var(--primary);
  --btn-case: none;
  --btn-track: normal;
  --scrim: rgba(0, 0, 0, 0.45);

  /* unset on purpose: controls keep their own face and bars keep the surface */
  --btn-bg: initial;
  --btn-bg-hover: initial;
  --bar-bg: initial;
  --bar-fg: initial;
  --bar-accent: initial;
  --top-bg: initial;
  --top-fg: initial;
  --sb: initial;
}

/* ── Behaviour shared by every non-Classic style ──────── */
html[data-style]:not([data-style="classic"]) { --sb: var(--muted) var(--surface); }
html[data-style]:not([data-style="classic"]) :is(.btn:not(.ghost), .icon-btn, .mini, .theme-btn, .loadmore):active:not(:disabled) {
  border-color: var(--sunken-bc);
  box-shadow: var(--sunken-sh);
}
html[data-style]:not([data-style="classic"]) .modal-head .icon-btn { margin-left: auto; }


/* ═══ Modern (default) ════════════════════════════════════
   Clean and flat, in the manner of a webmail inbox: square buttons with quiet
   hover tints, hairline-separated rows that lift when you point at them, a
   filled search pill, pill-ended navigation, light-blue selection. Primary is
   the filled-button colour; --sel is the (lighter) selected-row colour. */
[data-theme="modern-light"] {
  --bg: #ffffff; --surface: #f6f8fc; --border: #dadce0;
  --text: #1f1f1f; --muted: #5f6368;
  --primary: #0b57d0; --primary-bg: #0b57d0; --primary-dark: #0842a0; --on-primary: #ffffff;
  --secondary: #f4b400;
  --danger: #d93025; --input-bg: #ffffff; --bg-hover: #edf2fa;
  --line: #eceef1; --read-bg: #f6f8fc; --sel: #d3e3fd; --search-bg: #eaf1fb;
}
[data-theme="modern-dark"] {
  --bg: #1f1f1f; --surface: #161616; --border: #3c4043;
  --text: #e3e3e3; --muted: #9aa0a6;
  --primary: #a8c7fa; --primary-bg: #a8c7fa; --primary-dark: #7cacf8; --on-primary: #062e6f;
  --secondary: #fbbc04;
  --danger: #f28b82; --input-bg: #1f1f1f; --bg-hover: #2b2c2f;
  --line: #2c2d2f; --read-bg: #1a1a1a; --sel: #0f3a6b; --search-bg: #2d2e31;
}
[data-style="modern"] {
  --radius: 12px; --r-ctl: 4px; --r-btn: 4px; --r-tab: 4px; --r-icon: 4px; --r-pill: 999px;
  --panel-bc: transparent;
  --panel-sh: 0 8px 30px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.12);
  --pop-sh: 0 2px 6px 2px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
  --float-sh: 0 2px 6px 2px rgba(60, 64, 67, 0.15), 0 1px 3px rgba(60, 64, 67, 0.3);
  --tn-sh: 0 1px 3px rgba(60, 64, 67, 0.3);
  --hover-bc: var(--border); --hover-fg: var(--text);
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --tab-accent: transparent;
}
[data-style="modern"] .topbar { border-bottom-color: transparent; padding: 8px 16px; }
[data-style="modern"] .topbar-search input {
  padding: 10px 18px; background: var(--search-bg); border-color: transparent;
}
[data-style="modern"] .topbar-search input:focus {
  background: var(--input-bg); border-color: transparent; box-shadow: var(--pop-sh);
}
[data-style="modern"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
[data-style="modern"] :is(.icon-btn, .mini, .theme-btn),
[data-style="modern"] :is(.icon-btn, .mini, .theme-btn):hover { border-color: transparent; }
[data-style="modern"] .btn { font-weight: 500; }
[data-style="modern"] .btn.solid:hover {
  background: var(--primary-dark); border-color: var(--primary-dark); filter: none;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}
[data-style="modern"] .theme-popover { background: var(--bg); }

/* navigation: roomy rows, selected one ends in a pill */
[data-style="modern"] .sidebar { padding: 8px 0 16px; }
[data-style="modern"] .side-heading { padding-left: 16px; }
[data-style="modern"] .node {
  padding: 6px 12px 6px 16px; margin-right: 8px; min-height: 32px;
  border-radius: 0 16px 16px 0;
}
[data-style="modern"] .node.active { background: var(--sel); color: var(--text); font-weight: 600; }
[data-style="modern"] .node .count { background: transparent; padding: 0; font-weight: 600; }
[data-style="modern"] .node.active .count { color: var(--text); }
[data-style="modern"] .kids { border-left-color: transparent; margin-left: 8px; }

/* story rows: hairlines, bold unread, quiet read, lift on hover */
[data-style="modern"] .list-header { padding: 10px 16px; border-bottom-color: var(--line); }
[data-style="modern"] .list-header h2 { font-weight: 500; }
[data-style="modern"] .article {
  position: relative; gap: 12px; padding: 11px 16px;
  border-bottom-color: var(--line);
}
[data-style="modern"] .article.read { background: var(--read-bg); }
[data-style="modern"] .article:hover,
[data-style="modern"] .article.read:hover {
  z-index: 1;
  box-shadow: inset 1px 0 0 var(--border), inset -1px 0 0 var(--border),
    0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}
[data-style="modern"] .article:hover { background: var(--bg); }
[data-style="modern"] .article.read:hover { background: var(--read-bg); }
[data-style="modern"] .article.read .a-title { color: var(--text); }
[data-style="modern"] .article.active,
[data-style="modern"] .article.active:hover { background: var(--sel); }
[data-style="modern"] .article.active,
[data-style="modern"] .article.active .a-title,
[data-style="modern"] .article.active .a-snippet,
[data-style="modern"] .article.active .a-source,
[data-style="modern"] .article.active .a-time,
[data-style="modern"] .article.active .count { color: var(--text); }
[data-style="modern"] .article.active .a-snippet,
[data-style="modern"] .article.active .a-source,
[data-style="modern"] .article.active .a-time { color: var(--muted); }
[data-style="modern"] .article.active .a-star { color: var(--secondary); }
[data-style="modern"] .reader { padding: 24px 32px; }

/* dialogs */
[data-style="modern"] .modal-head { border-bottom: none; padding: 16px 20px 6px; }
[data-style="modern"] .modal-head h2 { font-size: 1.25rem; font-weight: 400; }
[data-style="modern"] .tabs { background: var(--surface); padding: 4px 20px 0; gap: 0; }
[data-style="modern"] .tab { background: transparent; border-color: transparent; border-radius: 0; padding: 10px 18px; }
[data-style="modern"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="modern"] .tab.active,
[data-style="modern"] .tab.active:hover {
  background: transparent; color: var(--primary); box-shadow: none;
  border-color: transparent; border-bottom: 3px solid var(--primary);
}
[data-style="modern"] .tab-intro { background: var(--bg); border-left-color: var(--primary); }


/* ═══ Folio ══════════════════════════════════════════════
   Modern and calm, built for long reading: a warm off-white (or soft charcoal)
   instead of stark white/black, text well above AA contrast, a muted colour
   that stays legible, roomy rows and a reading column with generous leading.
   Selection is a quiet tint with an accent edge. */
[data-theme="folio-light"] {
  --bg: #fbfaf7; --surface: #f3f1ec; --border: #ddd9d0;
  --text: #25272a; --muted: #5b6066;
  --primary: #2a5d8a; --primary-bg: #2a5d8a; --primary-dark: #1f4a70; --on-primary: #ffffff;
  --secondary: #b06f10;
  --danger: #b3372c; --input-bg: #ffffff; --bg-hover: #efece5;
  --line: #ebe8e1; --sel: #e3ebf2; --search-bg: #eeebe4;
}
[data-theme="folio-dark"] {
  --bg: #1f2226; --surface: #191b1e; --border: #363a40;
  --text: #dcdfe3; --muted: #a0a6ad;
  --primary: #8fb8de; --primary-bg: #8fb8de; --primary-dark: #74a5d1; --on-primary: #10263a;
  --secondary: #e0b45a;
  --danger: #f08a80; --input-bg: #262a2f; --bg-hover: #2a2e34;
  --line: #2d3136; --sel: #2b3d4f; --search-bg: #2a2e34;
}
[data-style="folio"] {
  --radius: 12px; --r-ctl: 8px; --r-btn: 8px; --r-tab: 8px; --r-icon: 8px;
  --panel-sh: 0 12px 40px rgba(0, 0, 0, 0.22), 0 1px 3px rgba(0, 0, 0, 0.1);
  --pop-sh: 0 6px 20px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.1);
  --float-sh: 0 2px 8px rgba(0, 0, 0, 0.2);
  --tn-sh: 0 1px 2px rgba(0, 0, 0, 0.25);
  --hover-bc: var(--border); --hover-fg: var(--text);
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--primary);
}
[data-style="folio"] .topbar { border-bottom-color: var(--line); padding: 8px 16px; }
[data-style="folio"] .topbar-search input { padding: 8px 16px; background: var(--search-bg); border-color: transparent; }
[data-style="folio"] .topbar-search input:focus { background: var(--input-bg); border-color: var(--primary); }
[data-style="folio"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); outline: none; }
[data-style="folio"] :is(.icon-btn, .mini, .theme-btn),
[data-style="folio"] :is(.icon-btn, .mini, .theme-btn):hover { border-color: transparent; }
[data-style="folio"] .btn { font-weight: 500; }
[data-style="folio"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); filter: none; }
[data-style="folio"] .theme-popover { background: var(--bg); }
[data-style="folio"] .col-resizer { background: linear-gradient(to right, transparent 3px, var(--line) 3px, var(--line) 4px, transparent 4px); }
[data-style="folio"] .col-resizer:hover,
[data-style="folio"] .col-resizer.dragging { background: linear-gradient(to right, transparent 2px, var(--primary-bg) 2px, var(--primary-bg) 5px, transparent 5px); }

/* navigation */
[data-style="folio"] .sidebar { padding: 12px 8px 20px; }
[data-style="folio"] .node { padding: 7px 12px; min-height: 38px; }
[data-style="folio"] .node.active { background: var(--sel); color: var(--text); font-weight: 600; }
[data-style="folio"] .node .count { background: transparent; padding: 0; }
[data-style="folio"] .node.active .count { color: var(--text); }
[data-style="folio"] .kids { border-left-color: var(--line); margin-left: 14px; }

/* story rows: space to breathe, clear unread/read, tinted selection */
[data-style="folio"] .list-header { padding: 14px 20px; border-bottom-color: var(--line); }
[data-style="folio"] .list-header h2 { font-weight: 600; }
[data-style="folio"] .article { gap: 14px; padding: 17px 20px; border-bottom-color: var(--line); }
[data-style="folio"] .a-title { line-height: 1.4; margin-bottom: 6px; }
[data-style="folio"] .a-snippet { line-height: 1.6; }
[data-style="folio"] .a-meta { margin-top: 8px; }
[data-style="folio"] .article.active,
[data-style="folio"] .article.active:hover { background: var(--sel); box-shadow: inset 3px 0 0 var(--primary); }
[data-style="folio"] .article.active,
[data-style="folio"] .article.active .a-title,
[data-style="folio"] .article.active .count { color: var(--text); }
[data-style="folio"] .article.active .a-snippet,
[data-style="folio"] .article.active .a-source,
[data-style="folio"] .article.active .a-time { color: var(--muted); }
[data-style="folio"] .article.active .a-star { color: var(--secondary); }
[data-style="folio"] .tl-card { padding: 18px 14px 18px 20px; }
[data-style="folio"] :is(.tl-content, .tl-summary) { line-height: 1.65; }

/* the reading column */
[data-style="folio"] .reader { padding: 36px clamp(24px, 6vw, 72px) 64px; }
[data-style="folio"] .reader h1 { font-size: 1.8rem; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: 10px; }
[data-style="folio"] .r-head { border-bottom-color: var(--line); padding-bottom: 20px; margin-bottom: 30px; }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) { font-size: 1.06rem; line-height: 1.75; max-width: 64ch; }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.3em; }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) { line-height: 1.3; margin: 1.8em 0 0.6em; }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) :is(ul, ol) { padding-left: 1.4em; }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) li { margin-bottom: 0.5em; }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) img { border-radius: var(--r-ctl); }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 3px solid var(--primary); padding-left: 18px; margin-bottom: 1.3em; }
[data-style="folio"] .reader :is(.r-content, .r-thread-body) pre { padding: 14px 16px; line-height: 1.5; }
[data-style="folio"] .reader a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--primary) 55%, transparent); }
[data-style="folio"] .reader a:hover { text-decoration-color: currentColor; }
[data-style="folio"] .r-thread { max-width: 64ch; }

/* dialogs */
[data-style="folio"] .modal-head { padding: 18px 22px 10px; border-bottom-color: var(--line); }
[data-style="folio"] .modal-head h2 { font-size: 1.25rem; font-weight: 600; }
[data-style="folio"] .tabs { background: var(--surface); padding: 4px 22px 0; gap: 0; }
[data-style="folio"] .tab { background: transparent; border-color: transparent; border-radius: 0; padding: 10px 18px; }
[data-style="folio"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="folio"] .tab.active,
[data-style="folio"] .tab.active:hover {
  background: transparent; color: var(--primary); box-shadow: none;
  border-color: transparent; border-bottom: 3px solid var(--primary);
}
[data-style="folio"] .tab-intro { background: var(--bg); border-left-color: var(--primary); }


/* ═══ Classic Mac — System 7 ══════════════════════════════
   Black on white, 1px outlines, hard 2px window shadows, striped title bars,
   and a pressed button that flips to inverse video. Dark is inverse video. */
[data-theme="mac-light"] {
  --bg: #ffffff; --surface: #e3e3e3; --border: #000000;
  --text: #000000; --muted: #555555;
  --primary: #0000b8; --primary-bg: #000000; --primary-dark: #000000; --on-primary: #ffffff;
  --secondary: #b86e00;
  --danger: #cc0000; --input-bg: #ffffff; --bg-hover: #eeeeee;
}
[data-theme="mac-dark"] {
  --bg: #000000; --surface: #1c1c1c; --border: #d0d0d0;
  --text: #f4f4f4; --muted: #9e9e9e;
  --primary: #8fb0ff; --primary-bg: #f4f4f4; --primary-dark: #ffffff; --on-primary: #000000;
  --secondary: #ffc24d;
  --danger: #ff6b6b; --input-bg: #000000; --bg-hover: #262626;
}
[data-style="mac"] {
  --radius: 0px; --r-ctl: 3px; --r-btn: 8px; --r-tab: 6px; --r-icon: 3px; --r-pill: 4px; --r-round: 0px;
  --raised-sh: 1px 1px 0 var(--border);
  --sunken-sh: inset 1px 1px 0 rgba(0, 0, 0, 0.3);
  --panel-sh: 2px 2px 0 var(--border);
  --pop-sh: 2px 2px 0 var(--border);
  --float-sh: 2px 2px 0 var(--border);
  --tn-sh: 1px 1px 0 var(--border);
  --hover-bc: var(--border); --hover-fg: var(--text);
  --btn-bg: var(--input-bg); --btn-bg-hover: var(--input-bg);
  --tab-accent: transparent;
  --bar-bg: repeating-linear-gradient(to bottom, var(--border) 0 1px, var(--surface) 1px 3px);
  --bar-fg: var(--text);
}
/* The title is centred on the whole bar (out of flow) and the close box sits
   alone at the left, each with a gap cut out of the stripes around it. */
[data-style="mac"] .modal-head { position: relative; padding: 4px 10px; min-height: 2rem; justify-content: flex-start; }
[data-style="mac"] .modal-head h2 {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  flex: none; margin: 0; padding: 0 10px; max-width: calc(100% - 5rem);
  background: var(--surface); line-height: 1.25; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-style="mac"] .modal-head .spacer { display: none; }
html[data-style="mac"][data-theme] .modal-head .icon-btn {
  margin: 0; width: 1.1rem; height: 1.1rem; flex-basis: 1.1rem; font-size: .8rem;
  background: var(--surface); box-shadow: 0 0 0 3px var(--surface);
}
html[data-style="mac"] :is(.btn:not(.ghost), .icon-btn, .mini, .theme-btn, .loadmore):active:not(:disabled) {
  background: var(--text); color: var(--bg);
}

/* The Eyes desk accessory (eyes.js adds it while the System 7 super theme is on):
   a little striped-title window in the corner, its pupils tracking the pointer.
   Needs a mouse, so it stays away from touch screens and the narrow layout. */
.mac-eyes { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .mac-eyes {
    display: block; position: fixed; right: 24px; bottom: 20px; z-index: 35; width: 88px;
    background: var(--bg); border: 1px solid var(--border); box-shadow: var(--panel-sh);
  }
}
.mac-eyes-bar {
  position: relative; display: flex; align-items: center; height: 17px; padding-left: 4px;
  border-bottom: 1px solid var(--border); background: var(--bar-bg);
}
.mac-eyes-title {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 0 6px; background: var(--surface); color: var(--text);
  font-size: 11px; line-height: 1.2; user-select: none;
}
html[data-style="mac"] .mac-eyes-close {
  width: 11px; height: 11px; min-width: 0; padding: 0; border-radius: 0;
  border: 1px solid var(--border); background: var(--surface); box-shadow: 0 0 0 2px var(--surface);
}
html[data-style="mac"] .mac-eyes-close:active { background: var(--text); }
.mac-eyes-field { display: flex; justify-content: center; gap: 6px; padding: 8px 0 9px; user-select: none; }
.mac-eye {
  position: relative; width: 28px; height: 36px; border-radius: 50%;
  border: 2px solid var(--text); background: var(--bg);
}
.mac-pupil {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: var(--text);
}


/* ═══ Mac OS 9 ════════════════════════════════════════════
   Platinum: grey bevelled chrome, pinstriped title bars with a close box on the
   left and zoom/collapse boxes on the right, lavender selection, and splashes
   of colour (the rainbow rule under the top bar, coloured default buttons).
   Dark is a blue-grey slate take on the same bevels. */
[data-theme="os9-light"] {
  --bg: #ffffff; --surface: #dddddd; --border: #8a8a8a;
  --text: #000000; --muted: #4f4f4f;
  --primary: #2b3a8f; --primary-bg: #9aa5dc; --primary-dark: #7f8bc9; --on-primary: #000000;
  --secondary: #e0731a;
  --danger: #c4261d; --input-bg: #ffffff; --bg-hover: #ecebf5;
  --hi: #ffffff; --lo: #9b9b9b; --lo2: #4a4a4a; --bar-s: #c3c3cb; --tab-c: #6f7fd0;
}
[data-theme="os9-dark"] {
  --bg: #23252d; --surface: #43454f; --border: #14151a;
  --text: #ececf2; --muted: #b0b2be;
  --primary: #b4bdf5; --primary-bg: #5a66b3; --primary-dark: #4a5596; --on-primary: #ffffff;
  --secondary: #ffb347;
  --danger: #ff7468; --input-bg: #1a1c22; --bg-hover: #30323b;
  --hi: #6a6c78; --lo: #2a2b33; --lo2: #0c0d10; --bar-s: #383a43; --tab-c: #8a97ee;
}
[data-style="os9"] {
  --radius: 5px; --r-ctl: 3px; --r-btn: 6px; --r-tab: 5px; --r-icon: 3px; --r-pill: 6px;
  --raised-bc: var(--lo2);
  --raised-sh: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
  --sunken-bc: var(--lo) var(--hi) var(--hi) var(--lo);
  --sunken-sh: inset 1px 1px 0 rgba(0, 0, 0, 0.25);
  --panel-bc: var(--lo2);
  --panel-sh: 2px 5px 14px rgba(0, 0, 0, 0.4);
  --pop-sh: 2px 4px 10px rgba(0, 0, 0, 0.35);
  --float-sh: 1px 3px 7px rgba(0, 0, 0, 0.35);
  --tn-sh: 1px 2px 4px rgba(0, 0, 0, 0.3);
  --hover-bc: var(--lo2); --hover-fg: var(--text);
  --btn-bg: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 45%, white), var(--surface) 55%, color-mix(in srgb, var(--surface) 88%, black));
  --btn-bg-hover: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 35%, white), color-mix(in srgb, var(--surface) 82%, white));
  --tab-accent: var(--tab-c);
  --top-bg: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 55%, white), var(--surface));
  --bar-bg: repeating-linear-gradient(to bottom, var(--hi) 0 1px, var(--bar-s) 1px 2px);
  --bar-fg: var(--text);
}
[data-style="os9"] .topbar {
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #61bb46, #fdb827, #f5821f, #e03a3e, #963d97, #009ddc) 1;
}
[data-style="os9"] .btn.solid {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 60%, white), var(--primary-bg) 55%, color-mix(in srgb, var(--primary-bg) 85%, black));
  border-color: var(--lo2);
}
[data-style="os9"] .btn.solid:hover { background-color: var(--primary-bg); }
[data-style="os9"] .node.active { box-shadow: inset 0 0 0 1px var(--primary-dark); }
[data-style="os9"] .modal-head { position: relative; padding: 4px 8px; min-height: 2rem; gap: 6px; justify-content: flex-start; border-bottom-color: var(--lo2); }
[data-style="os9"] .modal-head h2 {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  flex: none; margin: 0; padding: 0 12px; max-width: calc(100% - 6.5rem);
  background: var(--surface); border-radius: 3px; line-height: 1.25; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-style="os9"] .modal-head .spacer { display: none; }
html[data-style="os9"][data-theme] .modal-head .icon-btn {
  margin: 0; width: 1.05rem; height: 1.05rem; flex-basis: 1.05rem; font-size: .8rem;
  border-radius: 2px;
}
[data-style="os9"] .modal-head::after {
  content: ""; flex: 0 0 auto; width: 13px; height: 13px; margin-left: auto; margin-right: 20px;
  box-sizing: border-box; border: 1px solid var(--lo2); border-radius: 2px; background: var(--btn-bg);
  box-shadow: inset 1px 1px 0 var(--hi), 19px 0 0 0 var(--surface), 19px 0 0 1px var(--lo2);
}


/* ═══ Windows 95 ══════════════════════════════════════════
   Two-tone bevels on a grey face, navy selection, a navy title bar, and a
   teal desktop behind dialogs. Dark is a charcoal take on the same bevels. */
[data-theme="win95-light"] {
  --bg: #ffffff; --surface: #c0c0c0; --border: #808080;
  --text: #000000; --muted: #404040;
  --primary: #000080; --primary-bg: #000080; --primary-dark: #00005a; --on-primary: #ffffff;
  --secondary: #a06000;
  --danger: #b00000; --input-bg: #ffffff; --bg-hover: #e4e4e4;
  --hi: #ffffff; --hi2: #dfdfdf; --lo: #808080; --lo2: #000000;
  --bar-a: #000080; --bar-b: #1084d0; --bar-t: #ffffff;
  --scrim: rgba(0, 128, 128, 0.55);
}
[data-theme="win95-dark"] {
  --bg: #1b1b1b; --surface: #3c3c3c; --border: #6a6a6a;
  --text: #ececec; --muted: #b4b4b4;
  --primary: #86aaff; --primary-bg: #1c3a9e; --primary-dark: #142a74; --on-primary: #ffffff;
  --secondary: #e0b030;
  --danger: #ff6b6b; --input-bg: #101010; --bg-hover: #2c2c2c;
  --hi: #7a7a7a; --hi2: #565656; --lo: #222222; --lo2: #000000;
  --bar-a: #0a246a; --bar-b: #3a6ea5; --bar-t: #ffffff;
  --scrim: rgba(0, 60, 60, 0.6);
}
[data-style="win95"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bwp: 2px;
  --raised-bc: var(--hi) var(--lo2) var(--lo2) var(--hi);
  --raised-sh: inset -1px -1px 0 var(--lo), inset 1px 1px 0 var(--hi2);
  --sunken-bc: var(--lo) var(--hi) var(--hi) var(--lo);
  --sunken-sh: inset -1px -1px 0 var(--hi2), inset 1px 1px 0 var(--lo2);
  --panel-bc: var(--hi) var(--lo) var(--lo) var(--hi);
  --panel-sh: 0 0 0 1px var(--lo2), 4px 4px 0 rgba(0, 0, 0, 0.35);
  --pop-sh: 0 0 0 1px var(--lo2), 3px 3px 0 rgba(0, 0, 0, 0.3);
  --float-sh: 0 0 0 1px var(--lo2), 3px 3px 0 rgba(0, 0, 0, 0.3);
  --tn-sh: 1px 1px 0 var(--lo2);
  --hover-bc: var(--raised-bc); --hover-fg: var(--text);
  --btn-bg: var(--surface); --btn-bg-hover: var(--surface);
  --tab-accent: transparent;
  --bar-bg: linear-gradient(90deg, var(--bar-a), var(--bar-b));
  --bar-fg: var(--bar-t);
}
[data-style="win95"] .modal-head { padding: 3px 4px 3px 8px; }
[data-style="win95"] .modal-head h2 { font-size: .95rem; }
[data-style="win95"] .modal-head .icon-btn { width: 1.2rem; height: 1.1rem; flex-basis: 1.2rem; font-size: .85rem; }
[data-style="win95"] .tab { border-bottom-color: var(--lo2); }
[data-style="win95"] .tab.active, [data-style="win95"] .tab.active:hover { border-bottom-color: var(--surface); }


/* ═══ BeOS ════════════════════════════════════════════════
   Soft grey bevels with a black hairline, small radii, and the yellow window
   tab, which shows up on dialogs and on the active tab. */
[data-theme="beos-light"] {
  --bg: #f6f6f6; --surface: #d8d8d8; --border: #9a9a9a;
  --text: #000000; --muted: #505050;
  --primary: #1c4f96; --primary-bg: #8fb4ea; --primary-dark: #6b97d6; --on-primary: #000000;
  --secondary: #d99a00;
  --danger: #b3261e; --input-bg: #ffffff; --bg-hover: #ebebeb;
  --hi: #ffffff; --lo: #8c8c8c; --lo2: #5a5a5a; --tab-y: #ffcb00;
}
[data-theme="beos-dark"] {
  --bg: #262626; --surface: #3a3a3a; --border: #161616;
  --text: #e8e8e8; --muted: #a8a8a8;
  --primary: #8fb8f5; --primary-bg: #3d6aa8; --primary-dark: #2f5588; --on-primary: #ffffff;
  --secondary: #ffcb00;
  --danger: #ff7468; --input-bg: #1c1c1c; --bg-hover: #303030;
  --hi: #5c5c5c; --lo: #222222; --lo2: #0d0d0d; --tab-y: #e0ae00;
}
[data-style="beos"] {
  --radius: 4px; --r-ctl: 3px; --r-btn: 3px; --r-tab: 5px; --r-icon: 3px; --r-pill: 8px;
  --raised-bc: var(--lo2);
  --raised-sh: inset 1px 1px 0 var(--hi), inset -1px -1px 0 var(--lo);
  --sunken-bc: var(--lo) var(--hi) var(--hi) var(--lo);
  --sunken-sh: inset 1px 1px 0 rgba(0, 0, 0, 0.22);
  --panel-bc: var(--lo2);
  --panel-sh: 0 8px 22px rgba(0, 0, 0, 0.35);
  --pop-sh: 0 6px 16px rgba(0, 0, 0, 0.3);
  --float-sh: 0 2px 6px rgba(0, 0, 0, 0.3);
  --tn-sh: 0 1px 2px rgba(0, 0, 0, 0.3);
  --hover-bc: var(--lo2); --hover-fg: var(--text);
  --btn-bg: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 65%, white), var(--surface));
  --btn-bg-hover: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 55%, white), color-mix(in srgb, var(--surface) 85%, white));
  --tab-accent: var(--tab-y);
  --bar-bg: var(--surface);
  --bar-fg: var(--tab-y);
}
[data-style="beos"] .modal-head { padding: 8px 10px 0; align-items: flex-end; }
[data-style="beos"] .modal-head h2 {
  flex: 0 0 auto; margin: 0; padding: 4px 18px 3px;
  background: var(--tab-y); color: #000;
  border: 1px solid var(--lo2); border-bottom: none; border-radius: 6px 6px 0 0;
  font-size: .95rem;
  position: relative; top: 1px;
}
[data-style="beos"] .modal-head .icon-btn { align-self: center; margin-bottom: 6px; }


/* ═══ Atari ST — GEM ══════════════════════════════════════
   Square, 2px black outlines, shadowed dialogs, dense hatched title bars and
   a green desktop behind them. Dark is the mono monitor in inverse. */
[data-theme="atari-light"] {
  --bg: #ffffff; --surface: #ececec; --border: #000000;
  --text: #000000; --muted: #505050;
  --primary: #007a3d; --primary-bg: #000000; --primary-dark: #000000; --on-primary: #ffffff;
  --secondary: #d40000;
  --danger: #d40000; --input-bg: #ffffff; --bg-hover: #e2f3e8;
  --scrim: rgba(0, 170, 85, 0.55);
}
[data-theme="atari-dark"] {
  --bg: #000000; --surface: #141414; --border: #ececec;
  --text: #ffffff; --muted: #a8a8a8;
  --primary: #44e08a; --primary-bg: #ffffff; --primary-dark: #ffffff; --on-primary: #000000;
  --secondary: #ff5a5a;
  --danger: #ff5a5a; --input-bg: #000000; --bg-hover: #0d2a1a;
  --scrim: rgba(0, 60, 30, 0.7);
}
[data-style="atari-st"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bw: 2px; --bwp: 2px;
  --raised-sh: 2px 2px 0 var(--border);
  --panel-sh: 5px 5px 0 var(--border);
  --pop-sh: 4px 4px 0 var(--border);
  --float-sh: 3px 3px 0 var(--border);
  --tn-sh: 2px 2px 0 var(--border);
  --hover-bc: var(--border); --hover-fg: var(--text);
  --btn-bg: var(--input-bg); --btn-bg-hover: var(--input-bg);
  --tab-accent: transparent;
  --bar-bg: repeating-linear-gradient(to bottom, var(--border) 0 1px, var(--bg) 1px 2px);
  --bar-fg: var(--text);
}
/* GEM: the close box sits flush at the left edge, the title is centred on the
   whole bar (out of flow), each with a gap cut out of the hatching around it. */
[data-style="atari-st"] .modal-head { position: relative; padding: 5px 8px; min-height: 2.1rem; justify-content: flex-start; }
[data-style="atari-st"] .modal-head h2 {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  flex: none; margin: 0; padding: 0 12px; max-width: calc(100% - 5rem);
  background: var(--bg); line-height: 1.25; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[data-style="atari-st"] .modal-head .spacer { display: none; }
html[data-style="atari-st"][data-theme] .modal-head .icon-btn,
html[data-style="atari-st"][data-theme] .modal-head .icon-btn:active:not(:disabled) {
  margin: 0; width: 1.2rem; height: 1.2rem; flex: 0 0 1.2rem; padding: 0; font-size: .8rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 3px var(--bg);
}
[data-style="atari-st"] .topbar { border-bottom-width: 2px; }
[data-style="atari-st"] .list-header { border-bottom-width: 2px; }
html[data-style="atari-st"] :is(.btn:not(.ghost), .icon-btn, .mini, .theme-btn, .loadmore):active:not(:disabled) {
  background: var(--text); color: var(--bg);
}


/* ═══ Amiga Workbench ═════════════════════════════════════
   Light is Workbench 3: grey, two-pixel white/black bevels, a blue title bar.
   Dark is Workbench 1.3: blue, white lines and orange highlights. */
[data-theme="amiga-light"] {
  --bg: #cfcfcf; --surface: #aaaaaa; --border: #000000;
  --text: #000000; --muted: #3c3c3c;
  --primary: #0055aa; --primary-bg: #0055aa; --primary-dark: #003d7a; --on-primary: #ffffff;
  --secondary: #e06c00;
  --danger: #cc2200; --input-bg: #e8e8e8; --bg-hover: #dddddd;
  --hi: #ffffff; --lo: #000000;
  --bar-a: #0055aa; --bar-t: #ffffff;
  --scrim: rgba(0, 40, 100, 0.55);
}
[data-theme="amiga-dark"] {
  --bg: #0055aa; --surface: #004488; --border: #ffffff;
  --text: #ffffff; --muted: #b8d4f4;
  --primary: #ff8800; --primary-bg: #ff8800; --primary-dark: #cc6e00; --on-primary: #000000;
  --secondary: #ffcc00;
  --danger: #ff6655; --input-bg: #002b5c; --bg-hover: #1066bb;
  --hi: #ffffff; --lo: #000000;
  --bar-a: #ffffff; --bar-t: #000000;
  --scrim: rgba(0, 20, 60, 0.65);
}
[data-style="amiga"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bw: 2px; --bwp: 2px;
  --raised-bc: var(--hi) var(--lo) var(--lo) var(--hi);
  --sunken-bc: var(--lo) var(--hi) var(--hi) var(--lo);
  --panel-bc: var(--hi) var(--lo) var(--lo) var(--hi);
  --panel-sh: 0 0 0 1px var(--lo), 4px 4px 0 rgba(0, 0, 0, 0.4);
  --pop-sh: 0 0 0 1px var(--lo), 3px 3px 0 rgba(0, 0, 0, 0.4);
  --float-sh: 2px 2px 0 var(--lo);
  --tn-sh: 1px 1px 0 var(--lo);
  --hover-bc: var(--raised-bc); --hover-fg: var(--text);
  --btn-bg: var(--surface); --btn-bg-hover: var(--surface);
  --tab-accent: transparent;
  --bar-bg: var(--bar-a);
  --bar-fg: var(--bar-t);
}
[data-style="amiga"] .modal-head { padding: 3px 6px; border-bottom: 2px solid var(--lo); }
[data-style="amiga"] .modal-head h2 { font-size: .95rem; }
[data-style="amiga"] .modal-head .icon-btn { width: 1.3rem; height: 1.2rem; flex-basis: 1.3rem; font-size: .85rem; }
[data-style="amiga"] .topbar { border-bottom-width: 2px; border-bottom-color: var(--lo); }


/* ═══ 1992 DOS ════════════════════════════════════════════
   Text-mode UI: blue screen, cyan menu bar, double-line dialog frames, hard
   black drop shadows and <Bracketed> buttons. Light is a grey dialog scheme. */
[data-theme="dos-dark"] {
  --bg: #0000aa; --surface: #00008c; --border: #00aaaa;
  --text: #ffffff; --muted: #aaaaaa;
  --primary: #55ffff; --primary-bg: #00aaaa; --primary-dark: #008888; --on-primary: #000000;
  --secondary: #ffff55;
  --danger: #ff5555; --input-bg: #000000; --bg-hover: #0000cc;
  --btn-face: #000000;
  --top-a: #00aaaa; --top-t: #000000;
  --scrim: rgba(0, 0, 40, 0.65);
}
[data-theme="dos-light"] {
  --bg: #ffffff; --surface: #aaaaaa; --border: #000000;
  --text: #000000; --muted: #444444;
  --primary: #0000aa; --primary-bg: #0000aa; --primary-dark: #000080; --on-primary: #ffffff;
  --secondary: #aa5500;
  --danger: #aa0000; --input-bg: #ffffff; --bg-hover: #d4d4d4;
  --btn-face: #aaaaaa;
  --top-a: #00aaaa; --top-t: #000000;
  --scrim: rgba(0, 0, 130, 0.5);
}
[data-style="dos"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bwp: 3px; --bsp: double;
  --raised-sh: 2px 2px 0 #000000;
  --panel-sh: 6px 6px 0 rgba(0, 0, 0, 0.6);
  --pop-sh: 4px 4px 0 #000000;
  --float-sh: 3px 3px 0 #000000;
  --tn-sh: 2px 2px 0 #000000;
  --btn-bg: var(--btn-face); --btn-bg-hover: var(--btn-face);
  --tab-accent: transparent;
  --top-bg: var(--top-a); --top-fg: var(--top-t);
  --bar-bg: var(--top-a); --bar-fg: var(--top-t);
}
[data-style="dos"] .modal-head h2 { text-align: center; font-size: .95rem; }
[data-style="dos"] .modal-head .icon-btn { width: 1.3rem; height: 1.3rem; flex-basis: 1.3rem; margin-left: 0; order: -1; }
[data-style="dos"] .btn::before { content: "<"; }
[data-style="dos"] .btn::after { content: ">"; }
[data-style="dos"] .btn:not(.ghost) { box-shadow: var(--raised-sh); }
[data-style="dos"] .topbar { border-bottom-color: #000000; }


/* ═══ Aqua ════════════════════════════════════════════════
   Early Mac OS X: candy pill buttons, brushed toolbar, pinstriped sidebar and
   dialogs, gel traffic-light window buttons. Dark is Graphite. */
[data-theme="aqua-light"] {
  --bg: #ffffff; --surface: #ececec; --border: #b4b4b4;
  --text: #1c1c1c; --muted: #6c6c6c;
  --primary: #1f66d1; --primary-bg: #3b82e6; --primary-dark: #2a68c0; --on-primary: #ffffff;
  --secondary: #f0a30a;
  --danger: #d93a2f; --input-bg: #ffffff; --bg-hover: #eef4fd;
  --btn-hi: #ffffff; --btn-lo: #dcdcdc; --gloss: rgba(255, 255, 255, 0.9);
  --stripe: rgba(255, 255, 255, 0.6); --top-a: #f3f3f3; --top-b: #cfcfcf;
}
[data-theme="aqua-dark"] {
  --bg: #2a2a2d; --surface: #38383c; --border: #17171a;
  --text: #ececee; --muted: #a2a2a8;
  --primary: #6eaeff; --primary-bg: #3f78c8; --primary-dark: #2f60a6; --on-primary: #ffffff;
  --secondary: #ffb938;
  --danger: #ff6b60; --input-bg: #1e1e21; --bg-hover: #343439;
  --btn-hi: #5d5d63; --btn-lo: #3a3a3f; --gloss: rgba(255, 255, 255, 0.2);
  --stripe: rgba(255, 255, 255, 0.04); --top-a: #58585d; --top-b: #3a3a3e;
}
[data-style="aqua"] {
  --r-ctl: 6px; --r-btn: 8px; --r-tab: 10px; --r-icon: 999px;
  --raised-sh: inset 0 1px 0 var(--gloss), 0 1px 2px rgba(0, 0, 0, 0.25);
  --sunken-sh: inset 0 1px 3px rgba(0, 0, 0, 0.3);
  --panel-sh: 0 14px 36px rgba(0, 0, 0, 0.42), 0 0 0 0.5px rgba(0, 0, 0, 0.45);
  --pop-sh: 0 8px 24px rgba(0, 0, 0, 0.35);
  --float-sh: 0 3px 10px rgba(0, 0, 0, 0.35);
  --tn-sh: 0 1px 3px rgba(0, 0, 0, 0.3);
  /* candy: a bright upper half over a deeper lower half, split at the middle */
  --btn-bg: linear-gradient(to bottom, var(--btn-hi) 0%, color-mix(in srgb, var(--btn-hi) 55%, var(--btn-lo)) 49%, var(--btn-lo) 50%, color-mix(in srgb, var(--btn-lo) 65%, var(--btn-hi)) 100%);
  --btn-bg-hover: linear-gradient(to bottom, var(--btn-hi) 0%, color-mix(in srgb, var(--btn-hi) 55%, var(--primary-bg)) 49%, color-mix(in srgb, var(--btn-lo) 70%, var(--primary-bg)) 50%, color-mix(in srgb, var(--btn-lo) 50%, var(--btn-hi)) 100%);
  --tab-accent: transparent;
  --top-bg: linear-gradient(to bottom, var(--top-a), var(--top-b));
  --bar-bg: linear-gradient(to bottom, var(--top-a), var(--top-b));
  --bar-fg: var(--text);
  --scrim: rgba(0, 0, 0, 0.35);
}
[data-style="aqua"] .btn { border-radius: 999px; padding-left: 18px; padding-right: 18px; }
[data-style="aqua"] .btn.sm { padding-left: 14px; padding-right: 14px; }
[data-style="aqua"] .btn.solid {
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary-bg) 45%, white),
    color-mix(in srgb, var(--primary-bg) 85%, white) 49%,
    var(--primary-bg) 50%,
    color-mix(in srgb, var(--primary-bg) 70%, white));
  border-color: color-mix(in srgb, var(--primary-bg) 70%, black);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7), inset 0 -3px 5px rgba(255, 255, 255, 0.35), 0 1px 3px rgba(0, 0, 0, 0.35);
}
[data-style="aqua"] .btn.solid:hover { background: linear-gradient(to bottom,
  color-mix(in srgb, var(--primary-bg) 38%, white),
  color-mix(in srgb, var(--primary-bg) 78%, white) 49%,
  color-mix(in srgb, var(--primary-bg) 92%, black) 50%,
  color-mix(in srgb, var(--primary-bg) 62%, white)); filter: none; }
[data-style="aqua"] :is(.node.active, .article.active) {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.08) 51%);
}
/* pinstripes: the sidebar and every dialog body */
[data-style="aqua"] :is(.sidebar, .modal-card) {
  background-image: repeating-linear-gradient(to bottom, var(--stripe) 0 2px, transparent 2px 4px);
}
/* gel traffic lights: the close button is the red one, the other two are for show */
[data-style="aqua"] .modal-head { position: relative; padding: 7px 12px; min-height: 2.2rem; gap: 6px; justify-content: flex-start; }
[data-style="aqua"] .modal-head h2 {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  flex: none; margin: 0; max-width: calc(100% - 6rem); line-height: 1.25; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
[data-style="aqua"][data-mode="dark"] .modal-head h2 { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5); }
[data-style="aqua"] .modal-head .spacer { display: none; }
html[data-style="aqua"][data-theme] .modal-head .icon-btn {
  order: -1; margin: 0; width: 13px; height: 13px; flex: 0 0 13px; padding: 0;
  border-radius: 50%; font-size: 11px; font-weight: 700; color: transparent;
  border: 1px solid #b0261c;
  background: radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.85) 0 22%, rgba(255, 255, 255, 0) 55%), radial-gradient(circle at 50% 85%, #ff9a8f, #ff5f57 55%, #d8382e);
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
}
html[data-style="aqua"][data-theme] .modal-head .icon-btn:hover { color: rgba(90, 0, 0, 0.85); }
[data-style="aqua"] .modal-head::before {
  content: ""; flex: 0 0 32px; width: 32px; height: 13px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.85) 0 22%, rgba(255, 255, 255, 0) 55%) 0 0 / 13px 13px no-repeat,
    radial-gradient(circle at 50% 85%, #ffe28a, #febc2e 55%, #d89a0c) 0 0 / 13px 13px no-repeat,
    radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.85) 0 22%, rgba(255, 255, 255, 0) 55%) 19px 0 / 13px 13px no-repeat,
    radial-gradient(circle at 50% 85%, #8ff0a0, #28c840 55%, #14962a) 19px 0 / 13px 13px no-repeat;
  filter: drop-shadow(0 1px 0.5px rgba(0, 0, 0, 0.3));
}
[data-style="aqua"] .tn-brand {
  flex: 0 0 4px; width: 4px; height: 4px; margin-right: 11px; border-radius: 50%;
  background: #ff5f57; box-shadow: 6px 0 0 #febc2e, 12px 0 0 #28c840;
}


/* ═══ Cyberpunk ═══════════════════════════════════════════
   Near-black with a yellow selection slab, cyan hover, cut-corner buttons,
   shouty tracked caps and a glow. Light is the same city at midday. */
[data-theme="cyber-dark"] {
  --bg: #0a0a12; --surface: #101120; --border: #2a2d4a;
  --text: #e8e8f4; --muted: #8084ad;
  --primary: #fcee0a; --primary-bg: #fcee0a; --primary-dark: #d9cc00; --on-primary: #000000;
  --secondary: #00f0ff;
  --danger: #ff2a6d; --input-bg: #0c0d18; --bg-hover: #1a1c34;
  --neon: #00f0ff; --glow: rgba(252, 238, 10, 0.3);
}
[data-theme="cyber-light"] {
  --bg: #f1f1ec; --surface: #e2e2dc; --border: #15151f;
  --text: #0d0d16; --muted: #585870;
  --primary: #c2005c; --primary-bg: #fcee0a; --primary-dark: #d9cc00; --on-primary: #000000;
  --secondary: #008c9a;
  --danger: #d4004a; --input-bg: #ffffff; --bg-hover: #fbf6b0;
  --neon: #c2005c; --glow: rgba(0, 0, 0, 0.12);
}
[data-style="cyberpunk"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --panel-sh: 0 0 0 1px var(--border), 0 0 34px var(--glow);
  --pop-sh: 0 0 0 1px var(--border), 0 0 22px var(--glow);
  --float-sh: 0 0 16px var(--glow);
  --tn-sh: 0 0 6px var(--glow);
  --hover-bc: var(--neon); --hover-fg: var(--neon);
  --btn-case: uppercase; --btn-track: 0.08em;
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--surface); --bar-fg: var(--text); --bar-accent: var(--primary-bg);
  --scrim: rgba(0, 0, 0, 0.6);
}
[data-style="cyberpunk"] :is(.btn, .theme-btn, .mini, .loadmore, .icon-btn, .login button, .new-articles) {
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}
[data-style="cyberpunk"] .modal-card { border-top: 3px solid var(--primary-bg); }
[data-style="cyberpunk"] .modal-head h2 { text-transform: uppercase; letter-spacing: 0.14em; font-size: .95rem; }
[data-style="cyberpunk"] .modal-head::before {
  content: ""; align-self: stretch; flex: 0 0 5px; margin: -10px 4px -10px -12px;
  background: var(--primary-bg);
}
[data-style="cyberpunk"] .topbar { border-bottom-color: var(--primary-bg); box-shadow: 0 1px 14px var(--glow); }
[data-style="cyberpunk"] .side-heading, [data-style="cyberpunk"] .list-header h2 { letter-spacing: 0.14em; }
[data-style="cyberpunk"] .list-header h2 { text-transform: uppercase; }


/* ═══ Phosphor ════════════════════════════════════════════
   A terminal. Dark is green phosphor with a soft glow and faint scanlines;
   light is greenbar fanfold paper. Buttons are [ BRACKETED ]. */
[data-theme="phosphor-dark"] {
  --bg: #030a05; --surface: #06140a; --border: #0f5a28;
  --text: #35ff72; --muted: #22b058;
  --primary: #b9ffcf; --primary-bg: #35ff72; --primary-dark: #1fcc58; --on-primary: #021208;
  --secondary: #ffb000;
  --danger: #ff5f56; --input-bg: #000000; --bg-hover: #0b2a15;
  --glow: rgba(53, 255, 114, 0.35); --scan: rgba(0, 0, 0, 0.16); --bar-green: transparent;
}
[data-theme="phosphor-light"] {
  --bg: #f7faf1; --surface: #e4eedb; --border: #a9c9b0;
  --text: #10301a; --muted: #4c6e57;
  --primary: #0b7a32; --primary-bg: #0b7a32; --primary-dark: #075c25; --on-primary: #ffffff;
  --secondary: #b36a00;
  --danger: #c0392b; --input-bg: #ffffff; --bg-hover: #dcebd2;
  --glow: transparent; --scan: transparent; --bar-green: rgba(60, 160, 90, 0.11);
}
[data-style="phosphor"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --panel-sh: 0 0 0 1px var(--border), 0 0 26px var(--glow);
  --pop-sh: 0 0 0 1px var(--border), 0 0 18px var(--glow);
  --float-sh: 0 0 12px var(--glow);
  --tn-sh: 0 0 6px var(--glow);
  --btn-case: uppercase; --btn-track: 0.1em;
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--surface); --bar-fg: var(--text); --bar-accent: var(--primary-bg);
}
[data-style="phosphor"] body { text-shadow: 0 0 4px var(--glow); }
[data-style="phosphor"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: repeating-linear-gradient(to bottom, var(--scan) 0 1px, transparent 1px 3px);
}
[data-style="phosphor"] .btn::before { content: "["; }
[data-style="phosphor"] .btn::after { content: "]"; }
[data-style="phosphor"] .modal-head h2 { text-transform: uppercase; letter-spacing: 0.12em; font-size: .95rem; }
[data-style="phosphor"] .modal-head h2::before { content: "> "; }
[data-theme="phosphor-light"] .article:nth-child(even):not(.active):not(:hover) { background: var(--bar-green); }


/* ═══ Broadsheet ══════════════════════════════════════════
   Newsprint: paper stock, ink-black rules, double-rule frames, square corners,
   buttons that print in reverse when you point at them. Dark is the night
   edition. */
[data-theme="news-light"] {
  --bg: #f6f1e4; --surface: #ece4d0; --border: #b9ae95;
  --text: #1c1a17; --muted: #6a6252;
  --primary: #9c1c1c; --primary-bg: #1c1a17; --primary-dark: #000000; --on-primary: #f6f1e4;
  --secondary: #b8860b;
  --danger: #a01212; --input-bg: #fbf8ee; --bg-hover: #e8dfc8;
  --ink: #1c1a17;
}
[data-theme="news-dark"] {
  --bg: #17150f; --surface: #201d16; --border: #4a4435;
  --text: #e8e0cb; --muted: #a39a82;
  --primary: #e0a45c; --primary-bg: #e8e0cb; --primary-dark: #ffffff; --on-primary: #17150f;
  --secondary: #d9b45a;
  --danger: #e8705f; --input-bg: #1c1912; --bg-hover: #29251b;
  --ink: #e8e0cb;
}
[data-style="broadsheet"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bwp: 3px; --bsp: double;
  --raised-bc: var(--ink);
  --sunken-bc: var(--ink);
  --panel-bc: var(--ink);
  --panel-sh: 6px 6px 0 rgba(0, 0, 0, 0.2);
  --pop-sh: 4px 4px 0 rgba(0, 0, 0, 0.2);
  --float-sh: 3px 3px 0 rgba(0, 0, 0, 0.25);
  --tn-sh: 2px 2px 0 rgba(0, 0, 0, 0.2);
  --hover-bc: var(--ink); --hover-fg: var(--bg);
  --btn-bg-hover: var(--ink);
  --btn-case: uppercase; --btn-track: 0.08em;
  --tab-accent: var(--ink);
  --bar-bg: var(--surface); --bar-fg: var(--text);
}
[data-style="broadsheet"] .topbar { border-bottom: 3px double var(--ink); }
[data-style="broadsheet"] .modal-head { border-bottom: 3px double var(--ink); }
[data-style="broadsheet"] .modal-head h2 { flex: 1; text-align: center; text-transform: uppercase; letter-spacing: 0.14em; font-size: .95rem; }
[data-style="broadsheet"] .list-header { border-bottom: 2px solid var(--ink); }
[data-style="broadsheet"] .list-header h2 { text-transform: uppercase; letter-spacing: 0.12em; }
[data-style="broadsheet"] .side-heading { border-bottom: 1px solid var(--ink); }


/* ═══ Soviet ══════════════════════════════════════════════
   Constructivist agitprop: cream stock, black ink, one loud red. Square
   corners, hard red offset shadows, red title bars with shouty caps and a star.
   Dark is the red-star night: near-black with cream ink and gold links. */
[data-theme="soviet-light"] {
  --bg: #efe6cf; --surface: #e2d6b8; --border: #1a1614;
  --text: #1a1614; --muted: #5a5040;
  --primary: #b00d28; --primary-bg: #c8102e; --primary-dark: #9a0b22; --on-primary: #f6eed8;
  --secondary: #8a6400;
  --danger: #a00018; --input-bg: #f7f0dc; --bg-hover: #ead9b0;
  --ink: #1a1614; --red: #c8102e; --cream: #f6eed8;
}
[data-theme="soviet-dark"] {
  --bg: #121010; --surface: #1f1818; --border: #5a4a44;
  --text: #f0e6cc; --muted: #b0a488;
  --primary: #ffd23f; --primary-bg: #c8102e; --primary-dark: #e02a42; --on-primary: #f6eed8;
  --secondary: #ffd23f;
  --danger: #ff6b5a; --input-bg: #0b0909; --bg-hover: #2a1313;
  --ink: #f0e6cc; --red: #c8102e; --cream: #f6eed8;
}
[data-style="soviet"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bw: 2px; --bwp: 3px;
  --raised-bc: var(--ink);
  --raised-sh: 3px 3px 0 var(--red);
  --sunken-bc: var(--ink);
  --panel-bc: var(--ink);
  --panel-sh: 8px 8px 0 var(--red);
  --pop-sh: 5px 5px 0 var(--red);
  --float-sh: 3px 3px 0 var(--red);
  --tn-sh: 2px 2px 0 var(--red);
  --hover-bc: var(--red); --hover-fg: var(--text);
  --btn-case: uppercase; --btn-track: 0.1em;
  --btn-bg: var(--input-bg); --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--red);
  --bar-bg: var(--red); --bar-fg: var(--cream);
  --scrim: rgba(60, 8, 8, 0.6);
}
[data-style="soviet"] .topbar { border-bottom: 4px solid var(--red); box-shadow: 0 3px 0 var(--ink); }
[data-style="soviet"] .list-header { border-bottom: 3px solid var(--red); }
[data-style="soviet"] .list-header h2,
[data-style="soviet"] .side-heading { text-transform: uppercase; letter-spacing: 0.12em; }
[data-style="soviet"] .modal-head { border-bottom: 3px solid var(--ink); padding: 8px 12px; }
[data-style="soviet"] .modal-head h2 { text-transform: uppercase; letter-spacing: 0.16em; font-size: .95rem; font-weight: 800; }
[data-style="soviet"] .modal-head h2::before { content: "\2605\00a0"; }
[data-style="soviet"] .modal-head .icon-btn { background: var(--cream); color: #1a1614; border-color: #1a1614; box-shadow: 2px 2px 0 #1a1614; }
[data-style="soviet"] .article { border-left: 5px solid transparent; }
[data-style="soviet"] .article:not(.read):not(.active) { border-left-color: var(--red); }

/* Stalinist One is very wide and has a single weight: the sizes come down,
   the tracking comes off, and synthesizing a bold is switched off */
[data-super="soviet"] :is(.a-title, .tl-title, .reader h1, .list-header h2, .modal-head h2, .article.read .a-title) { font-weight: 400; font-synthesis: none; }
[data-super="soviet"] :is(.a-title, .tl-title) { font-size: .95em; line-height: 1.3; letter-spacing: 0; }
[data-super="soviet"] :is(.list-header h2, .modal-head h2) { font-size: 1.1rem; letter-spacing: 0.03em; }
[data-super="soviet"] .reader h1 { font-size: 1.75rem; line-height: 1.25; letter-spacing: 0; }


/* ═══ Windows XP ══════════════════════════════════════════
   Luna: beige dialog faces, glossy blue title bars with a red close button,
   rounded top corners, orange hover glow, and the Bliss hill behind dialogs.
   Dark is Royale Noir: charcoal chrome on a night-time hill. */
[data-theme="xp-light"] {
  --bg: #ffffff; --surface: #ece9d8; --border: #aca899;
  --text: #000000; --muted: #5a5a5a;
  --primary: #0b45b8; --primary-bg: #316ac5; --primary-dark: #2456a8; --on-primary: #ffffff;
  --secondary: #d97a00;
  --danger: #c42b1c; --input-bg: #ffffff; --bg-hover: #eaf1fc;
  --frame: #0831d9; --edge: #003c74; --field: #7f9db9;
  --b1: #ffffff; --b2: #d6d0c5; --bh1: #fffdf5; --bh2: #ffd98a; --glow: #f59a1b;
  --bar-g: linear-gradient(to bottom, #0058ee 0%, #3593ff 8%, #288eff 16%, #127dff 36%, #036ffc 80%, #0262ee 88%, #0057e5 94%, #0054e3 100%);
  --title-sh: #0a1a8a;
  --scrim:
    radial-gradient(ellipse 16% 5% at 24% 24%, rgba(255, 255, 255, 0.85), transparent 70%),
    radial-gradient(ellipse 22% 6% at 66% 15%, rgba(255, 255, 255, 0.7), transparent 70%),
    radial-gradient(ellipse 130% 52% at 22% 114%, #5aa624 0 62%, transparent 63%),
    radial-gradient(ellipse 100% 40% at 88% 120%, #3f8a1a 0 64%, transparent 65%),
    linear-gradient(to bottom, #1e5fd0 0%, #4a90e8 38%, #9cc8f7 66%, #d6e9fb 100%);
}
[data-theme="xp-dark"] {
  --bg: #1b1d22; --surface: #2d3037; --border: #0d0e11;
  --text: #e9ecf2; --muted: #a7adbb;
  --primary: #7fb4ff; --primary-bg: #2f6fd0; --primary-dark: #2458a8; --on-primary: #ffffff;
  --secondary: #ffa94d;
  --danger: #ff7468; --input-bg: #14161a; --bg-hover: #262a33;
  --frame: #3a3d46; --edge: #0b0c0e; --field: #4a4e58;
  --b1: #5b606c; --b2: #2a2d34; --bh1: #6c7280; --bh2: #3a3d46; --glow: #5d9cf0;
  --bar-g: linear-gradient(to bottom, #6d727f 0%, #4b4f5a 14%, #35383f 52%, #23252b 100%);
  --title-sh: #000000;
  --scrim:
    radial-gradient(ellipse 130% 52% at 22% 114%, #1d4a1a 0 62%, transparent 63%),
    radial-gradient(ellipse 100% 40% at 88% 120%, #143a14 0 64%, transparent 65%),
    linear-gradient(to bottom, #060f2a 0%, #112a5c 45%, #27508f 85%, #3a6aa8 100%);
}
[data-style="xp"] {
  --radius: 8px; --r-ctl: 3px; --r-btn: 3px; --r-tab: 3px; --r-icon: 3px; --r-pill: 3px;
  --bwp: 3px;
  --raised-bc: var(--edge);
  --raised-sh: inset 0 -2px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --sunken-bc: var(--field);
  --sunken-sh: none;
  --panel-bc: var(--frame);
  --panel-sh: 3px 5px 12px rgba(0, 0, 0, 0.5);
  --pop-sh: 2px 4px 9px rgba(0, 0, 0, 0.4);
  --float-sh: 1px 3px 6px rgba(0, 0, 0, 0.4);
  --tn-sh: 1px 2px 4px rgba(0, 0, 0, 0.35);
  --hover-bc: var(--glow); --hover-fg: var(--text);
  --btn-bg: linear-gradient(to bottom, var(--b1) 0%, color-mix(in srgb, var(--b1) 40%, var(--b2)) 85%, var(--b2) 100%);
  --btn-bg-hover: linear-gradient(to bottom, var(--bh1) 0%, color-mix(in srgb, var(--bh1) 40%, var(--bh2)) 85%, var(--bh2) 100%);
  --tab-accent: #f5a623;
  --top-bg: var(--bar-g);
  --bar-bg: var(--bar-g); --bar-fg: #ffffff;
}
[data-style="xp"] .btn.solid {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 70%, white), var(--primary-bg) 60%, color-mix(in srgb, var(--primary-bg) 85%, black));
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
[data-style="xp"] .btn.solid:hover { filter: brightness(1.1); }
[data-style="xp"] .modal-head { border-bottom: none; padding: 4px 5px 4px 10px; min-height: 1.9rem; }
[data-style="xp"] .modal-head h2 { font-size: .95rem; font-weight: 700; text-shadow: 1px 1px 0 var(--title-sh); }
html[data-style="xp"][data-theme] .modal-head .icon-btn {
  width: 21px; height: 21px; flex: 0 0 21px; padding: 0; margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #ffffff; border-radius: 3px; color: #ffffff; font-weight: 700; font-size: .85rem; line-height: 1;
  background: radial-gradient(ellipse at 30% 25%, #f3a58a, #d8431f 55%, #b82a08);
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}
html[data-style="xp"][data-theme] .modal-head .icon-btn:hover { filter: brightness(1.12); }


/* ═══ Liquid Glass ════════════════════════════════════════
   Translucent panes that blur a soft wallpaper behind them, a luminous edge on
   everything, big rounded corners and capsule controls. The wallpaper is a
   colour-mesh drawn in CSS (--wall). Dark is the same glass at night. */
[data-theme="liquid-light"] {
  --bg: rgba(255, 255, 255, 0.5); --surface: rgba(255, 255, 255, 0.36); --border: rgba(20, 40, 90, 0.13);
  --text: #14213a; --muted: #43536e;
  --primary: #0a62d8; --primary-bg: #0a7aff; --primary-dark: #0060d8; --on-primary: #ffffff;
  --secondary: #e07b00;
  --danger: #d92b20; --input-bg: rgba(255, 255, 255, 0.6); --bg-hover: rgba(10, 122, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.78); --edge: rgba(255, 255, 255, 0.85); --spec: rgba(255, 255, 255, 0.9);
  --g1: rgba(255, 255, 255, 0.78); --g2: rgba(255, 255, 255, 0.32); --g1h: rgba(255, 255, 255, 0.95); --g2h: rgba(255, 255, 255, 0.55);
  --dim: rgba(20, 30, 70, 0.26); --shade: rgba(10, 20, 60, 0.28);
  --wall:
    radial-gradient(60% 55% at 14% 20%, #ffb3d9 0, transparent 70%),
    radial-gradient(55% 60% at 86% 14%, #8ec5ff 0, transparent 70%),
    radial-gradient(60% 60% at 82% 88%, #ffd49a 0, transparent 70%),
    radial-gradient(55% 55% at 18% 90%, #a9f0cc 0, transparent 70%),
    linear-gradient(135deg, #c9dcff, #f0d9ff);
}
[data-theme="liquid-dark"] {
  --bg: rgba(14, 18, 36, 0.5); --surface: rgba(28, 34, 66, 0.42); --border: rgba(255, 255, 255, 0.13);
  --text: #eef2ff; --muted: #a9b3d0;
  --primary: #7db4ff; --primary-bg: #2f7cf6; --primary-dark: #1f63d0; --on-primary: #ffffff;
  --secondary: #ffb84d;
  --danger: #ff7a7a; --input-bg: rgba(255, 255, 255, 0.1); --bg-hover: rgba(125, 180, 255, 0.16);
  --glass-strong: rgba(26, 32, 62, 0.82); --edge: rgba(255, 255, 255, 0.26); --spec: rgba(255, 255, 255, 0.3);
  --g1: rgba(255, 255, 255, 0.2); --g2: rgba(255, 255, 255, 0.06); --g1h: rgba(255, 255, 255, 0.3); --g2h: rgba(255, 255, 255, 0.12);
  --dim: rgba(0, 0, 12, 0.45); --shade: rgba(0, 0, 0, 0.5);
  --wall:
    radial-gradient(60% 55% at 14% 20%, #5b2a86 0, transparent 70%),
    radial-gradient(55% 60% at 86% 14%, #1d4ed8 0, transparent 70%),
    radial-gradient(60% 60% at 82% 88%, #0e7490 0, transparent 70%),
    radial-gradient(55% 55% at 18% 90%, #9d174d 0, transparent 70%),
    linear-gradient(135deg, #0b1026, #1a1038);
}
[data-style="liquid"] {
  --radius: 22px; --r-ctl: 12px; --r-btn: 12px; --r-tab: 12px; --r-icon: 12px;
  --raised-bc: var(--edge);
  --raised-sh: inset 0 1px 0 var(--spec), 0 2px 8px var(--shade);
  --sunken-bc: var(--edge);
  --sunken-sh: inset 0 1px 3px var(--shade);
  --panel-bc: var(--edge);
  --panel-sh: inset 0 1px 0 var(--spec), 0 22px 54px var(--shade);
  --pop-sh: inset 0 1px 0 var(--spec), 0 14px 34px var(--shade);
  --float-sh: inset 0 1px 0 var(--spec), 0 4px 16px var(--shade);
  --tn-sh: 0 2px 6px rgba(0, 0, 0, 0.3);
  --btn-bg: linear-gradient(to bottom, var(--g1), var(--g2));
  --btn-bg-hover: linear-gradient(to bottom, var(--g1h), var(--g2h));
  --tab-accent: var(--primary-bg);
  --bar-bg: linear-gradient(to bottom, var(--g1), transparent); --bar-fg: var(--text);
  --scrim: var(--dim);
}
html[data-style="liquid"] { background-color: var(--bg); background-image: var(--wall); background-attachment: fixed; }
html[data-style="liquid"] body { background: transparent; }
.tn-layer[data-style="liquid"] { background-image: var(--wall); }
html[data-style="liquid"] :is(.topbar, .sidebar, .listpane, .reader) {
  -webkit-backdrop-filter: blur(26px) saturate(1.7); backdrop-filter: blur(26px) saturate(1.7);
}
html[data-style="liquid"] .modal { -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); }
html[data-style="liquid"] :is(.modal-card, .theme-popover) { background: var(--glass-strong); }
html[data-style="liquid"] .topbar { border-bottom-color: var(--edge); box-shadow: inset 0 -1px 0 var(--border), 0 4px 18px var(--shade); position: relative; z-index: 5; }
html[data-style="liquid"] .col-resizer { background: none; }
html[data-style="liquid"] .col-resizer:hover, html[data-style="liquid"] .col-resizer.dragging {
  background: linear-gradient(to right, transparent 2px, var(--edge) 2px, var(--edge) 5px, transparent 5px);
}
html[data-style="liquid"] .btn { border-radius: 999px; padding-left: 16px; padding-right: 16px; }
html[data-style="liquid"] .btn.solid {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 70%, white), var(--primary-bg));
  border-color: rgba(255, 255, 255, 0.55); color: var(--on-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 10px color-mix(in srgb, var(--primary-bg) 45%, transparent);
}
html[data-style="liquid"] .btn.solid:hover { filter: brightness(1.08); }
html[data-style="liquid"] :is(.node, .article) { border-radius: var(--r-ctl); }
html[data-style="liquid"] :is(.node.active, .article.active) {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 78%, white), var(--primary-bg));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 8px color-mix(in srgb, var(--primary-bg) 40%, transparent);
}
html[data-style="liquid"] .modal-head { border-bottom-color: var(--border); padding: 14px 16px 10px; }
html[data-style="liquid"] .modal-head h2 { font-weight: 600; }


/* ═══ Neo-Brutalist ═══════════════════════════════════════
   Thick black outlines, hard offset shadows, flat saturated colour, and
   controls that sink into their shadow when pressed. Dark swaps the black for
   cream outlines on a deep purple. */
[data-theme="brutal-light"] {
  --bg: #fffdf2; --surface: #ffdc5e; --border: #000000;
  --text: #000000; --muted: #4a4a4a;
  --primary: #3d2fd9; --primary-bg: #ff6fb5; --primary-dark: #e0509a; --on-primary: #000000;
  --secondary: #e8470f;
  --danger: #d90f3c; --input-bg: #ffffff; --bg-hover: #ffc9e3;
}
[data-theme="brutal-dark"] {
  --bg: #15131f; --surface: #2a2342; --border: #f5f0e1;
  --text: #f5f0e1; --muted: #b6abcc;
  --primary: #ffe45c; --primary-bg: #ffe45c; --primary-dark: #e6c800; --on-primary: #000000;
  --secondary: #5ef0c0;
  --danger: #ff6b8a; --input-bg: #0e0c16; --bg-hover: #3a2f5c;
}
[data-style="brutal"] {
  --radius: 10px; --r-ctl: 8px; --r-btn: 8px; --r-tab: 8px; --r-icon: 8px;
  --bw: 2px; --bwp: 3px;
  --raised-sh: 3px 3px 0 var(--border);
  --panel-sh: 8px 8px 0 var(--border);
  --pop-sh: 5px 5px 0 var(--border);
  --float-sh: 3px 3px 0 var(--border);
  --tn-sh: 2px 2px 0 var(--border);
  --hover-bc: var(--border); --hover-fg: var(--text);
  --btn-bg: var(--input-bg); --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--primary-bg); --bar-fg: var(--on-primary);
  --scrim: rgba(0, 0, 0, 0.5);
}
html[data-style="brutal"] :is(.btn:not(.ghost), .icon-btn, .mini, .theme-btn, .loadmore):active:not(:disabled) { transform: translate(2px, 2px); }
[data-style="brutal"] .topbar { border-bottom-width: 3px; }
[data-style="brutal"] .list-header { border-bottom-width: 3px; }
[data-style="brutal"] .modal-head { border-bottom: 3px solid var(--border); }
[data-style="brutal"] .modal-head h2 { font-weight: 800; }
[data-style="brutal"] .btn { font-weight: 700; }
[data-style="brutal"] :is(.node.active, .article.active) { box-shadow: inset 0 0 0 2px var(--border); }
[data-style="brutal"] .tab.active { font-weight: 700; }


/* ═══ 1980s ════════════════════════════════
    Parallel racing bands (red, orange, yellow, teal) separated by thin cream
    gaps, on a warm cream ground. Dark is the sunset-on-navy take. */
[data-theme="pinstripe-light"] {
  --bg: #fff6df; --surface: #f8ecd0; --border: #3b2a20;
  --text: #3b2a20; --muted: #8a7766;
  --primary: #d1190f; --primary-bg: #d1190f; --primary-dark: #a8110a; --on-primary: #fff6df;
  --secondary: #2f9a9e;
  --danger: #c81e1e; --input-bg: #fffbef; --bg-hover: #f3e0b5;
  --band1: #d1190f; --band2: #f26b21; --band3: #ffa90a; --band4: #2f9a9e; --gap: #fff6df;
}
[data-theme="pinstripe-dark"] {
  --bg: #12284f; --surface: #1a3562; --border: #7fa6c4;
  --text: #fbe8c4; --muted: #9db4cc;
  --primary: #f07a3a; --primary-bg: #f07a3a; --primary-dark: #d9621f; --on-primary: #12284f;
  --secondary: #3a9bb0;
  --danger: #ff7b6b; --input-bg: #0d1e3e; --bg-hover: #234478;
  --band1: #e8743b; --band2: #f4b983; --band3: #f9e3b8; --band4: #3a9bb0; --gap: #12284f;
}
[data-style="pinstripe"] {
  --bands: linear-gradient(180deg,
    var(--band1) 0 25%, var(--gap) 25% 31%,
    var(--band2) 31% 50%, var(--gap) 50% 56%,
    var(--band3) 56% 75%, var(--gap) 75% 81%,
    var(--band4) 81% 100%);
  --radius: 10px; --r-ctl: 8px; --r-btn: 999px; --r-tab: 8px; --r-icon: 8px; --r-pill: 999px;
  --bw: 2px; --bwp: 2px;
  --raised-bc: var(--border);
  --raised-sh: 0 2px 0 var(--border);
  --sunken-bc: var(--border);
  --sunken-sh: inset 0 2px 0 rgba(0, 0, 0, 0.12);
  --panel-bc: var(--border);
  --panel-sh: 0 6px 0 var(--band1);
  --pop-sh: 0 4px 0 var(--band1);
  --float-sh: 0 3px 0 var(--band1);
  --tn-sh: 0 2px 0 var(--band1);
  --hover-bc: var(--primary); --hover-fg: var(--primary);
  --btn-case: uppercase; --btn-track: 0.06em;
  --btn-bg: var(--surface); --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--primary-bg); --bar-fg: var(--on-primary); --bar-accent: var(--secondary);
  --top-bg: var(--surface); --top-fg: var(--text);
  --scrim: rgba(40, 25, 15, 0.5);
}
/* banded strip: under the topbar, on dialog headers, down the sidebar edge */
[data-style="pinstripe"] .topbar { border-bottom: 0; position: relative; }
[data-style="pinstripe"] .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px;
  background: var(--bands); pointer-events: none; z-index: 5;
}
[data-style="pinstripe"] { --top-ctl: 2.5rem; }
[data-style="pinstripe"] .sidebar {
  border-right: 0;
  padding-right: 34px;
  background-color: var(--surface);
  background-image: linear-gradient(90deg,
    var(--band1) 0 25%, var(--gap) 25% 31%,
    var(--band2) 31% 50%, var(--gap) 50% 56%,
    var(--band3) 56% 75%, var(--gap) 75% 81%,
    var(--band4) 81% 100%);
  background-repeat: no-repeat;
  background-position: right top;
  background-size: 14px 100%;
  background-attachment: scroll;
}
[data-style="pinstripe"] .modal-head { position: relative; padding-bottom: 14px; }
[data-style="pinstripe"] .modal-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--bands);
}
[data-style="pinstripe"] .list-header { border-bottom: 3px solid var(--border); padding-top: 22px; }
[data-style="pinstripe"] .list-header h2,
[data-style="pinstripe"] .side-heading { text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; }
[data-style="pinstripe"] .modal-head { border-bottom: 0; background: var(--bar-bg); color: var(--bar-fg); }
[data-style="pinstripe"] .modal-head h2 { text-transform: uppercase; letter-spacing: 0.12em; font-size: .95rem; font-weight: 800; }
[data-style="pinstripe"] .btn { font-weight: 700; }
[data-style="pinstripe"] .btn.solid {
  background: var(--primary-bg); color: var(--on-primary);
  border-color: var(--border); box-shadow: 0 3px 0 var(--primary-dark);
}
[data-style="pinstripe"] .btn.solid:hover { background: var(--primary-dark); filter: none; }
html[data-style="pinstripe"] :is(.btn:not(.ghost), .icon-btn, .mini, .theme-btn, .loadmore):active:not(:disabled) {
  transform: translate(2px, 2px);
}
[data-style="pinstripe"] .node.active { background: var(--primary-bg); color: var(--on-primary); box-shadow: inset 0 0 0 2px var(--border); }
[data-style="pinstripe"] .node.active .count { background: transparent; color: var(--on-primary); }
[data-style="pinstripe"] .article { border-left: 4px solid transparent; }
[data-style="pinstripe"] .article:not(.read):not(.active) { border-left-color: var(--secondary); }
[data-style="pinstripe"] .article.active,
[data-style="pinstripe"] .article.active:hover { background: var(--primary-bg); box-shadow: inset 0 0 0 2px var(--border); }
[data-style="pinstripe"] .article.active :is(.a-title, .a-star, .count) { color: var(--on-primary); }
[data-style="pinstripe"] .article.active :is(.a-snippet, .a-source, .a-time) { color: color-mix(in srgb, var(--on-primary) 78%, transparent); }


/* ═══ Airy ════════════════════════════════════════════════
    A light, open modern look: big soft corners, hairline rules, barely-there
    shadows and a pastel palette. Roomy rows and a wide, calm reading column;
    meant to be paired with a characterful headline face. */
[data-theme="airy-light"] {
  --bg: #fdfdff; --surface: #f3f5fc; --border: #e2e7f3;
  --text: #242a3d; --muted: #7b829c;
  --primary: #6d7ef7; --primary-bg: #6d7ef7; --primary-dark: #5969e8; --on-primary: #ffffff;
  --secondary: #e58fc0;
  --danger: #e0607e; --input-bg: #ffffff; --bg-hover: #edf0fb;
  --line: #eceff8; --read-bg: #f7f8fd; --sel: #e3e9fe; --search-bg: #eef1fa;
}
[data-theme="airy-dark"] {
  --bg: #161923; --surface: #1d212e; --border: #2c3145;
  --text: #e8eaf4; --muted: #9aa1b8;
  --primary: #a5b0ff; --primary-bg: #7c88f0; --primary-dark: #9aa6ff; --on-primary: #14162a;
  --secondary: #e08bb8;
  --danger: #ff8ba0; --input-bg: #1a1e2a; --bg-hover: #242a3b;
  --line: #262b3c; --read-bg: #1a1e2b; --sel: #2a3154; --search-bg: #212634;
}
[data-style="airy"] {
  --radius: 20px; --r-ctl: 14px; --r-btn: 12px; --r-tab: 12px; --r-icon: 14px; --r-pill: 999px;
  --raised-sh: 0 1px 2px rgba(36, 42, 61, 0.04), 0 10px 28px rgba(36, 42, 61, 0.07);
  --sunken-sh: inset 0 1px 3px rgba(36, 42, 61, 0.07);
  --panel-sh: 0 28px 70px rgba(36, 42, 61, 0.16);
  --pop-sh: 0 14px 36px rgba(36, 42, 61, 0.13);
  --float-sh: 0 4px 16px rgba(36, 42, 61, 0.13);
  --tn-sh: 0 1px 3px rgba(36, 42, 61, 0.08);
  --hover-bc: var(--border); --hover-fg: var(--text);
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--primary);
  --top-bg: var(--bg); --top-fg: var(--text);
  --scrim: rgba(22, 25, 35, 0.35);
}
[data-style="airy"] .topbar { border-bottom-color: var(--line); padding: 10px 18px; }
[data-style="airy"] .topbar-search input { padding: 10px 18px; background: var(--search-bg); border-color: transparent; border-radius: var(--r-pill); }
[data-style="airy"] .topbar-search input:focus { background: var(--input-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
[data-style="airy"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); outline: none; }
[data-style="airy"] :is(.icon-btn, .mini, .theme-btn),
[data-style="airy"] :is(.icon-btn, .mini, .theme-btn):hover { border-color: transparent; }
[data-style="airy"] .btn { font-weight: 500; }
[data-style="airy"] .btn.solid { border-radius: var(--r-pill); }
[data-style="airy"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); filter: none; }
[data-style="airy"] .theme-popover { background: var(--bg); }

/* navigation: roomy rounded rows, quiet selection tint */
[data-style="airy"] .sidebar { padding: 14px 8px 22px; }
[data-style="airy"] .node { padding: 8px 14px; min-height: 40px; border-radius: var(--r-ctl); }
[data-style="airy"] .node.active { background: var(--sel); color: var(--text); font-weight: 600; }
[data-style="airy"] .node .count { background: transparent; padding: 0; }
[data-style="airy"] .node.active .count { color: var(--text); }
[data-style="airy"] .kids { border-left-color: var(--line); margin-left: 15px; }

/* story rows: hairlines, space to breathe, tinted selection with an accent edge */
[data-style="airy"] .list-header { padding: 16px 22px; border-bottom-color: var(--line); }
[data-style="airy"] .list-header h2 { font-weight: 600; }
[data-style="airy"] .article { gap: 12px; padding: 18px 22px; border-bottom-color: var(--line); }
[data-style="airy"] .article.read { background: var(--read-bg); }
[data-style="airy"] .article:hover { background: var(--bg); }
[data-style="airy"] .article.read:hover { background: var(--read-bg); }
[data-style="airy"] .a-title { line-height: 1.45; margin-bottom: 6px; }
[data-style="airy"] .a-snippet { line-height: 1.6; }
[data-style="airy"] .a-meta { margin-top: 8px; }
[data-style="airy"] .article.active,
[data-style="airy"] .article.active:hover { background: var(--sel); box-shadow: inset 3px 0 0 var(--primary); }
[data-style="airy"] .article.active :is(.a-title, .count) { color: var(--text); }
[data-style="airy"] .article.active :is(.a-snippet, .a-source, .a-time) { color: var(--muted); }
[data-style="airy"] .article.active .a-star { color: var(--secondary); }

/* the reading column: wide, generous leading */
[data-style="airy"] .reader { padding: 44px clamp(28px, 8vw, 104px) 88px; }
[data-style="airy"] .reader h1 { font-size: 2.1rem; line-height: 1.22; letter-spacing: -0.015em; margin-bottom: 12px; }
[data-style="airy"] .r-head { border-bottom-color: var(--line); padding-bottom: 24px; margin-bottom: 34px; }
[data-style="airy"] .reader :is(.r-content, .r-thread-body) { font-size: 1.08rem; line-height: 1.85; max-width: 62ch; }
[data-style="airy"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.35em; }
[data-style="airy"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 3px solid var(--primary); padding-left: 20px; margin-bottom: 1.35em; }
[data-style="airy"] .reader :is(.r-content, .r-thread-body) img { border-radius: var(--r-ctl); }

/* dialogs */
[data-style="airy"] .modal-head { padding: 20px 24px 12px; border-bottom-color: var(--line); }
[data-style="airy"] .modal-head h2 { font-size: 1.3rem; font-weight: 600; }
[data-style="airy"] .tabs { background: var(--surface); padding: 5px 24px 0; gap: 0; }
[data-style="airy"] .tab { background: transparent; border-color: transparent; border-radius: 0; padding: 11px 18px; }
[data-style="airy"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="airy"] .tab.active,
[data-style="airy"] .tab.active:hover {
  background: transparent; color: var(--primary); box-shadow: none;
  border-color: transparent; border-bottom: 3px solid var(--primary);
}
[data-style="airy"] .tab-intro { background: var(--bg); border-left-color: var(--primary); }
[data-style="airy"] .col-resizer { background: linear-gradient(to right, transparent 3px, var(--line) 3px, var(--line) 4px, transparent 4px); }


/* ═══ CRT — 1980s terminal ════════════════════════════════
    A cathode-ray screen: scanlines, a vignette darkening the edges, phosphor
    glow, chromatic-aberration headings and [ BRACKETED ] buttons. Dark is
    green phosphor; light is the white-phosphor paper terminal. */
[data-theme="crt-dark"] {
  --bg: #050805; --surface: #0a120a; --border: #1d4d26;
  --text: #4dff7a; --muted: #2fae54;
  --primary: #c8ffd9; --primary-bg: #37f06e; --primary-dark: #25cc59; --on-primary: #03140a;
  --secondary: #ffb000;
  --danger: #ff5f56; --input-bg: #030503; --bg-hover: #0d2413;
  --glow: rgba(77, 255, 122, 0.32); --scan: rgba(0, 0, 0, 0.3); --vig: rgba(0, 0, 0, 0.42);
}
[data-theme="crt-light"] {
  --bg: #edf3e9; --surface: #e0ead9; --border: #a9c2a4;
  --text: #123a1e; --muted: #4d6b55;
  --primary: #0e7a34; --primary-bg: #0e7a34; --primary-dark: #0a5c28; --on-primary: #f2fff4;
  --secondary: #b36a00;
  --danger: #b3271e; --input-bg: #f8fcf4; --bg-hover: #d9e6cf;
  --glow: rgba(14, 122, 52, 0.12); --scan: rgba(18, 58, 30, 0.06); --vig: rgba(70, 90, 70, 0.14);
}
[data-style="crt"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bw: 2px;
  --raised-bc: var(--border);
  --raised-sh: 0 0 0 1px var(--border);
  --sunken-bc: var(--border);
  --sunken-sh: inset 0 0 10px var(--glow), inset 0 2px 5px rgba(0, 0, 0, 0.45);
  --panel-bc: var(--border);
  --panel-sh: 0 0 0 1px var(--border), 0 0 44px var(--glow);
  --pop-sh: 0 0 0 1px var(--border), 0 0 26px var(--glow);
  --float-sh: 0 0 18px var(--glow);
  --tn-sh: 0 0 8px var(--glow);
  --hover-bc: var(--primary-bg); --hover-fg: var(--primary-bg);
  --btn-case: uppercase; --btn-track: 0.12em;
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--surface); --bar-fg: var(--text); --bar-accent: var(--primary-bg);
  --top-bg: var(--surface); --top-fg: var(--text);
  --scrim: rgba(2, 10, 4, 0.72);
}
[data-style="crt"] body { text-shadow: 0 0 6px var(--glow); }
/* the screen itself: scanlines plus a vignette at the edges */
[data-style="crt"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 52%, var(--vig) 100%),
    repeating-linear-gradient(to bottom, var(--scan) 0 1px, transparent 1px 3px);
}
[data-style="crt"] .btn { font-weight: 700; }
[data-style="crt"] .btn::before { content: "["; }
[data-style="crt"] .btn::after { content: "]"; }
/* chromatic aberration on headings */
[data-style="crt"] :is(.list-header h2, .modal-head h2, .reader h1, .side-heading) {
  text-shadow: 1.5px 0 rgba(255, 0, 80, 0.5), -1.5px 0 rgba(0, 240, 255, 0.5), 0 0 8px var(--glow);
}
[data-style="crt"] .modal-head { border-bottom: 2px solid var(--border); }
[data-style="crt"] .modal-head h2 { text-transform: uppercase; letter-spacing: 0.14em; font-size: .95rem; }
[data-style="crt"] .modal-head h2::before { content: "> "; }
[data-style="crt"] .reader h1 { font-size: 0.8rem; }
[data-style="crt"] .a-title { font-size: 0.6rem; }
[data-style="crt"] .tl-title { font-size: 0.6rem; }
[data-style="crt"] .topbar { border-bottom: 2px solid var(--border); box-shadow: 0 1px 14px var(--glow); }
[data-style="crt"] .list-header { border-bottom: 2px solid var(--border); }
[data-style="crt"] .list-header h2 { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.6rem; }
[data-style="crt"] .article { border-left: 3px solid transparent; }
[data-style="crt"] .article:not(.read):not(.active) { border-left-color: var(--primary-bg); }
[data-style="crt"] :is(.node.active, .article.active) { background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--primary-bg); }
[data-style="crt"] .node.active { color: var(--primary); font-weight: 700; }
[data-style="crt"] .article.active .a-title { color: var(--primary); }


/* ═══ Olde ════════════════════════════════════════════════
    An old broadsheet: aged paper with foxing at the edges, sepia ink, double
    rules, gilt-and-oxblood plaques for the selection, a drop cap on every
    story. Meant to be paired with a blackletter headline face. Dark is the
    same print read by candlelight. */
[data-theme="olde-light"] {
  --bg: #f1e4c3; --surface: #e6d3a6; --border: #6b4a2a;
  --text: #2b1a0e; --muted: #6e5636;
  --primary: #7a1f1a; --primary-bg: #7a1f1a; --primary-dark: #5a1511; --on-primary: #f6e9c8;
  --secondary: #a9801f;
  --danger: #a3231b; --input-bg: #f8edd0; --bg-hover: #e9d8ac;
  --gild: #a9801f; --vig: rgba(110, 70, 20, 0.28); --grain: 0.9;
}
[data-theme="olde-dark"] {
  --bg: #1d140d; --surface: #2a1d12; --border: #8a6a34;
  --text: #ecd9ae; --muted: #ac9568;
  --primary: #d9a441; --primary-bg: #d9a441; --primary-dark: #c0902f; --on-primary: #1d140d;
  --secondary: #c2563f;
  --danger: #e0705a; --input-bg: #150e08; --bg-hover: #3a2916;
  --gild: #d9a441; --vig: rgba(0, 0, 0, 0.5); --grain: 0.5;
}
[data-style="olde"] {
  --radius: 3px; --r-ctl: 2px; --r-btn: 2px; --r-tab: 2px; --r-icon: 2px; --r-pill: 3px;
  --bw: 1px; --bwp: 5px; --bsp: double;
  --raised-bc: var(--border);
  --raised-sh: inset 0 0 0 2px var(--btn-bg), inset 0 0 0 3px color-mix(in srgb, var(--border) 45%, transparent);
  --sunken-bc: var(--border);
  --sunken-sh: inset 0 2px 5px rgba(60, 30, 0, 0.3);
  --panel-bc: var(--border);
  --panel-sh: 0 18px 50px rgba(30, 15, 0, 0.5);
  --pop-sh: 0 10px 26px rgba(30, 15, 0, 0.4);
  --float-sh: 0 2px 8px rgba(30, 15, 0, 0.4);
  --tn-sh: 0 1px 3px rgba(30, 15, 0, 0.3);
  --hover-bc: var(--primary); --hover-fg: var(--primary);
  --btn-bg: var(--surface); --btn-bg-hover: var(--surface);
  --btn-case: none; --btn-track: 0.02em;
  --tab-accent: var(--gild);
  --bar-bg: initial;
  --top-bg: var(--surface); --top-fg: var(--text);
  --scrim: rgba(30, 15, 0, 0.55);
}
/* the paper itself: grain, then foxed edges */
[data-style="olde"] body::before,
[data-style="olde"] body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
}
[data-style="olde"] body::before {
  opacity: var(--grain);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .5 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-style="olde"] body::after { background: radial-gradient(ellipse at center, transparent 55%, var(--vig) 100%); }

/* rules: doubled, as in a printed masthead */
[data-style="olde"] .topbar { border-bottom: 5px double var(--border); }
[data-style="olde"] .list-header { border-bottom: 4px double var(--border); padding: 10px 14px; }
[data-style="olde"] .modal-head { border-bottom: 4px double var(--border); }
[data-style="olde"] .r-head { border-bottom: 4px double var(--border); padding-bottom: 14px; margin-bottom: 18px; }
[data-style="olde"] .sidebar { border-right: 1px solid var(--border); }
[data-style="olde"] .kids { border-left-style: dotted; }
[data-style="olde"] .article { border-bottom-style: dotted; padding: 10px 14px; }
[data-style="olde"] .setting + .setting { border-top-style: dotted; }

/* headings: blackletter, with small-capital section labels */
[data-style="olde"] .list-header h2 { font-size: 1.5rem; line-height: 1.15; }
[data-style="olde"] .modal-head h2 { font-size: 1.5rem; line-height: 1.15; }
[data-style="olde"] .side-heading {
  text-transform: none; font-variant: small-caps; font-size: .98rem; letter-spacing: 0.12em;
  color: var(--primary); border-bottom: 1px dotted var(--border); margin: 0 4px 4px; padding: 10px 2px 3px;
}
[data-style="olde"] .theme-pop-header, [data-style="olde"] .theme-section {
  text-transform: none; font-variant: small-caps; font-size: .95rem; letter-spacing: 0.1em;
}
[data-style="olde"] :is(.a-title, .tl-title) { font-size: 1.12em; line-height: 1.2; }
[data-style="olde"] .article:not(.read):not(.active) .a-title::before,
[data-style="olde"] .tl-card:not(.read) .tl-title::before { content: "\2766\00a0"; color: var(--gild); font-size: .85em; }
[data-style="olde"] .a-snippet { line-height: 1.4; }

/* the selection is a plaque: gilt line inside a solid field */
[data-style="olde"] :is(.node.active, .article.active),
[data-style="olde"] :is(.node.active, .article.active):hover {
  background: var(--primary-bg); color: var(--on-primary);
  box-shadow: inset 0 0 0 2px var(--primary-bg), inset 0 0 0 3px color-mix(in srgb, var(--on-primary) 55%, transparent);
}
[data-style="olde"] .node.active .count { color: var(--on-primary); }
[data-style="olde"] .node .count { background: transparent; padding: 0; font-variant-numeric: oldstyle-nums; }
[data-style="olde"] .node { padding: 5px 8px; }

[data-style="olde"] .btn { font-weight: 700; }
[data-style="olde"] .btn.solid {
  box-shadow: inset 0 0 0 2px var(--primary-bg), inset 0 0 0 3px color-mix(in srgb, var(--on-primary) 50%, transparent);
}
[data-style="olde"] .btn.solid:hover { filter: none; background: var(--primary-dark); border-color: var(--primary-dark); }
[data-style="olde"] .tab { font-variant: small-caps; font-size: 1rem; letter-spacing: 0.08em; }
[data-style="olde"] .tab-intro { border-left: 4px double var(--gild); }

/* the reading column: justified, hyphenated, with a drop cap */
[data-style="olde"] .reader { padding: 22px clamp(20px, 5vw, 56px) 48px; }
[data-style="olde"] .reader h1 { font-size: 2.3rem; line-height: 1.1; margin-bottom: 8px; }
[data-style="olde"] .r-meta { font-style: italic; }
[data-style="olde"] .reader :is(.r-content, .r-thread-body) { font-size: 1.08rem; line-height: 1.65; text-align: justify; hyphens: auto; }
[data-style="olde"] .reader .r-content > p:first-of-type::first-letter {
  float: left; font-family: var(--font-headline); font-weight: 700; color: var(--primary);
  font-size: 3.6em; line-height: .78; padding: .07em .1em 0 0;
}
[data-style="olde"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 4px double var(--gild); font-style: italic; }
[data-style="olde"] .reader :is(.r-content, .r-thread-body) img { border: 1px solid var(--border); padding: 3px; background: var(--surface); }
[data-style="olde"] .reader a { text-decoration-style: dotted; text-underline-offset: 3px; }


/* ═══ Sleek ═══════════════════════════════════════════════
    Brushed metal: bevelled chrome buttons, a satin bar across the top, hairline
    edges, slanted headlines with a slanted accent stripe. Very sans. Light is
    brushed steel, dark is gunmetal with an electric-blue accent. */
[data-theme="sleek-light"] {
  --bg: #eceff2; --surface: #d9dee4; --border: #aab2bc;
  --text: #1b2229; --muted: #5d6874;
  --primary: #1478c8; --primary-bg: #1478c8; --primary-dark: #0d5c9f; --on-primary: #ffffff;
  --secondary: #e8661a;
  --danger: #c92a2a; --input-bg: #f7f9fb; --bg-hover: #dfe4ea;
  --metal-hi: #f7f9fb; --metal-mid: #dfe4ea; --metal-lo: #c4ccd5; --edge: #9aa4b0;
  --hl: rgba(255, 255, 255, 0.85); --shade: rgba(20, 30, 40, 0.18);
  --brush-hi: rgba(255, 255, 255, 0.22); --brush-lo: rgba(0, 0, 0, 0.025);
}
[data-theme="sleek-dark"] {
  --bg: #14171b; --surface: #1d2228; --border: #3a424b;
  --text: #e4e9ee; --muted: #8f9aa6;
  --primary: #34c3ff; --primary-bg: #1aa6e6; --primary-dark: #0f86be; --on-primary: #04131c;
  --secondary: #ff7a2f;
  --danger: #ff6b6b; --input-bg: #0f1215; --bg-hover: #2a3139;
  --metal-hi: #3d454e; --metal-mid: #2b3139; --metal-lo: #1d2228; --edge: #4a545f;
  --hl: rgba(255, 255, 255, 0.14); --shade: rgba(0, 0, 0, 0.55);
  --brush-hi: rgba(255, 255, 255, 0.035); --brush-lo: rgba(0, 0, 0, 0.2);
}
[data-style="sleek"] {
  --brushed: repeating-linear-gradient(90deg, var(--brush-hi) 0 1px, transparent 1px 2px, var(--brush-lo) 2px 3px);
  --metal: linear-gradient(180deg, var(--metal-hi), var(--metal-mid) 58%, var(--metal-lo));
  --radius: 4px; --r-ctl: 3px; --r-btn: 3px; --r-tab: 3px; --r-icon: 3px; --r-pill: 4px;
  --bw: 1px;
  --raised-bc: var(--edge);
  --raised-sh: inset 0 1px 0 var(--hl), 0 1px 2px var(--shade);
  --sunken-bc: var(--edge);
  --sunken-sh: inset 0 1px 3px var(--shade);
  --panel-bc: var(--edge);
  --panel-sh: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 var(--hl);
  --pop-sh: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 var(--hl);
  --float-sh: 0 3px 10px rgba(0, 0, 0, 0.35);
  --tn-sh: 0 1px 3px var(--shade);
  --hover-bc: var(--primary); --hover-fg: var(--text);
  --btn-bg: var(--metal);
  --btn-bg-hover: linear-gradient(180deg, var(--metal-hi), var(--metal-hi) 30%, var(--metal-mid));
  --btn-case: uppercase; --btn-track: 0.07em;
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--brushed), var(--metal); --bar-fg: var(--text);
  --top-bg: var(--brushed), var(--metal); --top-fg: var(--text);
  --scrim: rgba(8, 12, 16, 0.6);
}
[data-style="sleek"] .topbar { border-bottom: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--hl), 0 2px 6px var(--shade); position: relative; z-index: 3; }
[data-style="sleek"] .sidebar { background: var(--brushed), var(--surface); border-right: 1px solid var(--edge); }
[data-style="sleek"] .modal-head { background: var(--bar-bg); border-bottom: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--hl); }
[data-style="sleek"] .list-header { background: var(--brushed), var(--metal); border-bottom: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--hl); }
[data-style="sleek"] .topbar-search input { background: var(--input-bg); }
[data-style="sleek"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: var(--sunken-sh), 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); outline: none; }
[data-style="sleek"] .theme-popover { background: var(--surface); }

/* slanted headlines, each led by a slanted stripe */
[data-style="sleek"] :is(.a-title, .tl-title, .reader h1, .list-header h2, .modal-head h2) { font-style: italic; padding-left: 5px; }
[data-style="sleek"] :is(.list-header h2, .modal-head h2, .side-heading) { text-transform: uppercase; letter-spacing: 0.09em; }
[data-style="sleek"] :is(.list-header h2, .modal-head h2, .side-heading)::before {
  content: ""; display: inline-block; flex: 0 0 auto; width: .5em; height: .95em; margin-right: .55em;
  background: var(--primary-bg); transform: skewX(-22deg); vertical-align: -.1em;
}
[data-style="sleek"] .side-heading::before { height: .85em; margin-right: 0; }
[data-style="sleek"] .reader h1 { font-size: 2.05rem; line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 8px; }
[data-style="sleek"] .r-head { position: relative; border-bottom: 1px solid var(--edge); padding-bottom: 14px; margin-bottom: 20px; }
[data-style="sleek"] .r-head::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 96px; height: 5px;
  background: var(--primary-bg); transform: skewX(-35deg); transform-origin: bottom left;
}
[data-style="sleek"] .article.read .a-title { font-weight: 700; }
[data-style="sleek"] .a-title { letter-spacing: 0.005em; }

[data-style="sleek"] .btn { font-weight: 700; font-size: .84rem; }
[data-style="sleek"] .btn.solid,
[data-style="sleek"] .btn.solid:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-bg) 70%, #fff), var(--primary-bg) 55%, var(--primary-dark));
  border-color: var(--primary-dark); color: var(--on-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px var(--shade);
}
[data-style="sleek"] .btn.solid:hover { filter: brightness(1.1); }
[data-style="sleek"] .tab { font-weight: 700; font-size: .84rem; }
[data-style="sleek"] .tab:hover { background: var(--btn-bg-hover); }
[data-style="sleek"] .tabs { background: var(--brushed), var(--metal); }
[data-style="sleek"] .tab-intro { border-left-color: var(--primary-bg); border-radius: 0; }

/* the selection is a slanted cut of colour */
[data-style="sleek"] .node { padding: 5px 10px; }
[data-style="sleek"] .node.active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-bg) 78%, #fff), var(--primary-bg) 60%, var(--primary-dark));
  color: var(--on-primary); padding-right: 22px; margin-right: -6px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
[data-style="sleek"] .node .count { background: transparent; padding: 0; font-weight: 700; }
[data-style="sleek"] .article { padding: 10px 14px; border-left: 4px solid transparent; }
[data-style="sleek"] .article:not(.read):not(.active) { border-left-color: var(--primary-bg); }
[data-style="sleek"] .article:hover { background: linear-gradient(90deg, var(--bg-hover), var(--bg)); }
[data-style="sleek"] .article.active,
[data-style="sleek"] .article.active:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-bg) 85%, #fff), var(--primary-bg) 60%, var(--primary-dark));
  border-left-color: var(--secondary);
}

[data-style="sleek"] .reader :is(.r-content, .r-thread-body) { font-size: 1.04rem; line-height: 1.7; }
[data-style="sleek"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 4px solid var(--primary-bg); }
[data-style="sleek"] .reader a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
[data-style="sleek"] .col-resizer { background: linear-gradient(to right, transparent 2px, var(--edge) 2px, var(--edge) 4px, transparent 4px); }


/* ═══ 1960s ═══════════════════════════════════════════════
    Groovy: thick outlines, sticker shadows, round everything, a wavy rainbow
    under the top bar and every dialog title, concentric rings in the sidebar
    corner, rainbow unread stripes, flowers and peace signs. Light is the
    flower-power poster, dark is blacklight purple. */
[data-theme="sixties-light"] {
  --bg: #fff3cf; --surface: #ffe7a8; --border: #3b1a5a;
  --text: #2e1245; --muted: #7a5a8e;
  --primary: #e6007e; --primary-bg: #e6007e; --primary-dark: #b80064; --on-primary: #fff7e0;
  --secondary: #ff7a1a;
  --danger: #d4002a; --input-bg: #fffaf0; --bg-hover: #ffd98a;
  --g1: #e6007e; --g2: #ff7a1a; --g3: #ffc61a; --g4: #12a4a0; --g5: #7b3fbf;
  --ring: 28%;
}
[data-theme="sixties-dark"] {
  --bg: #25103f; --surface: #341856; --border: #8a4fd1;
  --text: #fff0d6; --muted: #c4a3e6;
  --primary: #ff4fa3; --primary-bg: #ff4fa3; --primary-dark: #ff7ab8; --on-primary: #25103f;
  --secondary: #b8f23a;
  --danger: #ff6b6b; --input-bg: #1a0a2e; --bg-hover: #45206e;
  --g1: #ff4fa3; --g2: #ff9a2e; --g3: #ffe14a; --g4: #3ee0c8; --g5: #7b3fbf;
  --ring: 45%;
}
[data-style="sixties"] {
  --wave-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='31' viewBox='0 0 40 31'%3E%3Cg fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='M0 5Q10 1 20 5T40 5'/%3E%3Cpath d='M0 12Q10 8 20 12T40 12'/%3E%3Cpath d='M0 19Q10 15 20 19T40 19'/%3E%3Cpath d='M0 26Q10 22 20 26T40 26'/%3E%3C/g%3E%3C/svg%3E");
  --rainbow: linear-gradient(180deg, var(--g1) 0 27.4%, var(--g2) 27.4% 50%, var(--g3) 50% 72.6%, var(--g4) 72.6% 100%);
  --radius: 22px; --r-ctl: 16px; --r-btn: 999px; --r-tab: 18px; --r-icon: 999px; --r-pill: 999px;
  --bw: 3px; --bwp: 4px;
  --raised-bc: var(--border);
  --raised-sh: 0 3px 0 var(--border);
  --sunken-bc: var(--border);
  --sunken-sh: inset 0 2px 0 rgba(0, 0, 0, 0.14);
  --panel-bc: var(--border);
  --panel-sh: 10px 10px 0 var(--g1), 20px 20px 0 var(--g2);
  --pop-sh: 6px 6px 0 var(--g1);
  --float-sh: 0 3px 0 var(--border);
  --tn-sh: 3px 3px 0 var(--g2);
  --hover-bc: var(--primary); --hover-fg: var(--primary);
  --btn-bg: var(--surface); --btn-bg-hover: var(--bg-hover);
  --btn-case: none; --btn-track: 0.02em;
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--g5); --bar-fg: #fff7e0; --bar-accent: var(--g3);
  --top-bg: var(--bg); --top-fg: var(--text);
  --top-ctl: 2.5rem;
  --scrim: rgba(40, 10, 60, 0.55);
}
/* the wavy rainbow: colour bands cut by a mask of four sine waves */
[data-style="sixties"] .topbar { position: relative; margin-bottom: 22px; border-bottom: 0; }
[data-style="sixties"] .topbar::after,
[data-style="sixties"] .modal-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 22px; pointer-events: none;
  background: var(--rainbow);
  -webkit-mask: var(--wave-mask) repeat-x 0 0 / 28px 22px;
  mask: var(--wave-mask) repeat-x 0 0 / 28px 22px;
}
[data-style="sixties"] .topbar::after { z-index: 5; }
[data-style="sixties"] .modal-head { position: relative; border-bottom: 0; margin-bottom: 22px; padding: 12px 18px; }
[data-style="sixties"] .modal-head h2 { color: var(--bar-fg); font-size: 1.3rem; }
[data-style="sixties"] .modal-head h2::before { content: "\262E\00a0"; color: var(--g3); }

/* the sidebar: concentric rings spreading from its bottom-left corner */
[data-style="sixties"] .sidebar {
  background:
    radial-gradient(circle at -24px calc(100% + 24px),
      color-mix(in srgb, var(--g1) var(--ring), transparent) 0 36px,
      color-mix(in srgb, var(--g2) var(--ring), transparent) 36px 72px,
      color-mix(in srgb, var(--g3) var(--ring), transparent) 72px 108px,
      color-mix(in srgb, var(--g4) var(--ring), transparent) 108px 144px,
      transparent 144px),
    var(--surface);
  border-right: 3px solid var(--border);
}
[data-style="sixties"] .side-heading { text-transform: none; letter-spacing: 0.02em; font-weight: 700; font-size: .95rem; color: var(--primary); }
[data-style="sixties"] .side-heading::before { content: "\273F"; color: var(--g2); font-size: 1.1em; }
[data-style="sixties"] .node { padding: 5px 12px; border: 3px solid transparent; }
[data-style="sixties"] .node:hover { border-color: var(--border); }
[data-style="sixties"] .node.active { background: var(--primary-bg); color: var(--on-primary); border-color: var(--border); box-shadow: 0 2px 0 var(--border); }
[data-style="sixties"] .node .count { background: var(--g3); color: #2e1245; padding: 0 8px; font-weight: 700; border: 2px solid var(--border); }
[data-style="sixties"] .node.active .count { background: var(--g3); color: #2e1245; }
[data-style="sixties"] .kids { border-left: 3px dotted var(--g2); }

/* story rows */
[data-style="sixties"] .list-header { border-bottom: 3px solid var(--border); padding: 12px 18px; }
[data-style="sixties"] .list-header h2 { font-size: 1.35rem; color: var(--primary); text-shadow: 2px 2px 0 var(--g3); }
[data-style="sixties"] .article { padding: 12px 16px; border-left: 8px solid transparent; border-bottom: 2px dashed color-mix(in srgb, var(--border) 45%, transparent); }
[data-style="sixties"] .article:not(.read):not(.active) { border-left-color: var(--g1); }
[data-style="sixties"] .article:not(.read):not(.active):nth-child(4n + 1) { border-left-color: var(--g2); }
[data-style="sixties"] .article:not(.read):not(.active):nth-child(4n + 2) { border-left-color: var(--g3); }
[data-style="sixties"] .article:not(.read):not(.active):nth-child(4n + 3) { border-left-color: var(--g4); }
[data-style="sixties"] .article.active,
[data-style="sixties"] .article.active:hover { background: var(--primary-bg); border-left-color: var(--g3); box-shadow: inset 0 0 0 3px var(--border); }
[data-style="sixties"] :is(.a-title, .tl-title) { font-size: .98em; line-height: 1.3; }
[data-style="sixties"] .a-snippet { line-height: 1.45; }

/* Shrikhand has one weight; synthesizing a bold only smears it */
[data-super="sixties"] :is(.a-title, .tl-title, .reader h1, .list-header h2, .modal-head h2, .article.read .a-title) { font-weight: 400; font-synthesis: none; }

/* the reading column */
[data-style="sixties"] .reader { padding: 24px clamp(20px, 5vw, 56px) 56px; }
[data-style="sixties"] .reader h1 { font-size: 2.1rem; line-height: 1.15; color: var(--primary); text-shadow: 3px 3px 0 var(--g3); margin-bottom: 8px; }
[data-style="sixties"] .r-head { border-bottom: 4px dotted var(--g2); padding-bottom: 16px; margin-bottom: 20px; }
[data-style="sixties"] .reader :is(.r-content, .r-thread-body) { font-size: 1.05rem; line-height: 1.7; }
[data-style="sixties"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 8px solid var(--g4); border-radius: 6px; padding-left: 16px; }
[data-style="sixties"] .reader :is(.r-content, .r-thread-body) img { border: 3px solid var(--border); box-shadow: 5px 5px 0 var(--g2); }
[data-style="sixties"] .reader a { text-decoration: underline wavy var(--g2); text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* buttons: round stickers that wobble when you point at them */
[data-style="sixties"] .btn { font-weight: 700; transition: transform 0.12s; }
[data-style="sixties"] .btn.solid { box-shadow: 0 3px 0 var(--primary-dark), 0 0 0 0 transparent; border-color: var(--border); }
[data-style="sixties"] .btn.solid:hover { background: var(--primary-bg); filter: none; border-color: var(--border); }
[data-style="sixties"] :is(.btn:not(.ghost):not(:disabled), .theme-btn):hover { transform: rotate(-1.5deg); }
html[data-style="sixties"] :is(.btn:not(.ghost), .icon-btn, .mini, .theme-btn, .loadmore):active:not(:disabled) { transform: translateY(2px); }
[data-style="sixties"] .tabs { background: var(--bg); box-shadow: inset 0 -3px 0 var(--border); padding-top: 10px; }
[data-style="sixties"] .tab { font-weight: 700; padding: 8px 20px; }
[data-style="sixties"] .tab.active,
[data-style="sixties"] .tab.active:hover { background: var(--primary-bg); color: var(--on-primary); border-bottom-color: var(--border); box-shadow: none; }
[data-style="sixties"] .tab-intro { border-left: 8px solid var(--g2); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
[data-style="sixties"] .super-badge, [data-style="sixties"] .tn-super { border-radius: 999px; }
[data-style="sixties"] .col-resizer { background: linear-gradient(to right, transparent 2px, var(--border) 2px, var(--border) 5px, transparent 5px); }


/* ═══ Bauhaus ═════════════════════════════════════════════
    Dessau, 1926: flat primaries on warm paper, thick black rules, no shadows,
    no gradients. Circle, square and triangle do the ornament: a circle leads
    each list title, a triangle each dialog, a square each sidebar heading.
    Headlines are lowercase, as in Bayer's universal alphabet. Dark is the
    atelier at night: black with a yellow selection. */
[data-theme="bauhaus-light"] {
  --bg: #f3eddc; --surface: #e6dcc3; --border: #111111;
  --text: #111111; --muted: #5b5546;
  --primary: #c61f15; --primary-bg: #d9261c; --primary-dark: #b01c14; --on-primary: #ffffff;
  --secondary: #1c4fa0;
  --danger: #a8140c; --input-bg: #faf5e6; --bg-hover: #ead9a8;
  --ink: #111111; --red: #d9261c; --yel: #f2b705; --blu: #1c4fa0;
}
[data-theme="bauhaus-dark"] {
  --bg: #141414; --surface: #222222; --border: #6f6a5c;
  --text: #f1ebd8; --muted: #a29d8c;
  --primary: #f2c200; --primary-bg: #f2c200; --primary-dark: #d6a900; --on-primary: #111111;
  --secondary: #e3402a;
  --danger: #ff6b52; --input-bg: #0c0c0c; --bg-hover: #2e2e2e;
  --ink: #f1ebd8; --red: #e3402a; --yel: #f2c200; --blu: #3a6fd0;
}
[data-style="bauhaus"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 50%; --r-pill: 0px; --r-round: 50%;
  --bw: 2px; --bwp: 4px;
  --raised-bc: var(--ink);
  --sunken-bc: var(--ink);
  --panel-bc: var(--ink);
  --panel-sh: none; --pop-sh: none; --float-sh: none; --tn-sh: none;
  --hover-bc: var(--primary-bg); --hover-fg: var(--text);
  --btn-bg: var(--input-bg); --btn-bg-hover: var(--bg-hover);
  --btn-case: lowercase; --btn-track: 0.04em;
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--yel); --bar-fg: #111111; --bar-accent: var(--red);
  --top-bg: var(--bg); --top-fg: var(--text);
  --scrim: rgba(17, 17, 17, 0.6);
}
[data-style="bauhaus"] .topbar { position: relative; border-bottom: 4px solid var(--ink); }
[data-style="bauhaus"] .topbar::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 168px; height: 8px; z-index: 5; pointer-events: none;
  background: linear-gradient(90deg, var(--red) 0 33.3%, var(--yel) 33.3% 66.6%, var(--blu) 66.6%);
}
[data-style="bauhaus"] .sidebar { border-right: 4px solid var(--ink); }
[data-style="bauhaus"] .col-resizer { background: linear-gradient(to right, transparent 2px, var(--ink) 2px, var(--ink) 4px, transparent 4px); }

/* headings: lowercase, each with its own primitive */
[data-style="bauhaus"] :is(.list-header h2, .modal-head h2, .side-heading, .reader h1, .theme-pop-header, .theme-section) { text-transform: lowercase; }
[data-style="bauhaus"] .side-heading { letter-spacing: 0.06em; font-weight: 700; color: var(--text); font-size: .86rem; }
[data-style="bauhaus"] .side-heading::before { content: ""; flex: 0 0 auto; width: .62em; height: .62em; background: var(--red); }
[data-style="bauhaus"] .list-header { border-bottom: 3px solid var(--ink); padding: 10px 14px; }
[data-style="bauhaus"] .list-header h2 { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.01em; }
[data-style="bauhaus"] .list-header h2::before {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .5em; vertical-align: -.02em;
  border-radius: 50%; background: var(--yel); border: 2px solid var(--ink);
}
[data-style="bauhaus"] .modal-head { border-bottom: 4px solid var(--ink); padding: 10px 14px; }
[data-style="bauhaus"] .modal-head h2 { font-size: 1.75rem; font-weight: 700; }
[data-style="bauhaus"] .modal-head h2::before {
  content: ""; display: inline-block; width: .75em; height: .65em; margin-right: .5em;
  background: var(--blu); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* navigation: the selection is a solid block of primary */
[data-style="bauhaus"] .node { padding: 5px 8px; }
[data-style="bauhaus"] .node .count { background: var(--ink); color: var(--bg); padding: 0 6px; font-weight: 700; }
[data-style="bauhaus"] .node.active .count { background: var(--on-primary); color: var(--primary-bg); }
[data-style="bauhaus"] .kids { border-left: 3px solid var(--yel); }

/* story rows: a circle marks the unread, a square block the selection */
[data-style="bauhaus"] .article { padding: 10px 14px; border-left: 6px solid transparent; }
[data-style="bauhaus"] .article:not(.read):not(.active) { border-left-color: var(--blu); }
[data-style="bauhaus"] .article.active,
[data-style="bauhaus"] .article.active:hover { border-left-color: var(--ink); }
[data-style="bauhaus"] .article:not(.read):not(.active) .a-title::before,
[data-style="bauhaus"] .tl-card:not(.read) .tl-title::before { content: "\25CF\00a0"; color: var(--red); font-size: .8em; }
[data-style="bauhaus"] .article.read .a-title { font-weight: 500; }
[data-style="bauhaus"] :is(.a-title, .tl-title) { font-size: 1.3em; line-height: 1.2; }
[data-style="bauhaus"] .a-snippet { line-height: 1.45; }

/* the reading column: a thick rule with one red block set off to the left */
[data-style="bauhaus"] .reader { padding: 24px clamp(20px, 5vw, 56px) 52px; }
[data-style="bauhaus"] .reader h1 { font-size: 3rem; line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 10px; }
[data-style="bauhaus"] .r-head { position: relative; border-bottom: 6px solid var(--ink); padding-bottom: 14px; margin-bottom: 22px; }
[data-style="bauhaus"] .r-head::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 84px; height: 6px; background: var(--red); }
[data-style="bauhaus"] .reader :is(.r-content, .r-thread-body) { font-size: 1.05rem; line-height: 1.65; }
[data-style="bauhaus"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 8px solid var(--yel); padding-left: 16px; }
[data-style="bauhaus"] .reader :is(.r-content, .r-thread-body) img { border: 2px solid var(--ink); }
[data-style="bauhaus"] .reader a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* buttons: square, or fully round when only an icon */
[data-style="bauhaus"] .btn { font-weight: 700; }
[data-style="bauhaus"] .btn.solid { border-color: var(--ink); }
[data-style="bauhaus"] .btn.solid:hover { background: var(--primary-dark); filter: none; border-color: var(--ink); }
[data-style="bauhaus"] .tabs { background: var(--bg); box-shadow: inset 0 -3px 0 var(--ink); }
[data-style="bauhaus"] .tab { font-weight: 700; }
[data-style="bauhaus"] .tab.active,
[data-style="bauhaus"] .tab.active:hover { background: var(--primary-bg); color: var(--on-primary); border-color: var(--ink); box-shadow: none; }
[data-style="bauhaus"] .tab-intro { border-left: 8px solid var(--red); border-radius: 0; }
[data-style="bauhaus"] :is(.super-badge, .tn-super) { border-radius: 50%; }


/* ═══ Orbital ═════════════════════════════════════════════
    A mission-control graphic system: hard edges, hairlines, tiny tracked
    uppercase readouts, hazard stripes under the bars, a halftone fade in the
    sidebar and a cut corner on the selection. Dark is acid lime and cyan on
    deep black; light is mission paper with a magenta signal. */
[data-theme="orbital-light"] {
  --bg: #eef0ea; --surface: #dde1d5; --border: #a4aa98;
  --text: #0e100c; --muted: #565d50;
  --primary: #c3166d; --primary-bg: #d61a78; --primary-dark: #ab1260; --on-primary: #ffffff;
  --secondary: #4b7a00;
  --danger: #c4221f; --input-bg: #f7f8f3; --bg-hover: #e2e6d8;
  --ink: #0e100c; --cyan: #007f9a; --dots: 0.2;
}
[data-theme="orbital-dark"] {
  --bg: #07080a; --surface: #0f1114; --border: #2b3036;
  --text: #e6e9e2; --muted: #8a9186;
  --primary: #c6ff00; --primary-bg: #c6ff00; --primary-dark: #a8dd00; --on-primary: #0a0c06;
  --secondary: #00e5ff;
  --danger: #ff4d6d; --input-bg: #040506; --bg-hover: #181b20;
  --ink: #e6e9e2; --cyan: #00e5ff; --dots: 0.28;
}
[data-style="orbital"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 50%;
  --bw: 1px; --bwp: 1px;
  --raised-bc: var(--border);
  --sunken-bc: var(--border);
  --panel-bc: var(--primary-bg);
  --panel-sh: 0 0 0 1px var(--bg), 0 24px 60px rgba(0, 0, 0, 0.55);
  --pop-sh: 0 12px 30px rgba(0, 0, 0, 0.4);
  --float-sh: 0 2px 10px rgba(0, 0, 0, 0.4);
  --tn-sh: none;
  --hover-bc: var(--primary-bg); --hover-fg: var(--text);
  --btn-bg: var(--surface); --btn-bg-hover: var(--bg-hover);
  --btn-case: uppercase; --btn-track: 0.1em;
  --tab-accent: var(--primary-bg);
  --bar-bg: var(--primary-bg); --bar-fg: var(--on-primary); --bar-accent: var(--cyan);
  --top-bg: var(--bg); --top-fg: var(--text);
  --scrim: rgba(2, 4, 6, 0.7);
}
[data-style="orbital"] .topbar { position: relative; border-bottom: 1px solid var(--border); }
[data-style="orbital"] .topbar::after,
[data-style="orbital"] .modal-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(-45deg, var(--primary-bg) 0 5px, transparent 5px 10px);
}
[data-style="orbital"] .modal-head { position: relative; border-bottom: 0; padding: 8px 14px; }
[data-style="orbital"] .modal-head::after { bottom: 0; height: 3px; background: repeating-linear-gradient(-45deg, var(--on-primary) 0 4px, transparent 4px 8px); opacity: .55; }
[data-style="orbital"] .sidebar {
  border-right: 1px solid var(--border);
  background:
    linear-gradient(to bottom, var(--surface) 38%, transparent 100%),
    radial-gradient(circle, color-mix(in srgb, var(--primary-bg) calc(var(--dots) * 100%), transparent) 0.9px, transparent 1.4px) 0 0 / 5px 5px,
    var(--surface);
}
[data-style="orbital"] .col-resizer { background: linear-gradient(to right, transparent 2px, var(--border) 2px, var(--border) 3px, transparent 3px); }

/* readouts: small, tracked, tabular */
[data-style="orbital"] :is(.side-heading, .list-header h2, .modal-head h2, .theme-pop-header, .theme-section) { text-transform: uppercase; letter-spacing: 0.14em; }
[data-style="orbital"] .side-heading { font-size: .7rem; font-weight: 700; color: var(--muted); }
[data-style="orbital"] .side-heading::before { content: "//"; color: var(--primary); letter-spacing: 0; font-weight: 700; }
[data-style="orbital"] .list-header { border-bottom: 1px solid var(--primary-bg); padding: 10px 14px; }
[data-style="orbital"] .list-header h2 { font-size: .95rem; font-weight: 700; }
[data-style="orbital"] .modal-head h2 { font-size: .95rem; font-weight: 700; }

/* Anta has a single weight, so unread and read titles differ by colour and the
   accent edge, and synthesizing a bold is switched off. The reader title is
   about 30px at the default size (rem follows the size setting). */
[data-super="orbital"] :is(.a-title, .tl-title, .reader h1, .list-header h2, .modal-head h2, .article.read .a-title) { font-weight: 400; font-synthesis: none; }
[data-super="orbital"] :is(.a-title, .tl-title) { font-size: 1.4em; line-height: 1.2; letter-spacing: 0.01em; }
[data-super="orbital"] :is(.list-header h2, .modal-head h2) { font-size: 1.4rem; letter-spacing: 0.06em; }
[data-style="orbital"] .modal-head h2::before { content: "\25B6\00a0"; font-size: .7em; vertical-align: .1em; }
[data-style="orbital"] :is(.a-source, .a-time, .r-meta) { text-transform: uppercase; letter-spacing: 0.08em; font-size: .7rem; font-variant-numeric: tabular-nums; }
[data-style="orbital"] .node .count { background: transparent; border: 1px solid var(--border); padding: 0 5px; font-variant-numeric: tabular-nums; }
[data-style="orbital"] .node.active .count { border-color: currentColor; }
[data-style="orbital"] .kids { border-left: 1px dashed var(--border); }

/* the selection is a solid field with one cut corner */
[data-style="orbital"] .node { padding: 5px 10px; }
[data-style="orbital"] .node.active,
[data-style="orbital"] .article.active,
[data-style="orbital"] .article.active:hover {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
[data-style="orbital"] .article { padding: 10px 14px; border-left: 3px solid transparent; }
[data-style="orbital"] .article:not(.read):not(.active) { border-left-color: var(--primary-bg); }
[data-style="orbital"] .article.active, [data-style="orbital"] .article.active:hover { border-left-color: var(--cyan); }
[data-style="orbital"] .a-snippet { line-height: 1.45; }

/* the reading column */
[data-style="orbital"] .reader { padding: 24px clamp(20px, 5vw, 56px) 52px; }
[data-style="orbital"] .reader h1 { font-size: 1.9rem; line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; margin-bottom: 10px; }
[data-super="orbital"] .reader h1 { font-size: 2.3rem; line-height: 1.1; letter-spacing: 0.01em; }
[data-style="orbital"] .r-head { border-bottom: 1px solid var(--border); border-left: 4px solid var(--primary-bg); padding: 0 0 14px 14px; margin-bottom: 22px; }
[data-style="orbital"] .reader :is(.r-content, .r-thread-body) { font-size: 1.02rem; line-height: 1.7; }
[data-style="orbital"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 3px solid var(--cyan); padding-left: 16px; }
[data-style="orbital"] .reader :is(.r-content, .r-thread-body) img { border: 1px solid var(--border); }
[data-style="orbital"] .reader a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* controls */
[data-style="orbital"] .btn { font-weight: 700; font-size: .76rem; }
[data-style="orbital"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); filter: none; }
[data-style="orbital"] :is(input, select, textarea):focus { border-color: var(--primary-bg); box-shadow: 0 0 0 1px var(--primary-bg); outline: none; }
[data-style="orbital"] .tabs { background: var(--surface); }
[data-style="orbital"] .tab { font-weight: 700; font-size: .76rem; text-transform: uppercase; letter-spacing: 0.1em; }
[data-style="orbital"] .tab.active,
[data-style="orbital"] .tab.active:hover { background: transparent; color: var(--primary); border-color: var(--border); border-bottom: 3px solid var(--primary-bg); box-shadow: none; }
[data-style="orbital"] .tab-intro { border-left: 3px solid var(--primary-bg); border-radius: 0; }


/* ═══ Washi ═══════════════════════════════════════════════
    Japanese paper and sumi ink: a fibrous cream ground, hairline rules,
    generous space, a mincho headline face. Vermilion is used the way a hanko
    is: small and sure. A 新聞 seal sits by the masthead, and shippo (seven
    treasures) circles fade up the sidebar. Dark is the same page by night,
    on aizome indigo with a gold accent. */
[data-theme="washi-light"] {
  --bg: #f6f1e7; --surface: #ebe3d2; --border: #cfc4ac;
  --text: #232120; --muted: #6b6459;
  --primary: #27406b; --primary-bg: #27406b; --primary-dark: #1b2e4f; --on-primary: #f6f1e7;
  --secondary: #c8382b;
  --danger: #b3261e; --input-bg: #fbf8f1; --bg-hover: #efe7d6;
  --ink: #1d1b1a; --rule: #1d1b1a; --seal: #c8382b; --sel: #e7dcc4; --fibre: 0.55;
}
[data-theme="washi-dark"] {
  --bg: #10131c; --surface: #1a2030; --border: #2e3548;
  --text: #e8e3d6; --muted: #9a98a0;
  --primary: #e0665c; --primary-bg: #c8382b; --primary-dark: #e0665c; --on-primary: #f8f1e4;
  --secondary: #d8b45f;
  --danger: #ff7a6e; --input-bg: #0b0e15; --bg-hover: #232a3d;
  --ink: #e8e3d6; --rule: #4a5270; --seal: #d9534a; --sel: #252d44; --fibre: 0.3;
}
[data-style="washi"] {
  --radius: 3px; --r-ctl: 2px; --r-btn: 2px; --r-tab: 0px; --r-icon: 2px; --r-pill: 3px;
  --bw: 1px; --bwp: 1px;
  --raised-bc: var(--border);
  --sunken-bc: var(--border);
  --panel-bc: var(--rule);
  --panel-sh: 0 20px 50px rgba(30, 20, 10, 0.3);
  --pop-sh: 0 10px 28px rgba(30, 20, 10, 0.22);
  --float-sh: 0 2px 8px rgba(30, 20, 10, 0.25);
  --tn-sh: 0 1px 2px rgba(30, 20, 10, 0.25);
  --hover-bc: var(--seal); --hover-fg: var(--text);
  --btn-bg: var(--input-bg); --btn-bg-hover: var(--bg-hover);
  --btn-case: none; --btn-track: 0.05em;
  --tab-accent: var(--seal);
  --bar-bg: var(--surface); --bar-fg: var(--text); --bar-accent: var(--seal);
  --top-bg: var(--bg); --top-fg: var(--text);
  --scrim: rgba(20, 14, 8, 0.5);
}

/* the paper: long, horizontal fibres */
[data-style="washi"] body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: var(--fibre);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .6' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .28 0 0 0 .55 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* masthead: a vertical seal, set like a hanko beside the logo */
[data-style="washi"] .topbar { border-bottom: 1px solid var(--rule); padding: 8px 18px; }
[data-style="washi"] .brand::after {
  content: "\65B0\805E"; writing-mode: vertical-rl; margin-left: 10px; padding: 3px 2px;
  font-family: var(--font-headline); font-size: .78rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.1;
  color: var(--seal); border: 1.5px solid var(--seal); border-radius: 2px;
}
[data-style="washi"] .topbar-search input { background: var(--input-bg); }
[data-style="washi"] :is(input, select, textarea):focus { border-color: var(--seal); box-shadow: none; outline: none; }

/* the sidebar: shippo circles fading up from the foot */
[data-style="washi"] .sidebar {
  border-right: 1px solid var(--border); padding: 12px 8px 20px;
  background:
    linear-gradient(to bottom, var(--surface) 45%, transparent 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23888' stroke-opacity='.3' stroke-width='1'%3E%3Ccircle cx='0' cy='0' r='17'/%3E%3Ccircle cx='24' cy='0' r='17'/%3E%3Ccircle cx='0' cy='24' r='17'/%3E%3Ccircle cx='24' cy='24' r='17'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 24px 24px,
    var(--surface);
}
[data-style="washi"] .col-resizer { background: linear-gradient(to right, transparent 3px, var(--border) 3px, var(--border) 4px, transparent 4px); }
[data-style="washi"] .side-heading { text-transform: none; font-size: .78rem; letter-spacing: 0.22em; color: var(--muted); font-weight: 700; }
[data-style="washi"] .side-heading::before { content: ""; flex: 0 0 auto; width: 14px; height: 1px; background: var(--seal); }
[data-style="washi"] .node { padding: 6px 10px; }
[data-style="washi"] .node.active { background: var(--sel); color: var(--text); font-weight: 700; box-shadow: inset 3px 0 0 var(--seal); }
[data-style="washi"] .node .count { background: transparent; padding: 0; }
[data-style="washi"] .node.active .count { color: var(--text); }
[data-style="washi"] .kids { border-left: 1px solid var(--border); margin-left: 14px; }

/* story rows: space around each, a seal-red dot for the unread */
[data-style="washi"] .list-header { border-bottom: 1px solid var(--rule); padding: 14px 20px; }
[data-style="washi"] .list-header h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.04em; }
[data-style="washi"] .article { gap: 12px; padding: 16px 20px; }
[data-style="washi"] .a-title { line-height: 1.45; margin-bottom: 6px; letter-spacing: 0.02em; }
[data-style="washi"] .a-snippet { line-height: 1.65; }
[data-style="washi"] .article:not(.read):not(.active) .a-title::before,
[data-style="washi"] .tl-card:not(.read) .tl-title::before {
  content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .6em; vertical-align: .1em;
  background: var(--seal); border-radius: 50%;
}
[data-style="washi"] .article.active,
[data-style="washi"] .article.active:hover { background: var(--sel); box-shadow: inset 4px 0 0 var(--seal); }
[data-style="washi"] .article.active,
[data-style="washi"] .article.active .a-title,
[data-style="washi"] .article.active .count { color: var(--text); }
[data-style="washi"] .article.active .a-snippet,
[data-style="washi"] .article.active .a-source,
[data-style="washi"] .article.active .a-time { color: var(--muted); }
[data-style="washi"] .article.active .a-star { color: var(--secondary); }
[data-style="washi"] .tl-card { padding: 18px 14px 18px 20px; }

/* the reading column: a quiet measure, with one seal-red square under the title */
[data-style="washi"] .reader { padding: 36px clamp(24px, 6vw, 72px) 64px; }
[data-style="washi"] .reader h1 { font-size: 2rem; line-height: 1.3; letter-spacing: 0.03em; margin-bottom: 12px; }
[data-style="washi"] .r-head { position: relative; border-bottom: 1px solid var(--rule); padding-bottom: 20px; margin-bottom: 32px; }
[data-style="washi"] .r-head::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 11px; height: 11px; background: var(--seal); }
[data-style="washi"] .reader :is(.r-content, .r-thread-body) { font-size: 1.05rem; line-height: 1.9; letter-spacing: 0.02em; max-width: 62ch; }
[data-style="washi"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.4em; }
[data-style="washi"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) { font-family: var(--font-headline); line-height: 1.4; margin: 1.8em 0 .6em; }
[data-style="washi"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 1px solid var(--rule); padding-left: 20px; color: var(--muted); }
[data-style="washi"] .reader :is(.r-content, .r-thread-body) img { border: 1px solid var(--border); padding: 4px; background: var(--input-bg); }
[data-style="washi"] .reader a { text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--seal) 70%, transparent); }
[data-style="washi"] .r-thread { max-width: 62ch; }

/* dialogs and controls */
[data-style="washi"] .modal-head { border-bottom: 1px solid var(--rule); padding: 16px 22px 12px; }
[data-style="washi"] .modal-head h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.05em; }
[data-style="washi"] .modal-head h2::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .6em; background: var(--seal); vertical-align: .05em; }
[data-style="washi"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); filter: none; }
[data-style="washi"] .tabs { background: var(--surface); padding: 4px 22px 0; gap: 0; }
[data-style="washi"] .tab { background: transparent; border-color: transparent; padding: 10px 18px; }
[data-style="washi"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="washi"] .tab.active,
[data-style="washi"] .tab.active:hover { background: transparent; color: var(--text); font-weight: 700; box-shadow: none; border-color: transparent; border-bottom: 2px solid var(--seal); }
[data-style="washi"] .tab-intro { background: var(--bg); border-left: 2px solid var(--seal); border-radius: 0; }
[data-style="washi"] .theme-popover { background: var(--bg); }
[data-style="washi"] :is(.super-badge, .tn-super) { background: var(--seal); color: #fff; }


/* ═══ Graffiti ════════════════════════════════════════════
    A wall by the underpass: concrete grain, tag-lettered headlines, tape
    labels on the sidebar, drips under every heading, marker-cut selections
    and highlighter links. Dark is the wall at night, glowing in spray pink
    and yellow; light is daytime concrete. The reading column stays clean. */
[data-theme="graffiti-light"] {
  --bg: #d8d6d0; --surface: #c9c6bd; --border: #6d6a62;
  --text: #17161a; --muted: #55524b;
  --primary: #b80f4f; --primary-bg: #d4145f; --primary-dark: #a50e48; --on-primary: #ffffff;
  --secondary: #007f7f;
  --danger: #b00020; --input-bg: #e8e6e0; --bg-hover: #bfbcb2;
  --pink: #d4145f; --yel: #ffd800; --cyan: #00a6a6; --ink: #17161a;
  --tag-sh: 2px 2px 0 #ffd800; --grain: 0.55;
}
[data-theme="graffiti-dark"] {
  --bg: #0d0d10; --surface: #17171d; --border: #34343f;
  --text: #f1efe8; --muted: #9d9ba6;
  --primary: #ff3d81; --primary-bg: #ff3d81; --primary-dark: #e0256a; --on-primary: #0d0d10;
  --secondary: #ffe600;
  --danger: #ff6b52; --input-bg: #09090b; --bg-hover: #22222b;
  --pink: #ff3d81; --yel: #ffe600; --cyan: #2ee6d6; --ink: #f1efe8;
  --tag-sh: 0 0 10px rgba(255, 61, 129, 0.65); --grain: 0.35;
}
[data-style="graffiti"] {
  --radius: 2px; --r-ctl: 2px; --r-btn: 2px; --r-tab: 2px; --r-icon: 2px; --r-pill: 2px; --r-round: 50%;
  --bw: 2px; --bwp: 3px; --bsp: dashed;
  --raised-bc: var(--text);
  --sunken-bc: var(--text);
  --panel-bc: var(--yel);
  --panel-sh: 0 20px 50px rgba(0, 0, 0, 0.6);
  --pop-sh: 0 10px 28px rgba(0, 0, 0, 0.45);
  --float-sh: 0 2px 10px rgba(0, 0, 0, 0.45);
  --tn-sh: none;
  --hover-bc: var(--pink); --hover-fg: var(--text);
  --btn-bg: var(--surface); --btn-bg-hover: var(--bg-hover);
  --btn-case: uppercase; --btn-track: 0.07em;
  --tab-accent: var(--pink);
  --bar-bg: var(--surface); --bar-fg: var(--text); --bar-accent: var(--yel);
  --top-bg: var(--bg); --top-fg: var(--text);
  --scrim: rgba(0, 0, 0, 0.65);
}

/* the wall: concrete grain over everything */
[data-style="graffiti"] body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: var(--grain);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 -.32'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Sedgwick Ave has one weight; synthesizing a bold only smears it */
[data-super="graffiti"] :is(.a-title, .tl-title, .reader h1, .list-header h2, .modal-head h2, .article.read .a-title) { font-weight: 400; font-synthesis: none; }

[data-style="graffiti"] .topbar { border-bottom: 4px solid var(--pink); box-shadow: 0 3px 16px color-mix(in srgb, var(--pink) 35%, transparent); position: relative; z-index: 3; }
[data-style="graffiti"] .sidebar { border-right: 3px solid var(--text); }
[data-style="graffiti"] .col-resizer { background: linear-gradient(to right, transparent 2px, var(--text) 2px, var(--text) 4px, transparent 4px); }

/* sidebar headings: strips of masking tape */
[data-style="graffiti"] .side-heading {
  background: var(--yel); color: #111; margin: 10px 2px 4px; padding: 3px 8px;
  transform: rotate(-1deg); font-weight: 700; letter-spacing: 0.1em; font-size: .75rem;
}
[data-style="graffiti"] .side-heading .mini { background: #111; color: var(--yel); border-color: #111; }
[data-style="graffiti"] .node { padding: 5px 10px; }
[data-style="graffiti"] .node .count { background: var(--text); color: var(--bg); padding: 0 6px; font-weight: 700; }
[data-style="graffiti"] .node.active .count { background: var(--on-primary); color: var(--primary-bg); }
[data-style="graffiti"] .kids { border-left: 3px dashed var(--cyan); }

/* the selection is cut by a marker, not a ruler */
[data-style="graffiti"] .node.active,
[data-style="graffiti"] .article.active,
[data-style="graffiti"] .article.active:hover { clip-path: polygon(0 5%, 99% 0, 100% 94%, 1% 100%); }

/* headlines: tag lettering, then the drips */
[data-style="graffiti"] .list-header { border-bottom: 3px solid var(--text); padding: 12px 16px; }
[data-style="graffiti"] .list-header h2 { font-size: 2rem; line-height: 1.1; color: var(--primary); text-shadow: var(--tag-sh); }
/* .list-header is already sticky, which is positioned enough to hold the drips */
[data-style="graffiti"] :is(.modal-head, .r-head) { position: relative; }
[data-style="graffiti"] :is(.list-header, .modal-head, .r-head)::after {
  content: ""; position: absolute; left: 14px; bottom: -19px; width: 64px; height: 22px; z-index: 3; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='22' viewBox='0 0 64 22'%3E%3Cpath d='M30.5 9Q29.8 11.7 29.8 14.5' stroke='%23fff' stroke-opacity='.5' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='29.8' cy='14.3' r='0.9' fill='%23fff' fill-opacity='.65'/%3E%3C/svg%3E") no-repeat 0 0 / 64px 22px, var(--pink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='22' viewBox='0 0 64 22'%3E%3Cpath d='M0 0h64v3H0z'/%3E%3Cpath d='M1.5 0Q7.5 0 7.5 7C7.5 5.5 7 6.5 6.5 10.3A2.7 2.7 0 0 0 11.9 10.3C11.4 6.5 10.5 5.5 10.5 7Q10.5 0 16.5 0Z'/%3E%3Cpath d='M23.3 0Q29.3 0 29.3 7C29.3 7.6 28.4 9 27.8 14.8A3.2 3.2 0 0 0 34.2 14.8C33.6 9 32.7 7.6 32.7 7Q32.7 0 38.7 0Z'/%3E%3Cpath d='M44.7 0Q50.7 0 50.7 7C50.7 3.8 50.2 4.5 49.8 6.8A2.2 2.2 0 0 0 54.2 6.8C53.8 4.5 53.3 3.8 53.3 7Q53.3 0 59.3 0Z'/%3E%3Ccircle cx='31' cy='20.5' r='1.2'/%3E%3C/svg%3E") no-repeat 0 0 / 64px 22px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='22' viewBox='0 0 64 22'%3E%3Cpath d='M0 0h64v3H0z'/%3E%3Cpath d='M1.5 0Q7.5 0 7.5 7C7.5 5.5 7 6.5 6.5 10.3A2.7 2.7 0 0 0 11.9 10.3C11.4 6.5 10.5 5.5 10.5 7Q10.5 0 16.5 0Z'/%3E%3Cpath d='M23.3 0Q29.3 0 29.3 7C29.3 7.6 28.4 9 27.8 14.8A3.2 3.2 0 0 0 34.2 14.8C33.6 9 32.7 7.6 32.7 7Q32.7 0 38.7 0Z'/%3E%3Cpath d='M44.7 0Q50.7 0 50.7 7C50.7 3.8 50.2 4.5 49.8 6.8A2.2 2.2 0 0 0 54.2 6.8C53.8 4.5 53.3 3.8 53.3 7Q53.3 0 59.3 0Z'/%3E%3Ccircle cx='31' cy='20.5' r='1.2'/%3E%3C/svg%3E") no-repeat 0 0 / 64px 22px;
}
[data-style="graffiti"] .modal-head { border-bottom: 3px solid var(--text); padding: 12px 16px; }
[data-style="graffiti"] .modal-head h2 { font-size: 2rem; line-height: 1.1; }
[data-style="graffiti"] .article { padding: 11px 14px; border-left: 5px solid transparent; border-bottom: 1px dashed var(--border); }
[data-style="graffiti"] .article:not(.read):not(.active) { border-left-color: var(--pink); }
[data-style="graffiti"] .article:not(.read):not(.active):nth-child(3n) { border-left-color: var(--cyan); }
[data-style="graffiti"] .article:not(.read):not(.active):nth-child(3n + 1) { border-left-color: var(--yel); }
[data-style="graffiti"] :is(.a-title, .tl-title) { font-size: 1.5em; line-height: 1.12; }
[data-style="graffiti"] .a-snippet { line-height: 1.4; }

/* the reading column stays clean: one tag headline, plain body */
[data-style="graffiti"] .reader { padding: 24px clamp(20px, 5vw, 56px) 52px; }
[data-style="graffiti"] .reader h1 { font-size: 3.2rem; line-height: 1.05; color: var(--primary); text-shadow: var(--tag-sh); margin-bottom: 10px; }
[data-style="graffiti"] .r-head { border-bottom: 4px solid var(--pink); padding-bottom: 16px; margin-bottom: 26px; }
[data-style="graffiti"] .r-head::after { left: 0; }
[data-style="graffiti"] .reader :is(.r-content, .r-thread-body) { font-size: 1.08rem; line-height: 1.6; }
[data-style="graffiti"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 6px solid var(--cyan); padding-left: 16px; }
[data-style="graffiti"] .reader :is(.r-content, .r-thread-body) img { border: 3px solid var(--text); box-shadow: 4px 4px 0 var(--pink); }
[data-style="graffiti"] .reader a {
  text-decoration: none; color: inherit; font-weight: 700;
  background: linear-gradient(transparent 58%, color-mix(in srgb, var(--yel) 55%, transparent) 58%);
}
[data-style="graffiti"] .reader a:hover { background: color-mix(in srgb, var(--yel) 70%, transparent); }

/* buttons: stencil caps that tilt when you point at them */
[data-style="graffiti"] .btn { font-weight: 700; transition: transform 0.1s; }
[data-style="graffiti"] .btn.solid { border-color: var(--text); }
[data-style="graffiti"] .btn.solid:hover { background: var(--primary-dark); filter: none; border-color: var(--text); }
[data-style="graffiti"] :is(.btn:not(.ghost):not(:disabled), .theme-btn):hover { transform: rotate(-1.2deg); }
[data-style="graffiti"] :is(input, select, textarea):focus { border-color: var(--pink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pink) 40%, transparent); outline: none; }
[data-style="graffiti"] .tabs { background: var(--bg); box-shadow: inset 0 -3px 0 var(--text); }
[data-style="graffiti"] .tab { font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
[data-style="graffiti"] .tab.active,
[data-style="graffiti"] .tab.active:hover { background: var(--primary-bg); color: var(--on-primary); border-color: var(--text); box-shadow: none; }
[data-style="graffiti"] .tab-intro { border-left: 6px solid var(--yel); border-radius: 0; }
[data-style="graffiti"] :is(.super-badge, .tn-super) { background: var(--yel); color: #111; }
[data-theme="graffiti-dark"] .reader a { color: var(--yel); background: linear-gradient(transparent 88%, var(--yel) 88%); }
[data-theme="graffiti-dark"] .reader a:hover { background: color-mix(in srgb, var(--yel) 30%, transparent); }


/* ═══ Header art ══════════════════════════════════════════
   Super themes dress the top bar with a drawing behind its controls. Two
   pseudo-elements per theme (::before / ::after) sit at z-index -1 inside the
   bar's own stacking context: above its background, under its buttons, and
   never in the way of a click. Line art is an SVG used as a mask, filled with
   a theme token, so it follows the palette and flips with light/dark. Motion
   is slow and switched off under prefers-reduced-motion. */
:is([data-style="soviet"], [data-style="cyberpunk"], [data-style="graffiti"], [data-style="liquid"],
    [data-style="xp"], [data-style="olde"], [data-style="crt"], [data-style="dos"], [data-style="atari-st"]) .topbar { position: relative; z-index: 5; }
:is([data-style="soviet"], [data-style="cyberpunk"], [data-style="graffiti"], [data-style="liquid"],
    [data-style="xp"], [data-style="olde"], [data-style="crt"], [data-style="dos"], [data-style="atari-st"]) .topbar::before,
:is([data-style="soviet"], [data-style="cyberpunk"], [data-style="graffiti"], [data-style="liquid"],
    [data-style="xp"], [data-style="olde"], [data-style="crt"], [data-style="dos"], [data-style="atari-st"]) .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
}

/* Soviet: constructivist rays climbing from the lower-right, a factory skyline
   along the red rule, and a star by the logo */
[data-style="soviet"] .topbar::before {
  inset: 0;
  background: repeating-conic-gradient(from 270deg at 100% 140%,
    color-mix(in srgb, var(--red) 22%, transparent) 0 3deg, transparent 3deg 9deg);
  -webkit-mask-image: linear-gradient(270deg, #000, transparent 50%);
  mask-image: linear-gradient(270deg, #000, transparent 50%);
}
[data-style="soviet"] .topbar::after {
  left: 0; right: 0; bottom: 0; height: 12px;
  background: color-mix(in srgb, var(--ink) 85%, transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='12' viewBox='0 0 110 14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V9h8V3h4v6h5V6l7 3V6l7 3V6l7 3v5h10V0h4v14h6V7h14V3h3v4h3V5h4v9h10V8l6-4v4l6-4v4l6-4v10z'/%3E%3C/svg%3E") repeat-x left bottom / 110px 12px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='12' viewBox='0 0 110 14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V9h8V3h4v6h5V6l7 3V6l7 3V6l7 3v5h10V0h4v14h6V7h14V3h3v4h3V5h4v9h10V8l6-4v4l6-4v4l6-4v10z'/%3E%3C/svg%3E") repeat-x left bottom / 110px 12px;
}
[data-style="soviet"][data-mode="dark"] .topbar::after { opacity: .4; }
[data-style="soviet"] .brand::after {
  content: "\2605"; color: var(--red); font-size: 1.6rem; line-height: 1; margin-left: 4px;
  transform: rotate(-12deg); text-shadow: 2px 2px 0 var(--ink);
}

/* Cyberpunk: circuit traces fading in from the right, a lit skyline along the
   rule, a glitch now and then, and a status tag by the logo */
[data-style="cyberpunk"] .topbar::before {
  top: 0; bottom: 0; right: 0; width: min(62%, 760px);
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--neon) 60%, transparent) 70%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80' viewBox='0 0 240 80' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M0 20h50l12 12h40l10-10h70l10 10h48M30 80V56l14-14h40l8-8h60M150 80V64l12-12h50l8 8h20M120 0v12l10 10h30l10-10h50M200 80V68'/%3E%3Cg fill='%23000' stroke='none'%3E%3Ccircle cx='62' cy='32' r='2.6'/%3E%3Ccircle cx='112' cy='22' r='2.6'/%3E%3Ccircle cx='84' cy='42' r='2.6'/%3E%3Ccircle cx='162' cy='52' r='2.6'/%3E%3Ccircle cx='222' cy='60' r='2.6'/%3E%3Ccircle cx='130' cy='22' r='2.6'/%3E%3Ccircle cx='230' cy='20' r='2.6'/%3E%3C/g%3E%3C/svg%3E") repeat-x right center / 240px 80px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80' viewBox='0 0 240 80' fill='none' stroke='%23000' stroke-width='1.2'%3E%3Cpath d='M0 20h50l12 12h40l10-10h70l10 10h48M30 80V56l14-14h40l8-8h60M150 80V64l12-12h50l8 8h20M120 0v12l10 10h30l10-10h50M200 80V68'/%3E%3Cg fill='%23000' stroke='none'%3E%3Ccircle cx='62' cy='32' r='2.6'/%3E%3Ccircle cx='112' cy='22' r='2.6'/%3E%3Ccircle cx='84' cy='42' r='2.6'/%3E%3Ccircle cx='162' cy='52' r='2.6'/%3E%3Ccircle cx='222' cy='60' r='2.6'/%3E%3Ccircle cx='130' cy='22' r='2.6'/%3E%3Ccircle cx='230' cy='20' r='2.6'/%3E%3C/g%3E%3C/svg%3E") repeat-x right center / 240px 80px;
}
[data-style="cyberpunk"] .topbar::after {
  left: 0; right: 0; bottom: 0; height: 13px;
  background:
    radial-gradient(circle, var(--surface) 0.7px, transparent 1.2px) 1px 1px / 4px 4px,
    color-mix(in srgb, var(--neon) 40%, var(--surface));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='13' viewBox='0 0 150 13' preserveAspectRatio='none'%3E%3Cpath d='M0 13V8h10V4h8v9h4V6h6V0h2v6h6v7h6V9h12V5h10v8h8V7h6V3h8v10h10V10h8V6h8v7h6V8h10V2h8v11z'/%3E%3C/svg%3E") repeat-x left bottom / 150px 13px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='13' viewBox='0 0 150 13' preserveAspectRatio='none'%3E%3Cpath d='M0 13V8h10V4h8v9h4V6h6V0h2v6h6v7h6V9h12V5h10v8h8V7h6V3h8v10h10V10h8V6h8v7h6V8h10V2h8v11z'/%3E%3C/svg%3E") repeat-x left bottom / 150px 13px;
}
[data-style="cyberpunk"] .brand::after {
  content: "NET//ONLINE"; align-self: center; margin-left: 8px; padding: 3px 6px 3px 18px;
  font: 700 .6rem/1 var(--font-ui); letter-spacing: 0.2em; color: var(--neon);
  border: 1px solid color-mix(in srgb, var(--neon) 60%, transparent);
  background: radial-gradient(circle, var(--neon) 0 2.5px, transparent 3px) 6px center / 8px 8px no-repeat;
}

/* Graffiti: paint drips off the bottom rule and a spatter of colour on the right */
[data-style="graffiti"] .topbar::before {
  top: 0; bottom: 0; right: 0; width: min(60%, 720px); opacity: .5;
  background: linear-gradient(90deg, transparent 0%, var(--pink) 35%, var(--yel) 70%, var(--cyan) 100%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='80' viewBox='0 0 300 80'%3E%3Ccircle cx='24' cy='18' r='4.5'/%3E%3Ccircle cx='46' cy='52' r='2.5'/%3E%3Ccircle cx='70' cy='30' r='1.6'/%3E%3Ccircle cx='96' cy='64' r='5.5'/%3E%3Ccircle cx='118' cy='14' r='2'/%3E%3Ccircle cx='140' cy='44' r='3.4'/%3E%3Ccircle cx='166' cy='68' r='1.8'/%3E%3Ccircle cx='188' cy='22' r='6'/%3E%3Ccircle cx='210' cy='56' r='2.2'/%3E%3Ccircle cx='236' cy='34' r='3'/%3E%3Ccircle cx='262' cy='12' r='1.8'/%3E%3Ccircle cx='280' cy='62' r='4.2'/%3E%3Ccircle cx='58' cy='70' r='1.4'/%3E%3Ccircle cx='152' cy='10' r='1.4'/%3E%3C/svg%3E") repeat-x right center / 300px 80px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='80' viewBox='0 0 300 80'%3E%3Ccircle cx='24' cy='18' r='4.5'/%3E%3Ccircle cx='46' cy='52' r='2.5'/%3E%3Ccircle cx='70' cy='30' r='1.6'/%3E%3Ccircle cx='96' cy='64' r='5.5'/%3E%3Ccircle cx='118' cy='14' r='2'/%3E%3Ccircle cx='140' cy='44' r='3.4'/%3E%3Ccircle cx='166' cy='68' r='1.8'/%3E%3Ccircle cx='188' cy='22' r='6'/%3E%3Ccircle cx='210' cy='56' r='2.2'/%3E%3Ccircle cx='236' cy='34' r='3'/%3E%3Ccircle cx='262' cy='12' r='1.8'/%3E%3Ccircle cx='280' cy='62' r='4.2'/%3E%3Ccircle cx='58' cy='70' r='1.4'/%3E%3Ccircle cx='152' cy='10' r='1.4'/%3E%3C/svg%3E") repeat-x right center / 300px 80px;
}
[data-style="graffiti"] .topbar::after {
  left: 0; right: 0; top: 100%; height: 34px; z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='34' viewBox='0 0 240 34'%3E%3Cpath d='M55.4 9Q54.2 14.5 54.2 20' stroke='%23fff' stroke-opacity='.5' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='54.2' cy='19.9' r='0.9' fill='%23fff' fill-opacity='.65'/%3E%3Cpath d='M117.4 9Q116.5 11.9 116.5 14.7' stroke='%23fff' stroke-opacity='.5' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='116.5' cy='14.5' r='0.9' fill='%23fff' fill-opacity='.65'/%3E%3Cpath d='M165.5 9Q165.2 14.2 165.2 19.4' stroke='%23fff' stroke-opacity='.5' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='165.2' cy='19.2' r='0.9' fill='%23fff' fill-opacity='.65'/%3E%3Cpath d='M213.6 9Q212.7 11.5 212.7 14' stroke='%23fff' stroke-opacity='.5' stroke-width='1.4' stroke-linecap='round' fill='none'/%3E%3Ccircle cx='212.7' cy='13.9' r='0.9' fill='%23fff' fill-opacity='.65'/%3E%3C/svg%3E") repeat-x left top / 240px 34px, var(--pink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='34' viewBox='0 0 240 34'%3E%3Cpath d='M0 0h240v4H0z'/%3E%3Cpath d='M0.4 0Q8.4 0 8.4 7C8.4 6.3 7.8 7.5 7.2 12A3 3 0 0 0 13.2 12C12.6 7.5 11.6 6.3 11.6 7Q11.6 0 19.6 0Z'/%3E%3Cpath d='M20.7 0Q28.7 0 28.7 7C28.7 3.8 28.2 4.5 27.7 6.7A2.3 2.3 0 0 0 32.3 6.7C31.8 4.5 31.3 3.8 31.3 7Q31.3 0 39.3 0Z'/%3E%3Cpath d='M46.1 0Q54.1 0 54.1 7C54.1 10.1 52.7 12 52 20.4A3.6 3.6 0 0 0 59.2 20.4C58.5 12 57.9 10.1 57.9 7Q57.9 0 65.9 0Z'/%3E%3Cpath d='M78.5 0Q86.5 0 86.5 7C86.5 5 86.1 6 85.6 9.3A2.7 2.7 0 0 0 91 9.3C90.5 6 89.5 5 89.5 7Q89.5 0 97.5 0Z'/%3E%3Cpath d='M107.9 0Q115.9 0 115.9 7C115.9 8 114.9 9.5 114.1 15.1A3.9 3.9 0 0 0 121.9 15.1C121.1 9.5 120.1 8 120.1 7Q120.1 0 128.1 0Z'/%3E%3Cpath d='M126.6 0Q134.6 0 134.6 7C134.6 4.2 134.1 5 133.6 7.6A2.4 2.4 0 0 0 138.4 7.6C137.9 5 137.4 4.2 137.4 7Q137.4 0 145.4 0Z'/%3E%3Cpath d='M156.3 0Q164.3 0 164.3 7C164.3 9.7 163.9 11.5 163.2 19.7A3.3 3.3 0 0 0 169.8 19.7C169.1 11.5 167.7 9.7 167.7 7Q167.7 0 175.7 0Z'/%3E%3Cpath d='M186.2 0Q194.2 0 194.2 7C194.2 5.5 193.6 6.5 193 10A3 3 0 0 0 199 10C198.4 6.5 197.8 5.5 197.8 7Q197.8 0 205.8 0Z'/%3E%3Cpath d='M204.6 0Q212.6 0 212.6 7C212.6 7.1 211.5 8.5 211 14.3A2.7 2.7 0 0 0 216.4 14.3C215.9 8.5 215.4 7.1 215.4 7Q215.4 0 223.4 0Z'/%3E%3Cpath d='M222.7 0Q230.7 0 230.7 7C230.7 3.4 230.2 4 229.8 5.8A2.2 2.2 0 0 0 234.2 5.8C233.8 4 233.3 3.4 233.3 7Q233.3 0 241.3 0Z'/%3E%3Ccircle cx='56' cy='30.5' r='1.6'/%3E%3Ccircle cx='166' cy='28.5' r='1.2'/%3E%3C/svg%3E") repeat-x left top / 240px 34px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='34' viewBox='0 0 240 34'%3E%3Cpath d='M0 0h240v4H0z'/%3E%3Cpath d='M0.4 0Q8.4 0 8.4 7C8.4 6.3 7.8 7.5 7.2 12A3 3 0 0 0 13.2 12C12.6 7.5 11.6 6.3 11.6 7Q11.6 0 19.6 0Z'/%3E%3Cpath d='M20.7 0Q28.7 0 28.7 7C28.7 3.8 28.2 4.5 27.7 6.7A2.3 2.3 0 0 0 32.3 6.7C31.8 4.5 31.3 3.8 31.3 7Q31.3 0 39.3 0Z'/%3E%3Cpath d='M46.1 0Q54.1 0 54.1 7C54.1 10.1 52.7 12 52 20.4A3.6 3.6 0 0 0 59.2 20.4C58.5 12 57.9 10.1 57.9 7Q57.9 0 65.9 0Z'/%3E%3Cpath d='M78.5 0Q86.5 0 86.5 7C86.5 5 86.1 6 85.6 9.3A2.7 2.7 0 0 0 91 9.3C90.5 6 89.5 5 89.5 7Q89.5 0 97.5 0Z'/%3E%3Cpath d='M107.9 0Q115.9 0 115.9 7C115.9 8 114.9 9.5 114.1 15.1A3.9 3.9 0 0 0 121.9 15.1C121.1 9.5 120.1 8 120.1 7Q120.1 0 128.1 0Z'/%3E%3Cpath d='M126.6 0Q134.6 0 134.6 7C134.6 4.2 134.1 5 133.6 7.6A2.4 2.4 0 0 0 138.4 7.6C137.9 5 137.4 4.2 137.4 7Q137.4 0 145.4 0Z'/%3E%3Cpath d='M156.3 0Q164.3 0 164.3 7C164.3 9.7 163.9 11.5 163.2 19.7A3.3 3.3 0 0 0 169.8 19.7C169.1 11.5 167.7 9.7 167.7 7Q167.7 0 175.7 0Z'/%3E%3Cpath d='M186.2 0Q194.2 0 194.2 7C194.2 5.5 193.6 6.5 193 10A3 3 0 0 0 199 10C198.4 6.5 197.8 5.5 197.8 7Q197.8 0 205.8 0Z'/%3E%3Cpath d='M204.6 0Q212.6 0 212.6 7C212.6 7.1 211.5 8.5 211 14.3A2.7 2.7 0 0 0 216.4 14.3C215.9 8.5 215.4 7.1 215.4 7Q215.4 0 223.4 0Z'/%3E%3Cpath d='M222.7 0Q230.7 0 230.7 7C230.7 3.4 230.2 4 229.8 5.8A2.2 2.2 0 0 0 234.2 5.8C233.8 4 233.3 3.4 233.3 7Q233.3 0 241.3 0Z'/%3E%3Ccircle cx='56' cy='30.5' r='1.6'/%3E%3Ccircle cx='166' cy='28.5' r='1.2'/%3E%3C/svg%3E") repeat-x left top / 240px 34px;
}

/* Liquid Glass: coloured orbs drifting behind the glass and a gloss that
   sweeps across it */
[data-theme="liquid-light"] { --orb1: #ff9fd0; --orb2: #7db8ff; --orb3: #ffcf8a; --orb4: #9fe8c4; }
[data-theme="liquid-dark"] { --orb1: #8b3fd0; --orb2: #2a5fe0; --orb3: #0f9bb8; --orb4: #c0267a; }
[data-style="liquid"] .topbar::before {
  inset: 0; opacity: .85;
  background:
    radial-gradient(ellipse 14% 90% at 12% 50%, var(--orb1), transparent 100%),
    radial-gradient(ellipse 16% 110% at 38% 20%, var(--orb2), transparent 100%),
    radial-gradient(ellipse 14% 100% at 66% 80%, var(--orb3), transparent 100%),
    radial-gradient(ellipse 16% 110% at 90% 40%, var(--orb4), transparent 100%);
  background-size: 140% 100%; background-position: 0 0;
  filter: blur(10px) saturate(1.2);
}
[data-style="liquid"] .topbar::after {
  inset: 0; border-radius: inherit;
  background:
    linear-gradient(to bottom, var(--spec) 0, transparent 2px),
    linear-gradient(105deg, transparent 42%, color-mix(in srgb, var(--spec) 55%, transparent) 50%, transparent 58%) 0 0 / 260% 100% no-repeat;
  background-position: 0 0, 160% 0;
}
@media (prefers-reduced-motion: no-preference) {
  [data-style="liquid"] .topbar::before { animation: liquid-drift 26s ease-in-out infinite alternate; }
  [data-style="liquid"] .topbar::after { animation: liquid-gloss 11s ease-in-out infinite; }
  [data-style="cyberpunk"] .topbar::before { animation: cyber-glitch 9s steps(1, end) infinite; }
}
@keyframes liquid-drift { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@keyframes liquid-gloss {
  0%, 62% { background-position: 0 0, 160% 0; }
  100% { background-position: 0 0, -60% 0; }
}
@keyframes cyber-glitch {
  0%, 93%, 100% { transform: none; opacity: 1; }
  94% { transform: translateX(-5px); opacity: .5; }
  96% { transform: translateX(4px); opacity: .85; }
  98% { transform: translateX(-2px); opacity: .6; }
}

/* Windows XP: a Luna-blue bar with the Bliss hills and a couple of clouds
   along its foot */
[data-theme="xp-light"] { --hill1: #5aa624; --hill2: #3f8a1a; --cloud: rgba(255, 255, 255, 0.6); }
[data-theme="xp-dark"] { --hill1: #1d4a1a; --hill2: #143a14; --cloud: rgba(180, 200, 255, 0.16); }
[data-style="xp"] { --top-fg: #ffffff; }
[data-style="xp"] .topbar { border-bottom: 1px solid var(--edge); }
[data-style="xp"] .topbar::before {
  inset: 0;
  background:
    radial-gradient(ellipse 14% 22% at 30% 30%, var(--cloud), transparent 72%),
    radial-gradient(ellipse 10% 18% at 72% 22%, var(--cloud), transparent 72%),
    radial-gradient(ellipse 46% 78% at 22% 124%, var(--hill1) 0 72%, transparent 73%),
    radial-gradient(ellipse 52% 66% at 82% 128%, var(--hill2) 0 72%, transparent 73%);
}
[data-style="xp"] .topbar::after {
  left: 0; right: 0; top: 0; height: 45%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.22), transparent);
}

/* Olde: a gilt printer's ornament set into the double rule */
[data-style="olde"] .topbar::after {
  left: 50%; bottom: -14px; height: 24px; padding: 0 .55em; transform: translateX(-50%);
  display: flex; align-items: center; white-space: nowrap;
  content: "\2619\00a0\2766\00a0\2767";
  font-size: 1.15rem; line-height: 1; letter-spacing: .15em; color: var(--gild);
  background: linear-gradient(to bottom, var(--surface) 50%, var(--bg) 50%);
}

/* CRT: the bar sits behind curved glass: a vignette, a phosphor roll bar
   drifting down it, a ruler of tick marks on the rule, and a blinking prompt */
[data-style="crt"] .topbar::before {
  inset: 0;
  background:
    linear-gradient(to bottom, transparent, color-mix(in srgb, var(--primary-bg) 16%, transparent) 50%, transparent) 0 -60% / 100% 55% no-repeat,
    radial-gradient(ellipse at center, transparent 50%, var(--vig) 120%);
}
[data-style="crt"] .topbar::after {
  left: 0; right: 0; bottom: 0; height: 6px; opacity: .65;
  background:
    repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 80px) 0 0 / 100% 6px no-repeat,
    repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 8px) 0 100% / 100% 3px no-repeat;
}
[data-style="crt"] .brand::after {
  content: "READY."; align-self: center; margin-left: 10px; padding-right: .85em;
  font-size: 1.1rem; letter-spacing: .1em; color: var(--primary-bg);
  background: linear-gradient(var(--primary-bg), var(--primary-bg)) right center / .55em 1em no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  [data-style="crt"] .topbar::before { animation: crt-roll 7s linear infinite; }
  [data-style="crt"] .brand::after { animation: crt-cursor 1.1s steps(1, end) infinite; }
}
@keyframes crt-roll { to { background-position: 0 160%, 0 0; } }
@keyframes crt-cursor { 50% { background-size: 0 0; } }

/* DOS 1992: a shade-block ramp (\2591 \2592 \2593) stepping down into a doubled
   rule along the foot of the bar, as drawn by box characters */
[data-style="dos"] .topbar { border-bottom: 5px double #000000; }
[data-style="dos"] .topbar::before {
  left: 0; right: 0; bottom: 0; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='12' viewBox='0 0 4 12'%3E%3Cpath d='M0 0h2v2h-2zM0 4h2v2h-2zM2 6h2v2h-2zM0 8h4v2h-4zM0 10h2v2h-2z'/%3E%3C/svg%3E") left bottom / 4px 12px repeat-x;
}

/* Atari ST: the GEM title-bar hatching along the bar's foot and a 1-bit dither
   thickening into the right edge */
[data-style="atari-st"] .topbar::before {
  top: 0; bottom: 0; right: 0; width: 132px;
  background:
    repeating-conic-gradient(var(--border) 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0 28%, rgba(0, 0, 0, 0.35) 28% 52%, rgba(0, 0, 0, 0.65) 52% 76%, #000 76%);
  mask-image: linear-gradient(90deg, transparent 0 28%, rgba(0, 0, 0, 0.35) 28% 52%, rgba(0, 0, 0, 0.65) 52% 76%, #000 76%);
}
[data-style="atari-st"] .topbar::after {
  left: 0; right: 0; bottom: 0; height: 9px;
  background: repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 3px);
}


/* ── Header art, second batch ─────────────────────────────
   Sleek, Airy, Aqua, Washi and Folio have both pseudo-elements free. Bauhaus,
   Orbital, 1960s and 1980s already hang a strip off ::after, so they only get
   ::before, and the shared rule leaves ::after alone for them. */
:is([data-style="sleek"], [data-style="airy"], [data-style="aqua"], [data-style="washi"], [data-style="folio"],
    [data-style="bauhaus"], [data-style="orbital"], [data-style="sixties"], [data-style="pinstripe"]) .topbar { position: relative; z-index: 5; }
:is([data-style="sleek"], [data-style="airy"], [data-style="aqua"], [data-style="washi"], [data-style="folio"],
    [data-style="bauhaus"], [data-style="orbital"], [data-style="sixties"], [data-style="pinstripe"]) .topbar::before,
:is([data-style="sleek"], [data-style="airy"], [data-style="aqua"], [data-style="washi"], [data-style="folio"]) .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
}

/* Sleek: rivets in the corners, two specular streaks across the plate with a
   glint passing over them now and then, and a lit seam along the foot */
[data-style="sleek"] .topbar::before {
  inset: 0;
  background:
    radial-gradient(circle at 35% 30%, var(--hl) 0 22%, color-mix(in srgb, var(--text) 38%, transparent) 55%, transparent 62%) left 4px top 4px / 7px 7px no-repeat,
    radial-gradient(circle at 35% 30%, var(--hl) 0 22%, color-mix(in srgb, var(--text) 38%, transparent) 55%, transparent 62%) right 4px top 4px / 7px 7px no-repeat,
    radial-gradient(circle at 35% 30%, var(--hl) 0 22%, color-mix(in srgb, var(--text) 38%, transparent) 55%, transparent 62%) left 4px bottom 4px / 7px 7px no-repeat,
    radial-gradient(circle at 35% 30%, var(--hl) 0 22%, color-mix(in srgb, var(--text) 38%, transparent) 55%, transparent 62%) right 4px bottom 4px / 7px 7px no-repeat,
    linear-gradient(105deg, transparent 44%, color-mix(in srgb, var(--hl) 85%, transparent) 50%, transparent 56%) 160% 0 / 240% 100% no-repeat,
    linear-gradient(100deg, transparent 12%, color-mix(in srgb, var(--hl) 40%, transparent) 15%, transparent 22%, transparent 61%, color-mix(in srgb, var(--hl) 28%, transparent) 63%, transparent 70%);
}
[data-style="sleek"] .topbar::after {
  left: 8px; right: 8px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary) 18%, var(--primary) 55%, var(--secondary) 82%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--primary) 60%, transparent);
}

/* Airy: a slow aurora of soft colour behind the bar and a hairline of it underneath */
[data-style="airy"] .topbar::before {
  inset: 0; opacity: .55;
  background:
    radial-gradient(ellipse 16% 130% at 6% 40%, color-mix(in srgb, var(--primary) 38%, transparent), transparent),
    radial-gradient(ellipse 14% 120% at 30% 0%, color-mix(in srgb, var(--secondary) 34%, transparent), transparent),
    radial-gradient(ellipse 16% 130% at 62% 100%, color-mix(in srgb, var(--primary) 30%, transparent), transparent),
    radial-gradient(ellipse 14% 120% at 90% 20%, color-mix(in srgb, var(--secondary) 34%, transparent), transparent);
  background-size: 130% 100%;
}
[data-style="airy"][data-mode="dark"] .topbar::before { opacity: .4; }
[data-style="airy"] .topbar::after {
  left: 8%; right: 8%; bottom: -1px; height: 2px; opacity: .55;
  background: linear-gradient(90deg, transparent, var(--primary) 30%, var(--secondary) 70%, transparent);
}

/* Aqua: pinstripes under a gel highlight, with a few bubbles rising in the middle */
[data-style="aqua"] .topbar::before {
  --bub-hi: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95) 0 9%, transparent 22%);
  --bub: radial-gradient(circle closest-side, rgba(70, 150, 240, 0.1), rgba(130, 195, 255, 0.28) 68%, rgba(70, 150, 240, 0.55) 94%, transparent 100%);
  inset: 0;
  background:
    var(--bub-hi) 58% 62% / 22px 22px no-repeat,
    var(--bub) 58% 62% / 22px 22px no-repeat,
    var(--bub-hi) 66% 24% / 14px 14px no-repeat,
    var(--bub) 66% 24% / 14px 14px no-repeat,
    var(--bub-hi) 74% 70% / 30px 30px no-repeat,
    var(--bub) 74% 70% / 30px 30px no-repeat,
    var(--bub-hi) 82% 30% / 18px 18px no-repeat,
    var(--bub) 82% 30% / 18px 18px no-repeat,
    var(--bub-hi) 36% 22% / 12px 12px no-repeat,
    var(--bub) 36% 22% / 12px 12px no-repeat,
    repeating-linear-gradient(to bottom, var(--stripe) 0 1px, transparent 1px 3px);
}
[data-style="aqua"] .topbar::after {
  left: 0; right: 0; top: 0; height: 50%;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--gloss) 60%, transparent), color-mix(in srgb, var(--gloss) 6%, transparent));
}

/* Washi: seigaiha waves lapping along the foot of the bar, and a faint rising sun */
[data-style="washi"] .topbar::before {
  left: 0; right: 0; bottom: 0; height: 20px;
  background: linear-gradient(to top, color-mix(in srgb, var(--primary) 55%, transparent), transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M-10 10A10 10 0 0 1 10 10M-7 10A7 7 0 0 1 7 10M-4 10A4 4 0 0 1 4 10M10 10A10 10 0 0 1 30 10M13 10A7 7 0 0 1 27 10M16 10A4 4 0 0 1 24 10M0 20A10 10 0 0 1 20 20M3 20A7 7 0 0 1 17 20M6 20A4 4 0 0 1 14 20'/%3E%3C/svg%3E") repeat-x left bottom / 20px 20px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M-10 10A10 10 0 0 1 10 10M-7 10A7 7 0 0 1 7 10M-4 10A4 4 0 0 1 4 10M10 10A10 10 0 0 1 30 10M13 10A7 7 0 0 1 27 10M16 10A4 4 0 0 1 24 10M0 20A10 10 0 0 1 20 20M3 20A7 7 0 0 1 17 20M6 20A4 4 0 0 1 14 20'/%3E%3C/svg%3E") repeat-x left bottom / 20px 20px;
}
[data-style="washi"] .topbar::after {
  inset: 0;
  background: radial-gradient(circle 74px at 84% 44%, color-mix(in srgb, var(--seal) 15%, transparent) 0 97%, transparent 100%);
}

/* Folio: an editorial ear: the date set in tracked small caps between hairlines */
[data-style="folio"] .topbar { border-bottom: 3px double var(--line); }
[data-style="folio"] .topbar-date {
  display: block; align-self: center; margin-left: 6px; padding: 4px 0 4px 14px;
  border-left: 1px solid var(--border); white-space: nowrap;
  font-family: var(--font-headline); font-variant: small-caps; font-size: .86rem; letter-spacing: .14em; color: var(--muted);
}
@media (max-width: 1180px) { [data-style="folio"] .topbar-date { display: none; } }

/* Bauhaus: a small composition of the primitives between logo and search */
[data-style="bauhaus"] .topbar::before {
  left: 232px; top: 6px; bottom: 6px; width: 190px;
  background:
    radial-gradient(circle 13px at 150px 22px, transparent 0 10px, var(--ink) 10px 12px, transparent 12px),
    linear-gradient(135deg, transparent 46%, var(--ink) 46% 51%, transparent 51%) 0 0 / 100% 100% no-repeat,
    linear-gradient(var(--blu), var(--blu)) 112px 30px / 26px 26px no-repeat,
    linear-gradient(to top right, var(--red) 50%, transparent 50%) 60px 14px / 44px 44px no-repeat,
    radial-gradient(circle 20px at 28px 34px, var(--yel) 0 98%, transparent 100%);
}
@media (max-width: 1100px) { [data-style="bauhaus"] .topbar::before { display: none; } }

/* Orbital: orbit tracks, a satellite and a field of stars thinning out to the
   left, with the mission clock beside the logo */
[data-style="orbital"] .topbar::before {
  top: 0; bottom: 0; right: 0; width: min(55%, 720px);
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--cyan) 75%, transparent) 65%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='76' viewBox='0 0 360 76' fill='none' stroke='%23000' stroke-width='1'%3E%3Cellipse cx='180' cy='38' rx='170' ry='24' transform='rotate(-9 180 38)'/%3E%3Cellipse cx='180' cy='38' rx='120' ry='13' transform='rotate(8 180 38)' stroke-dasharray='2 4'/%3E%3Ccircle cx='250' cy='38' r='10'/%3E%3Cg fill='%23000' stroke='none'%3E%3Ccircle cx='334' cy='24' r='3'/%3E%3Ccircle cx='250' cy='38' r='2'/%3E%3Ccircle cx='20' cy='14' r='.9'/%3E%3Ccircle cx='52' cy='60' r='.9'/%3E%3Ccircle cx='88' cy='22' r='.9'/%3E%3Ccircle cx='132' cy='66' r='.9'/%3E%3Ccircle cx='170' cy='10' r='.9'/%3E%3Ccircle cx='214' cy='64' r='.9'/%3E%3Ccircle cx='300' cy='10' r='.9'/%3E%3Ccircle cx='346' cy='62' r='.9'/%3E%3Ccircle cx='110' cy='44' r='.9'/%3E%3C/g%3E%3C/svg%3E") repeat-x right center / 360px 76px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='76' viewBox='0 0 360 76' fill='none' stroke='%23000' stroke-width='1'%3E%3Cellipse cx='180' cy='38' rx='170' ry='24' transform='rotate(-9 180 38)'/%3E%3Cellipse cx='180' cy='38' rx='120' ry='13' transform='rotate(8 180 38)' stroke-dasharray='2 4'/%3E%3Ccircle cx='250' cy='38' r='10'/%3E%3Cg fill='%23000' stroke='none'%3E%3Ccircle cx='334' cy='24' r='3'/%3E%3Ccircle cx='250' cy='38' r='2'/%3E%3Ccircle cx='20' cy='14' r='.9'/%3E%3Ccircle cx='52' cy='60' r='.9'/%3E%3Ccircle cx='88' cy='22' r='.9'/%3E%3Ccircle cx='132' cy='66' r='.9'/%3E%3Ccircle cx='170' cy='10' r='.9'/%3E%3Ccircle cx='214' cy='64' r='.9'/%3E%3Ccircle cx='300' cy='10' r='.9'/%3E%3Ccircle cx='346' cy='62' r='.9'/%3E%3Ccircle cx='110' cy='44' r='.9'/%3E%3C/g%3E%3C/svg%3E") repeat-x right center / 360px 76px;
}
[data-style="orbital"] .topbar-clock {
  display: block; align-self: center; margin-left: 8px; padding: 3px 0 3px 10px; white-space: nowrap;
  border-left: 2px solid var(--primary-bg); font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; font-variant-numeric: tabular-nums; color: var(--muted);
}
[data-style="orbital"] .topbar-clock::before { content: "MET"; display: block; font-size: .56rem; color: var(--primary); letter-spacing: .24em; }
@media (max-width: 1000px) { [data-style="orbital"] .topbar-clock { display: none; } }

/* 1960s: psychedelic ripples spreading from the right edge, and flowers by the logo */
[data-style="sixties"] .topbar::before {
  top: 0; bottom: 0; right: 0; width: min(36%, 420px); opacity: .32;
  background: repeating-radial-gradient(circle at 100% 50%, var(--g1) 0 9px, var(--g2) 9px 18px, var(--g3) 18px 27px, var(--g4) 27px 36px);
  -webkit-mask-image: radial-gradient(circle at 100% 50%, #000 0 35%, transparent 100%);
  mask-image: radial-gradient(circle at 100% 50%, #000 0 35%, transparent 100%);
}
[data-style="sixties"] .brand::after {
  content: "\273F\2740\273F"; align-self: center; margin-left: 6px; font-size: 1.5rem; line-height: 1; letter-spacing: .08em;
  background: linear-gradient(90deg, var(--g1), var(--g3) 50%, var(--g4)); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* 1980s: Memphis confetti across the bar, in the four band colours */
[data-style="pinstripe"] .topbar::before {
  inset: 0 0 0 210px; opacity: .5;
  background: linear-gradient(90deg, var(--band1), var(--band2) 33%, var(--band3) 66%, var(--band4));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='76' viewBox='0 0 320 76' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20l8-9 8 9 8-9 8 9 8-9'/%3E%3Cpath d='M120 62l14-24 14 24z'/%3E%3Ccircle cx='214' cy='22' r='9'/%3E%3Cpath d='M268 42h18M277 33v18'/%3E%3Cpath d='M60 58q6-10 12 0t12 0 12 0 12 0'/%3E%3Cpath d='M250 12l7 7 7-7 7 7'/%3E%3Cg fill='%23000' stroke='none'%3E%3Ccircle cx='170' cy='14' r='3.5'/%3E%3Ccircle cx='190' cy='64' r='3.5'/%3E%3Ccircle cx='300' cy='68' r='3.5'/%3E%3Ccircle cx='100' cy='16' r='3'/%3E%3Ccircle cx='240' cy='60' r='3'/%3E%3Ccircle cx='8' cy='54' r='3'/%3E%3C/g%3E%3C/svg%3E") repeat-x left center / 320px 76px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='76' viewBox='0 0 320 76' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20l8-9 8 9 8-9 8 9 8-9'/%3E%3Cpath d='M120 62l14-24 14 24z'/%3E%3Ccircle cx='214' cy='22' r='9'/%3E%3Cpath d='M268 42h18M277 33v18'/%3E%3Cpath d='M60 58q6-10 12 0t12 0 12 0 12 0'/%3E%3Cpath d='M250 12l7 7 7-7 7 7'/%3E%3Cg fill='%23000' stroke='none'%3E%3Ccircle cx='170' cy='14' r='3.5'/%3E%3Ccircle cx='190' cy='64' r='3.5'/%3E%3Ccircle cx='300' cy='68' r='3.5'/%3E%3Ccircle cx='100' cy='16' r='3'/%3E%3Ccircle cx='240' cy='60' r='3'/%3E%3Ccircle cx='8' cy='54' r='3'/%3E%3C/g%3E%3C/svg%3E") repeat-x left center / 320px 76px;
}

@media (prefers-reduced-motion: no-preference) {
  [data-style="sleek"] .topbar::before { animation: sleek-glint 13s ease-in-out infinite; }
  [data-style="airy"] .topbar::before { animation: airy-drift 42s ease-in-out infinite alternate; }
}
@keyframes sleek-glint {
  0%, 60% { background-position: left 4px top 4px, right 4px top 4px, left 4px bottom 4px, right 4px bottom 4px, 160% 0, 0 0; }
  100% { background-position: left 4px top 4px, right 4px top 4px, left 4px bottom 4px, right 4px bottom 4px, -60% 0, 0 0; }
}
@keyframes airy-drift { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* room for the art: every themed bar is at least 15px tall above and below its
   controls (the phone layout keeps its own tighter padding) */
@media (min-width: 901px) {
  :is([data-style="soviet"], [data-style="cyberpunk"], [data-style="graffiti"], [data-style="liquid"], [data-style="xp"], [data-style="olde"], [data-style="crt"], [data-style="dos"], [data-style="atari-st"], [data-style="sleek"], [data-style="airy"], [data-style="aqua"], [data-style="washi"], [data-style="folio"], [data-style="bauhaus"], [data-style="orbital"], [data-style="sixties"], [data-style="pinstripe"]) .topbar { padding-top: 15px; padding-bottom: 15px; }
}


/* ═══ Oslo ════════════════════════════════════════════════
    After the Oslo shop template: a warm cream page, white rounded cards, a
    fjord-teal brand colour and a confetti of pinks, oranges and greens. The
    four accents (--a1..--a4) and their pastel tints (--t1..--t4) are handed
    round the sidebar counts, the story cards and their source chips, so the
    lists read as a colourful row of tags. Flourishes: confetti drifting behind
    the top bar over a rainbow rule, a script tag by the logo, squiggle
    underlines (Oslo's hand-drawn stroke), a Leckerli One drop cap, and
    pastel pull-quotes. Dark is a deep fjord slate with brighter accents. */
[data-theme="oslo-light"] {
  --bg: #fbf6f0; --surface: #ffffff; --border: #eadfd2;
  --text: #262834; --muted: #6b6f7e;
  --primary: #0b7790; --primary-bg: #0d819b; --primary-dark: #0a6a80; --on-primary: #ffffff;
  --secondary: #f08a00;
  --danger: #c8372d; --input-bg: #ffffff; --bg-hover: #f5ebe0;
  --a1: #0f8fac; --a2: #ee6a9a; --a3: #ff8d3b; --a4: #2cc25e;
  --on-warm: #262834; --glow: rgba(15, 143, 172, 0.22); --shade: rgba(38, 40, 52, 0.1); --tint: 16%;
}
[data-theme="oslo-dark"] {
  --bg: #11181d; --surface: #182229; --border: #2a3943;
  --text: #e8f1f4; --muted: #94a9b3;
  --primary: #56cfe6; --primary-bg: #56cfe6; --primary-dark: #7adcee; --on-primary: #06222a;
  --secondary: #ffb347;
  --danger: #ff8a80; --input-bg: #0e1418; --bg-hover: #1f2c35;
  --a1: #56cfe6; --a2: #ff8fb8; --a3: #ffa35c; --a4: #5fdc8a;
  --on-warm: #1b1308; --glow: rgba(86, 207, 230, 0.2); --shade: rgba(0, 0, 0, 0.35); --tint: 24%;
}
[data-style="oslo"] {
  --radius: 16px; --r-ctl: 10px; --r-btn: 999px; --r-tab: 999px; --r-icon: 12px; --r-pill: 999px; --r-round: 50%;
  --raised-bc: var(--border);
  --sunken-bc: var(--border);
  --panel-bc: var(--border);
  --raised-sh: none; --sunken-sh: none;
  --panel-sh: 0 26px 60px var(--shade); --pop-sh: 0 14px 34px var(--shade);
  --float-sh: 0 8px 20px var(--glow); --tn-sh: 0 1px 3px var(--shade);
  --hover-bc: var(--primary); --hover-fg: var(--primary);
  --btn-bg: var(--surface); --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--a1);
  --top-bg: var(--surface); --top-fg: var(--text); --bar-bg: var(--surface); --bar-fg: var(--text);
  --bar-accent: var(--a1);
  --scrim: rgba(38, 40, 52, 0.5);
  --sb: color-mix(in srgb, var(--a1) 55%, transparent) transparent;
  --t1: color-mix(in srgb, var(--a1) var(--tint), var(--surface));
  --t2: color-mix(in srgb, var(--a2) var(--tint), var(--surface));
  --t3: color-mix(in srgb, var(--a3) var(--tint), var(--surface));
  --t4: color-mix(in srgb, var(--a4) var(--tint), var(--surface));
  --rainbow: linear-gradient(90deg, var(--a1), var(--a2) 38%, var(--a3) 68%, var(--a4));
  --squig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8' viewBox='0 0 16 8'%3E%3Cpath d='M0 4Q4 0 8 4T16 4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --confetti: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='84' viewBox='0 0 240 84'%3E%3Cg fill='%23000'%3E%3Ccircle cx='22' cy='20' r='5'/%3E%3Ccircle cx='150' cy='14' r='3'/%3E%3Ccircle cx='212' cy='62' r='4'/%3E%3Ccircle cx='96' cy='70' r='2.5'/%3E%3Cpath d='M104 28l6 7-6 7-6-7z'/%3E%3Cpath d='M184 22c0-12 10-18 26-16 0 14-10 20-26 16z'/%3E%3Cpath d='M60 8l2.4 6 6 2.4-6 2.4-2.4 6-2.4-6-6-2.4 6-2.4z'/%3E%3C/g%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='64' cy='58' r='6'/%3E%3Cpath d='M130 50v12M124 56h12'/%3E%3Cpath d='M20 54q5-7 10 0t10 0t10 0'/%3E%3Cpath d='M176 66q5-7 10 0t10 0'/%3E%3C/g%3E%3C/svg%3E");
}
[data-style="oslo"] ::selection { background: color-mix(in srgb, var(--a3) 32%, transparent); }

/* top bar: white, a rainbow rule along the bottom and confetti drifting behind
   the controls, with a script tag leaning against the logo */
[data-style="oslo"] .topbar { position: relative; z-index: 5; border-bottom: 0; padding: 8px 18px 10px; }
[data-style="oslo"] .topbar::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; bottom: 0; right: 0; width: min(62%, 780px); opacity: .6;
  background: linear-gradient(90deg, transparent 0%, var(--a1) 30%, var(--a2) 55%, var(--a3) 78%, var(--a4));
  -webkit-mask: var(--confetti) repeat-x right center / 240px 84px;
  mask: var(--confetti) repeat-x right center / 240px 84px;
}
[data-style="oslo"] .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; bottom: 0; height: 3px; background: var(--rainbow);
}
[data-style="oslo"] .brand::after {
  content: "fresh news"; align-self: flex-end; margin: 0 0 6px 6px; white-space: nowrap;
  font: 400 1.15rem/1 "Leckerli One", "Brush Script MT", cursive; letter-spacing: 0;
  color: var(--a2); transform: rotate(-5deg);
  text-decoration: underline wavy var(--a3) 1.5px; text-underline-offset: 6px;
}
@media (max-width: 1180px) { [data-style="oslo"] .brand::after { display: none; } }
[data-style="oslo"] .topbar-search input { padding: 8px 18px; background: var(--bg); border-color: transparent; }
[data-style="oslo"] .topbar-search input:focus { background: var(--surface); border-color: var(--a1); box-shadow: 0 0 0 4px var(--glow); }
[data-style="oslo"] :is(input, select, textarea):focus { border-color: var(--a1); box-shadow: 0 0 0 3px var(--glow); outline: none; }
[data-style="oslo"] .topbar :is(.icon-btn, .theme-btn, .mini) { background: var(--bg); border-color: transparent; }
[data-style="oslo"] .topbar :is(.icon-btn, .theme-btn, .mini):hover { background: var(--t1); color: var(--primary); }
[data-style="oslo"] .theme-popover { background: var(--surface); border-radius: 20px; }
[data-style="oslo"] :is(.super-badge, .tn-super) { background: var(--a3); color: var(--on-warm); }

/* buttons: pills, and the solid one carries Oslo's underline bar that draws in
   on hover */
[data-style="oslo"] .btn { font-weight: 700; padding: 7px 18px; }
[data-style="oslo"] .btn.sm { padding: 5px 13px; }
[data-style="oslo"] .btn.ghost { border-color: transparent; }
[data-style="oslo"] .btn:not(.solid):not(.ghost):hover { background: var(--t1); }
[data-style="oslo"] .btn.solid { position: relative; box-shadow: 0 6px 14px var(--glow); }
[data-style="oslo"] .btn.solid:hover { filter: none; box-shadow: 0 8px 18px var(--glow); transform: translateY(-1px); }
[data-style="oslo"] .btn.solid::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; width: 62%; height: 2.5px; border-radius: 2px;
  background: var(--a3); transform: translateX(-50%); transition: width .5s cubic-bezier(.19, 1, .22, 1);
}
[data-style="oslo"] .btn.solid:hover::after { width: 0; }
[data-style="oslo"] .btn.solid:not(:disabled):active { transform: none; }
[data-style="oslo"] .btn { transition: background .2s, box-shadow .2s, transform .2s; }

/* navigation: pill rows, a pair of squares before each heading, and counts and
   feed marks coloured in turn */
[data-style="oslo"] .sidebar { padding: 12px 10px 26px; }
[data-style="oslo"] .side-heading {
  padding: 18px 10px 6px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; color: var(--text);
}
[data-style="oslo"] .side-heading::before {
  content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin-right: 11px; border-radius: 2px;
  background: var(--a2); box-shadow: 11px 0 0 var(--a3);
}
[data-style="oslo"] .node { padding: 6px 12px; min-height: 34px; border-radius: 999px; transition: background .2s, box-shadow .2s; }
[data-style="oslo"] .node:hover { background: var(--t1); }
[data-style="oslo"] .node .count { padding: 1px 9px; font-size: .72rem; font-weight: 700; color: var(--text); background: var(--t1); }
[data-style="oslo"] .node:nth-child(4n+2) .count { background: var(--t2); }
[data-style="oslo"] .node:nth-child(4n+3) .count { background: var(--t3); }
[data-style="oslo"] .node:nth-child(4n+4) .count { background: var(--t4); }
[data-style="oslo"] .node .favicon-fallback { border: 0; border-radius: 50%; color: var(--text); background: var(--t1); }
[data-style="oslo"] .node:nth-child(4n+2) .favicon-fallback { background: var(--t2); }
[data-style="oslo"] .node:nth-child(4n+3) .favicon-fallback { background: var(--t3); }
[data-style="oslo"] .node:nth-child(4n+4) .favicon-fallback { background: var(--t4); }
[data-style="oslo"] .node .favicon { border-radius: 50%; }
[data-style="oslo"] .node.active { box-shadow: 0 6px 14px var(--glow); }
[data-style="oslo"] .node.active .count { background: rgba(255, 255, 255, 0.24); color: var(--on-primary); }
[data-style="oslo"] .favicon-fallback.topic { background: var(--a1); color: var(--on-primary); }
[data-style="oslo"] .kids { margin-left: 16px; border-left: 2px dotted color-mix(in srgb, var(--a1) 45%, transparent); padding-left: 4px; }

/* the list: a script heading over a squiggle, then white cards that each carry
   a coloured tag edge, a tinted source chip and, when selected, a teal fill
   with a round of lighter colour in the corner */
[data-style="oslo"] .listpane { padding-bottom: 20px; }
[data-style="oslo"] .list-header { padding: 18px 20px 16px; gap: 10px; border-bottom: 0; }
[data-style="oslo"] .list-header::after {
  content: ""; position: absolute; left: 20px; bottom: 3px; width: 112px; height: 8px;
  background: linear-gradient(90deg, var(--a2), var(--a3));
  -webkit-mask: var(--squig) repeat-x left center / 16px 8px; mask: var(--squig) repeat-x left center / 16px 8px;
}
[data-style="oslo"] .list-header h2 {
  font: 400 1.75rem/1.25 "Leckerli One", "Brush Script MT", cursive; letter-spacing: 0; color: var(--primary);
  font-synthesis: none;
}
[data-style="oslo"] .article {
  --tag: var(--a1); position: relative; overflow: hidden;
  margin: 10px 14px 0; padding: 14px 16px 14px 20px; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
[data-style="oslo"] .article:nth-child(4n+2) { --tag: var(--a2); }
[data-style="oslo"] .article:nth-child(4n+3) { --tag: var(--a3); }
[data-style="oslo"] .article:nth-child(4n+4) { --tag: var(--a4); }
[data-style="oslo"] .article::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px;
  border-radius: 0 5px 5px 0; background: var(--tag);
}
[data-style="oslo"] .article:hover { background: var(--surface); border-color: var(--tag); transform: translateY(-2px); box-shadow: 0 12px 26px var(--shade); }
[data-style="oslo"] .article.read { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
[data-style="oslo"] .article.read::before { opacity: .35; }
[data-style="oslo"] .article .a-title { font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
[data-style="oslo"] .article.read .a-title { font-weight: 400; }
[data-style="oslo"] .a-snippet { line-height: 1.5; }
[data-style="oslo"] .a-meta { margin-top: 7px; gap: 8px; }
[data-style="oslo"] .a-source {
  padding: 1px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--text);
  background: color-mix(in srgb, var(--tag) var(--tint), var(--surface));
}
[data-style="oslo"] .article:not(.read):not(.active) .a-source::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px;
  border-radius: 50%; background: var(--tag); vertical-align: 1px;
}
[data-style="oslo"] .article.read .a-source { background: transparent; padding-left: 0; color: var(--muted); font-weight: 400; }
[data-style="oslo"] .article.active, [data-style="oslo"] .article.active:hover {
  background: var(--primary-bg); border-color: var(--primary-bg); transform: none;
  box-shadow: 0 12px 26px var(--glow);
}
[data-style="oslo"] .article.active::before { background: var(--a3); opacity: 1; }
[data-style="oslo"] .article.active::after {
  content: ""; position: absolute; right: -22px; bottom: -26px; width: 84px; height: 84px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.16); pointer-events: none;
}
[data-style="oslo"] .article.active .a-source { padding: 1px 10px; background: rgba(255, 255, 255, 0.22); color: var(--on-primary); font-weight: 700; }
[data-style="oslo"] .article.active .a-source::before { display: none; }
[data-style="oslo"] .tl-card {
  margin: 10px 14px 0; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-right: 4px solid var(--a1); border-radius: 18px;
}
[data-style="oslo"] .tl-card:nth-child(4n+2) { border-right-color: var(--a2); }
[data-style="oslo"] .tl-card:nth-child(4n+3) { border-right-color: var(--a3); }
[data-style="oslo"] .tl-card:nth-child(4n+4) { border-right-color: var(--a4); }
[data-style="oslo"] .tl-card.read { border-right-color: var(--border); }
[data-style="oslo"] .loadmore { border-radius: 999px; font-weight: 700; }

/* the reader: a white page with soft rounds of colour in the corner, a bold
   headline over a squiggle, a script drop cap, and pastel pull-quotes */
[data-style="oslo"] .reader {
  padding: 34px clamp(22px, 5vw, 70px) 64px;
  background:
    radial-gradient(circle at 100% 0, var(--t2) 0 74px, transparent 75px),
    radial-gradient(circle at calc(100% - 78px) 0, var(--t3) 0 30px, transparent 31px),
    radial-gradient(circle at 100% 100px, var(--t1) 0 18px, transparent 19px),
    var(--surface);
  background-repeat: no-repeat;
}
[data-style="oslo"] .reader h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
[data-style="oslo"] .r-head { border-bottom: 0; padding-bottom: 6px; margin-bottom: 22px; }
[data-style="oslo"] .r-head::after {
  content: ""; display: block; width: 112px; height: 8px; margin-top: 14px;
  background: linear-gradient(90deg, var(--a2), var(--a3));
  -webkit-mask: var(--squig) repeat-x left center / 16px 8px; mask: var(--squig) repeat-x left center / 16px 8px;
}
[data-style="oslo"] .r-meta { gap: 8px; }
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) { font-size: 1.04rem; line-height: 1.85; }
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.35em; }
[data-style="oslo"] .reader .r-content > p:first-of-type { display: flow-root; }
[data-style="oslo"] .reader .r-content > p:first-of-type::first-letter {
  float: left; padding: 0.04em 0.12em 0 0;
  font: 400 4.1em/0.82 "Leckerli One", "Brush Script MT", cursive;
  color: var(--a2); -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, var(--a2), var(--a3)); -webkit-background-clip: text; background-clip: text;
}
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) { font-weight: 700; line-height: 1.3; margin: 1.9em 0 .6em; }
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) :is(h2, h3)::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 18px .12em 0; vertical-align: middle;
  border-radius: 2px; background: var(--a2); box-shadow: 11px 0 0 var(--a3);
}
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) blockquote {
  position: relative; margin: 1.6em 0; padding: 18px 24px 18px 62px;
  background: var(--t2); border: 0; border-radius: 20px; color: var(--text); font-size: 1.02rem; font-weight: 500;
}
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) blockquote::before {
  content: "\201C"; position: absolute; left: 20px; top: 2px;
  font: 400 4rem/1.1 "Leckerli One", Georgia, serif; color: var(--a3);
}
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) blockquote p { margin: 0; }
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) li::marker { color: var(--a2); }
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) :is(img, video) { border-radius: 16px; }
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) a {
  color: var(--primary); text-decoration: none; font-weight: 500;
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--a1) 24%, transparent) 62%);
  transition: background .2s;
}
[data-style="oslo"] .reader :is(.r-content, .r-thread-body) a:hover { background: color-mix(in srgb, var(--a1) 24%, transparent); }
[data-style="oslo"] .r-foot { border-top: 2px dotted var(--border); }

/* dialogs and tabs: a rainbow rule under the script title, pill tabs, and the
   intro as a tinted note with a sparkle */
[data-style="oslo"] .modal-card { border-radius: 24px; }
[data-style="oslo"] .modal-head { position: relative; padding: 16px 20px 15px; border-bottom: 0; }
[data-style="oslo"] .modal-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rainbow);
}
[data-style="oslo"] .modal-head h2 {
  font: 400 1.6rem/1.25 "Leckerli One", "Brush Script MT", cursive; letter-spacing: 0; color: var(--primary);
  font-synthesis: none;
}
[data-style="oslo"] .tabs { padding: 14px 20px 12px; gap: 8px; background: var(--bg); box-shadow: none; }
[data-style="oslo"] .tab { padding: 7px 18px; font-size: .88rem; font-weight: 700; background: var(--surface); color: var(--muted); }
[data-style="oslo"] .tab:hover { background: var(--t1); color: var(--primary); border-color: var(--a1); }
[data-style="oslo"] .tab.active,
[data-style="oslo"] .tab.active:hover {
  background: var(--primary-bg); border-color: var(--primary-bg); color: var(--on-primary);
  box-shadow: 0 6px 14px var(--glow);
}
[data-style="oslo"] .tab-intro {
  position: relative; padding: 12px 16px 12px 46px; background: var(--t1); border-left: 0; border-radius: 16px;
}
[data-style="oslo"] .tab-intro::before {
  content: "\2726"; position: absolute; left: 18px; top: 10px; font-size: 1.2rem; line-height: 1.4; color: var(--a3);
}
[data-style="oslo"] .manage-body { padding: 18px 22px 24px; }

@media (prefers-reduced-motion: no-preference) {
  [data-style="oslo"] .topbar::before { animation: oslo-drift 9s ease-in-out infinite alternate; }
  @keyframes oslo-drift { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
}
@media (max-width: 900px) {
  [data-style="oslo"] .topbar { padding: 6px 10px 8px; }
  [data-style="oslo"] .topbar::before { width: 80%; opacity: .4; }
  [data-style="oslo"] .article, [data-style="oslo"] .tl-card { margin: 8px 8px 0; padding: 12px 14px 12px 18px; }
  [data-style="oslo"] .reader { padding: 24px 18px 56px; }
  [data-style="oslo"] .reader h1 { font-size: 1.55rem; }
  [data-style="oslo"] .list-header { padding: 14px 14px 14px; }
  [data-style="oslo"] .list-header::after { left: 14px; }
}


/* ═══ Boutique ════════════════════════════════════════════
    A gallery-white blog in the manner of Pixelgrade's Gema: light Montserrat
    in tracked capitals on warm white, borderless text cards that lift when
    you point at them, solid black buttons and one note of red. The selected
    story is the inverted card with an offset double outline. Plain text
    cards only: schnews has no thumbnails to hang a masonry grid on. The
    reader opens with a drop cap whose stripes run through the letter. */
[data-theme="boutique-light"] {
  --bg: #f7f5f5; --surface: #ffffff; --border: #e4e1e1;
  --text: #000000; --muted: #6e6d6b;
  --primary: #d02f2f; --primary-bg: #000000; --primary-dark: #333333; --on-primary: #ffffff;
  --secondary: #f75034;
  --danger: #ad2d2d; --input-bg: #ffffff; --bg-hover: #efecec;
  --ink: #000000; --red: #e03a3a; --hair: rgba(0, 0, 0, 0.25); --lift: 0 12px 28px rgba(0, 0, 0, 0.09);
}
[data-theme="boutique-dark"] {
  --bg: #0b0b0b; --surface: #151515; --border: #2a2a2a;
  --text: #f7f5f5; --muted: #a3a3a1;
  --primary: #ff5a4d; --primary-bg: #f7f5f5; --primary-dark: #d8d5d5; --on-primary: #0b0b0b;
  --secondary: #ff7a5a;
  --danger: #ff8a80; --input-bg: #101010; --bg-hover: #1f1f1f;
  --ink: #f7f5f5; --red: #ff5a4d; --hair: rgba(247, 245, 245, 0.28); --lift: 0 12px 28px rgba(0, 0, 0, 0.55);
}
[data-style="boutique"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 50%;
  --bw: 1px; --bwp: 1px;
  --raised-bc: var(--hair);
  --sunken-bc: var(--hair);
  --panel-bc: var(--hair);
  --panel-sh: 0 24px 60px rgba(0, 0, 0, 0.2);
  --pop-sh: 0 12px 32px rgba(0, 0, 0, 0.16);
  --float-sh: 0 4px 14px rgba(0, 0, 0, 0.2);
  --tn-sh: 0 1px 3px rgba(0, 0, 0, 0.18);
  --hover-bc: var(--ink); --hover-fg: var(--text);
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --btn-case: uppercase; --btn-track: 0.08em;
  --tab-accent: var(--red);
  --top-bg: var(--surface); --top-fg: var(--text); --bar-bg: var(--surface); --bar-fg: var(--text);
  --bar-accent: var(--red);
  --scrim: rgba(0, 0, 0, 0.42);
}
[data-style="boutique"] body { font-weight: 300; }

/* masthead: white, one hairline */
[data-style="boutique"] .topbar { border-bottom: 1px solid var(--hair); padding: 8px 28px; }
[data-style="boutique"] .topbar-search input { padding: 9px 16px; letter-spacing: 0.04em; }
[data-style="boutique"] :is(input, select, textarea):focus { border-color: var(--ink); box-shadow: none; outline: none; }
[data-style="boutique"] .btn { font-size: 0.78rem; font-weight: 500; padding: 9px 20px; }
[data-style="boutique"] .btn.sm { padding: 7px 14px; }
[data-style="boutique"] .btn.solid:hover { background: var(--red); border-color: var(--red); color: #ffffff; filter: none; }
[data-style="boutique"] .btn.ghost { font-weight: 400; }
[data-style="boutique"] :is(.super-badge, .tn-super) { background: var(--red); color: var(--surface); }
[data-style="boutique"] .theme-popover { background: var(--surface); }

/* navigation: capitals in a light weight, the current one marked in red */
[data-style="boutique"] .sidebar { padding: 14px 10px 28px; }
[data-style="boutique"] .side-heading { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.18em; padding: 20px 12px 6px; }
[data-style="boutique"] .node { padding: 8px 12px; font-size: 0.78rem; font-weight: 300; text-transform: uppercase; letter-spacing: 0.06em; }
[data-style="boutique"] .node.active { background: transparent; color: var(--text); font-weight: 500; box-shadow: inset 2px 0 0 var(--red); }
[data-style="boutique"] .node .count { background: transparent; padding: 0; font-weight: 400; letter-spacing: 0.02em; }
[data-style="boutique"] .node.active .count { color: var(--muted); }
[data-style="boutique"] .node .favicon-fallback { border-radius: 0; }

/* the list: a serif masthead, then white cards on warm grey */
[data-style="boutique"] .list-header { padding: 26px 24px 14px; gap: 12px; border-bottom-color: var(--hair); }
[data-style="boutique"] .list-header h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 2rem; font-weight: 400; line-height: 1.1; letter-spacing: 0;
}
[data-style="boutique"] .article {
  margin: 12px 16px 0; padding: 20px 22px; gap: 14px;
  background: var(--surface); border-bottom: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
[data-style="boutique"] .article:hover { background: var(--surface); transform: translateY(-2px); box-shadow: var(--lift); }
[data-style="boutique"] .article.active,
[data-style="boutique"] .article.active:hover {
  background: var(--primary-bg); transform: none;
  box-shadow: 0 0 0 5px var(--bg), 0 0 0 6px var(--ink);
}
[data-style="boutique"] .listpane { padding-bottom: 20px; }
[data-style="boutique"] .a-body { display: flex; flex-direction: column; }
[data-style="boutique"] .a-meta {
  order: -1; margin: 0 0 8px; font-size: 0.66rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.08em;
}
[data-style="boutique"] .a-title { font-size: 0.95rem; font-weight: 500; line-height: 1.4; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.03em; }
[data-style="boutique"] .article.read .a-title { font-weight: 300; }
[data-style="boutique"] .a-snippet { font-size: 0.84rem; font-weight: 400; line-height: 1.65; }
[data-style="boutique"] .article:not(.read):not(.active) .a-source::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px;
  border-radius: 50%; background: var(--red); vertical-align: 1px;
}
[data-style="boutique"] .a-star { color: var(--red); }
[data-style="boutique"] .article.active .a-star { color: var(--on-primary); }
[data-style="boutique"] .tl-card {
  margin: 12px 16px 0; padding: 18px 20px; background: var(--surface);
  border-bottom: 0; border-right-color: var(--red);
}
[data-style="boutique"] .tl-card.read { border-right-color: transparent; }
[data-style="boutique"] .tl-source { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; }

/* the reader: a roomy white page, a capitals headline and the striped drop cap */
[data-style="boutique"] .reader { background: var(--surface); padding: 44px clamp(28px, 6vw, 80px) 80px; }
[data-style="boutique"] .reader h1 { font-size: 2rem; font-weight: 400; line-height: 1.3; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 16px; }
[data-style="boutique"] .r-head { border-bottom-color: var(--hair); padding-bottom: 22px; margin-bottom: 36px; }
[data-style="boutique"] .r-meta { font-size: 0.68rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.08em; gap: 8px; }
[data-style="boutique"] .reader :is(.r-content, .r-thread-body) { font-size: 1.05rem; font-weight: 300; line-height: 1.9; max-width: 62ch; }
[data-style="boutique"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.6em; }
[data-style="boutique"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) {
  font-weight: 400; line-height: 1.4; letter-spacing: 0.03em; text-transform: uppercase; margin: 2em 0 0.6em;
}
[data-style="boutique"] .reader :is(.r-content, .r-thread-body) blockquote {
  border-left: 2px solid var(--red); padding: 2px 0 2px 22px; color: var(--text);
  font-size: 0.98rem; font-weight: 500; line-height: 1.8; letter-spacing: 0.03em; text-transform: uppercase;
}
[data-style="boutique"] .reader a { text-decoration: none; border-bottom: 1px solid currentColor; }
[data-style="boutique"] .reader .r-head a { border-bottom: 0; text-decoration: underline; text-underline-offset: 3px; }
[data-style="boutique"] .r-foot { border-top-color: var(--hair); }
[data-style="boutique"] .reader .r-content > p:first-of-type::first-letter {
  float: left; padding: 0.08em 0.12em 0 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif; font-size: 4.6em; font-weight: 400; line-height: 0.78;
  color: transparent; -webkit-text-fill-color: transparent;
  background-image: linear-gradient(45deg, var(--ink) 0 31%, transparent 31% 36%, var(--ink) 36% 64%, transparent 64% 69%, var(--ink) 69%);
  -webkit-background-clip: text; background-clip: text;
}

/* dialogs and tabs */
[data-style="boutique"] .modal-head { padding: 20px 26px 16px; border-bottom-color: var(--hair); }
[data-style="boutique"] .modal-head h2 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.6rem; font-weight: 400; line-height: 1.2;
}
[data-style="boutique"] .tabs { background: var(--surface); padding: 6px 26px 0; gap: 4px; box-shadow: inset 0 -1px 0 var(--hair); }
[data-style="boutique"] .tab { background: transparent; border-color: transparent; font-size: 0.74rem; font-weight: 400; padding: 10px 14px; }
[data-style="boutique"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="boutique"] .tab.active,
[data-style="boutique"] .tab.active:hover { background: transparent; color: var(--text); font-weight: 500; box-shadow: none; border-color: transparent; border-bottom: 2px solid var(--red); }
[data-style="boutique"] .tab-intro { background: var(--bg); border-left: 2px solid var(--red); }
[data-style="boutique"] .manage-body { padding: 20px 26px 26px; }
@media (max-width: 900px) {
  [data-style="boutique"] .topbar { padding: 6px 8px; }
  [data-style="boutique"] .reader { padding: 24px 18px 56px; }
  [data-style="boutique"] .reader h1 { font-size: 1.5rem; }
  [data-style="boutique"] .article { margin: 10px 10px 0; padding: 16px 16px; }
}


/* ═══ Magazine ════════════════════════════════════════════
    A glossy editorial layout: serif headlines set large, a tracked kicker
    above each one, hairline rules in place of boxes and a lot of white. The
    first story in a list runs bigger, like a cover line. In the reader the
    headline leads, the body is a book face with a drop cap, and a quote
    becomes a pull-quote between two heavy rules. One hot accent, a marker
    yellow for the selection. */
[data-theme="magazine-light"] {
  --bg: #ffffff; --surface: #f6f4f0; --border: #e3dfd7;
  --text: #141414; --muted: #6d6a64;
  --primary: #c2185b; --primary-bg: #c2185b; --primary-dark: #9a1048; --on-primary: #ffffff;
  --secondary: #f2b705;
  --danger: #b3261e; --input-bg: #ffffff; --bg-hover: #f3f0ea;
  --ink: #141414; --sel: #fff3b0;
}
[data-theme="magazine-dark"] {
  --bg: #121214; --surface: #0b0b0d; --border: #2c2c31;
  --text: #f1efe9; --muted: #a09d96;
  --primary: #ff5c93; --primary-bg: #ff5c93; --primary-dark: #e03d77; --on-primary: #1a0a10;
  --secondary: #ffd23f;
  --danger: #ff8a80; --input-bg: #0b0b0d; --bg-hover: #1c1c20;
  --ink: #f1efe9; --sel: #3a3318;
}
[data-style="magazine"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 50%;
  --bw: 1px; --bwp: 2px;
  --raised-bc: var(--ink);
  --sunken-bc: var(--border);
  --panel-bc: var(--ink);
  --panel-sh: 0 22px 54px rgba(0, 0, 0, 0.28);
  --pop-sh: 0 10px 28px rgba(0, 0, 0, 0.2);
  --float-sh: 0 3px 12px rgba(0, 0, 0, 0.25);
  --tn-sh: 0 1px 3px rgba(0, 0, 0, 0.2);
  --hover-bc: var(--primary); --hover-fg: var(--primary);
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --btn-case: uppercase; --btn-track: 0.1em;
  --tab-accent: var(--primary);
  --top-bg: var(--bg); --top-fg: var(--text); --bar-bg: var(--bg); --bar-fg: var(--text);
  --bar-accent: var(--primary);
  --scrim: rgba(0, 0, 0, 0.5);
}

/* the masthead: a heavy rule with a fine one beneath it, and the date as a strapline */
[data-style="magazine"] .topbar { border-bottom: 4px solid var(--ink); position: relative; z-index: 5; }
[data-style="magazine"] .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: calc(100% + 3px); height: 1px; background: var(--ink);
}
[data-style="magazine"] .topbar-date {
  display: block; align-self: center; margin-left: 10px; padding: 3px 0 3px 14px;
  border-left: 1px solid var(--ink); white-space: nowrap;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
@media (max-width: 1180px) { [data-style="magazine"] .topbar-date { display: none; } }
[data-style="magazine"] .topbar-search input { border-color: var(--ink); padding: 8px 14px; }
[data-style="magazine"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: none; outline: none; }
[data-style="magazine"] .btn { font-size: 0.74rem; font-weight: 700; }
[data-style="magazine"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); filter: none; }
[data-style="magazine"] .btn.ghost { border-color: transparent; }
[data-style="magazine"] .theme-popover { background: var(--bg); }

/* navigation: section heads over a heavy rule, the current one marked */
[data-style="magazine"] .sidebar { padding: 8px 0 24px; }
[data-style="magazine"] .side-heading {
  margin: 18px 14px 6px; padding: 0 0 6px; border-bottom: 2px solid var(--ink);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.22em; color: var(--text);
}
[data-style="magazine"] .node { padding: 7px 14px; font-size: 0.95rem; }
[data-style="magazine"] .node.active { background: var(--sel); color: var(--text); font-weight: 700; box-shadow: inset 3px 0 0 var(--primary); }
[data-style="magazine"] .node .count { background: transparent; padding: 0; font-weight: 700; }
[data-style="magazine"] .node.active .count { color: var(--text); }
[data-style="magazine"] .kids { margin-left: 18px; }

/* the list: a serif masthead, then stories with the kicker above the headline */
[data-style="magazine"] .list-header { padding: 22px 26px 14px; border-bottom: 3px solid var(--ink); }
[data-style="magazine"] .list-header h2 { font-size: 1.9rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
[data-style="magazine"] .article { gap: 14px; padding: 22px 26px; }
[data-style="magazine"] .a-body { display: flex; flex-direction: column; }
[data-style="magazine"] .a-meta {
  order: -1; margin: 0 0 8px; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
[data-style="magazine"] .a-source { color: var(--primary); }
[data-style="magazine"] .a-title { font-size: 1.3rem; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
[data-style="magazine"] .list-header + .article .a-title { font-size: 1.75rem; line-height: 1.12; letter-spacing: -0.01em; }
[data-style="magazine"] .article.read .a-title { font-weight: 400; }
[data-style="magazine"] .article.read .a-source { color: var(--muted); }
[data-style="magazine"] .a-snippet { font-size: 0.92rem; line-height: 1.55; }
[data-style="magazine"] .article.active,
[data-style="magazine"] .article.active:hover { background: var(--sel); box-shadow: inset 4px 0 0 var(--primary); }
[data-style="magazine"] .article.active,
[data-style="magazine"] .article.active .a-title,
[data-style="magazine"] .article.active .count { color: var(--text); }
[data-style="magazine"] .article.active .a-snippet,
[data-style="magazine"] .article.active .a-time { color: var(--muted); }
[data-style="magazine"] .article.active .a-source,
[data-style="magazine"] .article.active .a-star { color: var(--primary); }
[data-style="magazine"] .a-star { color: var(--primary); }
[data-style="magazine"] .tl-card { padding: 20px 14px 20px 26px; }
[data-style="magazine"] .tl-source { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.74rem; color: var(--primary); }

/* the reader: a large headline, then a book face with a drop cap and pull-quotes */
[data-style="magazine"] .reader { padding: 52px clamp(28px, 8vw, 110px) 90px; }
[data-style="magazine"] .reader h1 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; margin-bottom: 16px; }
[data-style="magazine"] .r-head { border-bottom: 3px solid var(--ink); padding-bottom: 18px; margin-bottom: 34px; }
[data-style="magazine"] .r-meta { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
[data-style="magazine"] .reader :is(.r-content, .r-thread-body) {
  font-family: "Lora", Georgia, "Times New Roman", serif; font-size: 1.14rem; line-height: 1.8; max-width: 66ch;
}
[data-style="magazine"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.4em; }
[data-style="magazine"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) {
  font-family: var(--font-headline); font-weight: 700; line-height: 1.2; letter-spacing: -0.005em; margin: 1.8em 0 0.5em;
}
[data-style="magazine"] .reader :is(.r-content, .r-thread-body) blockquote {
  margin: 2em 0; padding: 18px 0; color: var(--text);
  border: solid var(--ink); border-width: 3px 0;
  font-family: var(--font-headline); font-style: italic; font-size: 1.5rem; line-height: 1.35;
}
[data-style="magazine"] .reader a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
[data-style="magazine"] .r-foot { border-top: 1px solid var(--ink); }
[data-style="magazine"] .reader .r-content > p:first-of-type::first-letter {
  float: left; padding: 0.06em 0.1em 0 0;
  font-family: var(--font-headline); font-size: 4.4em; font-weight: 700; line-height: 0.8; color: var(--primary);
}

/* dialogs and tabs */
[data-style="magazine"] .modal-head { padding: 18px 24px 14px; border-bottom: 3px solid var(--ink); }
[data-style="magazine"] .modal-head h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
[data-style="magazine"] .tabs { background: var(--bg); padding: 4px 24px 0; gap: 0; box-shadow: inset 0 -1px 0 var(--border); }
[data-style="magazine"] .tab { background: transparent; border-color: transparent; padding: 10px 16px; font-size: 0.72rem; font-weight: 700; }
[data-style="magazine"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="magazine"] .tab.active,
[data-style="magazine"] .tab.active:hover { background: transparent; color: var(--text); box-shadow: none; border-color: transparent; border-bottom: 3px solid var(--primary); }
[data-style="magazine"] .tab-intro { background: var(--surface); border-left: 3px solid var(--primary); }
@media (max-width: 900px) {
  [data-style="magazine"] .reader { padding: 24px 18px 56px; }
  [data-style="magazine"] .reader h1 { font-size: 1.7rem; }
  [data-style="magazine"] .article { padding: 18px 16px; }
  [data-style="magazine"] .list-header { padding: 16px 16px 12px; }
}


/* ═══ Natural ═════════════════════════════════════════════
    Oat, sage, clay and bark: soft, warm, unhurried. Nothing has a hard edge:
    rows are rounded cards that tint when you point at them, selections are
    pills, an unread story is marked by a small leaf, and rolling hills sit
    along the foot of the bar. A faint paper grain lies over it all. Text is
    set open and generous in a rounded sans with a soft serif for headings. */
[data-theme="natural-light"] {
  --bg: #f6f2e8; --surface: #ece6d6; --border: #d9d0b9;
  --text: #2e2b22; --muted: #6f6a58;
  --primary: #4f7040; --primary-bg: #4f7040; --primary-dark: #3e5a32; --on-primary: #fbf8ef;
  --secondary: #b86b3e;
  --danger: #a8392b; --input-bg: #fcfaf3; --bg-hover: #e6dfcc;
  --grain: 0.4;
}
[data-theme="natural-dark"] {
  --bg: #1d221b; --surface: #161a14; --border: #38422f;
  --text: #e9e6d6; --muted: #a4ab98;
  --primary: #9cc27f; --primary-bg: #7aa05f; --primary-dark: #8db36f; --on-primary: #11180d;
  --secondary: #d9a066;
  --danger: #ff9a86; --input-bg: #12150f; --bg-hover: #283023;
  --grain: 0.22;
}
[data-style="natural"] {
  --radius: 16px; --r-ctl: 12px; --r-btn: 12px; --r-tab: 12px; --r-icon: 12px; --r-pill: 999px;
  --bw: 1px; --bwp: 1px;
  --raised-bc: var(--border);
  --sunken-bc: var(--border);
  --panel-bc: var(--border);
  --panel-sh: 0 24px 60px rgba(60, 50, 30, 0.3);
  --pop-sh: 0 10px 28px rgba(60, 50, 30, 0.2);
  --float-sh: 0 3px 10px rgba(60, 50, 30, 0.25);
  --tn-sh: 0 1px 3px rgba(60, 50, 30, 0.25);
  --hover-bc: var(--primary); --hover-fg: var(--primary);
  --btn-bg: var(--input-bg); --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--primary);
  --top-bg: var(--surface); --top-fg: var(--text); --bar-bg: var(--surface); --bar-fg: var(--text);
  --bar-accent: var(--primary);
  --scrim: rgba(40, 34, 20, 0.45);
}

/* the paper grain, finer than Washi's fibres and without a direction */
[data-style="natural"] body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: var(--grain);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .36 0 0 0 0 .24 0 0 0 .5 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* the bar: rolling hills in sage and clay along its foot */
[data-style="natural"] .topbar { position: relative; z-index: 5; border-bottom: 0; box-shadow: 0 1px 0 var(--border); padding-top: 12px; padding-bottom: 12px; }
[data-style="natural"] .topbar::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0;
  background:
    radial-gradient(ellipse 34% 90% at 12% 128%, color-mix(in srgb, var(--primary) 24%, transparent) 0 70%, transparent 72%),
    radial-gradient(ellipse 44% 78% at 56% 132%, color-mix(in srgb, var(--secondary) 18%, transparent) 0 70%, transparent 72%),
    radial-gradient(ellipse 30% 96% at 92% 126%, color-mix(in srgb, var(--primary) 20%, transparent) 0 70%, transparent 72%);
}
[data-style="natural"] .topbar-search input { padding: 8px 16px; }
[data-style="natural"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); outline: none; }
[data-style="natural"] .btn { font-weight: 700; }
[data-style="natural"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); filter: none; }
[data-style="natural"] .theme-popover { background: var(--bg); }

/* navigation: leaf-marked headings, pill selections */
[data-style="natural"] .sidebar { padding: 14px 10px 24px; }
[data-style="natural"] .side-heading { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; color: var(--primary); padding: 14px 10px 6px; }
[data-style="natural"] .side-heading::before {
  content: ""; flex: 0 0 auto; width: 0.6em; height: 0.6em; background: currentColor; border-radius: 0 100% 0 100%;
}
[data-style="natural"] .node { padding: 7px 12px; margin: 1px 0; border-radius: 999px; }
[data-style="natural"] .node.active { font-weight: 700; }
[data-style="natural"] .kids { border-left: 2px dotted var(--border); margin-left: 16px; }

/* the list: soft cards with room between them */
[data-style="natural"] .list-header { padding: 18px 22px 12px; border-bottom: 0; }
[data-style="natural"] .list-header h2 { font-size: 1.35rem; font-weight: 700; }
[data-style="natural"] .article { margin: 4px 10px; padding: 14px 16px; gap: 12px; border-bottom: 0; border-radius: 18px; }
[data-style="natural"] .a-title { line-height: 1.35; margin-bottom: 4px; }
[data-style="natural"] .a-snippet { line-height: 1.5; }
[data-style="natural"] .article:not(.read) .a-title::before {
  content: ""; display: inline-block; width: 0.55em; height: 0.55em; margin-right: 0.5em;
  background: var(--primary); border-radius: 0 100% 0 100%;
}
[data-style="natural"] .article.active .a-title::before { background: var(--on-primary); }
[data-style="natural"] .tl-card { margin: 4px 10px; border-bottom: 0; border-radius: 18px; }

/* the reader: open, generous, a serif for the headings */
[data-style="natural"] .reader { padding: 40px clamp(24px, 6vw, 72px) 64px; }
[data-style="natural"] .reader h1 { font-size: 2rem; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
[data-style="natural"] .r-head { border-bottom: 2px dotted var(--border); padding-bottom: 18px; margin-bottom: 28px; }
[data-style="natural"] .reader :is(.r-content, .r-thread-body) { font-size: 1.06rem; line-height: 1.85; max-width: 64ch; }
[data-style="natural"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.35em; }
[data-style="natural"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) { font-family: var(--font-headline); line-height: 1.3; margin: 1.8em 0 0.5em; }
[data-style="natural"] .reader :is(.r-content, .r-thread-body) blockquote {
  border-left: 4px solid color-mix(in srgb, var(--primary) 55%, transparent); border-radius: 4px;
  padding: 6px 0 6px 18px; font-family: var(--font-headline); font-style: italic;
}
[data-style="natural"] .reader :is(.r-content, .r-thread-body) img { border-radius: 16px; box-shadow: 0 6px 18px rgba(60, 50, 30, 0.18); }
[data-style="natural"] .reader a { text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--primary) 55%, transparent); }
[data-style="natural"] .r-foot { border-top: 2px dotted var(--border); }

/* dialogs: tabs are pills */
[data-style="natural"] .modal-head { padding: 16px 22px 10px; border-bottom: 0; }
[data-style="natural"] .modal-head h2 { font-size: 1.35rem; font-weight: 700; }
[data-style="natural"] .tabs { background: var(--bg); padding: 4px 18px 8px; gap: 4px; box-shadow: inset 0 -1px 0 var(--border); }
[data-style="natural"] .tab { background: transparent; border-color: transparent; border-radius: 999px; padding: 7px 16px; }
[data-style="natural"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="natural"] .tab.active,
[data-style="natural"] .tab.active:hover { background: var(--primary-bg); color: var(--on-primary); border-color: transparent; box-shadow: none; font-weight: 700; }
[data-style="natural"] .tab-intro { background: color-mix(in srgb, var(--primary) 9%, var(--bg)); border-left: 0; border-radius: 14px; }
@media (max-width: 900px) {
  [data-style="natural"] .reader { padding: 24px 18px 56px; }
  [data-style="natural"] .reader h1 { font-size: 1.55rem; }
}


/* ═══ TUI ═════════════════════════════════════════════════
    The terminal, modern: truecolor on a quiet ground, square corners,
    monospace throughout, selection as reverse video, counts in [brackets],
    buttons as [ Labels ], a tree for the feeds, markdown-style headings and
    a status line along the bottom. No glow and no scanlines: this is a
    contemporary terminal UI, not a CRT. */
[data-theme="tui-light"] {
  --bg: #f7f5ef; --surface: #eceae2; --border: #c4c1b3;
  --text: #2a2a32; --muted: #6b6a75;
  --primary: #6e4fa8; --primary-bg: #6e4fa8; --primary-dark: #563c8a; --on-primary: #ffffff;
  --secondary: #1f7d86;
  --danger: #b3263e; --input-bg: #fffefb; --bg-hover: #e4e1d6;
}
[data-theme="tui-dark"] {
  --bg: #1c1b22; --surface: #17161b; --border: #3b3846;
  --text: #d9d6e4; --muted: #8d89a0;
  --primary: #c4a7e7; --primary-bg: #c4a7e7; --primary-dark: #d8c2f2; --on-primary: #1c1b22;
  --secondary: #9ccfd8;
  --danger: #eb6f92; --input-bg: #141319; --bg-hover: #28262f;
}
[data-style="tui"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 0px;
  --bw: 1px; --bwp: 1px;
  --raised-bc: var(--border);
  --sunken-bc: var(--border);
  --panel-bc: var(--primary);
  --panel-sh: 0 0 0 1px var(--bg), 0 18px 44px rgba(0, 0, 0, 0.45);
  --pop-sh: 0 0 0 1px var(--bg), 0 10px 28px rgba(0, 0, 0, 0.4);
  --float-sh: none; --tn-sh: none;
  --hover-bc: var(--primary); --hover-fg: var(--primary);
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --tab-accent: var(--primary);
  --top-bg: var(--surface); --top-fg: var(--text);
  --bar-bg: var(--primary-bg); --bar-fg: var(--on-primary); --bar-accent: var(--secondary);
  --scrim: rgba(0, 0, 0, 0.55);
}

/* the prompt by the logo, with a block cursor */
[data-style="tui"] .topbar { border-bottom: 1px solid var(--border); }
[data-style="tui"] .brand::after {
  content: "~/news ❯"; align-self: center; margin-left: 10px; padding-right: 1.1em;
  font-size: 0.95rem; font-weight: 700; color: var(--primary);
  background: linear-gradient(var(--primary), var(--primary)) right center / 0.55em 1.05em no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  [data-style="tui"] .brand::after { animation: tui-cursor 1.2s steps(1, end) infinite; }
}
@keyframes tui-cursor { 50% { background-size: 0 0; } }
[data-style="tui"] .topbar-search input { padding: 6px 10px; caret-color: var(--primary); }
[data-style="tui"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: none; outline: none; caret-shape: block; }
[data-style="tui"] .theme-popover { background: var(--bg); }

/* buttons are [ Labels ] */
[data-style="tui"] .btn { gap: 0; font-weight: 400; }
[data-style="tui"] .btn:not(.ghost) { background: transparent; border-color: transparent; padding: 6px 8px; }
[data-style="tui"] .btn:not(.ghost)::before { content: "["; margin-right: 0.5ch; color: var(--muted); }
[data-style="tui"] .btn:not(.ghost)::after { content: "]"; margin-left: 0.5ch; color: var(--muted); }
[data-style="tui"] .btn:not(.ghost):not(.solid):hover { background: var(--bg-hover); border-color: transparent; color: var(--primary); }
[data-style="tui"] .btn.solid,
[data-style="tui"] .btn.solid:hover { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--on-primary); filter: none; }
[data-style="tui"] .btn.solid::before,
[data-style="tui"] .btn.solid::after { color: inherit; opacity: 0.6; }
[data-style="tui"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* navigation: headings ruled, feeds in a tree, counts bracketed */
[data-style="tui"] .sidebar { border-right: 1px solid var(--border); padding: 8px 0 16px; }
[data-style="tui"] .side-heading { letter-spacing: 0.12em; color: var(--secondary); font-weight: 700; padding: 12px 10px 4px; }
[data-style="tui"] .side-heading::before { content: "──"; color: var(--border); letter-spacing: 0; }
[data-style="tui"] .node { padding: 3px 10px; font-size: 0.95em; }
[data-style="tui"] .node .count { background: transparent; padding: 0; color: var(--muted); }
[data-style="tui"] .node .count:not(:empty)::before { content: "["; }
[data-style="tui"] .node .count:not(:empty)::after { content: "]"; }
[data-style="tui"] .node.active .count { color: var(--on-primary); }
[data-style="tui"] .kids { margin-left: 12px; padding-left: 0; border-left: 1px solid var(--border); }
[data-style="tui"] .kids > .node::before { content: "─"; color: var(--border); margin-right: -2px; }
[data-style="tui"] .kids > .node.active::before { color: var(--on-primary); }

/* the list: a prompt for a heading, a marker per row, reverse video for the current one */
[data-style="tui"] .list-header { padding: 8px 12px; border-bottom: 1px dashed var(--border); }
[data-style="tui"] .list-header h2 { font-size: 1rem; font-weight: 700; }
[data-style="tui"] .list-header h2::before { content: "❯ "; color: var(--primary); }
[data-style="tui"] .article { padding: 7px 12px; gap: 10px; border-bottom: 1px dashed var(--border); }
[data-style="tui"] .a-title::before { content: "● "; color: var(--primary); }
[data-style="tui"] .article.read .a-title::before { content: "○ "; color: var(--muted); }
[data-style="tui"] .article.active .a-title::before { content: "▶ "; color: var(--on-primary); }
[data-style="tui"] .a-snippet { font-size: 0.88em; line-height: 1.45; }
[data-style="tui"] .a-source { color: var(--secondary); }
[data-style="tui"] .article.read .a-source { color: var(--muted); }
[data-style="tui"] .article.active .a-source { color: var(--on-primary); }
[data-style="tui"] .tl-card { padding: 10px 11px 10px 14px; border-bottom: 1px dashed var(--border); }

/* the reader: markdown headings, an 82-column measure */
[data-style="tui"] .reader { padding: 20px clamp(16px, 4vw, 44px) 44px; }
[data-style="tui"] .reader h1 { font-size: 1.3rem; line-height: 1.35; font-weight: 700; color: var(--primary); }
[data-style="tui"] .reader h1::before { content: "# "; color: var(--muted); }
[data-style="tui"] .r-head { border-bottom: 1px dashed var(--border); padding-bottom: 12px; margin-bottom: 18px; }
[data-style="tui"] .r-meta { font-size: 0.8rem; }
[data-style="tui"] .reader :is(.r-content, .r-thread-body) { font-size: 0.95rem; line-height: 1.65; max-width: 82ch; }
[data-style="tui"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) { font-size: 1.05em; margin: 1.5em 0 0.5em; color: var(--secondary); }
[data-style="tui"] .reader :is(.r-content, .r-thread-body) h2::before { content: "## "; color: var(--muted); }
[data-style="tui"] .reader :is(.r-content, .r-thread-body) h3::before { content: "### "; color: var(--muted); }
[data-style="tui"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 2px solid var(--secondary); padding-left: 14px; }
[data-style="tui"] .reader a { color: var(--secondary); text-decoration-style: dotted; text-underline-offset: 3px; }
[data-style="tui"] .r-foot { border-top: 1px dashed var(--border); }

/* dialogs: an inverted title bar, tabs as a row of labels */
[data-style="tui"] .modal-head { padding: 6px 12px; }
[data-style="tui"] .modal-head h2 { font-size: 1rem; font-weight: 700; }
[data-style="tui"] .modal-head .icon-btn { color: var(--on-primary); border-color: currentColor; }
[data-style="tui"] .tabs { background: var(--surface); padding: 6px 12px 0; gap: 2px; box-shadow: inset 0 -1px 0 var(--border); }
[data-style="tui"] .tab { background: transparent; border-color: transparent; padding: 6px 12px; }
[data-style="tui"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="tui"] .tab.active,
[data-style="tui"] .tab.active:hover { background: var(--primary-bg); color: var(--on-primary); border-color: var(--primary-bg); box-shadow: none; font-weight: 700; }
[data-style="tui"] .tab-intro { border-left: 2px solid var(--secondary); border-radius: 0; }

/* the status line: the keys that work, as a vim bar would show them */
[data-style="tui"] body::after {
  content: " NORMAL │ j/k move · o open · s star · m read · r refresh · / search · ? help";
  flex: 0 0 auto; padding: 3px 12px; white-space: pre; overflow: hidden; text-overflow: ellipsis;
  font-size: 0.78rem; color: var(--muted); background: var(--surface); border-top: 1px solid var(--border);
}
@media (max-width: 900px) { [data-style="tui"] body::after { display: none; } }


/* ═══ Skeuo ═══════════════════════════════════════════════
    2005, when software was made of things: a stitched leather bar, a linen
    sidebar, glossy gel buttons with an engraved label, a selection that looks
    like a pressed key, and the story itself on a sheet of paper with a double
    red margin and a yellow sticky note for the instructions. Light is leather
    and linen; dark is walnut and brass. */
[data-theme="skeuo-light"] {
  --bg: #f6f0e0; --surface: #e3dac6; --border: #b3a78f;
  --text: #2b2118; --muted: #6b5d4a;
  --primary: #9c4a22; --primary-bg: #a8552a; --primary-dark: #823c18; --on-primary: #fff8ec;
  --secondary: #c99a2e;
  --danger: #b3261e; --input-bg: #fffdf6; --bg-hover: #ece3cd;
  --paper: #fbf6e6; --margin: rgba(200, 70, 60, 0.45); --leather: #7b4a2a; --stitch: rgba(255, 236, 200, 0.6);
  --gel1: #fffefa; --gel2: #efe8d8; --gel3: #ddd3bd; --gel4: #e9e1cf;
  --gelh1: #ffffff; --gelh2: #f7f1e3; --gelh3: #e7ddc7; --gelh4: #f2ebda;
  --emboss: 0 1px 0 rgba(255, 255, 255, 0.75); --row-line: rgba(60, 40, 20, 0.14); --row-hi: rgba(255, 255, 255, 0.6);
  --note-bg: #fff6a8; --note-fg: #4a3d10; --note-bc: #d9c86a;
}
[data-theme="skeuo-dark"] {
  --bg: #2e261e; --surface: #231d17; --border: #55483a;
  --text: #efe5d2; --muted: #b0a28b;
  --primary: #e0b252; --primary-bg: #b8862f; --primary-dark: #9a6f22; --on-primary: #1f1608;
  --secondary: #d9843b;
  --danger: #ff8a7a; --input-bg: #1c1712; --bg-hover: #3b3228;
  --paper: #3a3027; --margin: rgba(230, 120, 90, 0.38); --leather: #4a2f1b; --stitch: rgba(233, 200, 140, 0.5);
  --gel1: #5c4b3b; --gel2: #473a2d; --gel3: #38302a; --gel4: #43362a;
  --gelh1: #6a5745; --gelh2: #524434; --gelh3: #42352a; --gelh4: #4d3f31;
  --emboss: 0 -1px 0 rgba(0, 0, 0, 0.55); --row-line: rgba(0, 0, 0, 0.35); --row-hi: rgba(255, 255, 255, 0.05);
  --note-bg: #6b5b22; --note-fg: #fbf0c4; --note-bc: #8f7b2e;
}
[data-style="skeuo"] {
  --radius: 10px; --r-ctl: 6px; --r-btn: 7px; --r-tab: 8px; --r-icon: 7px; --r-pill: 999px;
  --bw: 1px; --bwp: 1px;
  --raised-bc: color-mix(in srgb, var(--border) 80%, #000);
  --raised-sh: inset 0 1px 0 var(--row-hi), 0 1px 2px rgba(40, 25, 10, 0.3);
  --sunken-bc: color-mix(in srgb, var(--border) 80%, #000);
  --sunken-sh: inset 0 1px 3px rgba(40, 25, 10, 0.35);
  --panel-bc: #3b2514;
  --panel-sh: 0 22px 50px rgba(20, 10, 0, 0.55);
  --pop-sh: 0 10px 26px rgba(20, 10, 0, 0.4);
  --float-sh: 0 3px 10px rgba(20, 10, 0, 0.4);
  --tn-sh: 0 1px 3px rgba(20, 10, 0, 0.4);
  --hover-bc: var(--primary-dark); --hover-fg: var(--text);
  --btn-bg: linear-gradient(to bottom, var(--gel1) 0%, var(--gel2) 48%, var(--gel3) 52%, var(--gel4) 100%);
  --btn-bg-hover: linear-gradient(to bottom, var(--gelh1) 0%, var(--gelh2) 48%, var(--gelh3) 52%, var(--gelh4) 100%);
  --tab-accent: var(--primary);
  --top-bg: var(--leather); --top-fg: #f6ead2; --bar-bg: var(--leather); --bar-fg: #f6ead2;
  --bar-accent: var(--secondary);
  --scrim: rgba(25, 15, 5, 0.5);
}

/* every control is engraved */
[data-style="skeuo"] :is(button, .btn, .tab, .node, .side-heading, .list-header h2, .modal-head h2) { text-shadow: var(--emboss); }
[data-style="skeuo"] .btn.solid { background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 72%, #fff) 0%, var(--primary-bg) 50%, var(--primary-dark) 52%, color-mix(in srgb, var(--primary-bg) 88%, #000) 100%); border-color: var(--primary-dark); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); }
[data-style="skeuo"] .btn.solid:hover { background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 62%, #fff) 0%, color-mix(in srgb, var(--primary-bg) 92%, #fff) 50%, var(--primary-bg) 52%, color-mix(in srgb, var(--primary-bg) 94%, #000) 100%); border-color: var(--primary-dark); filter: none; }
[data-style="skeuo"] .btn.ghost { text-shadow: none; }
[data-style="skeuo"] :is(.btn:not(.ghost), .icon-btn, .mini, .theme-btn):active:not(:disabled) { filter: brightness(0.93); }
[data-style="skeuo"] :is(input, select, textarea):focus { border-color: var(--primary); box-shadow: var(--sunken-sh), 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); outline: none; }
[data-style="skeuo"] :is(.super-badge, .tn-super) { background: var(--secondary); color: #2b2118; text-shadow: none; }
[data-style="skeuo"] .theme-popover { background: var(--bg); }

/* the bar: stitched leather with a gloss across the top */
[data-style="skeuo"] .topbar { position: relative; z-index: 5; border-bottom: 1px solid #2d1a0c; box-shadow: 0 2px 6px rgba(20, 10, 0, 0.4); padding-top: 15px; padding-bottom: 15px; }
[data-style="skeuo"] .topbar::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.16), transparent 42%, rgba(0, 0, 0, 0.2)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .05 0 0 0 0 0 0 0 0 .55 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-style="skeuo"] .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 5px;
  border: 1px dashed var(--stitch); border-radius: 6px;
}
[data-style="skeuo"] .topbar-search input { padding: 6px 14px; }

/* the sidebar: linen, with embossed headings and a selection like a pressed key */
[data-style="skeuo"] .sidebar {
  background-color: var(--surface);
  background-image:
    repeating-linear-gradient(0deg, rgba(60, 40, 20, 0.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(60, 40, 20, 0.05) 0 1px, transparent 1px 3px);
  box-shadow: inset -1px 0 0 var(--row-hi), inset -10px 0 12px -10px rgba(40, 25, 10, 0.3);
}
[data-style="skeuo"] .side-heading { color: var(--muted); font-weight: 700; letter-spacing: 0.1em; }
[data-style="skeuo"] .node { padding: 5px 8px; border-radius: 6px; }
[data-style="skeuo"] .node.active {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 70%, #fff) 0%, var(--primary-bg) 50%, var(--primary-dark) 52%, color-mix(in srgb, var(--primary-bg) 88%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(40, 25, 10, 0.4);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4);
}
[data-style="skeuo"] .node .count { background: rgba(0, 0, 0, 0.1); color: var(--text); box-shadow: inset 0 1px 2px rgba(40, 25, 10, 0.25); text-shadow: none; }
[data-style="skeuo"] .node.active .count { background: rgba(0, 0, 0, 0.25); color: var(--on-primary); }

/* the list: gel header, rows with a highlight over a shadow line */
[data-style="skeuo"] .list-header {
  background: linear-gradient(to bottom, var(--gel1), var(--gel3));
  border-bottom: 1px solid var(--raised-bc); box-shadow: 0 2px 4px rgba(40, 25, 10, 0.15);
  padding: 10px 14px;
}
[data-style="skeuo"] .list-header h2 { font-weight: 700; }
[data-style="skeuo"] .article { padding: 10px 14px; border-bottom: 1px solid var(--row-line); box-shadow: inset 0 1px 0 var(--row-hi); }
[data-style="skeuo"] .article.active,
[data-style="skeuo"] .article.active:hover {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-bg) 70%, #fff) 0%, var(--primary-bg) 50%, var(--primary-dark) 52%, color-mix(in srgb, var(--primary-bg) 88%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
[data-style="skeuo"] .article.active .a-title { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); }
[data-style="skeuo"] .tl-card { border-bottom-color: var(--row-line); }

/* the story: a sheet of paper with a double red margin, shaded where it curls away */
[data-style="skeuo"] .reader {
  padding: 28px 40px 56px 80px;
  background-color: var(--paper);
  background-image: linear-gradient(90deg, transparent 56px, var(--margin) 56px 57px, transparent 57px 60px, var(--margin) 60px 61px, transparent 61px);
  box-shadow: inset 14px 0 18px -12px rgba(40, 25, 10, 0.35);
}
[data-style="skeuo"] .reader h1 { font-size: 1.6rem; line-height: 1.25; text-shadow: var(--emboss); }
[data-style="skeuo"] .r-head { border-bottom: 3px double var(--border); padding-bottom: 12px; margin-bottom: 18px; }
[data-style="skeuo"] .reader :is(.r-content, .r-thread-body) { font-size: 1.05rem; line-height: 1.7; }
[data-style="skeuo"] .reader :is(.r-content, .r-thread-body) img { border: 6px solid #fff; box-shadow: 0 2px 6px rgba(40, 25, 10, 0.4); border-radius: 1px; }
[data-theme="skeuo-dark"] .reader :is(.r-content, .r-thread-body) img { border-color: #efe5d2; }
[data-style="skeuo"] .reader :is(.r-content, .r-thread-body) blockquote { border-left-color: var(--secondary); }

/* dialogs: a leather title bar with its own stitching, tabs as gel folders, and a sticky note */
[data-style="skeuo"] .modal-head {
  position: relative; border-bottom: 1px solid #2d1a0c;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.14), transparent 45%, rgba(0, 0, 0, 0.2)), var(--leather);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
}
[data-style="skeuo"] .modal-head::after {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  border: 1px dashed var(--stitch); border-radius: 5px;
}
[data-style="skeuo"] .tab { text-shadow: var(--emboss); }
[data-style="skeuo"] .tab-intro {
  background: var(--note-bg); color: var(--note-fg); border: 1px solid var(--note-bc); border-left-width: 1px;
  border-radius: 2px; box-shadow: 0 2px 5px rgba(40, 25, 10, 0.3); transform: rotate(-0.3deg); text-shadow: none;
}
[data-style="skeuo"] .tab-intro strong { color: var(--note-fg); }
@media (max-width: 900px) {
  [data-style="skeuo"] .reader {
    padding: 18px 16px 48px 36px;
    background-image: linear-gradient(90deg, transparent 20px, var(--margin) 20px 21px, transparent 21px 24px, var(--margin) 24px 25px, transparent 25px);
  }
}


/* ═══ NeoClassical ════════════════════════════════════════
    Marble, Wedgwood blue and gilt: a library in the manner of the late
    eighteenth century. Everything is symmetrical and square-cornered, the
    capitals are Roman and tracked wide, the bar carries a Greek key and a
    row of dentils, the sidebar is fluted like a column, and the story is a
    justified page with a gilt initial between two ornaments. Light is
    Carrara; dark is a Pompeian wall in terracotta and gold. */
[data-theme="neoclassical-light"] {
  --bg: #f7f5f0; --surface: #ece8df; --border: #d3ccbb;
  --text: #23252b; --muted: #6a6a70;
  --primary: #35597f; --primary-bg: #35597f; --primary-dark: #264466; --on-primary: #f7f5f0;
  --secondary: #a8842c;
  --danger: #9c2a22; --input-bg: #fdfcf9; --bg-hover: #e8e3d6;
  --gilt: #b08d3c; --vein: 0.2;
}
[data-theme="neoclassical-dark"] {
  --bg: #1d1a18; --surface: #28231f; --border: #4a4038;
  --text: #eee6d6; --muted: #a99f8e;
  --primary: #e0b35c; --primary-bg: #9a3f2b; --primary-dark: #7f3322; --on-primary: #f6eddc;
  --secondary: #e0b35c;
  --danger: #ff9a88; --input-bg: #151311; --bg-hover: #332c26;
  --gilt: #d4a94d; --vein: 0.1;
}
[data-style="neoclassical"] {
  --radius: 0px; --r-ctl: 0px; --r-btn: 0px; --r-tab: 0px; --r-icon: 0px; --r-pill: 0px; --r-round: 50%;
  --bw: 1px; --bwp: 3px; --bsp: double;
  --raised-bc: var(--border);
  --sunken-bc: var(--border);
  --panel-bc: var(--gilt);
  --panel-sh: 0 22px 50px rgba(30, 25, 15, 0.38);
  --pop-sh: 0 10px 28px rgba(30, 25, 15, 0.26);
  --float-sh: 0 3px 10px rgba(30, 25, 15, 0.28);
  --tn-sh: 0 1px 3px rgba(30, 25, 15, 0.28);
  --hover-bc: var(--gilt); --hover-fg: var(--primary);
  --btn-bg: transparent; --btn-bg-hover: var(--bg-hover);
  --btn-case: uppercase; --btn-track: 0.14em;
  --tab-accent: var(--gilt);
  --top-bg: var(--bg); --top-fg: var(--text); --bar-bg: var(--surface); --bar-fg: var(--text);
  --bar-accent: var(--gilt);
  --scrim: rgba(25, 20, 12, 0.5);
}

/* veined marble over everything, faint */
[data-style="neoclassical"] body::before {
  content: ""; position: fixed; inset: -20%; z-index: 100; pointer-events: none; opacity: var(--vein); transform: rotate(-24deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='turbulence' baseFrequency='.0012 .016' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .4 0 0 0 0 .46 1 0 0 0 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 0 0 0 0 .9 0 0 0 0 0'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
}

/* the bar: a row of dentils along the top and a Greek key along the foot, under a gilt double rule */
[data-style="neoclassical"] .topbar { position: relative; z-index: 5; border-bottom: 3px double var(--gilt); padding-top: 15px; padding-bottom: 19px; }
[data-style="neoclassical"] .topbar::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; bottom: 0; height: 12px; background: var(--gilt); opacity: 0.8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Cpath d='M0 11H20M2 11V1H18V9H6V5H12'/%3E%3C/svg%3E") repeat-x left bottom / 20px 12px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12' fill='none' stroke='%23000' stroke-width='1.4'%3E%3Cpath d='M0 11H20M2 11V1H18V9H6V5H12'/%3E%3C/svg%3E") repeat-x left bottom / 20px 12px;
}
[data-style="neoclassical"] .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: 0; height: 5px; opacity: 0.6;
  background: repeating-linear-gradient(90deg, var(--gilt) 0 5px, transparent 5px 10px);
}
[data-style="neoclassical"] .topbar-search input { padding: 7px 14px; letter-spacing: 0.04em; }
[data-style="neoclassical"] :is(input, select, textarea):focus { border-color: var(--gilt); box-shadow: none; outline: none; }
[data-style="neoclassical"] .btn { font-size: 0.8rem; font-weight: 600; }
[data-style="neoclassical"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--gilt); filter: none; }
[data-style="neoclassical"] :is(.super-badge, .tn-super) { background: var(--gilt); color: #231c0a; }
[data-style="neoclassical"] .theme-popover { background: var(--bg); }

/* the sidebar: fluted along its inner edge like a column shaft */
[data-style="neoclassical"] .sidebar {
  padding: 12px 22px 24px 10px;
  background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--border) 80%, transparent) 0 1px, transparent 1px 4px);
  background-size: 16px 100%; background-position: right top; background-repeat: no-repeat;
}
[data-style="neoclassical"] .side-heading { font-family: var(--font-headline); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; color: var(--muted); }
[data-style="neoclassical"] .side-heading::before { content: "◆"; color: var(--gilt); font-size: 0.7em; letter-spacing: 0; }
[data-style="neoclassical"] .node { padding: 5px 10px; font-size: 1.04em; }
[data-style="neoclassical"] .node.active { box-shadow: inset 3px 0 0 var(--gilt); }
[data-style="neoclassical"] .node .count { background: transparent; padding: 0; font-variant-numeric: lining-nums; }
[data-style="neoclassical"] .node.active .count { color: var(--on-primary); }
[data-style="neoclassical"] .kids { border-left: 1px solid var(--gilt); margin-left: 12px; }

/* the list: a centred, capitalled heading between double rules */
[data-style="neoclassical"] .list-header { align-items: center; text-align: center; padding: 14px 16px 12px; border-bottom: 3px double var(--gilt); }
[data-style="neoclassical"] .list-header h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
[data-style="neoclassical"] .list-actions { justify-content: center; }
[data-style="neoclassical"] .article { padding: 13px 18px; gap: 12px; }
[data-style="neoclassical"] :is(.a-title, .tl-title) { font-family: var(--font-ui); font-size: 1.12em; line-height: 1.25; }
[data-style="neoclassical"] .a-snippet { font-size: 0.95em; }
[data-style="neoclassical"] .a-meta { font-variant: small-caps; letter-spacing: 0.08em; font-size: 0.92em; }
[data-style="neoclassical"] .article.active,
[data-style="neoclassical"] .article.active:hover { box-shadow: inset 3px 0 0 var(--gilt); }

/* the story: a centred, justified page */
[data-style="neoclassical"] .reader { padding: 40px clamp(24px, 7vw, 96px) 72px; }
[data-style="neoclassical"] .reader :is(.r-head, .r-content, .r-thread, .r-foot, .placeholder) { margin-left: auto; margin-right: auto; }
[data-style="neoclassical"] .r-head { max-width: 64ch; text-align: center; border-bottom: 0; padding-bottom: 0; margin-bottom: 26px; }
[data-style="neoclassical"] .reader h1 { font-size: 1.8rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.05em; margin-bottom: 10px; }
[data-style="neoclassical"] .r-meta { justify-content: center; font-variant: small-caps; letter-spacing: 0.08em; font-size: 0.95em; }
[data-style="neoclassical"] .r-head::after {
  content: "◆"; display: block; margin-top: 16px; text-align: center; line-height: 1; font-size: 0.7rem; color: var(--gilt);
  background:
    linear-gradient(var(--gilt), var(--gilt)) left center / calc(50% - 16px) 1px no-repeat,
    linear-gradient(var(--gilt), var(--gilt)) right center / calc(50% - 16px) 1px no-repeat;
}
[data-style="neoclassical"] .reader :is(.r-content, .r-thread-body) { font-size: 1.12rem; line-height: 1.75; max-width: 64ch; text-align: justify; hyphens: auto; }
[data-style="neoclassical"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.2em; }
[data-style="neoclassical"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) { font-family: var(--font-headline); font-weight: 600; letter-spacing: 0.08em; text-align: center; margin: 1.8em 0 0.6em; }
[data-style="neoclassical"] .reader :is(.r-content, .r-thread-body) blockquote {
  border-left: 0; border-top: 1px solid var(--gilt); border-bottom: 1px solid var(--gilt);
  padding: 14px 24px; text-align: center; font-style: italic; color: var(--text);
}
[data-style="neoclassical"] .reader .r-content > p:first-of-type::first-letter {
  float: left; padding: 0.04em 0.1em 0 0;
  font-family: var(--font-headline); font-size: 3.6em; font-weight: 700; line-height: 0.85; color: var(--gilt);
}
[data-style="neoclassical"] .r-foot { border-top-color: var(--gilt); }

/* dialogs */
[data-style="neoclassical"] .modal-head { border-bottom: 3px double var(--gilt); }
[data-style="neoclassical"] .modal-head h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
[data-style="neoclassical"] .tabs { background: var(--bg); padding: 6px 16px 0; gap: 0; box-shadow: inset 0 -1px 0 var(--border); }
[data-style="neoclassical"] .tab { background: transparent; border-color: transparent; font-size: 0.8rem; }
[data-style="neoclassical"] .tab:hover { background: var(--bg-hover); border-color: transparent; }
[data-style="neoclassical"] .tab.active,
[data-style="neoclassical"] .tab.active:hover { background: transparent; color: var(--text); box-shadow: none; border-color: transparent; border-bottom: 2px solid var(--gilt); }
[data-style="neoclassical"] .tab-intro { background: transparent; border-left: 0; border-top: 1px solid var(--gilt); border-bottom: 1px solid var(--gilt); text-align: center; font-style: italic; }
@media (max-width: 900px) {
  [data-style="neoclassical"] .reader { padding: 24px 18px 56px; }
  [data-style="neoclassical"] .reader h1 { font-size: 1.4rem; }
  [data-style="neoclassical"] .reader :is(.r-content, .r-thread-body) { text-align: left; }
}


/* ═══ Art Deco ════════════════════════════════════════════
    Miami Beach, 1935: pastel flamingo, aqua and sunshine on warm sand by day,
    neon on midnight blue by night. The geometry is the Deco kit: sunbursts
    (rising behind the top bar, fanning out of a selected story), racing-stripe
    rules, double borders, trapezoid tabs, a stepped corner on every unread
    story, and portholes for feed marks. Pane titles are Limelight, a Deco
    display face; everything else is Josefin Sans, the era's geometric sans.
    Dark is Ocean Drive: the same shapes lit up in pink and cyan. */
[data-theme="deco-light"] {
  --bg: #fff3e3; --surface: #fffaf2; --border: #ecd2b8;
  --text: #1b3a40; --muted: #546a6e;
  --primary: #0b7f82; --primary-bg: #0b7f82; --primary-dark: #08666a; --on-primary: #ffffff;
  --secondary: #e8820c;
  --danger: #c8372d; --input-bg: #fffdf8; --bg-hover: #fbe6cf;
  --d1: #19b5b0; --d2: #f4799a; --d3: #ffc857; --d4: #ff9f7a; --pop: #f4799a;
  --on-pop: #1b3a40; --neon: none; --shade: rgba(11, 60, 66, 0.2);
}
[data-theme="deco-dark"] {
  --bg: #0b1020; --surface: #121936; --border: #2b3668;
  --text: #f3eefc; --muted: #9aa3cc;
  --primary: #3de8e0; --primary-bg: #ff5fa8; --primary-dark: #ff86bd; --on-primary: #1a0b1c;
  --secondary: #ffd166;
  --danger: #ff8a80; --input-bg: #0a0f20; --bg-hover: #1b2349;
  --d1: #3de8e0; --d2: #ff5fa8; --d3: #ffd166; --d4: #ff9e7a; --pop: #3de8e0;
  --on-pop: #0b1020; --neon: 0 0 14px color-mix(in srgb, var(--d1) 65%, transparent); --shade: rgba(0, 0, 0, 0.55);
}
[data-style="deco"] {
  --radius: 4px; --r-ctl: 6px; --r-btn: 999px; --r-tab: 0px; --r-icon: 8px; --r-pill: 999px; --r-round: 50%;
  --bw: 1px; --bwp: 4px; --bsp: double;
  --raised-bc: var(--border);
  --sunken-bc: var(--border);
  --panel-bc: var(--d1);
  --raised-sh: none; --sunken-sh: none;
  --panel-sh: 10px 10px 0 color-mix(in srgb, var(--d2) 55%, transparent), 0 30px 60px var(--shade);
  --pop-sh: 5px 5px 0 color-mix(in srgb, var(--d2) 45%, transparent), 0 14px 30px var(--shade);
  --float-sh: 3px 3px 0 color-mix(in srgb, var(--d2) 55%, transparent);
  --tn-sh: 0 1px 3px var(--shade);
  --hover-bc: var(--d1); --hover-fg: var(--primary);
  --btn-bg: var(--surface); --btn-bg-hover: var(--bg-hover);
  --btn-case: uppercase; --btn-track: 0.1em;
  --tab-accent: var(--d2);
  --top-bg: var(--surface); --top-fg: var(--text); --bar-bg: var(--surface); --bar-fg: var(--text);
  --bar-accent: var(--d2);
  --scrim: rgba(8, 24, 32, 0.55);
  --sb: color-mix(in srgb, var(--d1) 60%, transparent) transparent;
  --stripes: linear-gradient(var(--d1) 0 3px, transparent 3px 5px, var(--d2) 5px 7px, transparent 7px 8px, var(--d3) 8px 9px, transparent 9px);
  --bars: linear-gradient(90deg, var(--d1) 0 3px, transparent 3px 5px, var(--d2) 5px 8px, transparent 8px 10px, var(--d3) 10px 12px);
}
[data-style="deco"] ::selection { background: color-mix(in srgb, var(--d3) 45%, transparent); }

/* the bar: a sun rising behind the controls, fanned rays, and three racing
   stripes along the foot, with the founding year tucked against the logo */
[data-style="deco"] .topbar { position: relative; z-index: 5; border-bottom: 0; padding: 8px 18px 16px; }
[data-style="deco"] .topbar::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; bottom: 0; right: 0; width: min(64%, 820px);
  background:
    radial-gradient(circle at 80% 150%, var(--d3) 0 52px, transparent 53px),
    radial-gradient(circle at 80% 150%, transparent 0 62px, color-mix(in srgb, var(--d4) 55%, transparent) 62px 66px, transparent 67px),
    repeating-conic-gradient(from 270deg at 80% 150%, color-mix(in srgb, var(--d2) 70%, transparent) 0 4deg, transparent 4deg 10deg);
  opacity: .5;
  -webkit-mask-image: linear-gradient(270deg, #000 25%, transparent 100%);
  mask-image: linear-gradient(270deg, #000 25%, transparent 100%);
}
[data-style="deco"] .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; bottom: 0; height: 9px; background: var(--stripes);
}
[data-style="deco"] .brand::after {
  content: "\25C6  EST. 1935  \25C6"; align-self: flex-end; margin: 0 0 8px 10px; white-space: nowrap;
  font: 700 .62rem/1 var(--font-ui); letter-spacing: .26em; color: var(--muted);
}
@media (max-width: 1180px) { [data-style="deco"] .brand::after { display: none; } }
[data-style="deco"] .topbar-search input { padding: 8px 18px; border-width: 2px; border-color: var(--d1); background: var(--input-bg); }
[data-style="deco"] .topbar-search input:focus { border-color: var(--d2); box-shadow: 3px 3px 0 color-mix(in srgb, var(--d2) 45%, transparent); }
[data-style="deco"] :is(input, select, textarea):focus { border-color: var(--d1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--d1) 28%, transparent); outline: none; }
[data-style="deco"] .topbar :is(.icon-btn, .theme-btn, .mini) { border-color: var(--d1); border-width: 1.5px; }
[data-style="deco"] .topbar :is(.icon-btn, .theme-btn, .mini):hover { background: var(--bg-hover); color: var(--primary); border-color: var(--d2); }
[data-style="deco"] .theme-popover { background: var(--surface); }
[data-style="deco"] :is(.super-badge, .tn-super) { background: var(--d3); color: #231c0a; }

/* buttons: capital letters in a stadium outline; the solid one sits on a hard
   pink edge and presses into it */
[data-style="deco"] .btn { font-size: .76rem; font-weight: 700; padding: 8px 20px; border-width: 2px; border-color: var(--d1); }
[data-style="deco"] .btn.sm { padding: 6px 14px; }
[data-style="deco"] .btn.ghost { border-color: transparent; }
[data-style="deco"] .btn:hover { border-color: var(--d2); }
[data-style="deco"] .btn.solid { border-color: var(--primary-bg); box-shadow: 0 3px 0 var(--d2); transition: transform .12s, box-shadow .12s; }
[data-style="deco"] .btn.solid:hover { filter: none; border-color: var(--primary-bg); transform: translateY(1px); box-shadow: 0 2px 0 var(--d2); }
[data-style="deco"] .btn.solid:active { transform: translateY(3px); box-shadow: 0 0 0 var(--d2); }

/* navigation: fluted sidebar, headings led by three bars, double-ringed
   portholes for the feeds, and a selection plaque with a pink underedge */
[data-style="deco"] .sidebar {
  padding: 12px 10px 26px;
  background: repeating-linear-gradient(90deg, transparent 0 21px, color-mix(in srgb, var(--d1) 11%, transparent) 21px 22px), var(--surface);
}
[data-style="deco"] .side-heading { padding: 18px 8px 6px; font-size: .66rem; font-weight: 700; letter-spacing: .18em; white-space: nowrap; color: var(--primary); }
[data-style="deco"] .side-heading::before { content: ""; flex: 0 0 auto; width: 12px; height: 12px; margin-right: 6px; background: var(--bars); }
[data-style="deco"] .node { padding: 6px 14px; min-height: 34px; border-radius: 999px; transition: background .15s, box-shadow .15s; }
[data-style="deco"] .node:hover { background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--border); }
[data-style="deco"] .node .count {
  padding: 0 8px; font-size: .68rem; font-weight: 700; color: var(--primary); background: transparent;
  border: 1px solid color-mix(in srgb, var(--d1) 65%, transparent);
}
[data-style="deco"] .node .favicon-fallback {
  border: 1px solid var(--d1); border-radius: 50%; color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--d2);
}
[data-style="deco"] .node .favicon { border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--d2); }
[data-style="deco"] .node.active,
[data-style="deco"] .node.active:hover {
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--primary-bg), inset 0 0 0 3px rgba(255, 255, 255, 0.55), 0 3px 0 var(--pop);
}
[data-style="deco"] .node.active .count { color: var(--on-primary); border-color: rgba(255, 255, 255, 0.55); }
[data-style="deco"] .favicon-fallback.topic { background: var(--d1); color: var(--on-pop); }
[data-style="deco"] .kids { margin-left: 16px; padding-left: 5px; border-left: 3px double color-mix(in srgb, var(--d1) 70%, transparent); }

/* the list: a Limelight title over a stripe-and-diamond rule, then stories in
   double frames. Unread ones wear a stepped corner; the selected one is filled
   and fans a sunburst out of its lower corner. */
[data-style="deco"] .listpane { padding-bottom: 22px; }
[data-style="deco"] .list-header { padding: 16px 20px 12px; gap: 8px; border-bottom: 0; }
[data-style="deco"] .list-header h2 {
  font: 400 1.5rem/1.25 "Limelight", "Poiret One", "Century Gothic", sans-serif; letter-spacing: .02em; color: var(--primary);
  font-synthesis: none; text-shadow: var(--neon);
}
[data-style="deco"] .list-header::after {
  content: "\25C6"; display: block; flex: 0 0 auto; width: 100%; max-width: 230px; margin-top: 2px;
  font-size: .55rem; line-height: 6px; text-align: center; color: var(--d3);
  background:
    linear-gradient(var(--d1), var(--d1)) 0 50% / calc(50% - 12px) 2px no-repeat,
    linear-gradient(var(--d2), var(--d2)) 100% 50% / calc(50% - 12px) 2px no-repeat;
}
[data-style="deco"] .article {
  position: relative; overflow: hidden; margin: 10px 14px 0; padding: 14px 20px 14px 22px; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px color-mix(in srgb, var(--d1) 38%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
[data-style="deco"] .article:hover {
  background: var(--surface); border-color: var(--d1); transform: translate(-1px, -1px);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px color-mix(in srgb, var(--d1) 55%, transparent), 4px 4px 0 color-mix(in srgb, var(--d1) 35%, transparent);
}
[data-style="deco"] .article:not(.read)::before {
  content: ""; position: absolute; top: 0; right: 0; width: 28px; height: 28px; pointer-events: none;
  background:
    linear-gradient(225deg, var(--d3) 50%, transparent 50%) top right / 13px 13px no-repeat,
    linear-gradient(225deg, var(--d2) 50%, transparent 50%) top right / 28px 28px no-repeat;
}
[data-style="deco"] .article.read { background: color-mix(in srgb, var(--surface) 50%, var(--bg)); box-shadow: none; }
[data-style="deco"] .article .a-title { font-weight: 700; line-height: 1.3; letter-spacing: .015em; margin-bottom: 4px; }
[data-style="deco"] .article.read .a-title { font-weight: 400; }
[data-style="deco"] .a-snippet { line-height: 1.5; }
[data-style="deco"] .a-meta { margin-top: 8px; gap: 8px; }
[data-style="deco"] .a-source { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); }
[data-style="deco"] .article.read .a-source { color: var(--muted); font-weight: 400; }
[data-style="deco"] .article.active,
[data-style="deco"] .article.active:hover {
  background: var(--primary-bg); border-color: var(--primary-bg); transform: none;
  box-shadow: inset 0 0 0 3px var(--primary-bg), inset 0 0 0 4px rgba(255, 255, 255, 0.5), 5px 5px 0 color-mix(in srgb, var(--pop) 60%, transparent);
}
[data-style="deco"] .article.active::before {
  content: ""; position: absolute; top: 0; right: 0; width: 28px; height: 28px; pointer-events: none;
  background:
    linear-gradient(225deg, var(--d3) 50%, transparent 50%) top right / 13px 13px no-repeat,
    linear-gradient(225deg, var(--pop) 50%, transparent 50%) top right / 28px 28px no-repeat;
}
[data-style="deco"] .article.active::after {
  content: ""; position: absolute; right: -34px; bottom: -52px; width: 140px; height: 140px; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.2) 0 6deg, transparent 6deg 12deg);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 68%);
  mask-image: radial-gradient(circle, #000 10%, transparent 68%);
}
[data-style="deco"] .article.active .a-source { color: var(--on-primary); font-weight: 700; }
[data-style="deco"] .tl-card {
  margin: 10px 14px 0; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-right: 5px double var(--d2); border-radius: 4px;
}
[data-style="deco"] .tl-card.read { border-right-color: var(--border); }
[data-style="deco"] .loadmore { border-radius: 999px; border-width: 2px; border-color: var(--d1); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .74rem; }

/* the reader: sunrays fading out of the top corner, a Limelight headline over
   a double rule, a drop cap with a hard cyan shadow, capitals for the
   subheads over three stripes, and the pull-quote between two double rules */
[data-style="deco"] .reader {
  padding: 40px clamp(24px, 6vw, 84px) 72px;
  background:
    radial-gradient(circle at 100% 0, transparent 0, var(--surface) 360px),
    repeating-conic-gradient(from 180deg at 100% 0, color-mix(in srgb, var(--d2) 22%, transparent) 0 4deg, transparent 4deg 10deg),
    var(--surface);
  background-repeat: no-repeat;
}
[data-style="deco"] .reader h1 {
  font: 400 1.95rem/1.25 "Limelight", "Century Gothic", sans-serif; letter-spacing: .01em; font-synthesis: none; margin-bottom: 10px;
}
[data-style="deco"] .r-head { border-bottom: 5px double var(--primary); padding-bottom: 14px; margin-bottom: 26px; }
[data-style="deco"] .r-meta { gap: 8px; }
[data-style="deco"] .reader :is(.r-content, .r-thread-body) { font-size: 1.06rem; line-height: 1.8; max-width: 66ch; }
[data-style="deco"] .reader :is(.r-content, .r-thread-body) p { margin: 0 0 1.3em; }
[data-style="deco"] .reader .r-content > p:first-of-type { display: flow-root; }
[data-style="deco"] .reader .r-content > p:first-of-type::first-letter {
  float: left; padding: 0.02em 0.14em 0 0;
  font: 400 3.8em/0.85 "Limelight", "Century Gothic", sans-serif;
  color: var(--d2); text-shadow: 3px 3px 0 var(--d1);
}
[data-style="deco"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) {
  font-size: 1.02em; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--primary); margin: 2em 0 .6em;
}
[data-style="deco"] .reader :is(.r-content, .r-thread-body) :is(h2, h3)::after {
  content: ""; display: block; width: 58px; height: 9px; margin-top: 8px; background: var(--stripes);
}
[data-style="deco"] .reader :is(.r-content, .r-thread-body) blockquote {
  margin: 1.8em 0; padding: 18px 28px; text-align: center; font-size: 1.12rem; font-weight: 700; letter-spacing: .02em; color: var(--text);
  border: 0; border-block: 5px double var(--d2); background: transparent;
}
[data-style="deco"] .reader :is(.r-content, .r-thread-body) blockquote p { margin: 0; }
[data-style="deco"] .reader :is(.r-content, .r-thread-body) a { color: var(--primary); text-decoration: underline 2px var(--d2); text-underline-offset: 3px; }
[data-style="deco"] .reader :is(.r-content, .r-thread-body) ul > li::marker { content: "\25C6  "; color: var(--d2); font-size: .8em; }
[data-style="deco"] .reader :is(.r-content, .r-thread-body) img {
  border: 3px double var(--primary); padding: 4px; background: var(--surface); border-radius: 0;
}
[data-style="deco"] .r-foot { border-top: 5px double var(--border); }

/* dialogs: a double frame on a hard pink shadow, a sunburst at the title bar's
   end and stripes under it; tabs are trapezoids sitting on a double rule */
[data-style="deco"] .modal-card { border-radius: 6px; }
[data-style="deco"] .modal-head { position: relative; padding: 16px 22px 18px; border-bottom: 0; overflow: hidden; }
[data-style="deco"] .modal-head > * { position: relative; z-index: 1; }
[data-style="deco"] .modal-head::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 55%; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 270deg at 92% 230%, color-mix(in srgb, var(--d2) 70%, transparent) 0 4deg, transparent 4deg 10deg);
  -webkit-mask-image: linear-gradient(270deg, #000 20%, transparent);
  mask-image: linear-gradient(270deg, #000 20%, transparent);
}
[data-style="deco"] .modal-head::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: var(--stripes);
}
[data-style="deco"] .modal-head h2 {
  font: 400 1.45rem/1.25 "Limelight", "Century Gothic", sans-serif; letter-spacing: .02em; color: var(--primary);
  font-synthesis: none; text-shadow: var(--neon);
}
[data-style="deco"] .tabs { padding: 14px 20px 0; gap: 4px; background: var(--bg); box-shadow: none; border-bottom: 4px double var(--primary); }
[data-style="deco"] .tab {
  padding: 9px 30px; border: 0; border-radius: 0; font-size: .72rem; font-weight: 700;
  background: var(--bg-hover); color: var(--muted);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
}
[data-style="deco"] .tab:hover { background: var(--surface); color: var(--primary); }
[data-style="deco"] .tab.active,
[data-style="deco"] .tab.active:hover { background: var(--primary-bg); color: var(--on-primary); box-shadow: inset 0 3px 0 var(--pop); }
[data-style="deco"] .tab-intro {
  background: color-mix(in srgb, var(--d3) 14%, var(--surface)); border: 0; border-block: 3px double var(--d2); border-radius: 0;
}
[data-style="deco"] .manage-body { padding: 18px 22px 24px; }

@media (prefers-reduced-motion: no-preference) {
  [data-style="deco"] .topbar::before { animation: deco-rise 7s ease-in-out infinite alternate; }
  @keyframes deco-rise { from { transform: translateY(5px); } to { transform: translateY(-2px); } }
}
@media (max-width: 900px) {
  [data-style="deco"] .topbar { padding: 6px 10px 14px; }
  [data-style="deco"] .topbar::before { width: 85%; opacity: .35; }
  [data-style="deco"] .article, [data-style="deco"] .tl-card { margin: 8px 8px 0; padding: 12px 16px 12px 18px; }
  [data-style="deco"] .reader { padding: 24px 18px 56px; }
  [data-style="deco"] .reader h1 { font-size: 1.5rem; }
  [data-style="deco"] .list-header { padding: 14px 14px 10px; }
}


/* ═══ Trek ════════════════════════════════════════════════
    An LCARS homage (the interface of a twenty-fourth-century starship, not
    anyone's logo): black ground, rounded colour-blocked bars, an elbow that
    joins the bar across the top to the column down the left, pill-ended
    buttons, tall condensed capitals. The sidebar's buttons are coloured by
    depth and the selection is lit orange. The elbow needs the width of a
    desktop, so on a phone it collapses to the bar. Dark is Deep Space; light
    is a daylight variant on cream. */
[data-theme="trek-dark"] {
  --bg: #000000; --surface: #07050b; --border: #3a2f4a;
  --text: #f4e4cf; --muted: #b59fb8;
  --primary: #ff9900; --primary-bg: #ff9900; --primary-dark: #cc7a00; --on-primary: #000000;
  --secondary: #99ccff;
  --danger: #ff6b6b; --input-bg: #0c0814; --bg-hover: #1a1226;
  --lc1: #ff9900; --lc2: #ffcc99; --lc3: #cc99cc; --lc4: #9999ff; --lc5: #cc6666; --lc6: #99ccff;
}
[data-theme="trek-light"] {
  --bg: #f4ead8; --surface: #e9dec8; --border: #c9b9a0;
  --text: #1c1626; --muted: #5c5068;
  --primary: #a04f00; --primary-bg: #f29c2a; --primary-dark: #c77c14; --on-primary: #1a1008;
  --secondary: #4a52b8;
  --danger: #b3261e; --input-bg: #fbf5e8; --bg-hover: #e2d5bb;
  --lc1: #f29c2a; --lc2: #f0c08a; --lc3: #b07cb8; --lc4: #7a7ee0; --lc5: #c96a6a; --lc6: #6aa8dc;
}
[data-style="trek"] {
  --radius: 20px; --r-ctl: 999px; --r-btn: 999px; --r-tab: 999px; --r-icon: 999px; --r-pill: 999px; --r-round: 50%;
  --bw: 2px; --bwp: 2px;
  --raised-bc: var(--lc3);
  --sunken-bc: var(--lc4);
  --panel-bc: var(--lc1);
  --panel-sh: 0 0 0 1px var(--bg), 0 18px 46px rgba(0, 0, 0, 0.5);
  --pop-sh: 0 0 0 1px var(--bg), 0 10px 28px rgba(0, 0, 0, 0.4);
  --float-sh: 0 3px 10px rgba(0, 0, 0, 0.4);
  --tn-sh: none;
  --hover-bc: var(--lc1); --hover-fg: var(--primary);
  --btn-bg: var(--bg); --btn-bg-hover: var(--bg-hover);
  --btn-case: uppercase; --btn-track: 0.08em;
  --tab-accent: var(--lc1);
  --top-bg: var(--bg); --top-fg: var(--text);
  --bar-bg: var(--lc1); --bar-fg: var(--on-primary); --bar-accent: var(--lc3);
  --scrim: rgba(0, 0, 0, 0.6);
}
[data-style="trek"] :is(.a-title, .tl-title, .list-header h2, .reader h1, .modal-head h2, .side-heading, .node, .a-meta, .tl-source, .r-meta, .group-title) { text-transform: uppercase; letter-spacing: 0.04em; }

/* the bar: a run of colour blocks across the top; on a desktop its left end is the elbow */
[data-style="trek"] .topbar { position: relative; z-index: 5; border-bottom: 0; padding-top: 22px; }
[data-style="trek"] .topbar::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; inset: 0;
  background: linear-gradient(90deg, var(--lc1) 0 33%, transparent 33% 33.6%, var(--lc3) 33.6% 58%, transparent 58% 58.6%, var(--lc4) 58.6% 84%, transparent 84% 84.6%, var(--lc5) 84.6%) 0 0 / 100% 8px no-repeat;
}
[data-style="trek"] .topbar-date {
  display: block; align-self: center; margin-left: 8px; white-space: nowrap;
  font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary);
}
@media (max-width: 1180px) { [data-style="trek"] .topbar-date { display: none; } }
[data-style="trek"] .topbar-search input { padding: 6px 18px; text-transform: uppercase; letter-spacing: 0.08em; }
[data-style="trek"] :is(input, select, textarea):focus { border-color: var(--lc1); box-shadow: none; outline: none; }
[data-style="trek"] .btn { font-weight: 700; padding: 8px 20px; }
[data-style="trek"] .btn.solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); filter: none; }
[data-style="trek"] :is(.super-badge, .tn-super) { background: var(--lc3); color: #000000; }
[data-style="trek"] .theme-popover { background: var(--bg); }

/* navigation: pill buttons coloured by depth, the current one lit */
[data-style="trek"] .side-heading { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; color: var(--lc3); padding: 14px 12px 4px; }
[data-style="trek"] .node { --c: var(--lc2); padding: 5px 14px; margin: 3px 0; border-radius: 999px; font-weight: 700; background: color-mix(in srgb, var(--c) 28%, var(--bg)); }
[data-style="trek"] .cat > .node { --c: var(--lc3); }
[data-style="trek"] .kids > .node { --c: var(--lc4); }
[data-style="trek"] .node:hover { background: color-mix(in srgb, var(--c) 52%, var(--bg)); }
[data-style="trek"] .node.active { background: var(--primary-bg); color: var(--on-primary); }
[data-style="trek"] .node .count { background: transparent; padding: 0; font-weight: 700; color: inherit; }
[data-style="trek"] .kids { border-left: 0; margin-left: 14px; padding-left: 0; }

/* the list and the reader: headings over a run of colour blocks */
[data-style="trek"] .list-header {
  padding: 14px 18px 18px; border-bottom: 0;
  background: linear-gradient(90deg, var(--lc4) 0 55%, transparent 55% 56%, var(--lc5) 56% 80%, transparent 80% 81%, var(--lc2) 81%) left bottom / 100% 6px no-repeat, var(--bg);
}
[data-style="trek"] .list-header h2 { font-size: 1.5rem; font-weight: 400; color: var(--primary); letter-spacing: 0.06em; }
[data-style="trek"] .article { padding: 10px 14px; border-bottom: 1px solid var(--border); }
[data-style="trek"] .a-title { font-size: 1.18em; line-height: 1.15; }
[data-style="trek"] .a-snippet { font-size: 0.95em; letter-spacing: 0.01em; }
[data-style="trek"] .article.active,
[data-style="trek"] .article.active:hover { border-radius: 0 26px 26px 0; border-bottom-color: transparent; }
[data-style="trek"] .reader { padding: 28px clamp(20px, 5vw, 64px) 56px; }
[data-style="trek"] .reader h1 { font-size: 2.2rem; font-weight: 400; line-height: 1.08; letter-spacing: 0.05em; color: var(--primary); margin-bottom: 8px; }
[data-style="trek"] .r-head {
  border-bottom: 0; padding-bottom: 20px; margin-bottom: 22px;
  background: linear-gradient(90deg, var(--lc3) 0 34%, transparent 34% 35%, var(--lc4) 35% 62%, transparent 62% 63%, var(--lc1) 63%) left bottom / 100% 8px no-repeat;
}
[data-style="trek"] .r-meta { font-size: 0.95rem; letter-spacing: 0.06em; }
[data-style="trek"] .reader :is(.r-content, .r-thread-body) { line-height: 1.65; }
[data-super="trek"] .reader :is(.r-content, .r-thread-body) { font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 0.92em; line-height: 1.7; }
[data-style="trek"] .reader :is(.r-content, .r-thread-body) :is(h2, h3, h4) { font-family: var(--font-headline); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 400; color: var(--lc3); margin: 1.6em 0 0.4em; }
[data-style="trek"] .reader :is(.r-content, .r-thread-body) blockquote { border-left: 6px solid var(--lc3); border-radius: 6px 0 0 6px; padding-left: 16px; }
[data-style="trek"] .reader a { color: var(--secondary); }
[data-style="trek"] .r-foot { border-top-color: var(--lc3); }

/* dialogs: an orange title bar, tabs as pills */
[data-style="trek"] .modal-head { padding: 8px 18px; }
[data-style="trek"] .modal-head h2 { font-size: 1.3rem; font-weight: 400; letter-spacing: 0.08em; }
[data-style="trek"] .modal-head .icon-btn { color: var(--text); }
[data-style="trek"] .tabs { background: var(--bg); padding: 10px 16px 4px; gap: 6px; box-shadow: none; }
[data-style="trek"] .tab { border-radius: 999px; border-color: transparent; background: color-mix(in srgb, var(--lc3) 36%, var(--bg)); color: var(--text); padding: 6px 18px; margin-bottom: 6px; font-weight: 700; }
[data-style="trek"] .tab:hover { background: color-mix(in srgb, var(--lc3) 60%, var(--bg)); border-color: transparent; }
[data-style="trek"] .tab.active,
[data-style="trek"] .tab.active:hover { background: var(--primary-bg); color: var(--on-primary); border-color: transparent; box-shadow: none; }
[data-style="trek"] .tab-intro { border-left: 10px solid var(--lc3); border-radius: 0 20px 20px 0; background: color-mix(in srgb, var(--lc3) 12%, var(--bg)); }
[data-style="trek"] .col-resizer { background: linear-gradient(to right, transparent 3px, var(--lc5) 3px, var(--lc5) 4px, transparent 4px); }

/* on a desktop: the elbow, and the column that runs down from it */
@media (min-width: 901px) {
  [data-style="trek"] .topbar { padding-left: 50px; }
  [data-style="trek"] .topbar::after {
    border-top-left-radius: 32px;
    background:
      radial-gradient(circle at 100% 100%, transparent 15px, var(--lc1) 16px) 32px 8px / 16px 16px no-repeat,
      linear-gradient(var(--lc1), var(--lc1)) 0 0 / 32px 100% no-repeat,
      linear-gradient(90deg, var(--lc1) 0 33%, transparent 33% 33.6%, var(--lc3) 33.6% 58%, transparent 58% 58.6%, var(--lc4) 58.6% 84%, transparent 84% 84.6%, var(--lc5) 84.6%) 0 0 / 100% 8px no-repeat;
  }
  [data-style="trek"] .sidebar {
    padding-left: 44px;
    background:
      linear-gradient(to bottom, var(--lc1) 0 70px, transparent 70px 74px, var(--lc3) 74px 170px, transparent 170px 174px, var(--lc4) 174px 262px, transparent 262px 266px, var(--lc5) 266px) 0 0 / 32px 100% no-repeat,
      var(--surface);
  }
}
@media (max-width: 900px) {
  [data-style="trek"] .topbar { padding-top: 14px; }
  [data-style="trek"] .topbar::after { background-size: 100% 6px; }
  [data-style="trek"] .reader h1 { font-size: 1.6rem; }
}
