/* Minideas
   Layout: top bar (brand + language switch); home = chapters of idea cards; idea page = numbered
   contents rail + one swipeable card stack. Drawings are pencil sketches on warm paper. */
:root {
  --paper: #edf0f6;
  --card: #ffffff;
  --art: #fbf9f3; /* warm paper behind pictures: drawings, tiles, the Follow and Suggest boxes */
  --ink: #1c2333;
  --ink-2: #56607a;
  --line: #d8deea;
  --blue: #2f58d6;
  --coral: #d4462c;
  --green: #0f6e50; /* chapters: the number circles on a collection page, the chapter headings in the sidebar */
  --on: #1c2333;
  --fk: #ffffff;
  --f-blue: #8da6ff;
  --f-yellow: #ffc531;
  --f-mint: #5ccca8;
  --f-coral: #ff8a72;
  --f-tint: #e1e7f6;
  --chip: #e3e9f8; /* pale blue behind link arrows and action icons, which are the site's blue */
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Lexend", "Segoe UI", system-ui, sans-serif;
  --hand: "Patrick Hand", "Chalkboard SE", "Comic Sans MS", cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f121a; --card: #191e2b; --art: #1b2030; --ink: #e7eaf3; --ink-2: #a3abc0; --line: #2a3145;
    --blue: #8ba5ff; --coral: #ff8d77; --green: #6cd1b1; --on: #141927; --fk: #20263a;
    --f-blue: #7d97ff; --f-yellow: #f5c542; --f-mint: #4fc9a3; --f-coral: #ff8a70; --f-tint: #283150; --chip: #252e4a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f121a; --card: #191e2b; --art: #1b2030; --ink: #e7eaf3; --ink-2: #a3abc0; --line: #2a3145;
  --blue: #8ba5ff; --coral: #ff8d77; --green: #6cd1b1; --on: #141927; --fk: #20263a;
  --f-blue: #7d97ff; --f-yellow: #f5c542; --f-mint: #4fc9a3; --f-coral: #ff8a70; --f-tint: #283150; --chip: #252e4a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
/* readable by screen readers and search engines, not shown */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible, .track:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 8px 28px;
}

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 700 21px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); text-decoration: none; padding: 6px 0; }
.brand .mark { flex: none; width: 56px; height: 56px; }
@media (max-width: 479px) { .brand { gap: 10px; font-size: 17px; } .brand .mark { width: 46px; height: 46px; } }

/* site footer: the GitHub link on the left, small print on the right; on phones the small print goes under it, lined up with it */
.site-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.site-foot p { margin: 0 0 0 auto; }
@media (max-width: 560px) { .site-foot p { margin-left: 0; } }
.foot-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.foot-link svg { flex: none; width: 20px; height: 20px; }
.foot-link:hover span { text-decoration: underline; }
.top-tools { display: flex; align-items: center; gap: 10px; }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.lang { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang a { display: flex; align-items: center; min-height: 36px; padding: 0 14px; font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: none; }
.lang a[aria-current="true"] { background: var(--ink); color: var(--card); }
/* phones: short language codes so the logo, theme button and switch fit on one row */
.lang-short { display: none; }
@media (max-width: 480px) {
  .lang-long { display: none; }
  .lang-short { display: inline; }
}

/* home */
.hero { padding-block: 18px 8px; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 7vw, 60px); line-height: 1.02; letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance; }
.lede { color: var(--ink-2); max-width: 54ch; font-size: 17.5px; margin: 0; }
.hero .eyebrow { margin-bottom: 10px; }
/* the home page's only words about the site: larger than a caption, still grey. One line on wide screens; on
   narrow ones each comma-separated part keeps together, so a phrase never splits */
.home-lede { max-width: none; font-size: clamp(18px, 2.2vw + 10px, 22px); line-height: 1.4; }
.home-lede span { display: inline-block; }
.shelf { margin-top: 32px; }
.shelf-label { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 28px; margin: 44px 0 0; }
.shelf-label .shelf-icon { flex: none; }
.shelf-label + .tile-grid { margin-top: 14px; }
.edition { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.dateline { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.gist + .dateline { margin-top: 8px; }
.hero .lede + .dateline { margin-top: 10px; }

/* book review: one article in the reviewer's words */
.book-head { display: grid; gap: 28px; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); align-items: center; margin-top: 22px; max-width: 760px; }
.book-head.no-photo { grid-template-columns: minmax(0, 1fr); }
figure.book-photo { margin: 0; }
figure.book-photo img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.facts { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.book-head .abstract { margin: 0; font-size: 19px; line-height: 1.55; max-width: 34ch; }

@media (max-width: 640px) {
  .book-head { grid-template-columns: minmax(0, 1fr); }
  figure.book-photo { max-width: 200px; }
}
.review { max-width: 680px; margin-top: 40px; }
.review p { font-size: 17px; line-height: 1.75; margin: 0 0 1.1em; }
.review h2 { font-family: var(--display); font-weight: 800; font-size: 25px; line-height: 1.2; margin: 1.9em 0 .6em; text-wrap: balance; }
.review figure { margin: 0 0 1.3em; }
.review figure .art { max-width: 520px; }
.review figure.photo { max-width: 420px; }
.review figure.photo a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.review figure.photo img { display: block; width: 100%; height: auto; }
.review figure.photo figcaption { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.review blockquote { margin: 1.3em 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--blue); }
.review blockquote p { font-style: italic; margin: 0; }
.review .watch a { font-weight: 700; color: var(--blue); text-decoration: none; }
.review .watch a:hover { text-decoration: underline; }
.verdict { margin-top: 2.4em; padding: 22px 24px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.verdict h2 { margin-top: 0; }
.review .note { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin-top: 1.4em; }
.review .share-solo { margin-top: 24px; }
.review .source { margin: 0; }
.quick-link { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14.5px; color: var(--blue); text-decoration: none; }
.quick-link:hover { text-decoration: underline; }
/* a photo panel shows the whole photo, centred in the drawing's 320×220 frame on the paper */
.art:has(> img.photo-panel) { aspect-ratio: 320 / 220; position: relative; }
.art img.photo-panel { position: absolute; inset: 0; margin: auto; display: block; max-width: 100%; max-height: 100%; border-radius: 14px; }
.gallery ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.gallery li { min-width: 0; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.gallery a:hover { border-color: var(--ink); }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: var(--card); }
.gallery span { display: block; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.back { display: inline-block; margin: 4px 0 0; padding: 6px 0; font-weight: 700; font-size: 14.5px; color: var(--ink); text-decoration: none; }
.back:hover { text-decoration: underline; }
.chapter-label { display: flex; align-items: center; gap: 14px; font: 800 24px/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); margin: 44px 0 14px; text-wrap: balance; }
/* chapter number in a solid green circle (green marks chapters; blue is for links and buttons) */
.chapter-num { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: var(--card); font: 800 20px/1 var(--display); letter-spacing: 0; }
.tile-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.chapter-label + .tile-grid { margin-top: 0; }
.tile { display: block; height: 100%; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--ink); transform: translateY(-2px); }
/* the picture sits in a fixed 3:2 band (drawings are cropped to what's drawn, covers are portrait), centered on the drawing tint */
.tile-art { position: relative; display: flex; justify-content: center; align-items: center; aspect-ratio: 3 / 2; padding: 10px; background: var(--art); border-bottom: 1px solid var(--line); }
.tile-art svg { display: block; height: 100%; width: auto; max-width: 100%; }
.tile-art img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 1px 4px rgb(0 0 0 / .18); }
/* beside the title, so it never covers the picture */
.new-mark { float: right; margin: 2px 0 4px 10px; padding: 1px 10px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--f-yellow); color: var(--on); font: 700 12px/1.5 var(--body); letter-spacing: .06em; text-transform: uppercase; }
/* the end of every page, above the footer: Follow and Suggest, side by side (stacked on phones), on the tint behind
   tile pictures (so they read as actions, not as more tiles), with a yellow badge like the logo's bulb and a plain arrow */
.more-band { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 56px; }
.more-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.more-card:hover { border-color: var(--ink); }
.more-band .more-card { position: relative; padding-right: 58px; background: var(--art); }
.more-band .more-card:hover { border-color: var(--ink); box-shadow: 0 6px 18px -8px rgb(0 0 0 / .45); transform: translateY(-1px); }
.more-band .more-card > svg, .more-band .more-card:hover > svg { background: var(--f-yellow); color: var(--on); }
.more-band .more-card::after {
  content: "→"; position: absolute; top: 50%; right: 16px; translate: 0 -50%; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; color: var(--ink); font: 700 18px/1 var(--body);
}
.more-card strong { display: block; font: 700 17px/1.25 var(--display); }
.more-card small { display: block; margin-top: 3px; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.tile-body { display: block; padding: 12px 14px 14px; }
.tile-title { margin: 0; font: 700 19px/1.2 var(--display); color: var(--ink); text-wrap: balance; }
.tile-caption { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.tile-caption .count { display: block; margin: 0 0 2px; font-family: var(--hand); font-size: 17px; color: var(--ink); }
/* home shelves: when the last row would hold one tile alone, the first (newest) tile takes the whole row instead, with
   its picture beside the words. The column counts follow .tile-grid: 3 across from 928px, 2 from 614px */
.shelves { container: shelves / inline-size; }
@container shelves (min-width: 928px) { .shelf-grid > :first-child:nth-last-child(3n+1) { grid-column: 1 / -1; } }
@container shelves (614px <= width < 928px) { .shelf-grid > :first-child:nth-last-child(2n+1) { grid-column: 1 / -1; } }
.tile .tile-go { display: none; } /* .tile: beats .btn, which comes later */
.shelf-grid > :first-child { container: first-tile / inline-size; }
@container first-tile (min-width: 614px) {
  .tile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--art); }
  .tile-art { border-bottom: 0; }
  .tile-body { align-self: center; padding: 24px 32px; }
  .new-mark:not([hidden]) { float: none; display: inline-block; margin: 0 0 12px; }
  .tile-title { font-size: 30px; }
  .tile-caption { margin-top: 8px; max-width: 42ch; font-size: 16px; }
  .tile .tile-go { display: inline-flex; margin-top: 20px; }
}
.series-icon { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; fill: var(--chip); stroke: var(--blue); stroke-width: 1.4; stroke-linejoin: round; }
.series-icon .front { fill: var(--card); }

/* idea page */
.layout { display: grid; gap: 32px; margin-top: 12px; }
@media (min-width: 880px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
  .layout.solo { grid-template-columns: minmax(0, 1fr); }
  .toc { order: -1; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 16px); }
  /* beside a rail, the card and its rows fill the column up to the page's right edge */
  .layout .stack-main > *, .layout .stack-next > * { max-width: none; }
  /* no contents rail (books, standalone ideas): the title and where to go next (full review, related) on the left;
     the card, its buttons, the swipe hint and Share on the right as one block, so the left column never pulls the
     buttons away from the card. Phones keep the page order. */
  .layout.solo .viewer {
    display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 600px); column-gap: 56px; align-items: start;
    grid-template-areas: "head main" "pager main"; grid-template-rows: auto 1fr; /* the links follow the title */
  }
  .layout.solo .stack-head { grid-area: head; }
  .layout.solo .stack-main { grid-area: main; }
  .layout.solo .stack-next { display: contents; }
  .layout.solo .card { margin-top: 0; }
  .layout.solo .pager { grid-area: pager; grid-template-columns: minmax(0, 1fr); max-width: 360px; margin-top: 28px; }
  .layout.solo .pager a.next { text-align: left; grid-column: auto; }
}
.viewer { min-width: 0; }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.stack-title { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 4.5vw, 36px); line-height: 1.08; letter-spacing: -.01em; margin: 8px 0; text-wrap: balance; }
.gist { margin: 0; color: var(--ink-2); max-width: 50ch; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; margin-top: 18px; max-width: 540px; overflow: hidden;
  box-shadow: 0 22px 44px -30px rgba(20, 30, 60, .45);
}
.track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; padding: 14px 14px 24px; display: flex; flex-direction: column; }
.art { background: var(--art); border-radius: 14px; }
.art svg { display: block; width: 100%; height: auto; }
.count { font-family: var(--hand); font-size: 16px; color: var(--ink-2); margin: 16px 8px 0; font-variant-numeric: tabular-nums; }
.slide h2 { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.2; margin: 2px 8px 8px; text-wrap: balance; }
.slide p { margin: 0 8px; font-size: 16px; line-height: 1.6; max-width: 60ch; }
.slide p a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.slide p code { padding: 1px 5px; border-radius: 6px; background: var(--chip); color: var(--ink); font: 0.88em/1 ui-monospace, Menlo, Consolas, monospace; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 540px; margin-top: 14px; }
.btn {
  font: 700 14.5px/1 var(--body); color: var(--ink); background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 0 16px; min-height: 44px; cursor: pointer; white-space: nowrap;
}
.btn.primary { background: var(--ink); color: var(--card); }
.btn { display: inline-flex; align-items: center; gap: 7px; }
.share-wrap { position: relative; }
.share-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 190px; padding: 6px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.share-menu.from-left { right: auto; left: 0; }
.share-menu.up { top: auto; bottom: calc(100% + 6px); }
.share-menu a, .share-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; font: 600 14.5px/1.2 var(--body); color: var(--ink); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.share-menu svg { flex: none; }
.share-menu a:hover, .share-menu button:hover { background: var(--f-tint); }
.btn:disabled { opacity: .35; cursor: default; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; min-width: 0; }
.dot { width: 16px; height: 28px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; border-radius: 6px; }
.dot::before { content: ""; width: 9px; height: 9px; border-radius: 5px; background: var(--line); transition: width .2s, background .2s; }
.dot[aria-current="true"]::before { width: 18px; background: var(--ink); }
@media (max-width: 480px) {
  .dot { width: 12px; }
  .dot::before { width: 7px; height: 7px; }
  .dot[aria-current="true"]::before { width: 14px; }
}
.hint { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
/* under the buttons: the swipe hint on the left, Share on the right, under Next */
.hint-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; max-width: 540px; margin-top: 14px; }
.hint-row .hint { margin: 0; }
.hint-row .share-wrap { margin-left: auto; }
/* Share: a text button with the yellow badge of the Follow and Suggest icons, so it never competes with Next */
.btn.share { min-height: 40px; padding: 0 12px 0 4px; gap: 9px; border-color: transparent; background: none; color: var(--ink); font-size: 14px; }
.btn.share svg { box-sizing: content-box; width: 16px; height: 16px; padding: 7px; border-radius: 50%; background: var(--f-yellow); color: var(--on); }
.btn.share:hover, .btn.share[aria-expanded="true"] { border-color: var(--line); background: var(--card); color: var(--ink); }
.hint-row .btn.share { margin-right: -12px; } /* its text lines up with Next's right edge */
.share-solo .btn.share { margin-left: -4px; } /* its badge lines up with the text above */

.pager { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); max-width: 540px; margin-top: 32px; }
.pager a { display: block; min-width: 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pager a:hover { border-color: var(--ink); }
.pager a.next { text-align: right; grid-column: -2; }
/* nothing to go back to (a book, a standalone idea): each card gets the full width */
.pager:not(:has(.prev)) a { grid-column: 1 / -1; text-align: left; }
@media (max-width: 479px) { .pager a.next { text-align: left; } } /* one card per row: line up with the others */
.pager small { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pager strong { display: block; font-family: var(--display); font-size: 17px; line-height: 1.25; margin-top: 4px; }
/* where to go next: white cards like the rest, each with a small round arrow in the site's blue on a pale chip,
   so it reads as a link without pulling the eye from the pictures */
.pager a { position: relative; }
.pager a.next, .pager a.related { padding-right: 58px; }
.pager a.prev { padding-left: 58px; }
.pager a.next::after, .pager a.related::after, .pager a.prev::before {
  content: "→"; position: absolute; top: 50%; right: 14px; translate: 0 -50%; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--chip); color: var(--blue); font: 700 16px/1 var(--body);
}
.pager a.prev::before { content: "←"; right: auto; left: 14px; }
.pager a:hover::after, .pager a:hover::before { background: var(--blue); color: var(--card); }
/* a round badge for the follow and suggest icons */
.more-card > svg {
  box-sizing: border-box; width: 30px; height: 30px; padding: 6px; flex: none;
  border-radius: 50%; background: var(--chip); color: var(--blue);
}
.more-card > svg { width: 40px; height: 40px; padding: 6.5px; } /* the bulb has rays, so it needs most of the circle */
.more-card:hover > svg { background: var(--blue); color: var(--card); }

/* contents rail */
.toc .home { display: inline-block; font-weight: 700; font-size: 14.5px; color: var(--ink); text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.toc .home:hover { background: var(--card); }
.toc h2 { font: 700 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin: 20px 10px 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc ol a {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: baseline; gap: 6px; padding: 8px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.35;
}
.toc ol a .n { font-family: var(--hand); font-weight: 400; font-size: 17px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.toc ol a:hover { background: var(--card); }
.toc ol a[aria-current="page"] { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* go deeper */
.deeper { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.deeper h2 { font-family: var(--display); font-weight: 800; font-size: 26px; margin: 0 0 6px; }
.deeper > p { color: var(--ink-2); margin: 0 0 18px; max-width: 60ch; }
.links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.links a { display: block; min-width: 0; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.links a:hover { border-color: var(--ink); }
.links strong { display: block; font-size: 16px; }
.links span { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; line-height: 1.45; }
.source { font-size: 13px; color: var(--ink-2); margin-top: 22px; }

/* Share on its own (full reviews); its menu opens under it to the right */
.share-solo { width: fit-content; margin-top: 16px; }
.share-solo .share-menu { right: auto; left: 0; }

/* suggest page */
.suggest-form { max-width: 560px; margin-top: 24px; }
.suggest-form label { display: block; margin: 18px 0 6px; font-weight: 700; font-size: 15px; }
.suggest-form .opt { font-weight: 400; color: var(--ink-2); }
.suggest-form input, .suggest-form textarea, .email-form input { display: block; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 16px/1.4 var(--body); }
.suggest-form textarea { resize: vertical; }
.suggest-form input:focus, .suggest-form textarea:focus, .email-form input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.suggest-form .botcheck { display: none; }
.suggest-form .btn.primary { margin-top: 22px; }
.field-note { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
/* example questions under the topic field: word chips, like the labels in the drawings */
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.examples .field-note { flex-basis: 100%; }
.examples button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: 400 13.5px/1.3 var(--body); color: var(--ink); text-align: left; cursor: pointer; }
.examples button:hover { border-color: var(--ink); }
.form-status { margin: 10px 0 0; font-weight: 600; color: var(--coral); }
.form-status:empty { display: none; }
/* "it worked", after signing up or sending a suggestion: the mint of the drawings (dark text in both themes) and a tick */
.suggest-thanks, .form-thanks { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; max-width: 560px; margin-top: 24px; padding: 16px 20px; border-radius: 14px; background: var(--f-mint); color: var(--on); }
.suggest-thanks > svg, .form-thanks > svg { margin-top: 1px; }
.suggest-thanks p { margin: 0 0 14px; font-weight: 700; }
.suggest-thanks .thanks-next { margin-top: -8px; font-weight: 400; } .suggest-thanks a { color: inherit; font-weight: 700; }
.form-thanks { margin: 0 0 16px; } .form-thanks p { margin: 0; font-weight: 700; line-height: 1.5; }
.write-own { display: flex; align-items: flex-start; gap: 10px; max-width: 560px; margin: 36px 0 0; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 15px; color: var(--ink-2); }
.write-own svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--ink); } /* GitHub's mark, as in the footer */
.write-own strong { color: var(--ink); }
.write-own a { color: var(--ink); font-weight: 700; white-space: nowrap; }
.suggest-thanks[hidden], .suggest-form[hidden], .form-thanks[hidden], .email-form[hidden] { display: none; }

/* follow page */
.follow-way { margin-top: 28px; max-width: 640px; }
.follow-way h2 { display: flex; align-items: center; gap: 10px; font: 800 24px/1.2 var(--display); margin: 0 0 8px; }
.follow-way h2 svg { width: 24px; height: 24px; flex: none; }
.follow-way > p { color: var(--ink-2); margin: 0 0 16px; }
/* email sign-up: the address and the button on one line, the button under it on narrow phones */
.email-form { margin-bottom: 16px; }
.email-row { display: flex; flex-wrap: wrap; gap: 10px; }
.email-row input { flex: 1 1 220px; min-width: 0; width: auto; }
/* RSS, for the few who use it: one quiet line under the sign-up, with the feed's address to copy */
.rss-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; max-width: 680px; margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.rss-line svg { flex: none; width: 18px; height: 18px; }
.rss-line code { min-width: 0; overflow-wrap: anywhere; padding: 4px 8px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font: 13.5px/1.4 ui-monospace, Menlo, Consolas, monospace; }
.rss-line .btn { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-width: 1px; }
/* both labels in one grid cell, so the button is as wide as the longer one and doesn't jump when it says "Copied" */
.copy-btn { display: inline-grid; justify-items: center; }
.copy-btn > span { grid-area: 1 / 1; }
.copy-btn .done, .copy-btn.copied > span:first-child { visibility: hidden; }
.copy-btn.copied .done { visibility: visible; }

/* language picker (site root) */
.picker { min-height: 70vh; display: grid; place-content: center; gap: 14px; text-align: center; }
.picker h1 { font-family: var(--display); font-weight: 800; font-size: 32px; margin: 0; }
.picker .lang { justify-self: center; }
/* not-found page: the picker layout, with the logo and a line in each language */
.not-found .brand { justify-self: center; margin-bottom: 8px; }
.not-found h1 { text-wrap: balance; }
.not-found p { margin: 0; color: var(--ink-2); }
.not-found p[lang="en"] { font-size: 14.5px; }

/* drawings are pencil sketches: a drawing's shapes are a picture rendered at build time by src/sketch.js, one per
   theme, on warm paper (dark: like chalk on a blackboard), with its labels on top as real text. In a card stack the
   picture is the background, so only the current theme's one loads; elsewhere it's a pair of lazy images, and the
   hidden one never loads. */
:root { --sketch-ink: #2c3038; }
:root[data-theme="dark"] { --sketch-ink: #e4e2dc; }
.sk { position: relative; display: block; width: 100%; background: var(--sk-light) center / contain no-repeat; border-radius: inherit;
  --ink: var(--sketch-ink); }
:root[data-theme="dark"] .sk { background-image: var(--sk-dark); }
.sk > svg, .sk > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk > .sk-dark, :root[data-theme="dark"] .sk > .sk-light { display: none; }
:root[data-theme="dark"] .sk > .sk-dark { display: block; }
.tile-art > .sk { width: auto; height: 100%; max-width: 100%; }
.tile-art .sk > img { width: 100%; height: 100%; box-shadow: none; border-radius: 0; }

/* labels in drawings */
.lbl { font-family: var(--hand); font-size: 15px; fill: var(--ink); }
.lbl.on { fill: var(--on); } .lbl.mut { fill: var(--ink-2); } .lbl.cor { fill: var(--coral); } .lbl.blu { fill: var(--blue); }
.lbl.b { font-weight: 700; }
.lbl.halo { paint-order: stroke; stroke: var(--art); stroke-width: 5px; stroke-linejoin: round; }


@media (prefers-reduced-motion: reduce) {
  .dot::before, .tile { transition: none; }
  .tile:hover, .more-band .more-card:hover { transform: none; }
}
