
/* EXPERIMENT: sepia "reading app" light theme. To revert, swap this line for
   the original and restore the three hardcoded greys marked SEPIA below.
   original: --fg:#111; --muted:#666; --line:#e3e3e3; --head:#f6f6f6; --accent:#0b57d0; --bg:#fff; */
:root { --fg:#3b2f23; --muted:#6b5a45; --line:#e0d0b9; --head:#eedfcb; --accent:#8a4513;
        /* --bg is the reading area: iOS Safari Reader's sepia paper. --bar is the
           slightly deeper tone kept for the sticky header and title bar. */
        --bg:#fbf6ea; --bar:#f4ecd8;   /* --bg was #f8f1e3, Reader's paper; nudged lighter 14 Nov */
        /* the page-title bar: Fatehpur-Sikri-style red sandstone (sampled from a jaali
           carving photo) with dark lettering */
        --tbar:#c8977a; --tbar2:#c8977a; --tbaredge:#e2bfa3; --tbarfg:#401d00; --tbaracc:#a01d09; }
* { box-sizing: border-box; }
body { margin:0; font:16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
       color:var(--fg); background:var(--bg); }
header { position:sticky; top:0; background:var(--bar); border-bottom:1px solid var(--line);
         padding:12px 20px; z-index:30; display:flex; align-items:center; gap:14px; }
header h1 { margin:0; font-size:18px; }
header .meta { color:var(--muted); font-size:13px; }
header .spacer { flex:1; }

/* Contents as a dropdown pinned in the header: one control, no separate page
   region, and it collapses out of the way on a phone. <details> gives the
   open/close behaviour with no script. */
details.toc { position:relative; }
details.toc summary { cursor:pointer; list-style:none; white-space:nowrap;
  border:1px solid var(--line); border-radius:6px; padding:6px 12px; font-size:14px;
  background:var(--head); user-select:none; }
details.toc summary::-webkit-details-marker { display:none; }
/* A border triangle rather than a unicode arrow: be renders as tofu in
   fonts that lack it, which is most of them on some phones. */
details.toc summary::after { content:""; display:inline-block; margin-left:8px;
  border:5px solid transparent; border-top-color:var(--muted); vertical-align:2px; }
details.toc[open] summary::after { border-top-color:transparent;
  border-bottom-color:var(--muted); vertical-align:-3px; }
details.toc ol { position:absolute; right:0; top:calc(100% + 8px); margin:0;
  padding:8px 10px 8px 30px; width:min(94vw,460px); max-height:72vh; overflow:auto;
  background:var(--bg); border:1px solid var(--line); border-radius:8px;
  box-shadow:0 8px 28px rgba(0,0,0,.14); font-size:14.5px; }
details.toc ol { list-style:none; padding:10px 12px; }
details.toc li.pg { margin:12px 0 4px; font-size:12.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
details.toc li.pg:first-child { margin-top:0; }
details.toc li.t { margin:3px 0 3px 10px; }
details.toc li.t .n { color:var(--muted); font-size:12.5px; }
details.toc a { color:var(--accent); text-decoration:none; }

main { padding:0 20px 80px; max-width:1400px; }
section.tbl { margin:36px 0; scroll-margin-top:76px; }
section.tbl h2 { font-size:18px; margin:0 0 3px; }
section.tbl .sub { color:var(--muted); font-size:13px; margin-bottom:8px; }
section.tbl .sub a { color:var(--accent); text-decoration:none; }
section.tbl p.cap { margin:0 0 10px; max-width:68ch; font-size:16px; line-height:1.6; }
section.tbl ul.capdates { margin:0 0 10px; padding-left:1.2em; max-width:68ch; font-size:15px; line-height:1.5; }
section.tbl ul.capdates li { margin:2px 0; }
section.tbl p.cap:last-of-type { margin-bottom:14px; }
.scrollbox { position:relative; }
.scroll { overflow-x:auto; border:1px solid var(--line); border-radius:6px; }
/* "there is more this way" affordance. Triangles are drawn with borders rather
   than glyphs -- same reason as the dropdown caret. Hidden when the table fits
   or when already at that end, so they only appear when they mean something. */
.sa { position:absolute; top:50%; transform:translateY(-50%); z-index:6;
  width:32px; height:32px; border-radius:50%; border:1px solid var(--line);
  background:var(--bg); cursor:pointer; padding:0; display:flex;
  align-items:center; justify-content:center; opacity:.94;
  box-shadow:0 1px 6px rgba(0,0,0,.16); transition:opacity .12s; }
.sa:hover { opacity:1; }
.sa[hidden] { display:none; }
.sa.l { left:8px; }
.sa.r { right:8px; }
.sa::before { content:""; display:block; border:7px solid transparent; }
.sa.l::before { border-right-color:var(--fg); margin-right:5px; }
.sa.r::before { border-left-color:var(--fg); margin-left:5px; }

/* min-width, not width, so a 2-column table fills the row and a 9-column one is
   free to exceed it and scroll. break-word rather than anywhere: `anywhere`
   collapses a cell's intrinsic minimum to one character, which is what makes
   columns shrink to a single letter instead of the table scrolling. */
table { border-collapse:collapse; font-size:15px; min-width:100%; }
th, td { border-bottom:1px solid var(--line); padding:7px 11px; text-align:left;
         vertical-align:top; min-width:7ch; max-width:38ch; overflow-wrap:break-word; }
thead th { background:var(--head); position:sticky; top:0; font-weight:600; }
tbody tr:hover { background:#f4eadb; }   /* SEPIA; was #fafafa */
/* Links inside tables read as text, not as a field of blue: body colour with a
   faint underline, identical in every state so a table full of links does not
   flicker as the pointer crosses it. Each gets the small up-right arrow that
   marked an off-site link on blogs circa 2010 -- drawn as a masked SVG rather
   than a glyph, so it follows the text colour and never renders as tofu. */
td a, th a, td a:link, td a:visited, td a:hover, td a:active, td a:focus,
th a:link, th a:visited, th a:hover, th a:active, th a:focus {
  color:inherit; text-decoration:underline;
  text-decoration-color:color-mix(in srgb, currentColor 30%, transparent);
  text-decoration-thickness:1px; text-underline-offset:.18em; }
td a:focus-visible, th a:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:2px; }
/* Every external text link gets the arrow -- drawn, not typed, so copying the text never picks it up.
   Not on image credits, preview-card buttons or the Today article list (it has its own newspaper icon). */
main a[target="_blank"]:not(.og-open):not(figure a):not(ul.arts a)::after {
  content:""; display:inline-block; width:.62em; height:.62em; margin-left:.18em;
  vertical-align:.12em; background:currentColor; opacity:.45;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2h6v6M10 2 3 9' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/contain;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2h6v6M10 2 3 9' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center/contain; }

@media (max-width:600px) {
  header { padding:10px 12px; gap:10px; }
  header .meta { display:none; }
  main { padding:0 12px 60px; }
  th, td { min-width:6ch; max-width:24ch; padding:6px 9px; }
  section.tbl h2 { font-size:17px; }
}
/* DARK (class-based: the picker can choose it whatever the device prefers) */
html.t-dark { --fg:#e8e8e8; --muted:#9a9a9a; --line:#333; --head:#1b1b1b; --accent:#8ab4f8; --bg:#121212; --bar:#121212;
          --tbar:#1b1b1b; --tbar2:#1b1b1b; --tbaredge:#454545; --tbarfg:#e8e8e8; --tbaracc:#8ab4f8; }
html.t-dark tbody tr:hover { background:#1a1a1a; }

body { font-size:17.5px; line-height:1.6; }
table { font-size:17.5px; }   /* body size: table text reads like the caption above it, not smaller */
section.tbl p.cap { font-size:17px; }
section.tbl h2 { font-size:20px; }
section.tbl .sub { font-size:14px; }
main { max-width:1200px; margin:0 auto; }

/* Index */
ul.pages { list-style:none; margin:24px 0 0; padding:0; }
ul.pages li { border-bottom:1px solid var(--line); }
ul.pages a { display:flex; align-items:baseline; gap:10px; padding:13px 4px;
  color:var(--fg); text-decoration:none; }
ul.pages a:hover { background:var(--head); }
ul.pages .t { font-size:17px; flex:1; }
ul.pages .c { color:var(--muted); font-size:14px; white-space:nowrap; }
.logo { display:inline-flex; align-items:center; gap:6px; font-size:16px;
  font-weight:650; color:var(--fg); text-decoration:none; letter-spacing:-.01em;
  padding:6px 10px 6px 4px; margin:-6px 0 -6px -4px; border-radius:7px; }
a.logo:hover { background:var(--head); }
a.logo:active { transform:translateY(1px); }
.logo svg.mark { width:19px; height:22px; position:relative; top:2px; flex:none; fill:none; stroke:var(--accent);
  stroke-width:2.4; stroke-linecap:round; }
h1.pagetitle { font-size:25px; margin:26px 0 2px; line-height:1.25; }
.kind { display:inline-block; font-size:12px; text-transform:uppercase;
  letter-spacing:.05em; color:var(--muted); border:1px solid var(--line);
  border-radius:4px; padding:1px 6px; vertical-align:2px; margin-left:8px; }
.src { color:var(--muted); font-size:14px; margin:4px 0 0; }
form.rnd { display:flex; gap:6px; margin-left:14px; }
form.rnd input[type=search], form.rnd button { font:inherit; font-size:14.5px; color:var(--fg);
  border:1px solid var(--line); border-radius:7px; padding:6px 10px;
  background:var(--head); }
form.rnd input[type=search] { background:var(--bg); width:210px; min-width:0; -webkit-appearance:none; appearance:none; }
form.rnd input[type=search]::placeholder { color:var(--muted); opacity:.85; }
form.rnd input[type=search]:focus { outline:0; border-color:var(--accent); }
form.rnd button { cursor:pointer; padding:6px 14px; white-space:nowrap; }
form.rnd button:hover { border-color:var(--accent); color:var(--accent); }
form.rnd button:active { transform:translateY(1px); }
/* Search results: two short lists under small headings. */
.searchres h2 { font-size:19px; margin:26px 0 6px; }
@media (max-width:600px) {
  header .spacer { display:none; }
  form.rnd { flex:1 1 0; min-width:0; margin-left:2px; gap:5px; }
  form.rnd input[type=search] { flex:1 1 0; width:0; padding:6px 8px; }   /* width:0 so its intrinsic 200px does not set the form's minimum */
  form.rnd button { padding:6px 9px; }
  .subnav .wide { display:none; }   /* "Read" on phones */
  h1.pagetitle { font-size:21px; margin:20px 0 2px; }
}

/* Related artifacts: nearest captions elsewhere in the corpus. Quiet by
   default -- it is a sidelight, not the content -- but not shrunk, since the
   point of this site is that the type is big enough to read. */
section.tbl p.rel { margin:10px 0 0; max-width:68ch; font-size:15px; line-height:1.6; color:var(--muted); }
section.tbl p.rel a { color:var(--accent); text-decoration:none; }
section.tbl p.rel a:hover { text-decoration:underline; }

/* A scrollbar above a wide table. Drawn, not native: there is no CSS to move
   a real scrollbar to the top edge, and the dummy-scroller trick that can only
   shows a bar on platforms with classic scrollbars -- iOS Safari, macOS and
   most Linux paint overlay scrollbars, where it is an invisible gap. Drawn
   geometry behaves the same on all of them. */
.scrolltop { position:relative; height:10px; margin-bottom:4px; border-radius:5px;
  background:var(--head); border:1px solid var(--line); cursor:pointer;
  touch-action:none; }
.scrolltop[hidden] { display:none; }
.scrolltop .thumb { position:absolute; top:0; bottom:0; left:0; min-width:28px;
  border-radius:5px; background:var(--muted); opacity:.5; transition:opacity .12s; }
.scrolltop:hover .thumb { opacity:.75; }
.scrolltop .thumb.on { opacity:.95; }

/* Inner shadow on an overflowing edge: the cut-off column should look cut off.
   On the wrapper rather than on .scroll itself, because a pseudo-element of a
   scroll container is positioned against its padding box and would slide away
   with the content instead of staying pinned to the edge. Driven by the same
   test as the arrows, so a shadow never appears on an edge with nothing past
   it, and pointer-events:none so it never eats a click on a link beneath. */
.scrollinner { position:relative; }
.scrollinner::before, .scrollinner::after { content:""; position:absolute;
  top:1px; bottom:1px; width:26px; pointer-events:none; z-index:4;
  opacity:0; transition:opacity .15s; }
.scrollinner::before { left:1px; border-radius:6px 0 0 6px;
  background:linear-gradient(to right, rgba(0,0,0,.16), rgba(0,0,0,0)); }
.scrollinner::after { right:1px; border-radius:0 6px 6px 0;
  background:linear-gradient(to left, rgba(0,0,0,.16), rgba(0,0,0,0)); }
.scrollbox.sl .scrollinner::before { opacity:1; }
.scrollbox.sr .scrollinner::after { opacity:1; }

/* The same two shadows, driven by the browser instead of by a scroll listener.
   The pseudo-elements live on .scrollinner, which is the scroller's PARENT, so
   `scroll(nearest)` cannot reach it -- an element only finds an ancestor
   scroller that way. Hence a named timeline: .scroll publishes --tbl,
   .scrollbox widens its visibility with timeline-scope, and the pseudo-elements
   subscribe. The JS .sl/.sr classes above stay for browsers without this; an
   animation's value wins over a plain declaration, so where this applies the
   classes are simply overridden rather than fighting it. */
@supports (animation-timeline: scroll()) and (timeline-scope: --tbl) {
  .scrollbox { timeline-scope: --tbl; }
  .scroll { scroll-timeline: --tbl inline; }
  .scrollinner::before { animation: shadow-in linear both; animation-timeline: --tbl; }
  .scrollinner::after  { animation: shadow-out linear both; animation-timeline: --tbl; }
}
/* Short ramps so the shadow is at full strength a few pixels in, rather than
   fading across the whole table. */
@keyframes shadow-in  { 0% { opacity:0 }  5% { opacity:1 } 100% { opacity:1 } }
@keyframes shadow-out { 0% { opacity:1 } 95% { opacity:1 } 100% { opacity:0 } }

/* A seam in the similarity walk: the list changed subject here. Height is
   proportional to the size of the jump, so the page gets a rhythm rather than
   a uniform rule. Empty and aria-hidden -- it is pacing, not content. */
ul.pages li.seam { list-style:none; border:0; background:none; pointer-events:none; height:24px; }  /* one fixed gap: the proportional heights read as random space */

/* Alternating tint per RUN, flipped at each seam -- so a band is one stretch of
   related pages rather than one row. Even/odd striping of individual rows would
   fight the seams for attention and say nothing; this makes the grouping the
   thing you see. Very light, because the list is the content and the banding is
   only structure. */
ul.pages li.band { background:color-mix(in srgb, var(--accent) 5%, transparent); }
ul.pages li.band a:hover { background:color-mix(in srgb, var(--accent) 11%, transparent); }
@supports not (color: color-mix(in srgb, red 5%, transparent)) {
  ul.pages li.band { background:#f2f6fd; }
}

/* Heading over a run: the name of the cluster most of it belongs to. Absent
   when the walk is between clusters, which is the honest answer there. */
ul.pages li.runhead { list-style:none; border:0; padding:4px 4px 8px;
  font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted); }
header .meta .filtered { color:var(--accent); }

/* Per-artifact provenance. A reader can land on one table via a related link
   or an #anchor and never see the page header, so each carries its own. */
/* Same type as the caption, because it IS the caption's last line -- the
   caption stops at 50 words by design, and this is where it points next.
   Smaller type made it read as a footnote about the page rather than part of
   what is being said. */
section.tbl p.more { margin:0 0 14px; max-width:68ch; font-size:16px; line-height:1.6; }
section.tbl p.more a, .vlinks p.vlink a { color:var(--accent); }
section.tbl p.src.under { margin:10px 0 0; font-size:13px; color:var(--muted); overflow-wrap:anywhere; }
section.tbl p.src.under a { color:var(--accent); text-decoration:none; }
section.tbl p.src.under a:hover { text-decoration:underline; }

/* Heading icons: stroke-only and inheriting the heading's colour, so they read
   as part of the label rather than as decoration competing with it. */
ul.pages li.runhead { display:flex; align-items:center; gap:8px; }
ul.pages li.runhead svg.hi { width:16px; height:16px; flex:none; fill:none;
  stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* Archive: month headings and plain lists of titles, like an old blog. */
header a.navlink { margin-right:10px; font-size:14px; color:var(--accent); text-decoration:none; }
header a.navlink:hover { text-decoration:underline; }
h2.month { margin:34px 0 8px; font-size:20px; }
ul.arch { list-style:none; margin:0; padding:0; }
ul.arch li { padding:5px 0; font-size:17px; line-height:1.45; }
ul.arch a { color:var(--accent); text-decoration:none; }
ul.arch a:hover { text-decoration:underline; }
ul.arch .d { color:var(--muted); font-size:13px; margin-left:8px; white-space:nowrap; }
h3.week { margin:18px 0 4px; font-size:16px; font-weight:600; }
h3.week a { color:var(--fg); text-decoration:none; }
h3.week a:hover { text-decoration:underline; }
p.more-week { margin:2px 0 0; font-size:14px; }
p.more-week a, p.crumb a, p.trend-export a { color:var(--accent); text-decoration:none; }
p.crumb { margin:20px 0 0; font-size:14px; }


/* Page-level trend blurb, under the title: why this page is in the news. */
p.blurb { margin:6px 0 4px; max-width:68ch; font-size:17px; line-height:1.6;
  font-style:italic; }

/* Inside the italic blurb a title in *asterisks* reverts to roman, the usual
   way to mark emphasis within italic text. */
p.blurb em { font-style:normal; }

/* Trend snippet after a page name on the home list. */
ul.pages em.trend { color:var(--muted); }
ul.pages em.trend.nl { display:block; margin-top:3px; font-size:15px; line-height:1.45; }

/* Lead-image avatars on the home list: a square crop of the page's free lead
   image, linking to its file page for attribution. */
ul.pages li.row { display:flex; align-items:center; gap:12px; }
ul.pages li.row > a.go { flex:1; min-width:0; }
ul.pages .av { flex:none; width:36px; height:36px; border-radius:6px; overflow:hidden;
  background:var(--head); margin-left:4px; }
ul.pages a.av img { width:100%; height:100%; object-fit:cover; display:block; }
ul.pages a.av { display:block; padding:0; }   /* not the row-link padding */

/* Avatars align with the first line of the row (the page name), not the
   middle of a row that may run to four lines with its trend snippet. */
ul.pages li.row { align-items:flex-start; }
ul.pages .av { margin-top:17px; }   /* measured: aligns with the top of the page-name text */
ul.pages .av.noimg { display:flex; align-items:center; justify-content:center; color:var(--muted); }
ul.pages .av.noimg.avg { box-shadow:inset 0 0 0 1px rgba(0,0,0,.08); }
ul.pages .av.noimg svg.hi { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round; }
/* Rows with no trend snippet are one line: centre the avatar on that line
   rather than top-aligning it and letting it hang below. */
ul.pages li.row:not(:has(.trend)) { align-items:center; }
ul.pages li.row:not(:has(.trend)) .av { margin-top:0; }

/* Article page: lead image to the left of the trend blurb, uncropped, with a
   credit line under it. */
/* Context about <page> (test): a script-only button above the first table; the panel slides open
   (grid rows 0fr -> 1fr) with the article's lead and section list, fetched from Wikipedia. */
.ctxw { margin:10px 0 6px; max-width:68ch; }
.ctxbtn { font:inherit; font-size:14px; color:var(--accent); background:none; border:0; padding:4px 0; cursor:pointer;
          display:inline-flex; align-items:center; gap:5px; text-align:left; }
.ctxbtn:hover { text-decoration:underline; }
.ctxbtn svg { flex:none; transition:transform .2s; }
.ctxw.open .ctxbtn svg { transform:rotate(180deg); }
.ctxslide { display:grid; grid-template-rows:0fr; transition:grid-template-rows .25s ease; }
.ctxw.open .ctxslide { grid-template-rows:1fr; }
.ctxin { overflow:hidden; }
.ctxbody { margin-top:6px; padding:12px 16px; border:1px solid var(--line); border-radius:8px; background:var(--head);
           font-size:15px; line-height:1.6; }
.ctxbody p { margin:0 0 10px; }
.ctxh { font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin:4px 0 6px; }
.ctxh:not(:first-child) { margin-top:14px; }
.ctxtop { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 6px; }
.ctxtop .ctxh { margin:0; }
.ctxcopy { font:inherit; font-size:13px; padding:4px 10px; border:1px solid var(--line); border-radius:6px; background:var(--bg);
           color:var(--fg, inherit); cursor:pointer; white-space:nowrap; }
.ctxcopy:hover { border-color:var(--accent); }
.ctxsec { margin:0 0 10px; padding:0; list-style:none; font-size:14px; }
.ctxsec li { padding:1px 0; } .ctxsec li.l2 { padding-left:1.4em; } .ctxsec li.l3, .ctxsec li.l4 { padding-left:2.8em; }
.ctxsec .n { display:inline-block; min-width:2.2em; color:var(--muted); font-variant-numeric:tabular-nums; }
.ctxsec a { color:inherit; }
.ctxnote { color:var(--muted); font-size:13px; }
.ctxnote a { color:inherit; }
@media (prefers-reduced-motion: reduce) { .ctxslide, .ctxbtn svg { transition:none; } }
.blurbrow { display:flex; align-items:flex-start; gap:16px; margin:6px 0 4px; max-width:80ch; }
.blurbrow p.blurb { margin:0; }
.blurbrow .blurbcol { min-width:0; }
.blurbcol .pintro { margin:8px 0 0; }
/* Phones: the image floats, so a long intro wraps under it instead of running down a narrow column. */
@media (max-width:600px) {
  .blurbrow { display:block; }
  .blurbrow::after { content:""; display:table; clear:both; }
  div.blurbrow figure.pfig { float:left; margin:5px 16px 8px 0; }
}
.blurbrow figure.pfig { flex:none; width:112px; margin:5px 0 0; }
.blurbrow figure.pfig img { width:112px; height:auto; max-height:180px; object-fit:contain;
  display:block; border-radius:6px; }
.blurbrow figcaption { margin-top:4px; font-size:11px; line-height:1.35; color:var(--muted); }
.blurbrow figcaption a { color:inherit; text-decoration:none; }
.blurbrow figcaption a:hover { text-decoration:underline; }
ul.pages span.av img { width:100%; height:100%; object-fit:cover; display:block; }

/* Home sections: past day, then past week. Bigger than run headings. */
ul.pages li.sectionhead { list-style:none; border:0; margin:28px 0 6px; padding:0 4px;
  font-size:22px; font-weight:700; }
ul.pages li.sectionhead:first-child { margin-top:8px; }

/* Image-less avatar: the ⋕ mark in grey. */
ul.pages .av.noimg svg.gm { width:20px; height:20px; fill:none; stroke:currentColor;
  stroke-width:2; stroke-linecap:round; }

/* Footer: the archive and home links, moved out of the crowded header. */
footer.site { max-width:800px; margin:48px auto 0; padding:18px 20px 40px;
  border-top:1px solid var(--line); font-size:15px; color:var(--muted); }
footer.site a { color:var(--accent); text-decoration:none; }
footer.site a:hover { text-decoration:underline; }
footer.site .popular { margin:0 0 12px; color:var(--muted); }
footer.site span { margin:0 6px; }

/* Bookmark icon: outline when off, filled accent when on. */
button.fav { margin-left:8px; padding:2px; border:0; background:none; cursor:pointer;
  vertical-align:-3px; line-height:0; color:var(--muted); }
button.fav svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linejoin:round; }
button.fav:hover { color:var(--accent); }
button.fav.on { color:var(--accent); }
button.fav.on svg { fill:currentColor; }
ul.favs li.gone > a, ul.favs li.gone .d { opacity:.4; text-decoration:line-through; }
p.note { max-width:62ch; font-size:16px; line-height:1.6; color:var(--muted); }
.prose { max-width:68ch; font-size:16px; line-height:1.65; }
.prose p { margin:0 0 14px; }
.prose code { font-size:14px; background:var(--head); padding:1px 5px; border-radius:4px; }
.prose a { color:var(--accent); }
ul.recs .d, ul.favs .d { white-space:normal; }   /* long "via" labels wrap on phones */

/* "For you" on the home page: same weight as the Past day / Past week labels. */
h2.homesec { margin:8px 0 6px; padding:0 4px; font-size:22px; font-weight:700; }

/* Recommendation icons: the page's run icon, or the grid mark. */
ul.recs li a { display:inline-flex; align-items:baseline; gap:8px; }
ul.recs .ri { flex:none; align-self:center; display:inline-flex; color:var(--muted); }
ul.recs .ri svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8;
  stroke-linecap:round; stroke-linejoin:round; }
ul.recs .rs { display:block; max-width:70ch; margin:2px 0 3px 26px; color:var(--muted);
  font-size:14px; line-height:1.45; }

/* Citation superscripts in table cells: small, muted, no off-site arrow. */
sup.cite { font-size:.68em; line-height:0; margin-left:1px; }
td sup.cite a, th sup.cite a { color:var(--muted); text-decoration:none; }
td sup.cite a:hover, th sup.cite a:hover { color:var(--accent); text-decoration:underline; }
td sup.cite a::after, th sup.cite a::after { display:none; }

/* Bookmarks: import-from-link confirmation and the share link */
.import { border: 1px solid var(--line); border-radius: 8px; padding: 4px 16px 8px; margin: 0 0 24px; }
.import .btns { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
button.imp, button.copy { font: inherit; padding: 6px 14px; border-radius: 6px; border: 1px solid currentColor; background: none; color: inherit; cursor: pointer; }
button.imp:not(.alt) { background: var(--fg); color: var(--bg); border-color: transparent; }
p.share { font-size: 14px; opacity: .85; }
p.share button.copy { padding: 2px 10px; margin-left: 6px; }

/* Page view: sticky title bar with the table jump menu (built by JS) */
.pagehead { position:sticky; top:var(--hh, 50px); z-index:20;
  display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:9px 0; margin:0 0 16px;
  color:var(--tbarfg); }
/* The bar's colour and rule run the full width of the window, like the site
   header's, although the title itself stays in the content column. */
.pagehead::before { content:""; position:absolute; z-index:-1; top:0; bottom:0;
  left:calc(50% - 50vw); width:100vw; background:var(--tbar);
  border-bottom:1px solid var(--tbaredge); box-shadow:inset 0 1px 0 rgba(255,255,255,.30); }
html { overflow-x:clip; }   /* 100vw includes the scrollbar; never let that scroll sideways */
.pagehead div.pagetitle { font-weight:700; line-height:1.25; }
.pagehead .pagetitle { margin:0; display:flex; align-items:flex-start; gap:9px; min-width:0; }
.pagehead .tt { min-width:0; }
.pagehead .nw { white-space:nowrap; }
/* Flex centring puts the icons on the middle of the line box, which sits
   about 0.06em below the middle of the capitals (measured: E 102.0px, icons
   103.5px at 25px). The nudge is in em so it scales with the phone size. */
.pagehead a.ico { flex:none; display:flex; height:1.25em; align-items:center; }
.pagehead svg.tablet { transform:translateY(-.03em); }
.pagehead .pagetitle button.fav { margin-left:3px; padding:0 2px; display:inline-block; vertical-align:-.12em; }
.pagehead .pagetitle button.fav svg { display:block; }
.pagehead a.totop { color:inherit; text-decoration:none; }
.jumpbar { position:fixed; left:0; right:0; bottom:0; z-index:25; background:var(--head);
  border-top:1px solid #c7ae8f; display:flex; justify-content:space-between; align-items:center; gap:14px;   /* SEPIA; was #c4c4c4 */
  box-shadow:0 -4px 12px rgba(70,45,10,.12);   /* SEPIA; was rgba(0,0,0,.08) */
  /* extra room under the menu so iOS Safari's bottom address bar and the
     home indicator never sit on top of it */
  padding:8px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.jumpbar select.jump { font:inherit; font-size:14px; color:var(--fg); cursor:pointer;
  border:1px solid var(--line); border-radius:6px; padding:5px 12px 5px 26px;
  flex:0 1 60ch; min-width:0; text-overflow:ellipsis; -webkit-appearance:none; appearance:none;
  /* up triangle on the left: the menu opens toward the content above */
  background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 6h10L5 0z' fill='%23888'/%3E%3C/svg%3E") no-repeat 10px 50%; }
.jumpbar select.jump:hover, .jumpbar select.jump:focus { border-color:var(--accent); outline:none; }
body.hasjump { padding-bottom:calc(64px + env(safe-area-inset-bottom, 0px)); }
section.tbl { scroll-margin-top:var(--stick, 120px); }
p.blurb.plain { color:var(--muted); }
.pintro { max-width:68ch; margin:10px 0 6px; }
.pintro p { margin:0 0 8px; font-size:15.5px; line-height:1.6; color:var(--fg); }
@media (max-width:600px) { .jumpbar select.jump { font-size:13px; } }

/* Clay-tablet glyph before the page title: ruled lines with wedge marks */
.pagehead svg.tablet { width:22px; height:22px; flex:none; display:block; }
.pagehead svg.tablet .slab { fill:none; stroke:var(--accent); stroke-width:1.6; stroke-linejoin:round; }
.pagehead svg.tablet .rule { fill:none; stroke:var(--accent); stroke-width:1; opacity:.45; stroke-linecap:round; }
.pagehead svg.tablet .wedge { fill:var(--accent); stroke:none; }

/* Darker rule above the bottom bar in dark mode too */
html.t-dark .jumpbar { border-top-color:#4a4a4a; box-shadow:0 -4px 14px rgba(0,0,0,.5); }
/* The blurb (or table count) leads straight into the first table: the usual
   36px section gap reads as a break between unrelated things here. */
p.blurb + section.tbl, .blurbrow + section.tbl { margin-top:16px; }

/* Phones in landscape: three stacked bars would take nearly half the screen.
   The site header stays sticky (it is the way home); the title bar scrolls
   away with the page and the jump menu drops to the end of the page. */
@media (orientation:landscape) and (max-height:500px) {
  .pagehead { position:relative; top:auto; }
  .jumpbar { position:static; box-shadow:none; }
  body.hasjump { padding-bottom:0; }
  section.tbl { scroll-margin-top:calc(var(--hh, 50px) + 8px); }
}

/* Icons on the title bar: lettering colour, deep rust when bookmarked */
.pagehead svg.tablet .slab, .pagehead svg.tablet .rule { stroke:var(--tbarfg); }
.pagehead svg.tablet .rule { opacity:.55; }
.pagehead svg.tablet .wedge { fill:var(--tbarfg); }
.pagehead .pagetitle button.fav { color:var(--tbarfg); opacity:.8; }
.pagehead .pagetitle button.fav:hover { color:var(--tbaracc); opacity:1; }
.pagehead .pagetitle button.fav.on { color:var(--tbaracc); opacity:1; }

/* EXPERIMENT: table titles in a book serif (New York on Apple devices, then
   Iowan / Palatino / Georgia). Delete this rule to go back to the sans. */
section.tbl h2 { font-family:ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size:20px; font-weight:600; letter-spacing:0; line-height:1.3; }
@media (max-width:600px) { section.tbl h2 { font-size:19px; } }

/* LIGHT: the classic white / grey / blue theme (html.t-light). Every
   sepia-specific choice above is undone here. */
  html.t-light { --fg:#111; --muted:#666; --line:#e3e3e3; --head:#f6f6f6; --accent:#0b57d0; --bg:#fff; --bar:#fff;
                  --tbar:#fbfcfe; --tbar2:#fbfcfe; --tbaredge:#d3d9e2; --tbarfg:#111; --tbaracc:#0b57d0; }
  html.t-light tbody tr:hover { background:#fafafa; }
  html.t-light .jumpbar { border-top-color:#c4c4c4; box-shadow:0 -4px 12px rgba(0,0,0,.08); }
  html.t-light section.tbl h2 { font-family:inherit; font-size:18px; letter-spacing:normal; line-height:inherit; }
  html.t-light .pagehead svg.tablet .slab, html.t-light .pagehead svg.tablet .rule { stroke:var(--accent); }
  html.t-light .pagehead svg.tablet .wedge { fill:var(--accent); }
  html.t-light .pagehead .pagetitle button.fav { color:var(--tbarfg); opacity:.8; }
  html.t-light .pagehead .pagetitle button.fav:hover, html.t-light .pagehead .pagetitle button.fav.on { color:var(--accent); }
@media (max-width:600px) { html.t-light section.tbl h2 { font-size:17px; } }

/* LEATHER (Mocha and Light themes; Dark stays plain). Two tiles layered per bar: a grain
   tile that repeats both ways, and on the site header a flat dash tile that
   repeats along the bottom as stitching. The page-title bar and the bottom
   jump bar take the grain alone. Made from a wallet photo; see the A/B note. */
  html.t-sepia, html.t-light {
    --hbase:#fcf6e8;
    --tgrain: var(--grain); --tblend: soft-light;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='235' elevation='32'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Cfilter id='b' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0125' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23a)'/%3E%3Crect width='240' height='240' filter='url(%23b)' opacity='.3'/%3E%3C/svg%3E");
    /* Header grain: the leather relief as translucent brown, so it shows on a
       light colour (soft-light blending cannot lighten what is already pale). Light overrides it
       with a neutral grey grain and white thread below. */
    --grainh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='235' elevation='32'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .2 0 0 0 0 .1 -.6 0 0 0 .38'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23a)'/%3E%3C/svg%3E");
    --stitch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='8'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M4 5H14' stroke='black' stroke-width='2.2' opacity='.28'/%3E%3Cpath d='M4 4H14' stroke='%23f7ead6' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
  }
  html.t-light { --hbase:#ffffff; --grainh:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='235' elevation='32'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .25 0 0 0 0 .28 -.6 0 0 0 .38'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23a)'/%3E%3C/svg%3E");
    --tgrain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='235' elevation='32'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .33 0 0 0 0 .4 -.45 0 0 0 .27'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23a)'/%3E%3C/svg%3E"); --tblend:normal; }
  /* site header: the original beige, now with a visible embossed grain. No
     stitching here (it moved to the title bar), so its padding is the default. */
  html.t-sepia header, html.t-light header, html.t-sepia .jumpbar, html.t-light .jumpbar { background-color:var(--hbase);
    background-image:linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,0) 50%, rgba(0,0,0,.05)), var(--grainh);
    background-repeat:no-repeat, repeat; background-size:100% 100%, 240px 240px; }
  html.t-sepia header, html.t-light header { border-bottom:0; }
  /* page-title bar: sandstone with grain, and the stitching along its bottom
     edge (the dash sits about 7px above the border; the extra padding clears it) */
  html.t-sepia .pagehead { padding-bottom:15px; }
  html.t-sepia .pagehead::before, html.t-light .pagehead::before { background-color:var(--tbar);
    background-image:var(--tgrain); background-repeat:repeat; background-size:240px 240px;
    background-blend-mode:var(--tblend); }
  /* The stitching sits in the content column (the bar's colour runs the full
     window width, the thread does not): 4px above the bar's bottom edge. `space`
     repeats whole dashes with even gaps, so neither end is cut mid-dash. Mocha only:
     the Light theme has no stitching. */
  html.t-sepia .pagehead::after { content:""; position:absolute; left:0; right:0; bottom:4px; height:8px;
    background:var(--stitch) 0 0 / 18px 8px; background-repeat:space no-repeat; pointer-events:none; }
  html.t-sepia .pagehead .pagetitle, html.t-light .pagehead .pagetitle { text-shadow:0 1px 0 rgba(255,255,255,.35); }
  /* bottom jump bar: shares the site header's background (rule above) */

/* Page title: bold, but smaller than the 25px / 21px the other headings use,
   and the icons beside it scale with it (they are sized in em). */
.pagehead .pagetitle { font-size:21px; }
.pagehead svg.tablet { width:.9em; height:.9em; }
.pagehead .pagetitle button.fav { font-size:inherit; }
.pagehead .pagetitle button.fav svg { width:.9em; height:.9em; }
@media (max-width:600px) { .pagehead .pagetitle { font-size:18px; } }

/* Desktop: the header's contents line up with the content column (main is at
   most 1200px wide with 20px side padding) instead of hugging the window edges. */
@media (min-width:601px) {
  header { padding-left:max(20px, calc((100% - 1200px) / 2 + 20px));
           padding-right:max(20px, calc((100% - 1200px) / 2 + 20px)); }
}

/* THEMES: the reader's choice is a class on <html> (t-sepia, t-light, t-dark),
   set by index.php from the th_theme cookie, or on first paint from the device's
   colour preference when there is no cookie. :root above holds the sepia values. */
html.t-sepia, html.t-light { color-scheme:light; }
html.t-dark { color-scheme:dark; }

/* Bottom bar: jump menu left, theme picker right, both on the content column */
.jumpbar { padding-left:max(20px, calc((100% - 1200px) / 2 + 20px)); padding-right:max(20px, calc((100% - 1200px) / 2 + 20px)); }
@media (max-width:600px) { .jumpbar { padding-left:12px; padding-right:12px; } }
.themes { position:relative; flex:none; margin-left:auto; }
/* the trigger matches the jump menu beside it, with the same up-pointing triangle */
.themes .tbtn { position:relative; font:inherit; font-size:14px; color:var(--fg); cursor:pointer; background:var(--bg);
  border:1px solid var(--line); border-radius:6px; padding:5px 12px 5px 26px; }
.themes .tbtn::before { content:""; position:absolute; left:10px; top:50%; margin-top:-3px; border:5px solid transparent; border-top:0; border-bottom-color:#888; }
.themes .tbtn:hover, .themes .tbtn:focus-visible, .themes .tbtn[aria-expanded="true"] { border-color:var(--accent); outline:none; }
.tmenu { position:absolute; right:0; bottom:calc(100% + 10px); min-width:200px; padding:6px; background:var(--bg);
  border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.22); z-index:3; }
.tmenu[hidden] { display:none; }
.tlabel { padding:4px 10px 6px; font-size:12px; color:var(--muted); }
.tmenu .opt { display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; border:0; border-radius:6px;
  background:none; color:var(--fg); font:inherit; font-size:14px; text-align:left; cursor:pointer; }
.tmenu .opt:hover, .tmenu .opt:focus-visible { background:var(--head); outline:none; }
.tmenu .opt[aria-selected="true"] { font-weight:600; }
.tmenu .opt[aria-selected="true"]::after { content:""; margin-left:auto; width:5px; height:9px; border:solid currentColor;
  border-width:0 2px 2px 0; transform:rotate(45deg) translate(-1px,-1px); }
.dot { flex:none; width:16px; height:16px; border-radius:50%; border:1px solid rgba(0,0,0,.3); }
.dot-sepia { background:linear-gradient(135deg, #f8f1e3 50%, #c8977a 50%); }
.dot-light { background:linear-gradient(135deg, #ffffff 50%, #0b57d0 50%); }
.dot-dark  { background:linear-gradient(135deg, #121212 50%, #8ab4f8 50%); border-color:rgba(255,255,255,.35); }
@media (max-width:600px) { .themes .tbtn { font-size:13px; } }
h2.homesec, h3.sectionhead { scroll-margin-top:var(--stick, 70px); }

/* The pill above the bottom bar (bookmark added / removed) */
.toast { position:fixed; left:50%; width:max-content; bottom:calc(var(--barh, 64px) + 12px); z-index:40; display:flex; gap:14px; align-items:center;
  max-width:calc(100vw - 32px); padding:9px 16px; border-radius:999px; font-size:14px; line-height:1.3;
  background:var(--fg); color:var(--bg); box-shadow:0 6px 18px rgba(0,0,0,.28);
  opacity:0; transform:translate(-50%, 8px); pointer-events:none; transition:opacity .18s, transform .18s; }
.toast.show { opacity:1; transform:translate(-50%, 0); pointer-events:auto; }
.toast a, .toast button { color:inherit; font:inherit; font-weight:600; text-decoration:underline; background:none; border:0; padding:0; cursor:pointer; white-space:nowrap; }
@media (prefers-reduced-motion: reduce) { .toast { transition:none; } }

/* Settings page */
.settings fieldset { border:0; margin:0 0 6px; padding:0; }
.settings legend { padding:0; font-weight:600; margin-bottom:4px; }
.settings label.opt { display:flex; align-items:center; gap:10px; padding:7px 0; cursor:pointer; }
.settings h2 { font-size:18px; margin:26px 0 6px; }
.settings .note { color:var(--muted); font-size:14px; margin:8px 0 12px; }
.settings .note a { color:var(--accent); }
.settings input[type=radio] { accent-color:var(--accent); width:18px; height:18px; margin:0; }
.settings legend { margin-top:14px; }

/* Dark: a black shadow cannot show on near-black, so the title bar's lower edge
   gets a lighter rule (the --tbaredge above) and a faint light glow beneath it. */
html.t-dark .pagehead::before { box-shadow:0 7px 14px -9px rgba(255,255,255,.22); }   /* the top highlight is gone: it drew a light line under the header */

/* Bookmarks page: a little air between the recently-viewed list and its clear button. */
ul.arch.recent + form { margin:14px 0 0; }

/* DARK BARS (grain density B: frequency .4, 2 octaves, so airier than the .85/3 of the other themes): the same embossed grain as the other themes, drawn as a faint translucent
   WHITE relief (the Mocha and Light grains are dark on a light base and would vanish on
   near-black). Header, bottom bar and title bar; no stitching in Dark. */
html.t-dark { --hbase:#141414; --grainh:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.4' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='235' elevation='32'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .675 0 0 0 -.3'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23a)'/%3E%3C/svg%3E"); --tgrain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.4' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting surfaceScale='1' diffuseConstant='1' lighting-color='white'%3E%3CfeDistantLight azimuth='235' elevation='32'/%3E%3C/feDiffuseLighting%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 .675 0 0 0 -.3'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23a)'/%3E%3C/svg%3E"); }
html.t-dark header, html.t-dark .jumpbar { background-color:var(--hbase);
  background-image:linear-gradient(rgba(255,255,255,.05), rgba(255,255,255,0) 50%, rgba(0,0,0,.2)), var(--grainh);
  background-repeat:no-repeat, repeat; background-size:100% 100%, 240px 240px; }
html.t-dark header { border-bottom:0; }   /* no rule between the header and the title bar */
/* Title bar: no grain, a deep blue-teal instead (its lower edge a lighter blue of the same hue). */
html.t-dark { --tbar:#071b27; --tbar2:#071b27; --tbaredge:#244457; }   /* was #0d2938 */
html.t-dark .pagehead::before { background-color:var(--tbar); background-image:none; }

/* Home "For you": a little closer to its heading than the feed's own top margin. */
ul.pages.foryou { margin-top:6px; }

/* STICKY TABLE TITLES: while a table scrolls past, its title stays under the page title bar.
   The title's own bar (full window width, like the bars above) is the page background; its rule
   and shadow appear only while it is stuck (.stuck, set by the script) so resting titles stay
   clean. --stick is the header plus title bar plus 8px, so the title sits flush under them. */
body[data-multi] section.tbl h2 { position:sticky; top:calc(var(--stick, 120px) - 8px); z-index:15; padding:5px 0 4px; margin:0; }
body[data-multi] section.tbl h2::before { content:""; position:absolute; z-index:-1; top:0; bottom:0; left:calc(50% - 50vw); width:100vw; background:var(--bg); }
body[data-multi] section.tbl h2.stuck::before { border-bottom:1px solid var(--line); box-shadow:0 7px 10px -9px rgba(0,0,0,.35); }
html.t-dark body[data-multi] section.tbl h2.stuck::before { box-shadow:0 7px 10px -9px rgba(255,255,255,.2); }
@media (orientation:landscape) and (max-height:500px) { body[data-multi] section.tbl h2 { top:var(--hh, 50px); } }
/* With script, a stuck title fades out once the page stops moving (html.scrolling is set while it moves). */
html.js body[data-multi] section.tbl h2.stuck { transition:opacity .2s; }
html.js:not(.scrolling) body[data-multi] section.tbl h2.stuck { opacity:0; pointer-events:none; }

/* PAGE OUTLINE + the controls that go with it. The title bar's hamburger jumps to the outline at the
   foot of the page; the page's own bookmark is a labelled button under the title. */
.pagehead a.pmenu { color:var(--tbarfg); opacity:.8; display:inline-block; margin-left:6px; padding:0 2px; vertical-align:-.12em; line-height:0; text-decoration:none; }
.pagehead a.pmenu:hover { color:var(--tbaracc); opacity:1; }
.pagehead a.pmenu svg { width:.95em; height:.95em; display:block; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; }
p.pagebm { margin:12px 0 2px; }
button.fav.pagefav { display:inline-flex; align-items:center; gap:7px; margin:0; padding:6px 14px 6px 10px; border:1px solid var(--line); border-radius:999px;
  background:none; color:var(--muted); font:inherit; font-size:14.5px; line-height:1.2; cursor:pointer; }
button.fav.pagefav svg { width:17px; height:17px; }
button.fav.pagefav:hover { color:var(--accent); border-color:var(--accent); }
button.fav.pagefav.on { color:var(--accent); border-color:var(--accent); }
section.srcs { margin:44px 0 0; padding-top:12px; border-top:1px solid var(--line); }
section.srcs .ol-h { margin:0 0 4px; font-size:12.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
section.srcs .srcs-sub { margin:0 0 6px; font-size:14px; color:var(--muted); }
section.srcs .srcs-sub a { color:var(--muted); }
section.srcs ul { list-style:none; margin:0; padding:0; }
section.srcs li { padding:6px 2px; font-size:16px; line-height:1.4; overflow-wrap:anywhere; }
section.srcs li a { color:var(--accent); text-decoration:none; }
section.srcs li a:hover { text-decoration:underline; }
section.srcs .host { margin-left:8px; font-size:13px; color:var(--muted); }
section.srcs + nav.outline { margin-top:28px; }
nav.outline { margin:44px 0 8px; padding-top:12px; border-top:1px solid var(--line); scroll-margin-top:var(--stick, 120px); }
nav.outline .ol-h { margin:0 0 4px; font-size:12.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
nav.outline ul { list-style:none; margin:0; padding:0; }
nav.outline li a { display:flex; gap:10px; align-items:flex-start; padding:7px 2px; color:var(--accent); text-decoration:none; font-size:17px; line-height:1.4; }
nav.outline li a:hover .tx { text-decoration:underline; }
nav.outline .tx { flex:1; min-width:0; }
nav.outline svg.oi { flex:none; width:16px; height:16px; margin-top:.3em; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; color:var(--muted); }
nav.outline li.top a { font-weight:600; }
nav.outline li.top svg.oi { color:var(--accent); }
nav.outline li.t a { padding-left:26px; }                     /* the tables sit under the page name */
nav.outline li.t .meta { flex:none; margin-top:.2em; padding-left:6px; font-size:13px; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
nav.outline li.t svg.bm { width:14px; height:14px; margin-top:.4em; color:var(--accent); fill:currentColor; }   /* a table you bookmarked */
nav.outline li.home { margin-top:12px; padding-top:6px; border-top:1px solid var(--line); }
nav.outline li.home svg.oi { color:var(--accent); }
/* A stuck table title gets breathing room below it: its bar reaches 9px further down, over the
   content beneath, so nothing in the layout moves when the title sticks. */
body[data-multi] section.tbl h2.stuck::before { bottom:-9px; }

/* The title bar's Outline control: a small outlined pill, words instead of an icon. Overrides the
   hamburger rules above. */
.pagehead a.pmenu { display:inline-flex; align-items:center; gap:5px; margin-left:auto; flex:none; align-self:center; padding:5px 10px 5px 8px; border:1.5px solid currentColor; border-radius:999px;
  font-size:13px; font-weight:600; line-height:1; letter-spacing:.01em; vertical-align:.1em; opacity:.85; }
.pagehead a.pmenu svg { width:14px; height:14px; stroke-width:2; }
.pagehead a.pmenu:hover { opacity:1; }
.pagehead a.totop { -webkit-tap-highlight-color:rgba(0,0,0,.12); }
.pagehead a.tt { flex:0 1 auto; min-width:0; }
section.tbl h2 .nw { white-space:nowrap; }

/* The Outline pill's border is its own colour, separate from its text: a faint tint of the text colour
   in Light and Dark, and the stitching's cream in Mocha. (The dimming moved from the whole pill onto
   its text so the Mocha border is not washed out.) */
.pagehead a.pmenu { opacity:1; color:color-mix(in srgb, var(--tbarfg) 88%, transparent); border-color:color-mix(in srgb, currentColor 30%, transparent); }
.pagehead a.pmenu:hover { color:var(--tbarfg); border-color:color-mix(in srgb, currentColor 55%, transparent); }
html.t-sepia .pagehead a.pmenu { border-color:#f7ead6; }
html.t-sepia .pagehead a.pmenu:hover { border-color:#fffaf0; }

/* The title fills the bar, so the Outline pill (margin-left:auto) always sits at the far right. */
.pagehead .pagetitle { flex:1 1 auto; }

/* MOCHA TITLE-BAR TREATMENTS (random per load; see $tv in index.php). A is the original and has no rules.
   B-E: cream lettering with a brown outline and/or drop shadow. The outline is a stroke drawn behind the fill
   (paint-order), so it sits outside the letters. */
html.t-sepia.tv-cream .pagehead svg.tablet .slab, html.t-sepia.tv-cream .pagehead svg.tablet .rule { stroke:#fff4de; }
html.t-sepia.tv-cream .pagehead svg.tablet .wedge { fill:#fff4de; }
html.t-sepia.tv-cream .pagehead svg.tablet { filter:drop-shadow(0 0 .6px #4a2108) drop-shadow(0 0 .6px #4a2108) drop-shadow(0 1px 1px rgba(64,29,0,.5)); }
html.t-sepia.tv-cream .pagehead a.pmenu { color:#fff4de; text-shadow:0 1px 1px rgba(64,29,0,.65); }
html.t-sepia.tv-cream .pagehead .pagetitle a.tt { color:#fff4de; }
html.t-sepia.tv-b .pagehead .pagetitle a.tt { -webkit-text-stroke:3px #4a2108; paint-order:stroke fill; text-shadow:none; }
html.t-sepia.tv-c .pagehead .pagetitle a.tt { text-shadow:0 1px 0 #8a4a22, 0 2px 0 #6b3416, 0 3px 4px rgba(64,29,0,.45); }
html.t-sepia.tv-d .pagehead .pagetitle a.tt { -webkit-text-stroke:3px #4a2108; paint-order:stroke fill; text-shadow:0 2px 3px rgba(64,29,0,.55); }
html.t-sepia.tv-e .pagehead .pagetitle a.tt { -webkit-text-stroke:2px #5a2a0c; paint-order:stroke fill; text-shadow:0 2px 2px rgba(64,29,0,.5); }
html.t-sepia.tv-f .pagehead .pagetitle a.tt { text-shadow:0 -2px 0 rgba(255,244,222,.75), 0 1px 0 rgba(64,29,0,.25); }   /* A's dark-brown text, engraved: cream rim above, faint dark edge below */

/* About page: the same reading column as Privacy, with small section headings. */
.prose.about h2 { font-size:18px; margin:26px 0 6px; }

/* TEMPORARY title-style vote (see TITLE_VOTE in index.php): next to the bookmark pill, Mocha only, because the
   title styles A-E only exist there. */
.tvote-wrap { display:none; }
html.t-sepia .tvote-wrap { display:inline-flex; align-items:center; gap:6px; margin-left:12px; vertical-align:middle; }
p.pagebm { display:flex; flex-wrap:wrap; align-items:center; gap:6px 0; }
.tvote-wrap .tv-l { font-size:13px; color:var(--muted); margin-right:2px; }
button.tvote { font:inherit; font-size:13px; line-height:1.1; padding:5px 11px; border:1px solid var(--line); border-radius:999px; background:none; color:var(--muted); cursor:pointer; }
button.tvote:hover:not(:disabled) { border-color:var(--accent); color:var(--accent); }
button.tvote.picked { border-color:var(--accent); color:var(--accent); font-weight:600; }
button.tvote:disabled:not(.picked) { opacity:.45; cursor:default; }

/* row-count diffs (diffcore.php dc_render), on diff.php, Updates and Bookmarks */
.dtab tr.add td { font-weight:700; }
.dtab tr.del td { text-decoration:line-through; color:var(--muted); }
.dtab td.chg, .dtab th.chg { width:1%; white-space:nowrap; text-decoration:none; }
.dtab td.chg { font-size:13px; font-weight:600; }   /* the header cell keeps the column-header type */
.dtab tr.gap td { text-align:center; color:var(--muted); font-size:13px; padding:3px; }
.upd { margin:0 0 26px; } .upd h3 { font-size:18px; margin:0 0 6px; } .upd h3 .d { color:var(--muted); font-size:13px; font-weight:400; margin-left:8px; }
.fupd { margin:4px 0 10px 22px; font-size:14px; } .fupd .dtab { font-size:14px; }
.upd h3 a { color:var(--accent); text-decoration:none; } .upd h3 a:hover { text-decoration:underline; }
.upd:first-of-type { margin-top:16px; }
.upd .scroll { margin-left:22px; }
.dtab tr.del td.chg { text-decoration:none; }
.dtab .pl { color:#2ea043; font-weight:700; } .dtab .mi { color:#cf222e; font-weight:700; } .dtab .eq { opacity:.3; }
.subnav { display:flex; gap:22px; margin:6px 0 0; border-bottom:1px solid var(--line); font-size:15px; }
.subnav a, .subnav .on { padding:6px 2px 7px; margin-bottom:-1px; border-bottom:2px solid transparent; text-decoration:none; }
.subnav .sep { display:none; }
.subnav a { color:var(--muted); } .subnav a:hover { color:var(--accent); }
.subnav .on { color:var(--fg); font-weight:600; border-bottom-color:var(--accent); }
.subnav + h1.pagetitle { margin-top:16px; }
/* Verse tables (the Sonnets): keep each cell's line breaks. */
.verse td { white-space:pre-line; }
ul.arch span.cnt { color:var(--muted); font-size:.85em; margin-left:.3em; }   /* word counts on story lists */
@media (max-width:600px) {   /* phones: Sonnet + Text only; Roman and First line repeat what the text shows */
  .verse th:nth-child(2), .verse td:nth-child(2), .verse th:nth-child(3), .verse td:nth-child(3) { display:none; }
}
/* A back link already separates the title from the tabs. */
p.backlink + h1.pagetitle, p.backlink + section > h1.pagetitle:first-child { margin-top:4px; }
p.backlink + section.today.full { margin-top:0; }
/* jump drop-up (replaces the native select so it can carry icons and a divider) */
.jumpw { position:relative; flex:0 1 60ch; min-width:0; }
.jbtn { position:relative; display:flex; align-items:center; gap:8px; max-width:100%; font:inherit; font-size:14px; color:var(--fg); cursor:pointer;
  background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:5px 12px 5px 28px; }
.jbtn span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jbtn::before { content:""; position:absolute; left:11px; top:50%; margin-top:-3px; border:5px solid transparent; border-top:0; border-bottom-color:#888; }
.jbtn:hover, .jbtn:focus-visible, .jbtn[aria-expanded="true"] { border-color:var(--accent); outline:none; }

.jmenu { left:0; right:auto; min-width:220px; max-width:min(92vw, 420px); max-height:min(60vh, 440px); overflow-y:auto; }
.jmenu .opt span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ji { flex:none; width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; opacity:.75; }
.jsep { height:1px; background:var(--line); margin:6px 4px; }
@media (max-width:600px) { .jbtn { font-size:13px; } }
.topfab { position:fixed; z-index:24; right:max(20px, calc((100% - 1200px) / 2 + 20px)); bottom:calc(var(--barh, 56px) + 14px + env(safe-area-inset-bottom, 0px));
  width:40px; height:40px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--fg);
  background:var(--bg); border:1px solid var(--line); border-radius:8px; box-shadow:0 2px 10px rgba(0,0,0,.18); }
.topfab[hidden] { display:none; }
.topfab svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.topfab:hover, .topfab:focus-visible { border-color:var(--accent); color:var(--accent); outline:none; }
@media (max-width:600px) { .topfab { right:12px; } }
@media (orientation:landscape) and (max-height:500px) { .topfab { display:none; } }
@media print { .topfab { display:none; } }
.topfab { transition:opacity .2s; }
.topfab.ghost { opacity:0; cursor:default; }

.moreupd { margin:14px 0 6px; font-size:14px; }
.moreupd a { color:var(--accent); text-decoration:none; } .moreupd a:hover { text-decoration:underline; }

/* Mute control on For you rows */
ul.pages li.row { position:relative; }
details.mutew { flex:none; align-self:flex-start; margin:14px 4px 0 0; position:relative; }
details.mutew > summary { list-style:none; cursor:pointer; width:26px; height:26px; line-height:24px; text-align:center; font-size:18px; color:var(--muted); border-radius:6px; opacity:.55; }
details.mutew > summary::-webkit-details-marker { display:none; }
details.mutew > summary:hover, details.mutew[open] > summary, details.mutew > summary:focus-visible { opacity:1; background:var(--head); }
details.mutew .mmenu { position:absolute; right:0; top:30px; z-index:30; min-width:200px; display:flex; flex-direction:column; gap:2px; padding:6px; background:var(--bg); border:1px solid var(--line); border-radius:8px; box-shadow:0 4px 14px rgba(0,0,0,.18); }
details.mutew .mmenu form { margin:0; display:contents; }
details.mutew .mmenu button { font:inherit; font-size:14px; text-align:left; padding:7px 10px; width:100%; background:none; border:0; border-radius:6px; color:var(--fg, inherit); cursor:pointer; }
details.mutew .mmenu button:hover, details.mutew .mmenu button:focus-visible { background:var(--head); }
ul.mutedlist { list-style:none; padding:0; margin:0 0 10px; } ul.mutedlist li { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:6px 0; border-bottom:1px solid var(--line); }
ul.mutedlist form { margin:0; }

/* Quote above the footer links, and the list on About */
.thquote { max-width:800px; margin:44px auto 0; padding:0 20px; text-align:right; font-style:italic; font-size:14px; line-height:1.5; color:var(--muted); }
.thquote + footer.site { margin-top:10px; }
ul.thquotes { list-style:none; padding:0; margin:14px 0; } ul.thquotes li { margin:8px 0; padding-left:14px; border-left:2px solid var(--line); }
ul.thquotes cite { font-style:italic; }

/* Today: the daily briefing. Clipped on home with a link to the full one on the Today tab. */
section.today { margin:0 0 14px; }
section.today .tb { position:relative; padding:2px 4px 2px 14px; border-left:3px solid var(--accent); }
section.today .tb-when { font-size:13px; opacity:.7; margin:0 0 6px; }
section.today .tb-audio { display:flex; align-items:center; gap:8px; margin:0 0 10px; font-size:13px; }
section.today .tb-audio audio { height:32px; max-width:100%; flex:1; }
section.today.archive ul.briefs { margin:4px 0 0; padding-left:1.2em; columns:2 14em; font-size:15px; line-height:1.7; }
section.today .tb-body h3 { font-size:17px; margin:14px 0 4px; }
section.today .tb-body p { margin:0 0 10px; line-height:1.55; }
section.today .tb-body hr { border:0; border-top:1px solid currentColor; opacity:.2; margin:12px 0; }
section.today ul.tb-rel { margin:-4px 0 14px; font-size:15px; }
a.tb-ex { display:block; color:inherit; text-decoration:none; }
a.tb-ex p { margin:0; line-height:1.55; }
a.tb-ex .tb-more { white-space:nowrap; text-decoration:underline; color:var(--accent); }
a.tb-ex:hover .tb-more { text-decoration-thickness:2px; }
section.today a.tb-ex { transition:background .15s; }
section.today a.tb-ex:hover { background:var(--head); }
section.today.full { margin-top:6px; }
p.backlink { margin:4px 0 6px; }
/* Same look as the page-outline links: accent text, no underline until hover, muted 16px icon. */
p.backlink a { display:inline-flex; align-items:center; gap:10px; padding:7px 2px; color:var(--accent); text-decoration:none; font-size:17px; line-height:1.4; }
p.backlink a:hover { text-decoration:underline; }
p.backlink svg { flex:none; width:16px; height:16px; stroke-width:1.7; color:var(--muted); }

/* Meditations (?meditations): one tall grid, so it scrolls inside its box and the header row stays put. */
section.medtbl { margin-top:6px; }
section.medtbl .scroll { max-height:78vh; overflow:auto; }
section.medtbl td { white-space:pre-line; }
section.medtbl td:first-child { white-space:nowrap; min-width:0; font-variant-numeric:tabular-nums; }
section.prose td:not(:first-child) { text-indent:1.5em; }
section.prose td { white-space:pre-line; }   /* verse lines (se_text.py keeps <br/> as \n) */
section.prose .scroll { max-height:none; }
p.src.under a { color:var(--accent); }

/* Home timeline: <div class="front-timeline"> with an h3 and a list per section.
   The row's link is only the page name (a.pl); its ::after covers the row, so the
   blurb and the table count are still part of one tap target. The avatar, its
   own link to the image's file page, sits above that layer. */
.front-timeline { margin-top:24px; }
.front-timeline ul.pages { margin-top:0; }
.front-timeline h3.sectionhead { margin:28px 0 6px; padding:0 4px; font-size:22px; font-weight:700; }
.front-timeline h3.sectionhead:first-child { margin-top:8px; }
.front-timeline li.row > div.go { flex:1; min-width:0; display:flex; align-items:baseline; gap:10px;
  padding:13px 4px; color:var(--fg); }
.front-timeline div.go a.pl { display:inline; padding:0; color:inherit; text-decoration:none; }   /* not ul.pages a's row padding */
.front-timeline div.go a.pl:hover { background:none; }
.front-timeline div.go a.pl::after { content:""; position:absolute; inset:0; }
.front-timeline li.row .av { position:relative; z-index:1; }
.front-timeline li.row:has(a.pl:hover) > div.go { background:var(--head); }
.front-timeline li.row.band:has(a.pl:hover) > div.go { background:color-mix(in srgb, var(--accent) 11%, transparent); }
.front-timeline li.row:has(a.pl:focus-visible) { outline:2px solid var(--accent); outline-offset:-2px; }
.front-timeline div.go a.pl:focus-visible { outline:none; }
/* Home timeline blurbs are <p class="trend nl"> in a <div class="t"> (a paragraph,
   so text extractors count it as content); styled as the <em> they replaced. */
.front-timeline p.trend { margin:3px 0 0; font-style:italic; color:var(--muted); font-size:15px; line-height:1.45; }

.front-timeline p.trend-export { margin:-2px 0 8px; padding:0 4px; font-size:14px; color:var(--muted); }

/* ?meditations is paged (50 rows), so the grid takes its natural height instead of an inner scroll box. */
section.medtbl.paged .scroll { max-height:none; }
nav.pager { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:10px 0; font-size:15px; }
nav.pager a { color:var(--accent); text-decoration:none; }
nav.pager a:hover { text-decoration:underline; }
nav.pager .pos { color:var(--muted); text-align:center; }

/* explore.php: the nearest tables to one table; each row also explores onward. */
ul.pages.explore span.xp { display:block; margin-top:2px; font-size:14px; color:var(--muted); }
ul.pages.explore a.more { flex:none; align-self:center; padding:0 8px; font-size:14px; color:var(--accent); text-decoration:none; white-space:nowrap; }
ul.pages.explore a.more:hover { text-decoration:underline; }
section.today a.tb-ex :is(strong,b,h3) { font-weight:inherit; }   /* home excerpt: no bold */

/* Today page: "Recent articles" below the briefing (brief_related.py, column D). */
section.today h3.arts-h { font-size:15px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin:18px 0 6px; }
section.today ul.arts { list-style:none; margin:0; padding:0; }
section.today ul.arts li { padding:8px 0; border-bottom:1px solid var(--line); line-height:1.4; }
section.today ul.arts li > a { color:var(--fg); text-decoration:none; }
section.today ul.arts p.lede { margin:3px 0 0; font-size:14px; line-height:1.45; color:var(--muted); }
section.today ul.arts li > a:hover { text-decoration:underline; }
section.today ul.arts .m { display:block; margin-top:2px; font-size:13px; color:var(--muted); }
section.today ul.arts .m a { color:inherit; }
section.today ul.arts li { display:flex; gap:12px; align-items:flex-start; }
section.today ul.arts li.arts-pg { display:block; border:0; padding:14px 0 0; font-size:13px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; }
section.today ul.arts li.arts-pg a { color:var(--muted); text-decoration:none; }
section.today ul.arts svg.np { flex:none; margin-top:2px; color:var(--accent); }
section.today ul.arts li > div > a { color:var(--fg); text-decoration:none; }
section.today ul.arts li > div > a:hover { text-decoration:underline; }
/* Link preview card (og.js / og.php): under a recent article on Today, or in a row under a table row. */
.ogcard { margin:10px 0 4px; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--head); animation:ogin .18s ease-out; }
@keyframes ogin { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.ogcard { display:grid; grid-template-columns:auto 1fr; column-gap:10px; align-items:start; }
.ogcard img { grid-row:1 / span 3; width:50px; height:50px; object-fit:cover; border-radius:5px; }
.ogcard > :not(img) { grid-column:2; }
.ogcard p { margin:0 0 8px; font-size:15px; line-height:1.45; }
.ogcard .og-load { color:var(--muted); font-size:14px; }
.ogcard a.og-open { font-size:14px; color:var(--accent); text-decoration:none; font-weight:600; }
tr.ogrow > td { padding:0 6px 8px; background:var(--bg); max-width:none; }
tr.ogrow .ogcard { position:sticky; left:6px; max-width:min(560px, calc(100vw - 48px)); white-space:normal; margin:2px 0 0; font-size:15px; }
.ogcard p.og-title { font-weight:600; margin-bottom:2px; }
.ogcard p.og-desc { display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
/* Short external links keep their arrow on the same line instead of wrapping it alone. */
.links a[target="_blank"], .fupd a[target="_blank"], p.cnt a[target="_blank"], p.src.under a[href*="action=history"] { white-space:nowrap; }

/* explore.php: the one-table-per-page filter */
.xfilter{margin:.2em 0 .6em}
.xfilter .chip{display:inline-block;font:inherit;font-size:.85em;padding:.2em .75em;border:1px solid var(--line);border-radius:999px;color:var(--muted);text-decoration:none;background:var(--bg)}
.xfilter .chip:hover{border-color:var(--accent);color:var(--accent)}
.xfilter .chip.on{background:var(--head);border-color:var(--accent);color:var(--fg)}
.xfilter .xfl{font-size:.85em;color:var(--muted);margin-right:.2em}

/* 800px column: page body and the header's contents (the header bar itself stays full width) */
main { max-width:800px; margin:0 auto; }
header { padding-left:max(20px, calc((100% - 760px) / 2)); padding-right:max(20px, calc((100% - 760px) / 2)); }   /* 760 = main's 800 less its 20px side padding, so the logo lines up with the text */
/* the fixed bottom bar and the back-to-top button on the same column (bar background stays full width) */
.jumpbar { padding-left:max(16px, calc((100% - 760px) / 2)); padding-right:max(16px, calc((100% - 760px) / 2)); }
.topfab { right:max(20px, calc((100% - 760px) / 2)); }
@media (max-width:600px) { .jumpbar { padding-left:12px; padding-right:12px; } .topfab { right:12px; } }

/* Page view, link-only side of the grid A/B: section heads and one manicule line per table. */
.vlinks { margin:18px 0 8px; }
.vlinks h3.vsec { font-size:1rem; margin:22px 0 6px; }
.vlinks p.vlink { display:flex; align-items:baseline; gap:10px; margin:6px 0; }
.vlinks svg.manicule { flex:none; width:28px; height:17px; color:var(--muted, #777); position:relative; top:3px; }

ul.pages li.runhead[data-run] { scroll-margin-top:var(--stick, 70px); }   /* topic jump lands below the sticky bar */
/* Topic links under each named run heading: A · B · C, the current topic unlinked. */
ul.pages li.topicnav { display:block; list-style:none; border:0; padding:0 4px 10px; font-size:13.5px; line-height:1.7; color:var(--muted); }
ul.pages li.topicnav a { display:inline; padding:0; color:var(--accent); text-decoration:none; }   /* ul.pages a is a flex row link */
ul.pages li.topicnav span { color:var(--fg); font-weight:600; }
ul.pages li.topicnav { padding-top:10px; }
ul.pages li.topicnav.tojump { padding-top:10px; }
/* "All topics" pill after each run: the same outline icon + pill as the collection pages' Outline button. */
ul.pages li.topicnav.tojump { text-align:center; }
ul.pages li.topicnav.tojump a.olpill { display:inline-flex; align-items:center; gap:5px; padding:5px 10px 5px 8px; font-size:13px; font-weight:600; line-height:1; letter-spacing:.01em; border:1.5px solid color-mix(in srgb, currentColor 30%, transparent); border-radius:999px; }
ul.pages li.topicnav.tojump a.olpill:hover { border-color:color-mix(in srgb, currentColor 60%, transparent); }
ul.pages li.topicnav.tojump a.olpill span { color:inherit; font-weight:inherit; }
ul.pages li.topicnav.tojump a.olpill svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
/* The topics outline at the foot of the trending list, like a single page's outline. */
nav#topics li.t a { padding-left:2px; }
/* "All topics" dropdown next to the Trending heading. */
.topicsel { font:inherit; font-size:14px; font-weight:400; vertical-align:middle; margin-left:10px; max-width:55vw;
  padding:3px 6px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:inherit; }

/* "N podcasts on this" under a trend blurb: above the row's stretched link (a.pl::after),
   so it is its own tap target. Its drawer is the next <li>, slid open with the 0fr -> 1fr
   grid-rows trick (no height measuring). */
.front-timeline div.go a.pods { position:relative; z-index:1; display:inline-block; margin-top:5px; padding:0;
  font-size:13.5px; color:var(--accent); text-decoration:none; }
.front-timeline div.go a.pods:hover { text-decoration:underline; background:none; }
ul.pages li.poddrawer { display:grid; grid-template-rows:0fr; transition:grid-template-rows .28s ease; padding:0 4px;
  scroll-margin-top:190px; }   /* the no-JS #pods- jump: keep the trend row above in view, under the sticky header */
ul.pages li.poddrawer:not(.open) { border-bottom:0; }
ul.pages li.poddrawer.open { grid-template-rows:1fr; }
ul.pages li.poddrawer > .pdi { overflow:hidden; min-height:0; }
li.poddrawer .pblurb { margin:12px 0 8px; font-size:15px; line-height:1.5; }
li.poddrawer .pblurb a { display:inline; padding:0; color:var(--accent); }   /* not ul.pages a's flex rows */
li.poddrawer .pblurb a:hover { background:none; text-decoration:underline; }
li.poddrawer .pep { padding:10px 0; border-top:1px solid var(--line); }
li.poddrawer .phead { display:flex; gap:10px; align-items:flex-start; }
li.poddrawer img.part { width:44px; height:44px; border-radius:6px; flex:none; object-fit:cover; background:var(--head); }
li.poddrawer .pmeta { flex:1; min-width:0; }
li.poddrawer .psh { color:var(--muted); font-size:13px; }
li.poddrawer .psh a { display:inline; padding:0; color:var(--accent); text-decoration:none; }
li.poddrawer .psh a:hover { text-decoration:underline; background:none; }
li.poddrawer .psh .ogcard { margin-top:6px; color:var(--fg); }
li.poddrawer .pti { font-weight:600; font-size:15px; }
li.poddrawer audio { width:100%; height:34px; margin:6px 0 2px; }
li.poddrawer .psl { font-size:14px; padding:4px 0; line-height:1.45; }
li.poddrawer .psl.ad { opacity:.55; }
li.poddrawer .psl button { font:inherit; font-size:13px; border:1px solid var(--line); background:none; color:inherit;
  border-radius:5px; padding:0 7px; margin-right:7px; cursor:pointer; }
li.poddrawer .pnote { color:var(--muted); font-size:12.5px; margin:6px 0 12px; }
@media (prefers-reduced-motion: reduce) { ul.pages li.poddrawer { transition:none; } }
.ytq { font-size:14px; }
.ytq a { color:var(--accent); display:inline-flex; align-items:center; gap:6px; }
.ytq .yti { flex:none; }
.pagearts { margin:28px 0 8px; max-width:68ch; }
.pagearts ul { list-style:none; margin:6px 0 0; padding:0; }
.pagearts li { padding:12px 0; border-top:1px solid var(--line); }
.pagearts .pa-t { font-weight:600; color:var(--accent); }
.pagearts .pa-src { display:block; font-size:12px; color:var(--muted); margin-top:1px; }
.pagearts .pa-lede { margin:6px 0 0; font-style:italic; }
.pagearts .pa-more { margin-top:6px; font-size:15px; }
.pagearts .pa-more summary { cursor:pointer; color:var(--accent); font-size:14px; }
.pagearts .pa-more p { margin:6px 0 0; }

.te { display:block; width:100%; min-height:60vh; padding:12px; font:16px/1.5 ui-monospace,Menlo,Consolas,monospace;
      color:var(--fg); background:var(--bg); border:1px solid var(--line); border-radius:6px; resize:vertical; box-sizing:border-box; }
.te-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0 0; }
.te-bar button { font:inherit; padding:6px 12px; border:1px solid var(--line); border-radius:6px; background:transparent; color:var(--accent); cursor:pointer; }
.te-status { color:var(--muted); font-size:14px; }

.te-nav { margin-top:6px; }
.te-nav button { padding:6px 10px; }
.te-count { margin:6px 0 0; padding:0; color:var(--muted); font-size:14px; font-variant-numeric:tabular-nums; border-top:1px solid var(--line); }

.te-top { position:sticky; top:0; z-index:2; background:var(--bg); padding:6px 0 8px; margin-bottom:8px; border-bottom:1px solid var(--line); }
.te-top .te-bar { margin:0; }
.te-top .te-nav { margin-top:6px; }
.te-count { border-top:0; }

/* Mocha (html.t-sepia): page avatars in a Mucha-style frame -- an arched window, a cream/gold double
   ring and a warm poster tint (an admin-only trial on 1 Dec 2026 that stuck). */
/* 2 Dec 2026, toned down: the 6px glow spread out from the arch (and the cream outer ring) lit the avatar
   like a bulb on iOS, and the saturate/contrast boost brightened it further. Now a tight, faint shadow,
   a plain tint with a touch less brightness, and a flatter arch (18%, was 26%). */
html.t-sepia ul.pages .av { border-radius:50% 50% 5px 5px/18% 18% 5px 5px;
  box-shadow:0 0 0 1.5px #efe0bd, 0 0 0 2.5px #b8893b, 0 1px 2px rgba(90,60,15,.18); }
html.t-sepia ul.pages .av img { filter:sepia(.3) brightness(.96); }
section.srcs .ol-h { display:flex; align-items:center; gap:6px; }
section.srcs .ol-h .oi { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
section.srcs li { display:flex; gap:10px; align-items:flex-start; }
section.srcs li > div { flex:1; min-width:0; }
section.srcs svg.np { flex:none; margin-top:1px; color:var(--accent); }

/* Context button and the YouTube search on one line; the context panel opens full width below both. */
.ctxw { display:flex; flex-wrap:wrap; align-items:center; column-gap:18px; }
.ctxw[hidden] { display:none; }
.ctxw .ctxslide { flex-basis:100%; }
.ytq a { font-size:14px; }
/* Source favicons (favicon.php), the newspaper SVG underneath until one loads, or for good if it fails. */
.srcic { flex:none; position:relative; width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; margin-top:1px; }
.srcic img { width:18px; height:18px; border-radius:3px; position:relative; z-index:1; background:var(--bg, #fff); }
.srcic svg.np { position:absolute; inset:0; margin:0; }
.srcic.nofav img { display:none; }

/* view page: every table from the same article, grouped by section (page_siblings) */
section.siblist { margin-top:28px; }
section.siblist h2 { font:600 17px/1.3 inherit; font-family:inherit; margin:0 0 4px; }
section.siblist h2 a { color:var(--accent); text-decoration:none; }
section.siblist h3.vsec { font-size:1rem; margin:18px 0 0; }
ul.pages li.row.cur > .go { flex:1; min-width:0; }
ul.pages.sibs { margin-top:6px; }
ul.pages li.cur .go { display:flex; align-items:baseline; gap:10px; padding:13px 4px; }
ul.pages li.cur .t { font-weight:600; }

/* A merged-cell table (wiki_grid.write_spanned): a merged cell sits at the top of the rows it covers,
   with a rule beside it so the eye can follow the rows it belongs to. */
.spanned td[rowspan], .spanned th[rowspan] { vertical-align:top; border-right:1px solid var(--line); }
.spanned th[colspan] { text-align:center; }
.spanned caption { text-align:left; padding:4px 0 8px; color:var(--muted); }

/* Ko-fi line in the bottom bar (jumpbar.js; not on the home page) and in the footer. */
.jumpbar .kofi { margin-left:auto; font-size:13px; line-height:1.3; color:var(--muted); min-width:0; text-align:right; }
.jumpbar .kofi + .themes { margin-left:0; }
.kofi-foot { margin:10px 0 0; color:var(--muted); }
.jumpbar .kofi a, .kofi-foot a { color:var(--accent); white-space:nowrap; }

/* Meditations reading view (?meditations): each chapter's Greek, Long and modern English stacked. */
.medmode { margin:4px 0 10px; color:var(--muted); font-size:14px; }
.medsearch { display:flex; gap:8px; align-items:center; margin:0 0 14px; flex-wrap:wrap; }
.medsearch input[type=search] { flex:1 1 220px; font:inherit; padding:6px 10px; border:1px solid var(--line); border-radius:6px; background:var(--bg); color:var(--fg); }
.medsearch button { font:inherit; padding:6px 14px; border:1px solid var(--line); border-radius:6px; background:var(--head); color:var(--fg); cursor:pointer; }
.medread { max-width:44rem; }
.medch { padding:14px 0 16px; border-bottom:1px solid var(--line); }
.medch h2 { font-size:15px; margin:0 0 8px; font-variant-numeric:tabular-nums; }
.medch h2 a { color:var(--muted); text-decoration:none; }
.medch p { margin:0 0 10px; white-space:pre-line; line-height:1.55; }
.medch p.grc { font-size:1.06em; }
.medch .who { display:block; font-size:12px; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); margin-bottom:2px; }
.medch mark { background:#f1d98a; color:inherit; padding:0 1px; border-radius:2px; }
.medmode a, .medsearch a { color:var(--accent); }
