/* Office Toolshed – site shell (mockup, phase 1) */
:root {
  --shed: #24453a;
  --shed-deep: #1a352c;
  --shed-ink: #eef3ec;
  --board: #d9dfd6;
  --hole: #b3beb1;
  --paper: #fbfcfa;
  --ink: #1c2420;
  --muted: #56625b;
  --line: #cdd5cb;
  --tape: #f2c744;
  --tape-edge: #d9ad2a;

  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --read: 41rem;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--shed); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.site-head { background: var(--shed); color: var(--shed-ink); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--shed-ink); text-decoration: none;
  font: 750 1.2rem/1 var(--sans); font-variation-settings: "wdth" 118; letter-spacing: -.01em;
}
.brand svg { flex: none; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--shed-ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 12px; border-radius: 6px;
}
.site-nav a:hover { background: rgba(255,255,255,.1); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--tape); border-radius: 0; }

/* ---------- pegboard ---------- */
.board {
  background-color: var(--board);
  background-image: radial-gradient(circle at center, var(--hole) 0 3.2px, transparent 3.7px);
  background-size: 28px 28px;
  background-position: 14px 14px;
  border-bottom: 1px solid #c3cbc1;
}

.hero { padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 6vw, 80px); }
.hero-intro {
  max-width: 40rem;
  background: var(--board);            /* lifts the text off the holes */
  box-shadow: 0 0 0 14px var(--board);
  border-radius: 2px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.hero h1 {
  font: 760 clamp(2rem, 4.4vw, 3.15rem)/1.06 var(--sans);
  font-variation-settings: "wdth" 104;
  letter-spacing: -.022em;
  margin: 0 0 .45em;
  text-wrap: balance;
}
.hero-intro p { margin: 0; font-size: 1.12rem; line-height: 1.55; color: #33403a; max-width: 36rem; }

.racks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
}
.rack h2 {
  display: inline-block;
  margin: 0 0 22px;
  padding: 5px 12px 6px;
  font: 650 .95rem/1.2 var(--sans);
  font-variation-settings: "wdth" 96;
  color: #2b2410;
  background: var(--tape);
  border-left: 1px dashed var(--tape-edge);
  border-right: 1px dashed var(--tape-edge);
  transform: rotate(-1.2deg);
  box-shadow: 0 1px 1px rgba(60,50,10,.18);
}
.rack:nth-child(2) h2 { transform: rotate(.9deg); }
.rack:nth-child(3) h2 { transform: rotate(-.6deg); }
.rack:nth-child(4) h2 { transform: rotate(1.3deg); }
.rack ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }

/* hang tag */
.tag {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 12px;
  padding: 26px 16px 16px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  border-radius: 10px 10px 8px 8px;
  border: 1px solid #c5cdc3;
  box-shadow: 0 2px 0 rgba(28,36,32,.06), 0 6px 14px -8px rgba(28,36,32,.35);
  transform-origin: 50% 0;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .25s ease, box-shadow .25s ease;
}
/* the punched hole, sitting on a peg */
.tag::before {
  content: "";
  position: absolute; top: 8px; left: 50%;
  width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%;
  background: var(--board);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
}
.tag::after {             /* peg */
  content: "";
  position: absolute; top: 11px; left: 50%;
  width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%;
  background: #6f7a72;
}
li:nth-child(3n+1) > .tag { --tilt: -1.1deg; }
li:nth-child(3n+2) > .tag { --tilt: .8deg; }
li:nth-child(3n+3) > .tag { --tilt: -.4deg; }
.tag:hover, .tag:focus-visible {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 2px 0 rgba(28,36,32,.06), 0 14px 22px -10px rgba(28,36,32,.45);
}
.tag:focus-visible { outline-offset: 3px; border-radius: 10px 10px 8px 8px; }
.tag svg { grid-row: span 2; color: var(--shed); margin-top: 2px; }
.tag-name { font: 650 1.02rem/1.25 var(--sans); }
.tag-does { font-size: .88rem; line-height: 1.45; color: var(--muted); margin-top: 4px; }

/* ---------- home: guides ---------- */
.home-lower { padding: clamp(48px, 7vw, 88px) 0; }
.home-lower .guides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 72px); }
.section-head h2 {
  font: 720 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--sans);
  font-variation-settings: "wdth" 104; letter-spacing: -.015em; margin: 0 0 .5em;
}
.section-head p { margin: 0; color: var(--muted); max-width: 22rem; }
.guide-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.guide-list li { border-bottom: 1px solid var(--line); }
.guide-list a {
  display: grid; grid-template-columns: 1fr auto; column-gap: 24px;
  padding: 20px 0; text-decoration: none; color: var(--ink);
}
.guide-list .g-title { font: 650 1.15rem/1.3 var(--sans); }
.guide-list a:hover .g-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.guide-list .g-sum { grid-column: 1; font: 1rem/1.55 var(--serif); color: #3d4842; margin-top: 6px; max-width: 38rem; }
.guide-list time { grid-row: 1; grid-column: 2; font-size: .88rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.tested {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 28px;
  border-top: 3px solid var(--ink);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(28px, 5vw, 72px);
}
.tested h2 { font: 720 1.35rem/1.2 var(--sans); margin: 0; }
.tested p { margin: 0 0 .8em; font: 1.06rem/1.65 var(--serif); max-width: 40rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--shed-deep); color: #c9d4cc; padding: 36px 0 44px; font-size: .92rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-foot a { color: var(--shed-ink); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot p { margin: 0; max-width: 32rem; }

/* ---------- article / prose ---------- */
.page-head { padding: clamp(36px, 6vw, 64px) 0 clamp(20px, 3vw, 28px); }
.crumb { font-size: .92rem; margin: 0 0 14px; color: var(--muted); }
.crumb a { color: var(--muted); }
.page-head h1 {
  font: 760 clamp(1.9rem, 4vw, 2.85rem)/1.1 var(--sans);
  font-variation-settings: "wdth" 100; letter-spacing: -.02em;
  margin: 0; max-width: 46rem; text-wrap: balance;
}
.page-head .lede { font: 1.2rem/1.55 var(--serif); color: #33403a; margin: 16px 0 0; max-width: 40rem; }
.page-head .meta { margin: 18px 0 0; font-size: .9rem; color: var(--muted); }

.prose { max-width: var(--read); font: 1.125rem/1.72 var(--serif); padding-bottom: 72px; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose ul, .prose ol { margin: 0; }
.prose * + p, .prose * + ul, .prose * + ol { margin-top: 1em; }
.prose h2 {
  font: 700 1.6rem/1.2 var(--sans); font-variation-settings: "wdth" 102; letter-spacing: -.012em;
  margin: 2.2em 0 .5em;
}
.prose h3 { font: 650 1.2rem/1.3 var(--sans); margin: 1.8em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--muted); }
.prose code { font: .86em/1 "Cascadia Mono", Consolas, monospace; background: #edf1eb; padding: .15em .35em; border-radius: 4px; }
.prose img { display: block; border-radius: 8px; margin: 1.6em 0; border: 1px solid var(--line); }
.prose blockquote { margin: 1.4em 0; padding: 0 0 0 1.1em; border-left: 3px solid var(--tape); color: #33403a; }
.prose .table-wrap, .prose .pp-table-wrap, .prose .pm-tw { overflow-x: auto; margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font: .95rem/1.45 var(--sans); }
.prose th { text-align: left; font-weight: 650; border-bottom: 2px solid var(--ink); padding: 8px 12px 8px 0; vertical-align: bottom; }
.prose td { border-bottom: 1px solid var(--line); padding: 9px 12px 9px 0; vertical-align: top; }
.prose details { border-top: 1px solid var(--line); padding: 12px 0; }
.prose details:last-of-type { border-bottom: 1px solid var(--line); }
.prose summary { cursor: pointer; font: 600 1.05rem/1.4 var(--sans); }
.prose details p { margin-top: .6em; }

/* boxes carried over from the old posts */
.prose .pp-box, .prose .note {
  margin: 1.6em 0; padding: 18px 20px; background: #eef2ec; border-radius: 8px; border-left: 4px solid var(--shed);
}
.prose .pp-box > :first-child { margin-top: 0; }
.prose .pp-toc { margin: 1.6em 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; font: .98rem/1.5 var(--sans); }
.prose .pp-toc ol, .prose .pp-toc ul { margin-top: .4em; }

/* related tools on article pages */
.related { border-top: 3px solid var(--ink); padding: 28px 0 0; margin-top: 56px; }
.related h2 { margin-top: 0; }
.related-board { margin: 20px calc(var(--gutter) * -1) 0; padding: 28px var(--gutter) 32px; border-radius: 0; }
.related-board ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.related-board .tag { font-family: var(--sans); }
.prose .related-board li + li { margin-top: 0; }

/* article + side rail (wide screens only) */
.rail { display: none; }
@media (min-width: 1100px) {
  .article-grid { display: grid; grid-template-columns: minmax(0, var(--read)) minmax(0, 1fr); column-gap: clamp(40px, 6vw, 96px); }
  .rail { display: block; padding-bottom: 72px; }
  .rail-inner { position: sticky; top: 24px; max-width: 300px; }
  .rail h2 { font: 650 .98rem/1.3 var(--sans); margin: 0 0 12px; }
  .rail .board { padding: 22px 18px 24px; border-radius: 10px; border: 1px solid #c3cbc1; }
  .rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
  .rail .tag { grid-template-columns: 26px 1fr; padding: 22px 14px 13px; }
  .rail .tag svg { width: 24px; height: 24px; }
  .rail .tag-name { font-size: .95rem; }
  .rail .tag-does { font-size: .82rem; }
  .article-grid .related { display: none; }      /* the rail already shows these tools */
}

/* ---------- tool page ---------- */
.bench { padding: 36px 0 40px; }
.bench-inner { max-width: 1000px; margin: 0 auto; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; font-size: .95rem; color: #33403a; }
.facts li { display: inline-flex; align-items: center; gap: 7px; }
.facts svg { color: var(--shed); flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .racks { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
}
@media (max-width: 760px) {
  .home-lower .guides, .tested { grid-template-columns: 1fr; }
  .guide-list a { grid-template-columns: 1fr; }
  .guide-list time { grid-row: auto; grid-column: 1; margin-top: 8px; }
}
@media (max-width: 560px) {
  .site-head .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; min-height: 0; row-gap: 2px; }
  .site-nav { margin-left: -12px; }
  .racks { grid-template-columns: 1fr; row-gap: 32px; }
  .rack h2 { margin-bottom: 16px; }
  .rack ul { gap: 16px; }
  .tag { grid-template-columns: 26px 1fr; column-gap: 12px; padding: 21px 14px 12px; }
  .tag svg { width: 24px; height: 24px; }
  .tag::before { top: 6px; width: 10px; height: 10px; margin-left: -5px; }
  .tag::after { top: 8px; width: 5px; height: 5px; margin-left: -2.5px; }
  .tag-name { font-size: .98rem; }
  .tag-does { font-size: .85rem; margin-top: 2px; }
  .hero-intro { box-shadow: 0 0 0 10px var(--board); }
  .prose { font-size: 1.06rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tag { transition: none; }
}

/* ---------- header, big Tools menu, phone menu, search, footer, category pages ---------- */
.site-head { position: relative; z-index: 60; }
.head-in { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.site-head .brand span { white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-item { position: static; }
.nav-top {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 8px;
  background: transparent; color: var(--shed-ink); font: 550 .97rem/1 var(--sans); text-decoration: none; cursor: pointer;
}
.nav-top:hover, .nav-top[aria-expanded="true"] { background: rgba(255,255,255,.12); }
.nav-top[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-top svg { transition: transform .15s; }
.nav-top[aria-current="page"], .nav-top[data-current] { box-shadow: inset 0 -3px 0 var(--tape); border-radius: 8px 8px 0 0; }
.head-search, .menu-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 8px;
  background: transparent; color: var(--shed-ink); cursor: pointer;
}
.head-search:hover, .menu-btn:hover { background: rgba(255,255,255,.12); }
.menu-btn { display: none; gap: 4px; align-content: center; }
.menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* the big menu hangs from the bottom of the header like a sheet pinned to the wall */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); color: var(--ink);
  border-top: 3px solid var(--tape);
  box-shadow: 0 24px 48px -20px rgba(20,34,28,.45), 0 1px 0 rgba(0,0,0,.06);
  max-height: calc(100vh - 70px); overflow-y: auto;
}
.mega[hidden] { display: none; }
/* the header's own .wrap is a flex row; the panels inside the header need their own layout */
/* the menu: search and the visitor's own tools in a row across the top, the groups below */
.site-head .wrap.mega-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; justify-content: stretch; padding-top: 16px; padding-bottom: 18px; min-height: 0; }
.site-head .phone-menu .wrap { display: grid; align-items: stretch; justify-content: stretch; min-height: 0; }
.mega-side { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr) auto; gap: 10px 24px; align-items: center; position: relative; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mega-side .search-results { position: absolute; top: 50px; left: 0; width: 340px; z-index: 5; }
.mega-side .mega-note { grid-column: 2; }
.mega-side .my-tools { grid-column: 2; flex-wrap: nowrap; overflow: hidden; mask-image: linear-gradient(90deg, #000 88%, transparent); }
.mega-side .my-tools a { flex: none; padding: 4px 10px; }
.mega-side .my-tools:not([hidden]) ~ .mega-note { display: none; }
.mega-note { margin: 0; font-size: .88rem; color: var(--muted); }
.site-head .mega-all { font-weight: 650; color: var(--shed); }
.site-head .mega a, .site-head .phone-menu a { text-decoration-color: rgba(36,69,58,.35); }
.mega-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 32px; }
/* nine groups: five columns on wide screens so the menu fits on one screen */
@media (min-width: 1200px) { .mega-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 24px; } .mega-cat li a { font-size: .9rem; padding: 6px 8px; } }
/* the visitor's own tools (favourites, then recently used), kept in their browser */
.my-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .88rem; }
.my-tools[hidden] { display: none; }
.my-tools > span { font-weight: 700; color: var(--muted); margin-right: 2px; white-space: nowrap; flex: none; }
.my-tools a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.my-tools a:hover { border-color: var(--shed); }
.my-tools a.fav::before { content: '\2605'; color: #c99a12; }
.mega-cat h3 { margin: 0 0 8px; font: 700 .98rem/1.3 var(--sans); }
.mega-cat h3 a { display: flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.mega-cat h3 a:hover { color: var(--shed); }
.mega-cat h3 span { font-size: .78rem; font-weight: 600; color: var(--muted); }
.mega-cat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-cat li a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px; border-radius: 7px; color: #2b3631; text-decoration: none; font-size: .95rem; }
.mega-cat li a:hover { background: #eef2ec; color: var(--ink); }
.mega-cat li svg { flex: none; color: var(--shed); }
.mega-cat li.mega-more a { font-weight: 700; font-size: .88rem; color: var(--shed); text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 2px; text-underline-offset: 4px; padding-left: 8px; }

/* search boxes (menu, phone menu, home, all-tools page) */
.mega-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 44px; border: 1px solid #b9c3b6; border-radius: 10px; background: #fff; color: var(--muted); }
.mega-search:focus-within { border-color: var(--shed); box-shadow: 0 0 0 3px rgba(242,199,68,.55); }
.mega-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 1rem/1 var(--sans); color: var(--ink); }
.search-results { list-style: none; margin: 0; padding: 6px; border: 1px solid #c5cdc3; border-radius: 10px; background: #fff;
  box-shadow: 0 16px 32px -18px rgba(20,34,28,.5); display: grid; gap: 2px; max-height: 360px; overflow: auto; }
.search-results[hidden] { display: none; }
.search-results a { display: grid; gap: 2px; padding: 8px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.search-results a b { font-weight: 650; }
.search-results a small { color: var(--muted); font-size: .84rem; }
.search-results a[aria-selected="true"], .search-results a:hover { background: #fff3c4; }
.search-results .none { padding: 10px; color: var(--muted); font-size: .92rem; }
.hero-search { max-width: 32rem; margin-top: 22px; height: 52px; box-shadow: 0 10px 24px -16px rgba(20,34,28,.45); }
.hero-search input { font-size: 1.05rem; }
.hero-intro .search-results, .page-head .search-results { position: absolute; z-index: 20; width: min(32rem, calc(100vw - 2 * var(--gutter))); margin-top: 6px; }
.hero-intro, .page-head { position: relative; }
.page-search { max-width: 32rem; margin-top: 20px; }

/* phone menu */
.phone-menu { position: absolute; left: 0; right: 0; top: 100%; height: calc(100vh - 64px); overflow-y: auto; background: var(--paper); color: var(--ink); border-top: 3px solid var(--tape); }
.phone-menu[hidden] { display: none; }
.phone-menu .wrap { padding-top: 16px; padding-bottom: 40px; display: grid; gap: 4px; }
.phone-menu .search-results { margin: 4px 0 8px; }
.pm-top { display: block; padding: 14px 4px; font: 700 1.1rem/1.2 var(--sans); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.pm-group { display: grid; }
.pm-cat { border-bottom: 1px solid var(--line); }
.pm-cat summary { display: flex; align-items: center; gap: 12px; padding: 13px 4px; cursor: pointer; list-style: none; font: 600 1.02rem/1.2 var(--sans); }
.pm-cat summary::-webkit-details-marker { display: none; }
.pm-cat summary svg { color: var(--shed); }
.pm-cat summary em { margin-left: auto; font-style: normal; font-size: .85rem; color: var(--muted); }
.pm-cat summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: -4px 4px 0 6px; transition: transform .15s; }
.pm-cat[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.pm-cat ul { list-style: none; margin: 0 0 10px; padding: 0 0 0 36px; }
.pm-cat li a { display: block; padding: 9px 0; color: #2b3631; text-decoration: none; }
.pm-cat li:first-child a { font-weight: 650; color: var(--shed); }
body.menu-open { overflow: hidden; }

/* breadcrumbs */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .92rem; margin: 0 0 14px; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb .sep { color: #9aa69f; }
.crumb [aria-current] { color: #3d4842; }

/* racks: three per row, each with a link to its category */
.racks { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 48px; }
.rack h2 a { color: inherit; text-decoration: none; }
.rack h2 a:hover { text-decoration: underline; }
.rack-more { display: inline-block; margin-top: 16px; font-weight: 650; font-size: .92rem; color: var(--shed);
  background: rgba(251,252,250,.85); padding: 4px 8px; border-radius: 6px; }

/* all-tools page and category pages */
.cat-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cat-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .93rem; }
.cat-jump a span { color: var(--muted); font-weight: 500; }
.cat-jump a:hover { border-color: var(--shed); }
.cat-jump svg { color: var(--shed); }
.cat-band { padding: 34px 0 40px; border-bottom: 0; }
.cat-band + .cat-band { border-top: 1px solid #c8d0c6; }
.cat-band-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 22px; }
.cat-band-head h2 { margin: 0; font: 720 1.45rem/1.2 var(--sans); background: var(--board); padding: 0 6px; margin-left: -6px; }
.cat-band-head h2 a { color: var(--ink); text-decoration: none; }
.cat-band-head h2 a:hover { text-decoration: underline; }
.cat-band-head p { margin: 0; color: #3d4842; background: var(--board); padding: 0 4px; }
.cat-tags { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px 22px; }
.cat-band-main { padding: 34px 0 48px; }
/* groups inside a category page: a row of jump links, then each group with a tape-style heading */
.sub-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sub-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; background: var(--shed); color: #fff; text-decoration: none; font-weight: 650; font-size: .9rem; }
.sub-jump a span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--tape); color: #14261f; font-size: .78rem; font-weight: 800; }
.sub-jump a:hover { background: #1b352c; }
.sub-group { padding-top: 26px; scroll-margin-top: 80px; }
.sub-head { display: inline-block; margin: 0 0 18px; padding: 4px 12px 5px; font: 760 1.08rem/1.2 var(--sans); letter-spacing: .01em; color: #14261f; background: var(--tape); border-radius: 3px; transform: rotate(-1deg); box-shadow: 0 2px 0 rgba(20,38,31,.12); }
/* merged tools: one tab per job, above the tool */
.mtabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 0 0 20px; border-radius: 14px; background: #e6ebe4; border: 1px solid #d3dbd1; }
.mtabs a { flex: 1 1 0; min-width: max-content; padding: 11px 16px; border-radius: 10px; text-align: center; text-decoration: none; font: 700 .96rem/1.2 var(--sans); color: #34423b; transition: background .15s, color .15s; }
.mtabs a:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.mtabs a[aria-selected=true] { background: var(--shed); color: #fff; box-shadow: 0 6px 14px -8px rgba(20,38,31,.6); }
.mtabs a:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }
@media (max-width: 560px) { .mtabs a { flex: 1 1 100%; } }
/* next step on a tool page, right under the tool */
.next-step { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 24px 0 40px; }
.next-step .next-label { align-self: center; font: 800 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.next-step a { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; max-width: 460px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.next-step a:hover { border-color: var(--shed); transform: translateY(-1px); box-shadow: 0 10px 22px -16px rgba(20,38,31,.5); }
.next-step a > svg:first-child { flex: none; color: var(--shed); }
.next-step a span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.next-step a b { font-size: .96rem; }
.next-step a em { font-style: normal; font-size: .86rem; color: var(--muted); }
.next-step a > svg:last-child { flex: none; color: var(--shed); }
@media (max-width: 560px) { .next-step .next-label { flex-basis: 100%; } .next-step a { max-width: none; } }
.other-cats { padding: 48px 0 72px; }
.other-cats h2 { font: 720 1.4rem/1.2 var(--sans); margin: 0 0 16px; }
.other-cats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.other-cats a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.other-cats a:hover { border-color: var(--shed); }
.other-cats a svg { color: var(--shed); margin-top: 2px; }
.other-cats b { display: block; font-weight: 700; }
.other-cats span { font-size: .9rem; color: var(--muted); }
.other-cats em { font-style: normal; color: var(--muted); font-size: .88rem; }

/* footer with columns */
.site-foot { padding: 44px 0 50px; }
.foot-in { display: grid !important; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.foot-brand .brand { color: var(--shed-ink); }
.foot-brand p { margin: 12px 0 0; max-width: 24rem; }
.site-foot .foot-col { display: grid; align-content: start; gap: 8px; }
.foot-col h2 { margin: 0 0 4px; font: 700 .95rem/1.2 var(--sans); color: var(--shed-ink); }
.foot-col a { color: #c9d4cc; text-decoration: none; }
.foot-col a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 1100px) { .mega-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mega-side { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); } .mega-side .mega-all { grid-column: 2; } }
@media (max-width: 1000px) { .racks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .site-nav { display: none; }
  .menu-btn { display: inline-grid; }
  .head-search { margin-left: auto; }
}
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .site-head .wrap.head-in { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; min-height: 60px; }
  .site-head .brand { font-size: 1.05rem; }
  .racks { grid-template-columns: 1fr; }
  .phone-menu { height: calc(100vh - 60px); }
}
@media (prefers-reduced-motion: reduce) { .menu-btn span, .nav-top svg { transition: none; } }

/* save a tool: a small star button next to the title */
.fav-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px; border-radius: 999px; border: 1px solid #b9c3b6; background: #fff; color: var(--ink); font: 650 .86rem/1.2 var(--sans); cursor: pointer; }
.fav-btn::before { content: '\2606'; font-size: 1.05rem; line-height: 1; color: #8f9a93; }
.fav-btn[aria-pressed="true"] { background: #fff8db; border-color: #d9ad2a; }
.fav-btn[aria-pressed="true"]::before { content: '\2605'; color: #c99a12; }
.fav-btn:hover { border-color: var(--shed); }
.fav-btn:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }
kbd { display: inline-block; min-width: 1.4em; padding: 0 5px; border: 1px solid #b9c3b6; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 700 .8em/1.5 var(--sans); text-align: center; color: var(--ink); }

/* All tools: filter by what the visitor starts with */
.has-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.has-filter > span { font-weight: 700; margin-right: 4px; }
.has-filter button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 .92rem/1.2 var(--sans); cursor: pointer; }
.has-filter button em { font-style: normal; font-weight: 500; color: var(--muted); }
.has-filter button:hover { border-color: var(--shed); }
.has-filter button[aria-pressed="true"] { background: var(--shed); border-color: var(--shed); color: #fff; }
.has-filter button[aria-pressed="true"] em { color: #eef2ff; }
.has-filter button:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }
.has-results li[hidden] { display: none; }
.has-clear { border: 0; background: none; padding: 0; font: inherit; color: var(--shed); font-weight: 650; text-decoration: underline; cursor: pointer; }
body.has-on .cat-band:not(.has-results), body.has-on .cat-jump { display: none; }
.page-my-tools, .hero-my-tools { margin-top: 14px; }
.hero-my-tools a { background: rgba(255,255,255,.92); }
@media (max-width: 560px) { .has-filter > span { width: 100%; } .has-filter button { font-size: .88rem; padding: 7px 11px; } }
@media (max-width: 560px) { .page-head .cat-jump { display: none; } }

/* ---------- article system carried over from the Blogger theme (.pp-article), redrawn in Toolshed colours ----------
   Old posts set their own pieces on top of these variables, so the names stay the same. */
.pp-article {
  --a-ink: var(--ink); --a-soft: #3d4842; --a-mute: var(--muted); --a-rule: #cdd5cb;
  --a-acc: #2f6b55; --a-acc-ink: #24453a; --a-tint: #eaf1eb;
  --a-sans: var(--sans);
  --bg-ink: var(--ink);
}
.pp-article strong { font-weight: 650; }
.pp-article a { color: var(--a-acc-ink); }
.pp-article li::marker { color: var(--muted); font-family: var(--sans); }
.pp-article .pp-lead { font-size: 1.24rem; line-height: 1.6; color: var(--a-soft); margin: 0 0 1.2em; }

.pp-article .pp-box { position: relative; margin: 1.6em 0; padding: 18px 22px 18px 24px; border-radius: 10px;
  font: 1rem/1.7 var(--sans); background: #f1f5ef; border-left: 4px solid var(--shed); }
.pp-article .pp-box > strong:first-child { display: block; margin-bottom: 4px; font-weight: 700; color: var(--shed); }
.pp-article .pp-box > :last-child { margin-bottom: 0; }
.pp-article .pp-tip { background: #eef4f7; border-left-color: #2c6a8a; }
.pp-article .pp-tip > strong:first-child { color: #22566f; }
.pp-article .pp-warn { background: #fbf3e6; border-left-color: #b26b12; }
.pp-article .pp-warn > strong:first-child { color: #8a520c; }

.pp-article .pp-toc { margin: 1.6em 0 2em; padding: 16px 20px 10px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--sans); }
.pp-article .pp-toc > strong:first-child { display: block; font-weight: 700; margin-bottom: 4px; }
.pp-article .pp-toc ol { list-style: none; counter-reset: toc; margin: 0; padding: 0; columns: 2 240px; column-gap: 28px; }
.pp-article .pp-toc li { counter-increment: toc; margin: 0; break-inside: avoid; }
.pp-article .pp-toc a { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; min-height: 40px; font-size: .98rem; font-weight: 550;
  line-height: 1.4; color: var(--ink); text-decoration: none; border-bottom: 1px solid #e3e8e1; }
.pp-article .pp-toc a::before { content: counter(toc); flex: none; min-width: 1.2em; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.pp-article .pp-toc a:hover { color: var(--shed); text-decoration: underline; }

.pp-article .pp-table-wrap { margin: 1.4em 0 1.6em; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pp-article .pp-table-wrap > table { margin: 0; }
.pp-article .pp-table-wrap > table:has(tr > :nth-child(3)) { min-width: 540px; }
.pp-article .pp-table-wrap th, .pp-article .pp-table-wrap td { padding: 11px 14px; }
.pp-article .pp-table-wrap th { background: #eef2ec; border-bottom: 1px solid var(--line); }
.pp-article .pp-table-wrap tr:last-child td { border-bottom: 0; }

.pp-article .pp-img { display: block; max-width: 100%; height: auto; margin: 1.6em auto .6em; border-radius: 8px; border: 1px solid var(--line); }
.pp-article .pp-caption { margin: 0 auto 1.8em; max-width: 60ch; text-align: center; font: .9rem/1.5 var(--sans); color: var(--muted); }

.pp-article .pp-related { display: none; }      /* replaced by the related-tools board */
.pp-article .pp-disclaimer { margin: 2em 0 0; padding-top: 16px; border-top: 1px solid var(--line); font: .9rem/1.65 var(--sans); color: var(--muted); }
.pp-article .pp-note { font: .92rem/1.6 var(--sans); color: var(--muted); }

.pp-article .pp-quote { margin: .9em 0 1.3em; padding: 12px 18px 14px; border-radius: 4px 14px 14px 14px; background: #fff;
  border: 1px solid var(--line); font: 1rem/1.6 var(--sans); }
.pp-article .pp-quote .pp-who { display: flex; align-items: center; gap: 7px; width: fit-content; margin: 0 0 6px; padding: 2px 10px 2px 8px;
  border-radius: 999px; background: #eaf1eb; color: var(--shed); font-size: .8rem; font-weight: 700; }
.pp-article .pp-quote .pp-who::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--shed); }
.pp-article .pp-prompt { position: relative; margin: 1em 0 1.4em; padding: 38px 20px 16px; border-radius: 10px; background: var(--shed-deep); color: #eef3ec;
  font: .98rem/1.65 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-article .pp-prompt::before { content: 'Prompt to copy'; position: absolute; top: 12px; left: 20px; font-size: .8rem; font-weight: 700; color: var(--tape); }
.pp-article .pp-cmd { margin: .8em 0 1.2em; padding: 12px 16px; border-radius: 8px; background: #17241f; color: #e3ece6;
  font: .9rem/1.55 "Cascadia Mono", Consolas, monospace; overflow-x: auto; white-space: pre; }

.pp-article details > :not(summary) { font-size: 1rem; }
.pp-article .pp-video video { display: block; width: 100%; border-radius: 8px; }
.pp-article .pp-video-cap { font: .9rem/1.5 var(--sans); color: var(--muted); }

/* code blocks and table wrappers from the old tool articles scroll inside themselves on phones */
.prose pre { max-width: 100%; overflow-x: auto; margin: 1.2em 0; padding: 14px 16px; border-radius: 8px; background: #17241f; color: #e3ece6;
  font: .88rem/1.55 "Cascadia Mono", Consolas, monospace; }
.prose pre code { background: none; padding: 0; color: inherit; font: inherit; }
.prose [class$="-tw"], .prose [class*="-tw "] { max-width: 100%; overflow-x: auto; }

/* the tool pages' own article blocks, now outside their dark app */
.prose .tool-notes h2:first-child { margin-top: 0; }

/* ---------- toolkit: shared parts for the tools built for this site (2026-11) ----------
   A tool is a sheet of paper hung on the bench: white, a fine edge, one green action colour, yellow only for highlights. */
.tk {
  --tk-acc: var(--shed); --tk-acc-ink: #fff; --tk-line: #d3dbd1; --tk-soft: #f3f6f1;
  position: relative; background: var(--paper); color: var(--ink);
  border: 1px solid #c5cdc3; border-radius: 14px;
  box-shadow: 0 2px 0 rgba(28,36,32,.05), 0 22px 40px -26px rgba(28,36,32,.45);
  padding: clamp(16px, 2.6vw, 28px);
  font: 400 1rem/1.55 var(--sans);
}
.tk *, .tk *::before, .tk *::after { box-sizing: border-box; }
.tk h2, .tk h3 { font-family: var(--sans); color: var(--ink); margin: 0; }
.tk h3 { font-size: 1.05rem; font-weight: 700; }
.tk p { margin: 0; }
.tk-sub { color: var(--muted); font-size: .92rem; }

/* step headings inside a tool are a real sequence, so they are numbered */
.tk-step { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.tk-step b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--tk-acc); color: #fff; font-size: .85rem; font-weight: 700; }

/* segmented choice (radio buttons that look like a switch) */
.tk-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--tk-soft); border: 1px solid var(--tk-line); border-radius: 10px; }
.tk-seg label { position: relative; cursor: pointer; }
.tk-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tk-seg span { display: block; padding: 8px 14px; border-radius: 7px; font-weight: 600; font-size: .93rem; color: #3d4842; }
.tk-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 0 0 1px var(--tk-line); }
.tk-seg input:focus-visible + span { outline: 3px solid var(--tape); outline-offset: 1px; }

/* drop zone */
.tk-drop {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  padding: 30px 18px; border: 2px dashed #b3c0b1; border-radius: 12px; background: var(--tk-soft);
  color: #3d4842; transition: background .15s, border-color .15s;
}
.tk-drop.is-over { background: #fff8db; border-color: #d9ad2a; }
.tk-drop svg { color: var(--tk-acc); }
.tk-drop strong { font-size: 1.05rem; color: var(--ink); }
.tk-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* buttons */
.tk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--tk-acc);
  background: var(--tk-acc); color: var(--tk-acc-ink); font: 650 .95rem/1.2 var(--sans); cursor: pointer; text-decoration: none;
}
.tk-btn:hover { filter: brightness(1.08); }
.tk-btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.tk-btn.ghost { background: #fff; color: var(--ink); border-color: #b9c3b6; }
.tk-btn.ghost:hover { background: var(--tk-soft); filter: none; }
.tk-btn.small { min-height: 34px; padding: 6px 11px; font-size: .86rem; }
.tk-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid #c5cdc3; background: #fff; color: var(--ink); cursor: pointer; padding: 0; }
.tk-icon:hover { background: var(--tk-soft); }
.tk-icon:disabled { opacity: .35; cursor: default; }
.tk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tk-row.end { justify-content: flex-end; }
.tk-sep { height: 1px; background: var(--tk-line); margin: 20px 0; border: 0; }

/* form fields */
.tk-field { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.tk-field input[type=text], .tk-field input[type=number], .tk-field select, .tk-field textarea, .tk input.tk-input, .tk textarea.tk-input, .tk select.tk-input {
  font: 400 .98rem/1.45 var(--sans); padding: 9px 11px; border: 1px solid #b9c3b6; border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
.tk textarea.tk-input { font-family: "Cascadia Mono", Consolas, monospace; font-size: .9rem; resize: vertical; }
.tk-field small { font-weight: 400; color: var(--muted); }
.tk-check { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; }
.tk-check input { width: 18px; height: 18px; accent-color: var(--tk-acc); }
.tk input[type=range] { accent-color: var(--tk-acc); width: 100%; }

/* messages */
.tk-msg { padding: 10px 14px; border-radius: 9px; font-size: .93rem; background: #eef4f7; color: #22566f; border-left: 4px solid #2c6a8a; }
.tk-msg.ok { background: #edf6ef; color: #1e5a3f; border-left-color: #2f8a5c; }
.tk-msg.warn { background: #fbf3e6; color: #7a4a0c; border-left-color: #c47c16; }
.tk-msg.err { background: #fbeceb; color: #8d2b22; border-left-color: #c8453a; }
.tk-msg:empty { display: none; }

/* progress */
.tk-progress { height: 6px; border-radius: 3px; background: var(--tk-line); overflow: hidden; }
.tk-progress i { display: block; height: 100%; width: 0; background: var(--tk-acc); transition: width .2s; }

/* a list of files */
.tk-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tk-files li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--tk-line); border-radius: 10px; background: #fff; }
.tk-files .name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-files .meta { color: var(--muted); font-size: .86rem; }

/* a grid of page or image thumbnails */
.tk-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
.tk-thumb { position: relative; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--tk-line); border-radius: 10px; background: #fff; }
.tk-thumb.is-off { opacity: .4; }
.tk-thumb .pic { display: grid; place-items: center; aspect-ratio: 3 / 4; background: var(--tk-soft); border-radius: 6px; overflow: hidden; }
.tk-thumb .pic canvas, .tk-thumb .pic img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0,0,0,.2); background: #fff; transition: transform .2s; }
.tk-thumb .cap { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.tk-thumb .tools { display: flex; gap: 4px; justify-content: center; }
.tk-thumb .tools .tk-icon { width: 28px; height: 28px; border-radius: 6px; }
.tk-thumb .badge { position: absolute; top: 4px; left: 4px; min-width: 22px; padding: 1px 6px; border-radius: 6px; background: var(--tape); color: #2b2410; font-size: .75rem; font-weight: 700; text-align: center; }
.tk-thumb.is-dragging { opacity: .5; }
.tk-thumb.drop-before { box-shadow: -4px 0 0 var(--tape); }

/* a stat line */
.tk-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .93rem; color: #33403a; }
.tk-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }

.tk-hidden { display: none !important; }
/* the hidden attribute always wins over a tool's own display rule */
.tk [hidden] { display: none !important; }
@media (max-width: 560px) {
  .tk-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-seg { display: flex; width: 100%; }
  .tk-seg label { flex: 1; }
  .tk-seg span { text-align: center; padding: 8px 6px; }
}

/* Themes. One idea for all of them: the whole page is one desk surface (with the 3D scene from fx.js fixed behind it),
   and everything you read or use sits on it as a sheet. No section of the page is a full-width white band any more.
   html[data-theme] picks the desk. Tools keep their light, tested panels in every theme: paper on a desk. */

/* ---------- tokens ---------- */
:root, html[data-theme="pegboard"] {
  --desk: #d9dfd6;
  --desk-image: radial-gradient(circle at center, #b9c4b7 0 3px, transparent 3.5px);
  --desk-size: 28px 28px;
  --desk-glow: radial-gradient(ellipse 60% 45% at 80% 8%, rgba(255,255,255,.55), transparent 70%);
  --on-desk: #1c2420; --on-desk-muted: #3d4842;
  --sheet: #fbfcfa; --sheet-line: #c9d1c7; --sheet-shadow: 0 1px 0 rgba(28,36,32,.05), 0 18px 40px -28px rgba(28,36,32,.45);
  --frost: rgba(233,239,231,.72);
  --head-bg: #24453a; --head-ink: #eef3ec; --head-line: transparent;
  --foot-bg: #1a352c; --foot-ink: #c9d4cc;
  --chip-bg: #f2c744; --chip-ink: #2b2410;
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --display-wdth: "wdth" 104;
  --fx-fog: #dfe5dc;
}
html[data-theme="blueprint"] {
  --shed: #1d4f7a; --shed-deep: #0d2c48; --tape: #ffd166; --tape-edge: #e0ae3c;
  --paper: #f6f9fc; --line: #c9d6e2; --muted: #4f6070; --board: #12406a; --hole: #2a5a85;
  --desk: #0f3a60;
  --desk-image: linear-gradient(rgba(190,225,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(190,225,255,.16) 1px, transparent 1px),
                linear-gradient(rgba(190,225,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(190,225,255,.07) 1px, transparent 1px);
  --desk-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  --desk-glow: radial-gradient(ellipse 70% 55% at 75% 0%, rgba(120,180,240,.35), transparent 70%);
  --on-desk: #eef6ff; --on-desk-muted: #b4cbe0;
  --sheet: #f6f9fc; --sheet-line: #c9d6e2; --sheet-shadow: 0 24px 50px -30px rgba(0,10,25,.8);
  --frost: rgba(13,44,72,.72);
  --head-bg: rgba(10,36,60,.82); --head-ink: #eef6ff; --head-line: rgba(190,225,255,.35);
  --foot-bg: #0a2238; --foot-ink: #b4cbe0;
  --chip-bg: #ffd166; --chip-ink: #2a1f05;
  --display: "Barlow", "Archivo", system-ui, sans-serif;
  --display-wdth: normal;
  --fx-fog: #0f3a60;
}
html[data-theme="graph"] {
  --shed: #2f5bea; --shed-deep: #1d3aa8; --tape: #ffd84d; --tape-edge: #e5b92a;
  --paper: #ffffff; --line: #d7deec; --muted: #55607a; --board: #f2f5fb; --hole: #d7deec;
  --desk: #f2f5fb;
  --desk-image: linear-gradient(rgba(47,91,234,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(47,91,234,.13) 1px, transparent 1px),
                linear-gradient(rgba(47,91,234,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(47,91,234,.055) 1px, transparent 1px);
  --desk-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  --desk-glow: radial-gradient(ellipse 55% 40% at 85% 0%, rgba(255,216,77,.22), transparent 70%);
  --on-desk: #121a33; --on-desk-muted: #4a5675;
  --sheet: #ffffff; --sheet-line: #dbe2f0; --sheet-shadow: 0 1px 0 rgba(18,26,51,.04), 0 22px 44px -30px rgba(18,26,51,.4);
  --frost: rgba(242,245,251,.8);
  --head-bg: #ffffff; --head-ink: #121a33; --head-line: #2f5bea;
  --foot-bg: #121a33; --foot-ink: #c3cbe0;
  --chip-bg: #2f5bea; --chip-ink: #ffffff;
  --display: "Bricolage Grotesque", "Archivo", system-ui, sans-serif;
  --display-wdth: normal;
  --fx-fog: #f2f5fb;
}
html[data-theme="night"] {
  --shed: #2c5c58; --shed-deep: #0b1316; --tape: #ffb547; --tape-edge: #d98f1f;
  --paper: #f1f3f2; --line: #ccd3d1; --muted: #55605d; --board: #141f24; --hole: #1d2b31;
  --desk: #10191d;
  --desk-image: none;
  --desk-size: auto;
  --desk-glow: radial-gradient(ellipse 60% 55% at 12% 0%, rgba(255,181,71,.22), transparent 65%), radial-gradient(ellipse 50% 40% at 100% 100%, rgba(80,140,150,.18), transparent 70%), linear-gradient(180deg, #121c21, #0c1316);
  --on-desk: #e9eeec; --on-desk-muted: #a9b6b2;
  --sheet: #f1f3f2; --sheet-line: #2a3a40; --sheet-shadow: 0 30px 60px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(255,181,71,.08);
  --frost: rgba(16,25,29,.72);
  --head-bg: rgba(11,19,22,.86); --head-ink: #e9eeec; --head-line: rgba(255,181,71,.55);
  --foot-bg: #0a1013; --foot-ink: #a9b6b2;
  --chip-bg: #ffb547; --chip-ink: #241503;
  --display: "IBM Plex Sans", "Archivo", system-ui, sans-serif;
  --display-wdth: normal;
  --fx-fog: #10191d;
}

/* ---------- the desk: one surface for the whole page ---------- */
html { background: var(--desk); }
body { background: var(--desk-glow), var(--desk-image), var(--desk); background-size: auto, var(--desk-size), auto; background-attachment: fixed; color: var(--on-desk); }
html[data-theme="blueprint"] body, html[data-theme="graph"] body { background-image: var(--desk-glow), var(--desk-image); background-size: auto, var(--desk-size); }
html[data-theme="night"] body { background-image: var(--desk-glow); background-size: auto; }
main { position: relative; z-index: 1; }
/* sections that used to paint their own pegboard or white now let the desk show through */
.board, .hero.fx-on, .board.bench { background: transparent; border-bottom: 0; }
.cat-band + .cat-band { border-top: 0; }

/* ---------- header and footer ---------- */
.site-head { position: relative; z-index: 20; background: var(--head-bg); color: var(--head-ink); box-shadow: inset 0 -2px 0 var(--head-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.brand, .site-nav a, .nav-top, .head-search, .menu-btn { color: var(--head-ink); }
html[data-theme="graph"] .nav-top:hover, html[data-theme="graph"] .nav-top[aria-expanded="true"], html[data-theme="graph"] .head-search:hover, html[data-theme="graph"] .menu-btn:hover { background: rgba(47,91,234,.08); }
.site-foot { position: relative; z-index: 1; background: var(--foot-bg); color: var(--foot-ink); }

/* ---------- display type ---------- */
.hero h1, .page-head h1, .section-head h2, .prose h2, .cat-band-head h2, .other-cats h2 { font-family: var(--display); font-variation-settings: var(--display-wdth); }
html[data-theme="graph"] .hero h1, html[data-theme="graph"] .page-head h1 { font-weight: 800; letter-spacing: -.035em; }
html[data-theme="blueprint"] .hero h1, html[data-theme="blueprint"] .page-head h1 { font-weight: 700; letter-spacing: -.01em; }
html[data-theme="night"] .hero h1, html[data-theme="night"] .page-head h1 { font-weight: 600; letter-spacing: -.02em; }

/* ---------- sheets: everything you read sits on paper ---------- */
.page-head { position: relative; margin-top: clamp(20px, 3vw, 32px); padding: clamp(24px, 3.4vw, 40px) clamp(20px, 3.4vw, 44px); background: var(--sheet); border: 1px solid var(--sheet-line); border-radius: 18px; box-shadow: var(--sheet-shadow); color: var(--ink); }
.tool-notes-wrap, main > .wrap > .prose, .article-grid > .prose { margin-top: 8px; margin-bottom: 56px; padding: clamp(24px, 3.4vw, 48px) clamp(20px, 3.6vw, 56px) clamp(32px, 4vw, 56px); background: var(--sheet); border: 1px solid var(--sheet-line); border-radius: 18px; box-shadow: var(--sheet-shadow); color: var(--ink); }
.prose { max-width: calc(var(--read) + 7rem); }
.home-lower > .wrap, .other-cats { padding: clamp(28px, 4vw, 52px) clamp(20px, 3.6vw, 52px); background: var(--sheet); border: 1px solid var(--sheet-line); border-radius: 18px; box-shadow: var(--sheet-shadow); color: var(--ink); }
.home-lower { padding: clamp(24px, 4vw, 56px) var(--gutter); }
.home-lower > .wrap { max-width: calc(var(--wrap) - 2 * var(--gutter)); }
.other-cats { margin: 32px 0 64px; }
.page-head .lede, .page-head .facts { color: #33403a; }

/* text that sits straight on the desk */
.hero-intro { background: var(--frost); box-shadow: 0 0 0 18px var(--frost); border-radius: 22px; color: var(--on-desk); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero.fx-on .hero-intro { background: var(--frost); box-shadow: 0 0 0 18px var(--frost); border-radius: 22px; }
.hero-intro p { color: var(--on-desk-muted); }
.cat-band-head h2, .cat-band-head p { background: var(--frost); color: var(--on-desk); border-radius: 6px; padding: 2px 10px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cat-band-head h2 a { color: var(--on-desk); }
.cat-band-head p { color: var(--on-desk-muted); }
.next-step .next-label { color: var(--on-desk-muted); background: var(--frost); padding: 6px 10px; border-radius: 6px; }
.rack h2, .sub-head { background: var(--chip-bg); color: var(--chip-ink); border-color: transparent; }
.rack-more { background: var(--frost); color: var(--on-desk); }
.tag::before { background: var(--desk); }
.mtabs { background: var(--frost); border-color: transparent; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.mtabs a { color: var(--on-desk); }
.mtabs a:hover { background: rgba(255,255,255,.18); color: var(--on-desk); }
.mtabs a[aria-selected=true] { background: var(--shed); color: #fff; }
html[data-theme="night"] .mtabs a[aria-selected=true] { background: var(--tape); color: #241503; }
html[data-theme="blueprint"] .mtabs a[aria-selected=true] { background: var(--tape); color: #2a1f05; }
.sub-jump a { background: var(--shed); }
html[data-theme="night"] .sub-jump a, html[data-theme="blueprint"] .sub-jump a { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); }

/* the bench: the tool panel itself is a sheet on the desk */
.bench { padding: 24px 0 8px; }
.bench-inner > .tk, .bench-inner > .mtab-panel > .tk, .bench-inner > .tool-frame { box-shadow: var(--sheet-shadow); }

/* ---------- theme switcher (local preview only) ---------- */
.theme-pick { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 14px; background: rgba(15,20,18,.86); color: #fff; font: 600 .82rem/1 var(--sans); box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.theme-pick button { padding: 7px 10px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; font: 650 .8rem/1 var(--sans); cursor: pointer; }
.theme-pick button[aria-pressed="true"] { background: #fff; color: #111; }

@media (max-width: 560px) {
  .page-head { border-radius: 14px; }
  .tool-notes-wrap, main > .wrap > .prose { border-radius: 14px; padding-left: 18px; padding-right: 18px; }
  .theme-pick { left: 8px; right: 8px; bottom: 8px; flex-wrap: wrap; justify-content: center; }
}

.guides-page { margin: 8px 0 56px; padding: clamp(24px, 3.4vw, 44px) clamp(20px, 3.6vw, 52px); background: var(--sheet); border: 1px solid var(--sheet-line); border-radius: 18px; box-shadow: var(--sheet-shadow); color: var(--ink); }
.guides-page { max-width: none; margin-top: 16px; }

/* ---------- sheets and cards take the theme's colours (2026-11-17) ----------
   light themes: tinted paper instead of pure white; dark themes: dark glass with light text. Tool panels stay light. */
:root, html[data-theme="pegboard"] { --sheet: #f1f4ee; --sheet-ink: #1c2420; --sheet-muted: #4a5750; --sheet-line: #c9d2c6; --card: #f6f8f3; --card-line: #c3ccc0; --link: #24453a; --soft: #e4eadf; --sheet-blur: none; }
html[data-theme="graph"] { --sheet: #fdfdff; --sheet-ink: #121a33; --sheet-muted: #4a5675; --sheet-line: #d3dcf0; --card: #f7f9ff; --card-line: #cbd5ef; --link: #2f5bea; --soft: #eef2fd; --sheet-blur: none; }
html[data-theme="blueprint"] { --sheet: rgba(11,42,70,.86); --sheet-ink: #eef6ff; --sheet-muted: #a9c2da; --sheet-line: rgba(190,225,255,.22); --card: rgba(15,52,88,.92); --card-line: rgba(190,225,255,.28); --link: #ffd166; --soft: rgba(190,225,255,.08); --sheet-blur: blur(10px); }
html[data-theme="night"] { --sheet: rgba(21,32,37,.88); --sheet-ink: #e9eeec; --sheet-muted: #a9b6b2; --sheet-line: rgba(255,255,255,.12); --card: rgba(27,40,46,.92); --card-line: rgba(255,255,255,.14); --link: #ffc56b; --soft: rgba(255,255,255,.06); --sheet-blur: blur(10px); }

.page-head, .tool-notes-wrap, main > .wrap > .prose, .article-grid > .prose, .guides-page, .home-lower > .wrap, .other-cats { background: var(--sheet); color: var(--sheet-ink); border-color: var(--sheet-line); -webkit-backdrop-filter: var(--sheet-blur); backdrop-filter: var(--sheet-blur); }
.page-head .lede, .page-head .facts, .crumb, .crumb a, .crumb [aria-current], .guide-list .g-sum, .guide-list time, .prose .meta, .section-head p, .tested p, .prose blockquote { color: var(--sheet-muted); }
.page-head .lede, .tested p { color: color-mix(in srgb, var(--sheet-ink) 82%, transparent); }
.facts svg { color: var(--link); }
.page-head a, .tool-notes-wrap a:not(.tag), .prose a:not(.tag), .guides-page a, .home-lower a:not(.tag) { color: var(--link); }
.guide-list a, .guide-list .g-title { color: var(--sheet-ink); }
.guide-list, .guide-list li, .prose details, .prose details:last-of-type, .prose td, .tested, .related { border-color: var(--sheet-line); }
.prose th { border-bottom-color: var(--sheet-ink); }
.prose code, .pp-article .pp-table-wrap th { background: var(--soft); }
.prose .pp-box, .prose .note, .pp-article .pp-tip, .pp-article .pp-warn, .pp-article .pp-steps { background: var(--soft); }
.pp-article .pp-tip > strong:first-child, .pp-article .pp-warn > strong:first-child { color: var(--link); }
.pp-article .pp-table-wrap { border-color: var(--sheet-line); }
.pp-article .pp-quote { background: var(--card); }

/* the little tool cards, and the other pill and card links */
.tag { background: var(--card); border-color: var(--card-line); color: var(--sheet-ink); }
.tag-does { color: var(--sheet-muted); }
.tag svg { color: var(--link); }
.next-step a, .other-cats a, .cat-jump a, .has-filter button, .my-tools a, .hero-my-tools a, .fav-btn, kbd { background: var(--card); color: var(--sheet-ink); border-color: var(--card-line); }
.next-step a em, .other-cats a span, .other-cats a em, .has-filter button em, .cat-jump a span { color: var(--sheet-muted); }
.next-step a > svg, .other-cats a svg, .cat-jump svg { color: var(--link); }
.other-cats a b { color: var(--sheet-ink); }
.fav-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--tape) 22%, var(--card)); border-color: var(--tape-edge); }
.has-filter button[aria-pressed="true"] { background: var(--shed); color: #fff; }
html[data-theme="night"] .has-filter button[aria-pressed="true"], html[data-theme="blueprint"] .has-filter button[aria-pressed="true"] { background: var(--tape); color: #241503; border-color: var(--tape); }

/* search results open over the cards below (the frosted panels make their own layer, so they must sit above the cards) */
.hero-intro { position: relative; z-index: 10; }
.page-head { z-index: 5; }

/* tools on graph paper: the shared toolkit parts were tinted for the pegboard (sage); here they take the blue-grey of the sheet (2026-11-19) */
html[data-theme="graph"] .tk { --tk-line: #d3dcf0; --tk-soft: #f3f6fd; border-color: #c9d3ea; }
html[data-theme="graph"] .tk-drop { border-color: #b3c1e6; color: #3d4a66; }
html[data-theme="graph"] .tk-seg span { color: #3d4a66; }
html[data-theme="graph"] .tk-icon { border-color: #c9d3ea; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; background: var(--tape); color: #2b2410; font-weight: 700; border-radius: 6px; }
.skip:focus { left: 8px; }
.hero-plain { padding: 40px 0 56px; }
.rack-col { display: grid; gap: 40px; align-content: start; }
.rack-col .rack:nth-child(2) h2 { transform: rotate(1.1deg); }
@media (max-width: 1000px) { .rack-col { display: contents; } }
.tool-frame { display: block; width: 100%; min-height: 720px; border: 0; border-radius: 14px; background: transparent; }
.guides-page { padding-bottom: 80px; max-width: 52rem; }
.tool-notes-wrap .meta { margin-top: 2.4em; font: .9rem/1.5 var(--sans); color: var(--muted); }
.contact-form { display: grid; gap: 14px; margin: 1.6em 0; font-family: var(--sans); }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.contact-form input, .contact-form textarea { font: 1rem/1.5 var(--sans); padding: 10px 12px; border: 1px solid #b9c3b6; border-radius: 8px; background: #fff; color: var(--ink); }
.contact-form button { justify-self: start; font: 700 1rem/1 var(--sans); padding: 12px 18px; border: 0; border-radius: 8px; background: var(--shed); color: #fff; }
.contact-form button:disabled { opacity: .55; cursor: not-allowed; }

/* ---- dark mode (generated by dark.js) ---- */
html[data-mode="dark"]{--shed:#24453a;--shed-deep:#9fd0c0;--shed-ink:#eef3ec;--board:#253159;--hole:#364780;--paper:#161d34;--ink:#e0e2ea;--muted:#a9b0c6;--line:#2a3865;--tape:#f0c02d;--tape-edge:#d9ad2a}
html[data-mode="dark"] body{background:var(--paper);color:var(--ink)}
html[data-mode="dark"] a{color:var(--link)}
html[data-mode="dark"] .site-head{background:var(--shed);color:var(--shed-ink)}
html[data-mode="dark"] .brand{color:var(--shed-ink)}
html[data-mode="dark"] .site-nav a{color:var(--shed-ink)}
html[data-mode="dark"] .site-nav a:hover{background:rgba(255,255,255,.1)}
html[data-mode="dark"] .board{background-color:var(--board);border-bottom:1px solid #2f3e70}
html[data-mode="dark"] .hero-intro{background:var(--board)}
html[data-mode="dark"] .hero-intro p{color:#c6cbd9}
html[data-mode="dark"] .rack h2{color:#2b2410;background:var(--tape);border-left:1px dashed var(--tape-edge);border-right:1px dashed var(--tape-edge)}
html[data-mode="dark"] .tag{background:var(--paper);color:var(--ink);border:1px solid #2e3d6e}
html[data-mode="dark"] .tag::before{background:var(--board)}
html[data-mode="dark"] .tag::after{background:#6379be}
html[data-mode="dark"] .tag svg{color:var(--link)}
html[data-mode="dark"] .tag-does{color:var(--muted)}
html[data-mode="dark"] .section-head p{color:var(--muted)}
html[data-mode="dark"] .guide-list{border-top:1px solid var(--line)}
html[data-mode="dark"] .guide-list li{border-bottom:1px solid var(--line)}
html[data-mode="dark"] .guide-list a{color:var(--ink)}
html[data-mode="dark"] .guide-list .g-sum{color:#bec3d3}
html[data-mode="dark"] .guide-list time{color:var(--muted)}
html[data-mode="dark"] .tested{border-top:3px solid var(--ink)}
html[data-mode="dark"] .site-foot{background:#1a352c;color:#f1f4ff}
html[data-mode="dark"] .site-foot a{color:var(--shed-ink)}
html[data-mode="dark"] .crumb{color:var(--muted)}
html[data-mode="dark"] .crumb a{color:var(--muted)}
html[data-mode="dark"] .page-head .lede{color:#c6cbd9}
html[data-mode="dark"] .page-head .meta{color:var(--muted)}
html[data-mode="dark"] .prose li::marker{color:var(--muted)}
html[data-mode="dark"] .prose code{background:#1c2543}
html[data-mode="dark"] .prose img{border:1px solid var(--line)}
html[data-mode="dark"] .prose blockquote{border-left:3px solid var(--tape);color:#c6cbd9}
html[data-mode="dark"] .prose th{border-bottom:2px solid var(--ink)}
html[data-mode="dark"] .prose td{border-bottom:1px solid var(--line)}
html[data-mode="dark"] .prose details{border-top:1px solid var(--line)}
html[data-mode="dark"] .prose details:last-of-type{border-bottom:1px solid var(--line)}
html[data-mode="dark"] .prose .pp-box, html[data-mode="dark"] .prose .note{background:#1c2442;border-left:4px solid var(--shed)}
html[data-mode="dark"] .prose .pp-toc{border:1px solid var(--line)}
html[data-mode="dark"] .related{border-top:3px solid var(--ink)}
@media (min-width: 1100px){html[data-mode="dark"] .rail .board{border:1px solid #2f3e70}
}
html[data-mode="dark"] .facts{color:#c6cbd9}
html[data-mode="dark"] .facts svg{color:var(--link)}
html[data-mode="dark"] .nav-top{border:0;background:transparent;color:var(--shed-ink)}
html[data-mode="dark"] .nav-top:hover, html[data-mode="dark"] .nav-top[aria-expanded="true"]{background:rgba(255,255,255,.12)}
html[data-mode="dark"] .head-search, html[data-mode="dark"] .menu-btn{border:0;background:transparent;color:var(--shed-ink)}
html[data-mode="dark"] .head-search:hover, html[data-mode="dark"] .menu-btn:hover{background:rgba(255,255,255,.12)}
html[data-mode="dark"] .menu-btn span{background:currentColor}
html[data-mode="dark"] .mega{background:var(--paper);color:var(--ink);border-top:3px solid var(--tape)}
html[data-mode="dark"] .mega-side{border-bottom:1px solid var(--line)}
html[data-mode="dark"] .mega-note{color:var(--muted)}
html[data-mode="dark"] .site-head .mega-all{color:var(--link)}
html[data-mode="dark"] .site-head .mega a, html[data-mode="dark"] .site-head .phone-menu a{text-decoration-color:rgba(161,206,191,0.35)}
html[data-mode="dark"] .my-tools > span{color:var(--muted)}
html[data-mode="dark"] .my-tools a{background:#141a30;border:1px solid var(--line);color:var(--ink)}
html[data-mode="dark"] .my-tools a:hover{border-color:var(--shed)}
html[data-mode="dark"] .my-tools a.fav::before{color:#f4d680}
html[data-mode="dark"] .mega-cat h3 a{color:var(--ink);border-bottom:2px solid var(--ink)}
html[data-mode="dark"] .mega-cat h3 a:hover{color:var(--link)}
html[data-mode="dark"] .mega-cat h3 span{color:var(--muted)}
html[data-mode="dark"] .mega-cat li a{color:#cfd3df}
html[data-mode="dark"] .mega-cat li a:hover{background:#1c2442;color:var(--ink)}
html[data-mode="dark"] .mega-cat li svg{color:var(--link)}
html[data-mode="dark"] .mega-cat li.mega-more a{color:var(--link)}
html[data-mode="dark"] .mega-search{border:1px solid #33447b;background:#141a30;color:var(--muted)}
html[data-mode="dark"] .mega-search:focus-within{border-color:var(--shed)}
html[data-mode="dark"] .mega-search input{border:0;background:transparent;color:var(--ink)}
html[data-mode="dark"] .search-results{border:1px solid #2e3d6e;background:#141a30}
html[data-mode="dark"] .search-results a{color:var(--ink)}
html[data-mode="dark"] .search-results a small{color:var(--muted)}
html[data-mode="dark"] .search-results a[aria-selected="true"], html[data-mode="dark"] .search-results a:hover{background:#493f18}
html[data-mode="dark"] .search-results .none{color:var(--muted)}
html[data-mode="dark"] .phone-menu{background:var(--paper);color:var(--ink);border-top:3px solid var(--tape)}
html[data-mode="dark"] .pm-top{color:var(--ink);border-bottom:1px solid var(--line)}
html[data-mode="dark"] .pm-cat{border-bottom:1px solid var(--line)}
html[data-mode="dark"] .pm-cat summary svg{color:var(--link)}
html[data-mode="dark"] .pm-cat summary em{color:var(--muted)}
html[data-mode="dark"] .pm-cat summary::after{border-right:2px solid var(--muted);border-bottom:2px solid var(--muted)}
html[data-mode="dark"] .pm-cat li a{color:#cfd3df}
html[data-mode="dark"] .pm-cat li:first-child a{color:var(--link)}
html[data-mode="dark"] .crumb{color:var(--muted)}
html[data-mode="dark"] .crumb a{color:var(--muted)}
html[data-mode="dark"] .crumb .sep{color:#a9b0c6}
html[data-mode="dark"] .crumb [aria-current]{color:#bec3d3}
html[data-mode="dark"] .rack h2 a{color:inherit}
html[data-mode="dark"] .rack-more{color:var(--link);background:rgba(22,29,52,0.85)}
html[data-mode="dark"] .cat-jump a{border:1px solid var(--line);background:#141a30;color:var(--ink)}
html[data-mode="dark"] .cat-jump a span{color:var(--muted)}
html[data-mode="dark"] .cat-jump a:hover{border-color:var(--shed)}
html[data-mode="dark"] .cat-jump svg{color:var(--link)}
html[data-mode="dark"] .cat-band{border-bottom:0}
html[data-mode="dark"] .cat-band + .cat-band{border-top:1px solid #2d3b6a}
html[data-mode="dark"] .cat-band-head h2{background:var(--board)}
html[data-mode="dark"] .cat-band-head h2 a{color:var(--ink)}
html[data-mode="dark"] .cat-band-head p{color:#bec3d3;background:var(--board)}
html[data-mode="dark"] .sub-jump a{background:var(--shed);color:#fff}
html[data-mode="dark"] .sub-jump a span{background:var(--tape);color:#14261f}
html[data-mode="dark"] .sub-jump a:hover{background:#1b352c}
html[data-mode="dark"] .sub-head{color:#14261f;background:var(--tape)}
html[data-mode="dark"] .mtabs{background:#1f294a;border:1px solid #27345e}
html[data-mode="dark"] .mtabs a{color:#c5c9d8}
html[data-mode="dark"] .mtabs a:hover{background:rgba(20,26,48,0.7);color:var(--ink)}
html[data-mode="dark"] .mtabs a[aria-selected=true]{background:var(--shed);color:#fff}
html[data-mode="dark"] .next-step .next-label{color:var(--muted)}
html[data-mode="dark"] .next-step a{border:1px solid var(--line);background:#141a30;color:var(--ink)}
html[data-mode="dark"] .next-step a:hover{border-color:var(--shed)}
html[data-mode="dark"] .next-step a > svg:first-child{color:var(--link)}
html[data-mode="dark"] .next-step a em{color:var(--muted)}
html[data-mode="dark"] .next-step a > svg:last-child{color:var(--link)}
html[data-mode="dark"] .other-cats a{border:1px solid var(--line);background:#141a30;color:var(--ink)}
html[data-mode="dark"] .other-cats a:hover{border-color:var(--shed)}
html[data-mode="dark"] .other-cats a svg{color:var(--link)}
html[data-mode="dark"] .other-cats span{color:var(--muted)}
html[data-mode="dark"] .other-cats em{color:var(--muted)}
html[data-mode="dark"] .foot-brand .brand{color:var(--shed-ink)}
html[data-mode="dark"] .foot-col h2{color:var(--shed-ink)}
html[data-mode="dark"] .foot-col a{color:#f1f4ff}
html[data-mode="dark"] .foot-col a:hover{color:#fff}
html[data-mode="dark"] .fav-btn{border:1px solid #33447b;background:#141a30;color:var(--ink)}
html[data-mode="dark"] .fav-btn::before{color:#a9b0c6}
html[data-mode="dark"] .fav-btn[aria-pressed="true"]{background:#493f18;border-color:#d9ad2a}
html[data-mode="dark"] .fav-btn[aria-pressed="true"]::before{color:#f4d680}
html[data-mode="dark"] .fav-btn:hover{border-color:var(--shed)}
html[data-mode="dark"] kbd{border:1px solid #33447b;background:#141a30;color:var(--ink)}
html[data-mode="dark"] .has-filter button{border:1px solid var(--line);background:#141a30;color:var(--ink)}
html[data-mode="dark"] .has-filter button em{color:var(--muted)}
html[data-mode="dark"] .has-filter button:hover{border-color:var(--shed)}
html[data-mode="dark"] .has-filter button[aria-pressed="true"]{background:var(--shed);border-color:var(--shed);color:#fff}
html[data-mode="dark"] .has-filter button[aria-pressed="true"] em{color:#eef2ff}
html[data-mode="dark"] .has-clear{border:0;background:none;color:var(--link)}
html[data-mode="dark"] .hero-my-tools a{background:rgba(20,26,48,0.92)}
html[data-mode="dark"] .pp-article{--a-soft:#bec3d3;--a-rule:#2a3865;--a-acc:#2f6b55;--a-acc-ink:#a1cebf;--a-tint:#1c2544}
html[data-mode="dark"] .pp-article a{color:var(--a-acc-ink)}
html[data-mode="dark"] .pp-article li::marker{color:var(--muted)}
html[data-mode="dark"] .pp-article .pp-lead{color:var(--a-soft)}
html[data-mode="dark"] .pp-article .pp-box{background:#2d3c25;border-left:4px solid var(--shed)}
html[data-mode="dark"] .pp-article .pp-box > strong:first-child{color:var(--link)}
html[data-mode="dark"] .pp-article .pp-tip{background:#1f3642;border-left-color:#2c6a8a}
html[data-mode="dark"] .pp-article .pp-tip > strong:first-child{color:#92c5de}
html[data-mode="dark"] .pp-article .pp-warn{background:#493618;border-left-color:#b26b12}
html[data-mode="dark"] .pp-article .pp-warn > strong:first-child{color:#f4be7c}
html[data-mode="dark"] .pp-article .pp-toc{border:1px solid var(--line)}
html[data-mode="dark"] .pp-article .pp-toc a{color:var(--ink);border-bottom:1px solid #212b4e}
html[data-mode="dark"] .pp-article .pp-toc a::before{color:var(--muted)}
html[data-mode="dark"] .pp-article .pp-toc a:hover{color:var(--link)}
html[data-mode="dark"] .pp-article .pp-table-wrap{border:1px solid var(--line);background:#141a30}
html[data-mode="dark"] .pp-article .pp-table-wrap th{background:#1c2442;border-bottom:1px solid var(--line)}
html[data-mode="dark"] .pp-article .pp-table-wrap tr:last-child td{border-bottom:0}
html[data-mode="dark"] .pp-article .pp-img{border:1px solid var(--line)}
html[data-mode="dark"] .pp-article .pp-caption{color:var(--muted)}
html[data-mode="dark"] .pp-article .pp-disclaimer{border-top:1px solid var(--line);color:var(--muted)}
html[data-mode="dark"] .pp-article .pp-note{color:var(--muted)}
html[data-mode="dark"] .pp-article .pp-quote{background:#141a30;border:1px solid var(--line)}
html[data-mode="dark"] .pp-article .pp-quote .pp-who{background:#1c2544;color:var(--link)}
html[data-mode="dark"] .pp-article .pp-quote .pp-who::before{background:var(--shed)}
html[data-mode="dark"] .pp-article .pp-prompt{background:#1a352c;color:#eef3ec}
html[data-mode="dark"] .pp-article .pp-prompt::before{color:var(--tape)}
html[data-mode="dark"] .pp-article .pp-cmd{background:#17241f;color:#e3ece6}
html[data-mode="dark"] .pp-article .pp-video-cap{color:var(--muted)}
html[data-mode="dark"] .prose pre{background:#17241f;color:#e3ece6}
html[data-mode="dark"] .prose pre code{background:none;color:inherit}
html[data-mode="dark"] .tk{--tk-acc-ink:#fff;--tk-line:#27345e;--tk-soft:#19223d;background:var(--paper);color:var(--ink);border:1px solid #2e3d6e}
html[data-mode="dark"] .tk h2, html[data-mode="dark"] .tk h3{color:var(--ink)}
html[data-mode="dark"] .tk-sub{color:var(--muted)}
html[data-mode="dark"] .tk-step b{background:var(--tk-acc);color:#fff}
html[data-mode="dark"] .tk-seg{background:var(--tk-soft);border:1px solid var(--tk-line)}
html[data-mode="dark"] .tk-seg span{color:#bec3d3}
html[data-mode="dark"] .tk-seg input:checked + span{background:#141a30;color:var(--ink)}
html[data-mode="dark"] .tk-drop{border:2px dashed #35477f;background:var(--tk-soft);color:#bec3d3}
html[data-mode="dark"] .tk-drop.is-over{background:#493f18;border-color:#d9ad2a}
html[data-mode="dark"] .tk-drop svg{color:var(--link)}
html[data-mode="dark"] .tk-drop strong{color:var(--ink)}
html[data-mode="dark"] .tk-btn{border:1px solid var(--tk-acc);background:var(--tk-acc);color:var(--tk-acc-ink)}
html[data-mode="dark"] .tk-btn.ghost{background:#141a30;color:var(--ink);border-color:#33447b}
html[data-mode="dark"] .tk-btn.ghost:hover{background:var(--tk-soft)}
html[data-mode="dark"] .tk-icon{border:1px solid #2e3d6e;background:#141a30;color:var(--ink)}
html[data-mode="dark"] .tk-icon:hover{background:var(--tk-soft)}
html[data-mode="dark"] .tk-sep{background:var(--tk-line);border:0}
html[data-mode="dark"] .tk-field input[type=text], html[data-mode="dark"] .tk-field input[type=number], html[data-mode="dark"] .tk-field select, html[data-mode="dark"] .tk-field textarea, html[data-mode="dark"] .tk input.tk-input, html[data-mode="dark"] .tk textarea.tk-input, html[data-mode="dark"] .tk select.tk-input{border:1px solid #33447b;background:#141a30;color:var(--ink)}
html[data-mode="dark"] .tk-field small{color:var(--muted)}
html[data-mode="dark"] .tk-msg{background:#1f3642;color:#92c5de;border-left:4px solid #2c6a8a}
html[data-mode="dark"] .tk-msg.ok{background:#204127;color:#94dbbb;border-left-color:#2f8a5c}
html[data-mode="dark"] .tk-msg.warn{background:#493618;color:#f2bf7d;border-left-color:#c47c16}
html[data-mode="dark"] .tk-msg.err{background:#491b18;color:#e3938c;border-left-color:#c8453a}
html[data-mode="dark"] .tk-progress{background:var(--tk-line)}
html[data-mode="dark"] .tk-progress i{background:var(--tk-acc)}
html[data-mode="dark"] .tk-files li{border:1px solid var(--tk-line);background:#141a30}
html[data-mode="dark"] .tk-files .meta{color:var(--muted)}
html[data-mode="dark"] .tk-thumb{border:1px solid var(--tk-line);background:#141a30}
html[data-mode="dark"] .tk-thumb .pic{background:var(--tk-soft)}
html[data-mode="dark"] .tk-thumb .pic canvas, html[data-mode="dark"] .tk-thumb .pic img{background:#141a30}
html[data-mode="dark"] .tk-thumb .cap{color:var(--muted)}
html[data-mode="dark"] .tk-thumb .badge{background:var(--tape);color:#2b2410}
html[data-mode="dark"] .tk-stats{color:#c6cbd9}
html[data-mode="dark"] .tk-stats b{color:var(--ink)}
html[data-mode="dark"], html[data-mode="dark"][data-theme="pegboard"]{--desk:#253159;--desk-image:radial-gradient(circle at center, #33437a 0 3px, transparent 3.5px);--desk-glow:radial-gradient(ellipse 60% 45% at 80% 8%, rgba(20,26,48,0.55), transparent 70%);--on-desk:#e0e2ea;--on-desk-muted:#bec3d3;--sheet:#161d34;--sheet-line:#2c3a69;--sheet-shadow:0 1px 0 rgba(226,232,248,0.055), 0 18px 40px -28px rgba(28,36,32,.45);--frost:rgba(29,39,70,0.72);--head-bg:#24453a;--head-ink:#eef3ec;--foot-bg:#1a352c;--foot-ink:#f1f4ff;--chip-bg:#f0c02d;--chip-ink:#d8c797;--fx-fog:#222e52}
html[data-mode="dark"][data-theme="blueprint"]{--shed:#1d4f7a;--shed-deep:#86bae9;--tape:#ffbc1f;--tape-edge:#e0ae3c;--paper:#171e37;--line:#22313f;--muted:#a9b0c6;--board:#12406a;--hole:#2a5a85;--desk:#0f3a60;--desk-image:linear-gradient(rgba(24,50,73,0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(24,50,73,0.16) 1px, transparent 1px),
                linear-gradient(rgba(24,50,73,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(24,50,73,0.07) 1px, transparent 1px);--desk-glow:radial-gradient(ellipse 70% 55% at 75% 0%, rgba(53,143,233,0.35), transparent 70%);--on-desk:#eef6ff;--on-desk-muted:#c5d7e7;--sheet:#171e37;--sheet-line:#22313f;--sheet-shadow:0 24px 50px -30px rgba(0,10,25,.8);--frost:rgba(13,44,72,.72);--head-bg:rgba(10,36,60,.82);--head-ink:#eef6ff;--head-line:rgba(24,50,73,0.35);--foot-bg:#0a2238;--foot-ink:#c5d7e7;--chip-bg:#ffbc1f;--chip-ink:#f0ce7f;--fx-fog:#0f3a60}
html[data-mode="dark"][data-theme="graph"]{--shed:#2f5bea;--shed-deep:#859aea;--tape:#ffce1f;--tape-edge:#e5b92a;--paper:#141a30;--line:#1f2b42;--muted:#a9b0c6;--board:#182849;--hole:#1f2b42;--desk:#182849;--desk-image:linear-gradient(rgba(47,91,234,0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(47,91,234,0.13) 1px, transparent 1px),
                linear-gradient(rgba(47,91,234,0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(47,91,234,0.055) 1px, transparent 1px);--desk-glow:radial-gradient(ellipse 55% 40% at 85% 0%, rgba(255,206,31,0.22), transparent 70%);--on-desk:#95a6da;--on-desk-muted:#a8b0c8;--sheet:#141a30;--sheet-line:#1c2a44;--sheet-shadow:0 1px 0 rgba(18,26,51,.04), 0 22px 44px -30px rgba(18,26,51,.4);--frost:rgba(24,40,73,0.8);--head-bg:#141a30;--head-ink:#95a6da;--head-line:#2f5bea;--foot-bg:#121a33;--foot-ink:#d0d6e7;--chip-bg:#2f5bea;--chip-ink:#ffffff;--fx-fog:#182849}
html[data-mode="dark"][data-theme="night"]{--shed:#2c5c58;--shed-deep:#a0c2cf;--tape:#ffa51f;--tape-edge:#d98f1f;--paper:#1a233e;--line:#2a3865;--muted:#a9b0c6;--board:#141f24;--hole:#1d2b31;--desk:#10191d;--desk-glow:radial-gradient(ellipse 60% 55% at 12% 0%, rgba(255,165,31,0.22), transparent 65%), radial-gradient(ellipse 50% 40% at 100% 100%, rgba(80,140,150,0.18), transparent 70%), linear-gradient(180deg, #121c21, #0c1316);--on-desk:#e9eeec;--on-desk-muted:#a9b0c6;--sheet:#1a233e;--sheet-line:#2a3a40;--sheet-shadow:0 30px 60px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(255,165,31,0.08);--frost:rgba(16,25,29,.72);--head-bg:rgba(11,19,22,.86);--head-ink:#e9eeec;--head-line:rgba(255,165,31,0.55);--foot-bg:#0a1013;--foot-ink:#a9b0c6;--chip-bg:#ffa51f;--chip-ink:#f4bd7b;--fx-fog:#10191d}
html[data-mode="dark"]{background:var(--desk)}
html[data-mode="dark"] body{background:var(--desk-glow), var(--desk-image), var(--desk);color:var(--on-desk)}
html[data-mode="dark"] .board, html[data-mode="dark"] .hero.fx-on, html[data-mode="dark"] .board.bench{background:transparent;border-bottom:0}
html[data-mode="dark"] .cat-band + .cat-band{border-top:0}
html[data-mode="dark"] .site-head{background:var(--head-bg);color:var(--head-ink)}
html[data-mode="dark"] .brand, html[data-mode="dark"] .site-nav a, html[data-mode="dark"] .nav-top, html[data-mode="dark"] .head-search, html[data-mode="dark"] .menu-btn{color:var(--head-ink)}
html[data-mode="dark"][data-theme="graph"] .nav-top:hover, html[data-mode="dark"][data-theme="graph"] .nav-top[aria-expanded="true"], html[data-mode="dark"][data-theme="graph"] .head-search:hover, html[data-mode="dark"][data-theme="graph"] .menu-btn:hover{background:rgba(47,91,234,0.08)}
html[data-mode="dark"] .site-foot{background:var(--foot-bg);color:var(--foot-ink)}
html[data-mode="dark"] .page-head{background:var(--sheet);border:1px solid var(--sheet-line);color:var(--ink)}
html[data-mode="dark"] .tool-notes-wrap, html[data-mode="dark"] main > .wrap > .prose, html[data-mode="dark"] .article-grid > .prose{background:var(--sheet);border:1px solid var(--sheet-line);color:var(--ink)}
html[data-mode="dark"] .home-lower > .wrap, html[data-mode="dark"] .other-cats{background:var(--sheet);border:1px solid var(--sheet-line);color:var(--ink)}
html[data-mode="dark"] .page-head .lede, html[data-mode="dark"] .page-head .facts{color:#c6cbd9}
html[data-mode="dark"] .hero-intro{background:var(--frost);color:var(--on-desk)}
html[data-mode="dark"] .hero.fx-on .hero-intro{background:var(--frost)}
html[data-mode="dark"] .hero-intro p{color:var(--on-desk-muted)}
html[data-mode="dark"] .cat-band-head h2, html[data-mode="dark"] .cat-band-head p{background:var(--frost);color:var(--on-desk)}
html[data-mode="dark"] .cat-band-head h2 a{color:var(--on-desk)}
html[data-mode="dark"] .cat-band-head p{color:var(--on-desk-muted)}
html[data-mode="dark"] .next-step .next-label{color:var(--on-desk-muted);background:var(--frost)}
html[data-mode="dark"] .rack h2, html[data-mode="dark"] .sub-head{background:var(--chip-bg);color:var(--chip-ink);border-color:transparent}
html[data-mode="dark"] .rack-more{background:var(--frost);color:var(--on-desk)}
html[data-mode="dark"] .tag::before{background:var(--desk)}
html[data-mode="dark"] .mtabs{background:var(--frost);border-color:transparent}
html[data-mode="dark"] .mtabs a{color:var(--on-desk)}
html[data-mode="dark"] .mtabs a:hover{background:rgba(255,255,255,.18);color:var(--on-desk)}
html[data-mode="dark"] .mtabs a[aria-selected=true]{background:var(--shed);color:#fff}
html[data-mode="dark"][data-theme="night"] .mtabs a[aria-selected=true]{background:var(--tape);color:#241503}
html[data-mode="dark"][data-theme="blueprint"] .mtabs a[aria-selected=true]{background:var(--tape);color:#2a1f05}
html[data-mode="dark"] .sub-jump a{background:var(--shed)}
html[data-mode="dark"][data-theme="night"] .sub-jump a, html[data-mode="dark"][data-theme="blueprint"] .sub-jump a{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.22)}
html[data-mode="dark"] .theme-pick{background:rgba(15,20,18,.86);color:#fff}
html[data-mode="dark"] .theme-pick button{border:1px solid rgba(255,255,255,.25);background:transparent;color:#fff}
html[data-mode="dark"] .theme-pick button[aria-pressed="true"]{background:#141a30;color:#eaebf1}
html[data-mode="dark"] .guides-page{background:var(--sheet);border:1px solid var(--sheet-line);color:var(--ink)}
html[data-mode="dark"], html[data-mode="dark"][data-theme="pegboard"]{--sheet:#1b2340;--sheet-ink:#e0e2ea;--sheet-muted:#b0b6ca;--sheet-line:#2c3a69;--card:#333d24;--card-line:#2f3e70;--link:#a1cebf;--soft:#212b4e}
html[data-mode="dark"][data-theme="graph"]{--sheet:#141b31;--sheet-ink:#95a6da;--sheet-muted:#a8b0c8;--sheet-line:#192748;--card:#161d34;--card-line:#182649;--link:#b5c5f8;--soft:#182549}
html[data-mode="dark"][data-theme="blueprint"]{--sheet:rgba(11,42,70,.86);--sheet-ink:#eef6ff;--sheet-muted:#c6d7e6;--sheet-line:rgba(24,50,73,0.22);--card:rgba(15,52,88,.92);--card-line:rgba(24,50,73,0.28);--link:#f9e4b4;--soft:rgba(24,50,73,0.08)}
html[data-mode="dark"][data-theme="night"]{--sheet:rgba(21,32,37,.88);--sheet-ink:#e9eeec;--sheet-muted:#a9b0c6;--sheet-line:rgba(255,255,255,.12);--card:rgba(27,40,46,.92);--card-line:rgba(255,255,255,.14);--link:#f9deb4;--soft:rgba(255,255,255,.06)}
html[data-mode="dark"] .page-head, html[data-mode="dark"] .tool-notes-wrap, html[data-mode="dark"] main > .wrap > .prose, html[data-mode="dark"] .article-grid > .prose, html[data-mode="dark"] .guides-page, html[data-mode="dark"] .home-lower > .wrap, html[data-mode="dark"] .other-cats{background:var(--sheet);color:var(--sheet-ink);border-color:var(--sheet-line)}
html[data-mode="dark"] .page-head .lede, html[data-mode="dark"] .page-head .facts, html[data-mode="dark"] .crumb, html[data-mode="dark"] .crumb a, html[data-mode="dark"] .crumb [aria-current], html[data-mode="dark"] .guide-list .g-sum, html[data-mode="dark"] .guide-list time, html[data-mode="dark"] .prose .meta, html[data-mode="dark"] .section-head p, html[data-mode="dark"] .tested p, html[data-mode="dark"] .prose blockquote{color:var(--sheet-muted)}
html[data-mode="dark"] .page-head .lede, html[data-mode="dark"] .tested p{color:color-mix(in srgb, var(--sheet-ink) 82%, transparent)}
html[data-mode="dark"] .facts svg{color:var(--link)}
html[data-mode="dark"] .page-head a, html[data-mode="dark"] .tool-notes-wrap a:not(.tag), html[data-mode="dark"] .prose a:not(.tag), html[data-mode="dark"] .guides-page a, html[data-mode="dark"] .home-lower a:not(.tag){color:var(--link)}
html[data-mode="dark"] .guide-list a, html[data-mode="dark"] .guide-list .g-title{color:var(--sheet-ink)}
html[data-mode="dark"] .guide-list, html[data-mode="dark"] .guide-list li, html[data-mode="dark"] .prose details, html[data-mode="dark"] .prose details:last-of-type, html[data-mode="dark"] .prose td, html[data-mode="dark"] .tested, html[data-mode="dark"] .related{border-color:var(--sheet-line)}
html[data-mode="dark"] .prose th{border-bottom-color:var(--sheet-ink)}
html[data-mode="dark"] .prose code, html[data-mode="dark"] .pp-article .pp-table-wrap th{background:var(--soft)}
html[data-mode="dark"] .prose .pp-box, html[data-mode="dark"] .prose .note, html[data-mode="dark"] .pp-article .pp-tip, html[data-mode="dark"] .pp-article .pp-warn, html[data-mode="dark"] .pp-article .pp-steps{background:var(--soft)}
html[data-mode="dark"] .pp-article .pp-tip > strong:first-child, html[data-mode="dark"] .pp-article .pp-warn > strong:first-child{color:var(--link)}
html[data-mode="dark"] .pp-article .pp-table-wrap{border-color:var(--sheet-line)}
html[data-mode="dark"] .pp-article .pp-quote{background:var(--card)}
html[data-mode="dark"] .tag{background:var(--card);border-color:var(--card-line);color:var(--sheet-ink)}
html[data-mode="dark"] .tag-does{color:var(--sheet-muted)}
html[data-mode="dark"] .tag svg{color:var(--link)}
html[data-mode="dark"] .next-step a, html[data-mode="dark"] .other-cats a, html[data-mode="dark"] .cat-jump a, html[data-mode="dark"] .has-filter button, html[data-mode="dark"] .my-tools a, html[data-mode="dark"] .hero-my-tools a, html[data-mode="dark"] .fav-btn, html[data-mode="dark"] kbd{background:var(--card);color:var(--sheet-ink);border-color:var(--card-line)}
html[data-mode="dark"] .next-step a em, html[data-mode="dark"] .other-cats a span, html[data-mode="dark"] .other-cats a em, html[data-mode="dark"] .has-filter button em, html[data-mode="dark"] .cat-jump a span{color:var(--sheet-muted)}
html[data-mode="dark"] .next-step a > svg, html[data-mode="dark"] .other-cats a svg, html[data-mode="dark"] .cat-jump svg{color:var(--link)}
html[data-mode="dark"] .other-cats a b{color:var(--sheet-ink)}
html[data-mode="dark"] .fav-btn[aria-pressed="true"]{background:color-mix(in srgb, var(--tape) 22%, var(--card));border-color:var(--tape-edge)}
html[data-mode="dark"] .has-filter button[aria-pressed="true"]{background:var(--shed);color:#fff}
html[data-mode="dark"][data-theme="night"] .has-filter button[aria-pressed="true"], html[data-mode="dark"][data-theme="blueprint"] .has-filter button[aria-pressed="true"]{background:var(--tape);color:#241503;border-color:var(--tape)}
html[data-mode="dark"][data-theme="graph"] .tk{--tk-line:#192748;--tk-soft:#171f38;border-color:#1b2846}
html[data-mode="dark"][data-theme="graph"] .tk-drop{border-color:#5675c7;color:#a6b1ca}
html[data-mode="dark"][data-theme="graph"] .tk-seg span{color:#a6b1ca}
html[data-mode="dark"][data-theme="graph"] .tk-icon{border-color:#1b2846}
html[data-mode="dark"] .skip{background:var(--tape);color:#2b2410}
html[data-mode="dark"] .tool-frame{border:0;background:transparent}
html[data-mode="dark"] .tool-notes-wrap .meta{color:var(--muted)}
html[data-mode="dark"] .contact-form input, html[data-mode="dark"] .contact-form textarea{border:1px solid #33447b;background:#141a30;color:var(--ink)}
html[data-mode="dark"] .contact-form button{border:0;background:var(--shed);color:#fff}
/* Dark mode for the Graph paper theme (2026-11-18): the same graph paper at night.
   A deep navy sheet with faint blue rules, the yellow tape still yellow, the blue a little brighter so it reads on dark.
   build.js puts this AFTER the automatic dark copy of every stylesheet (dark.js); the [data-theme] in every selector
   matches the specificity of the generated html[data-mode][data-theme="graph"] rules, so these hand-picked ones win. */
html[data-mode="dark"][data-theme] {
  color-scheme: dark;
  --shed: #2f5bea; --shed-deep: #2a51d6; --shed-ink: #eef2ff; --tape: #ffd84d; --tape-edge: #e5b92a;
  --paper: #141c30; --ink: #e6ebf7; --muted: #a3aecb; --line: #2a3654; --board: #0c1220; --hole: #2a3654;
  --desk: #0c1220;
  --desk-image: linear-gradient(rgba(120,150,255,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(120,150,255,.11) 1px, transparent 1px),
                linear-gradient(rgba(120,150,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(120,150,255,.045) 1px, transparent 1px);
  --desk-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  --desk-glow: radial-gradient(ellipse 55% 40% at 85% 0%, rgba(255,216,77,.07), transparent 70%), radial-gradient(ellipse 60% 50% at 0% 100%, rgba(61,104,245,.12), transparent 70%);
  --on-desk: #e6ebf7; --on-desk-muted: #a3aecb;
  --sheet: #131b2e; --sheet-ink: #e6ebf7; --sheet-muted: #a3aecb; --sheet-line: #26314d;
  --sheet-shadow: 0 1px 0 rgba(0,0,0,.35), 0 26px 50px -28px rgba(0,0,0,.85);
  --card: #18213a; --card-line: #2b3757; --link: #8eabff; --soft: #1b2643; --sheet-blur: none;
  --frost: rgba(12,18,32,.8);
  --head-bg: #0f1628; --head-ink: #e6ebf7; --head-line: #3d68f5;
  --foot-bg: #080d18; --foot-ink: #a3aecb;
  --chip-bg: #3d68f5; --chip-ink: #ffffff;
  --fx-fog: #0c1220;
}
html[data-mode="dark"][data-theme] body { background-image: var(--desk-glow), var(--desk-image); background-size: auto, var(--desk-size); }

/* header: hover tints and the mode button */
html[data-mode="dark"][data-theme] .nav-top:hover, html[data-mode="dark"][data-theme] .nav-top[aria-expanded="true"], html[data-mode="dark"][data-theme] .head-search:hover, html[data-mode="dark"][data-theme] .menu-btn:hover { background: rgba(142,171,255,.12); }
.mode-btn .i-sun { display: none; }
html[data-mode="dark"][data-theme] .mode-btn .i-sun { display: block; }
html[data-mode="dark"][data-theme] .mode-btn .i-moon { display: none; }
html[data-mode="dark"][data-theme] .mode-btn { color: var(--tape); }

/* text set straight on sheets */
html[data-mode="dark"][data-theme] .page-head .lede, html[data-mode="dark"][data-theme] .page-head .facts { color: #c3cbe2; }
html[data-mode="dark"][data-theme] .mtabs a:hover { background: rgba(142,171,255,.12); }
html[data-mode="dark"][data-theme] .mtabs a[aria-selected=true], html[data-mode="dark"][data-theme] .has-filter button[aria-pressed="true"] { background: var(--shed); color: #fff; }
html[data-mode="dark"][data-theme] .fav-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--tape) 16%, var(--card)); }

/* tool panels: paper becomes the night sheet, inputs a shade deeper so they read as fields */
html[data-mode="dark"][data-theme] .tk { background: var(--paper); color: var(--ink); border-color: #2b3757; }
html[data-mode="dark"][data-theme] .tk input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), html[data-mode="dark"][data-theme] .tk select, html[data-mode="dark"][data-theme] .tk textarea { background-color: #0e1526; color: var(--ink); border-color: #33405f; }
html[data-mode="dark"][data-theme] .tk ::placeholder, html[data-mode="dark"][data-theme] .bench ::placeholder { color: #7f8aa8; }
html[data-mode="dark"][data-theme] .bench img, html[data-mode="dark"][data-theme] .bench canvas, html[data-mode="dark"][data-theme] .bench video { color-scheme: light; }

/* the theme switcher of the local preview */
html[data-mode="dark"][data-theme] .theme-pick { background: rgba(20,28,48,.92); }

/* the framed Excel tool swaps to its own dark copy; while it loads the frame stays dark */
html[data-mode="dark"][data-theme] .tool-frame { background: #0c1220; }

/* white fills written straight into the HTML (style="background:#fff") become the night sheet too */
html[data-mode="dark"][data-theme] .bench [style*="background:#fff"]:not(canvas):not(img):not(.esx .bd *), html[data-mode="dark"][data-theme] .bench [style*="background: #fff"]:not(canvas):not(img):not(.esx .bd *), html[data-mode="dark"][data-theme] .bench [style*="background:#ffffff"]:not(canvas):not(img):not(.esx .bd *), html[data-mode="dark"][data-theme] .bench [style*="background: #ffffff"]:not(canvas):not(img):not(.esx .bd *) { background: #0e1526 !important; }

/* one-off fixes the automatic copy cannot know about */
/* selected tabs of the Blogger-era tools, and their quieter buttons */
html[data-mode="dark"][data-theme] .ac-tab.on { background: var(--shed) !important; border-color: var(--shed) !important; }
html[data-mode="dark"][data-theme] .fx-tab.on, html[data-mode="dark"][data-theme] .dt-tab.on, html[data-mode="dark"][data-theme] .sr-seg button.on { color: #ffffff !important; }
html[data-mode="dark"][data-theme] .dm-btn.ghost { color: var(--link) !important; border-color: #3a4a75 !important; }
html[data-mode="dark"][data-theme] .gt-btn.ghost { color: #7fd6b8 !important; border-color: #2f5f52 !important; }
html[data-mode="dark"][data-theme] .dm-bars li.top .dm-n { color: #16203a !important; }
html[data-mode="dark"][data-theme] .kn-n { color: #ff9f7a !important; }
html[data-mode="dark"][data-theme] .dm-rk.first { background: #3a3218 !important; color: #f2c14e !important; }
html[data-mode="dark"][data-theme] .ac-btn:not(.ghost) { background: var(--shed) !important; border-color: var(--shed) !important; }
/* deleted and added words in comparisons */
html[data-mode="dark"][data-theme] del { color: #ffb4a8 !important; }
html[data-mode="dark"][data-theme] ins { color: #a6f0c6 !important; }
/* colours a script writes onto an element (password strength): lifted so they read on navy */
html[data-mode="dark"][data-theme] #pwx-grade, html[data-mode="dark"][data-theme] #pwx-bar { filter: brightness(2.6) saturate(.8) !important; }
html[data-mode="dark"][data-theme] .pmx .c { background: #4a5f9e !important; }
html[data-mode="dark"][data-theme] .skip { color: #2b2410 !important; }
html[data-mode="dark"][data-theme] .ftx { --ring: var(--link) !important; }
/* the email signature is shown inside a mock email: emails are read on white, so the preview stays white */
html[data-mode="dark"][data-theme] .esx .bd { background: #ffffff !important; color: #222222 !important; border-color: #2b3757 !important; }
html[data-mode="dark"][data-theme] .esx .bd p { color: #222222 !important; }

/* ---- fifth batch (2026-11-21) ---- */
/* the notepad is a sheet of ruled paper: a dark sheet with faint rules, the red margin kept */
html[data-mode="dark"][data-theme] .npx .npx-paper { background: #18213a !important; border-color: #33405f !important; }
html[data-mode="dark"][data-theme] .npx .npx-title { border-bottom-color: #2c3856 !important; background: transparent !important; color: #e8edf8 !important; }
html[data-mode="dark"][data-theme] .npx .npx-title:focus { background: rgba(255,255,255,.03) !important; }
html[data-mode="dark"][data-theme] .npx textarea.npx-text { color: #dfe6f5 !important; background-color: transparent !important; background-image: linear-gradient(transparent calc(var(--lh) - 1px), rgba(160,180,230,.13) calc(var(--lh) - 1px)) !important; background-size: 100% var(--lh) !important; background-position: 0 6px !important; background-attachment: local !important; }
/* the GPA marker stands out on the dark bar */
html[data-mode="dark"][data-theme] .gpx .gpx-bar i { background: #ffffff !important; box-shadow: 0 0 0 2px #141c30 !important; }
