/* ==========================================================================
   reader.css — /reader/ (js/reader.js): the saved list and the reading view.
   ========================================================================== */

.rd-shell { max-width: 46rem; }

.rd__note {
  max-width: 30rem; margin: 0 auto 1.5rem; padding: 1rem 1.15rem;
  background: rgba(255,255,255,.72); border: 1px solid rgba(47,74,114,.14); border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm); text-align: center; color: var(--ink-deep);
}
.rd__note p { margin: 0 0 .8rem; font-size: .95rem; line-height: 1.45; }

/* ------------------------------------------------------------- the list -- */
.rd__list {
  list-style: none; margin: 0; padding: 0;
  background: rgba(255,255,255,.72); border: 1px solid rgba(47,74,114,.14);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm); overflow: hidden;
}
.rd__item { display: flex; align-items: flex-start; border-top: 1px solid rgba(47,74,114,.12); }
.rd__item:first-child { border-top: 0; }
.rd__itemlink {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem;
  padding: .9rem .4rem .85rem 1.1rem; color: var(--ink-deep); text-decoration: none;
}
.rd__itemlink:focus-visible { outline-offset: -3px; border-radius: var(--radius-card); }
.rd__itemtitle { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.rd__itemmeta { font-size: .8rem; color: var(--ink-soft); }
.rd__itemprog { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bar); }
.rd__item.is-done .rd__itemtitle { color: var(--ink-soft); font-weight: 600; }
.rd__item.is-done .rd__itemprog { color: var(--ink-soft); }
.rd__del {
  flex: none; margin: .7rem .6rem 0 0; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: none; color: var(--ink-soft); cursor: pointer;
}
.rd__del:hover { background: rgba(0,0,0,.06); color: var(--ink-deep); }
.rd__del[data-sure="true"] { background: var(--c-bad); color: #fff; }

.rd__addrow { display: flex; justify-content: flex-end; margin: 0 0 .7rem; }

/* The note editor (#note, #edit=…). */
.rd__editor {
  margin: 0 0 1.5rem; padding: 1.1rem 1.15rem;
  background: rgba(255,255,255,.72); border: 1px solid rgba(47,74,114,.14);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm); color: var(--ink-deep);
}
.rd__field { display: block; margin: 0 0 .9rem; }
.rd__field span { display: block; margin: 0 0 .3rem; font-size: .85rem; font-weight: 700; }
.rd__notetitle, .rd__notetext, .rd__titlein {
  display: block; width: 100%; box-sizing: border-box; padding: .6rem .75rem;
  border: 1px solid rgba(47,74,114,.25); border-radius: 10px; background: #fff; color: #1f2329;
  font: inherit; font-size: 1rem; line-height: 1.5;
}
.rd__notetext { min-height: 16rem; resize: vertical; }
.rd__editbtns, .rd__renamebtns { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0 0; }
.rd__editor .rd__fine { margin: -.4rem 0 0; }

.rd__count, .rd__empty { text-align: center; font-size: .85rem; color: var(--ink-soft); margin: .9rem 0 1.5rem; }
.rd__empty { font-size: .95rem; }

.rd__install {
  margin: 0 0 1.5rem; padding: .9rem 1.15rem;
  background: rgba(255,255,255,.72); border: 1px solid rgba(47,74,114,.14);
  border-radius: var(--radius-card); box-shadow: var(--shadow-sm); color: var(--ink-deep);
  font-size: .92rem; line-height: 1.5;
}
.rd__install summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.rd__install h3 { margin: 1rem 0 .3rem; font-size: .95rem; }
.rd__install p, .rd__install ol { margin: .45rem 0; }
.rd__install ol { padding-left: 1.4rem; list-style: decimal; }
.rd__install li { margin: .25rem 0; }
.rd__bmrow { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0 !important; }
.rd__bm { cursor: grab; }
.rd__fine { font-size: .8rem; color: var(--ink-soft); }

/* -------------------------------------------------------- reading view -- */
/* Hangs straight off the blue top bar: the -1.5rem cancels .shell's top padding. */
.rd__bar {
  position: sticky; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); z-index: 5; display: flex; align-items: center; justify-content: center; gap: .25rem;
  margin: -1.5rem -.4rem 1rem; padding: .35rem .4rem;
  background: rgba(255,255,255,.92); border: 1px solid rgba(47,74,114,.14); border-top: 0;
  border-radius: 0 0 1.4rem 1.4rem; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px);
}
.rd__barbtn {
  min-width: 2.5rem; height: 2.5rem; padding: 0 .55rem; border: 0; border-radius: 999px;
  background: none; color: var(--ink-deep); font: inherit; font-weight: 700; cursor: pointer;
  display: inline-grid; place-items: center; text-decoration: none;
}
.rd__barbtn:hover { background: rgba(0,0,0,.06); }
.rd__barbtn svg { width: 22px; height: 22px; }
.rd__font { font-size: 1rem; }
.rd__textbtn { font-size: .88rem; padding: 0 .9rem; }
.rd__save { background: var(--bar); color: #fff; }
.rd__save:hover { background: var(--bar-hi); }
/* Armed delete stays red in light or dark, hovered or not. */
.rd__textbtn[data-sure="true"],
.rd__textbtn[data-sure="true"]:hover,
html.rd-dark .rd__textbtn[data-sure="true"],
html.rd-dark .rd__textbtn[data-sure="true"]:hover { background: var(--c-bad); color: #fff; }

.rd__article {
  font-size: calc(1.12rem * var(--rd-scale, 1));
  padding: 1.6rem 1.35rem 1.8rem;
  background: #fffdf8; color: #1f2329;
  border: 1px solid rgba(47,74,114,.12); border-radius: var(--radius-card); box-shadow: var(--shadow-sm);
}
@media (min-width: 640px) { .rd__article { padding: 2.4rem 2.6rem 2.6rem; } }
.rd__font--serif { font-family: var(--font-display); }
.rd__font--sans { font-family: var(--font-body); }
.rd__font--literata { font-family: 'Literata', var(--font-display); }
.rd__font--source { font-family: 'Source Serif 4', var(--font-display); }
.rd__font--merri { font-family: 'Merriweather', var(--font-display); }
.rd__font--inter { font-family: 'Inter', var(--font-body); }
.rd__font--atkinson { font-family: 'Atkinson Hyperlegible Next', var(--font-body); }
.rd__font--lexend { font-family: 'Lexend', var(--font-body); }
.rd__head { margin-bottom: 1.6em; }
.rd__site { margin: 0 0 .4em; font-family: var(--font-body); font-size: .72em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bar); }
.rd__titlerow { display: flex; align-items: flex-start; gap: .4rem; }
.rd__titlerow[hidden] { display: none; }
.rd__titlerow h1 { flex: 1; min-width: 0; }
.rd__pen {
  flex: none; margin-top: .25em; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: none; color: #6b717c; cursor: pointer;
}
.rd__pen:hover { background: rgba(0,0,0,.06); color: #1f2329; }
.rd__rename .rd__titlein { font-size: 1.15em; font-weight: 700; }
.rd__rename .btn { font-family: var(--font-body); font-size: .85rem; }
.rd__head h1 { margin: 0; font-size: 1.85em; line-height: 1.15; letter-spacing: -.01em; color: #14171c; }
.rd__by { margin: .7em 0 0; font-family: var(--font-body); font-size: .78em; color: #5d6470; }
.rd__text { line-height: 1.65; overflow-wrap: break-word; }
.rd__text p, .rd__text li { white-space: pre-line; }
.rd__text p { margin: 0 0 1em; }
.rd__text h2 { margin: 1.6em 0 .6em; font-size: 1.22em; line-height: 1.3; color: #14171c; }
.rd__text blockquote { margin: 1.2em 0; padding: .1em 0 .1em 1em; border-left: 3px solid var(--bar); color: #3a404a; font-style: italic; white-space: pre-line; }
.rd__text ul { margin: 0 0 1em; padding-left: 1.3em; }
.rd__text li { margin: 0 0 .45em; }
.rd__text pre { margin: 0 0 1em; padding: .8em 1em; overflow-x: auto; background: #f2efe7; border-radius: 8px; font-size: .8em; line-height: 1.5; white-space: pre; }
.rd__text .rd__cap { font-family: var(--font-body); font-size: .78em; color: #5d6470; }
.rd__orig { margin: 2em 0 0; padding-top: 1em; border-top: 1px solid rgba(0,0,0,.1); font-family: var(--font-body); font-size: .8em; }
.rd__orig a { color: var(--bar); font-weight: 700; }

.rd__toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 60;
  max-width: min(30rem, calc(100% - 2rem)); margin: 0; padding: .7rem 1.1rem;
  background: #23385c; color: #eef4ff; border-radius: 999px; box-shadow: var(--shadow-md);
  font-size: .87rem; line-height: 1.4; text-align: center;
  transform: translate(-50%, 1rem); opacity: 0; pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}
.rd__toast[data-open="true"] { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .rd__toast { transition: none; } }

/* ------------------------------------------------------------ dark mode -- */
/* html.rd-dark is set by js/reader.js while an article is open. The season's
   backdrop fades nearly out, so the page reads like a dark room. */
html.rd-dark body { background: #111316; }
html.rd-dark #backdrop, html.rd-dark #particles { opacity: .08; }
html.rd-dark .rd__bar { background: rgba(32,35,40,.94); border-color: rgba(255,255,255,.1); }
html.rd-dark .rd__barbtn { color: #e3ded5; }
html.rd-dark .rd__barbtn:hover { background: rgba(255,255,255,.08); }
html.rd-dark .rd__save { background: #6f93c7; color: #111316; }
html.rd-dark .rd__save:hover { background: #86a7d6; }
html.rd-dark .rd__article { background: #1b1d21; color: #d9d4cb; border-color: rgba(255,255,255,.08); }
html.rd-dark .rd__head h1, html.rd-dark .rd__text h2 { color: #f0ebe2; }
html.rd-dark .rd__site, html.rd-dark .rd__orig a { color: #8fb0dd; }
html.rd-dark .rd__pen { color: #9a958c; }
html.rd-dark .rd__pen:hover { background: rgba(255,255,255,.08); color: #f0ebe2; }
html.rd-dark .rd__rename .btn--ghost { color: #8fb0dd; border-color: #8fb0dd; }
html.rd-dark .rd__rename .btn--ghost:hover { background: rgba(255,255,255,.08); }
html.rd-dark .rd__titlein { background: #25282d; color: #f0ebe2; border-color: rgba(255,255,255,.18); }
html.rd-dark .rd__by, html.rd-dark .rd__text .rd__cap { color: #9a958c; }
html.rd-dark .rd__text blockquote { color: #c4bfb6; border-left-color: #6f93c7; }
html.rd-dark .rd__text pre { background: #25282d; }
html.rd-dark .rd__orig { border-top-color: rgba(255,255,255,.1); }
html.rd-dark .rd__note { background: #1b1d21; color: #d9d4cb; border-color: rgba(255,255,255,.1); }
html.rd-dark .sitefoot { opacity: .4; }

/* ------------------------------------------------------------- listening -- */
/* js/reader.js: the paragraph being read aloud, and the player bar. */
.rd__text .is-speaking {
  background: rgba(47,74,114,.09); border-radius: 6px;
  box-shadow: 0 0 0 .35em rgba(47,74,114,.09);
}
html.rd-listening .rd__article { margin-bottom: 6rem; }
.rd__listen {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 50;
  transform: translateX(-50%); max-width: calc(100% - 1.5rem);
  display: flex; align-items: center; gap: .15rem; padding: .3rem .4rem;
  background: rgba(255,255,255,.96); border: 1px solid rgba(47,74,114,.16);
  border-radius: 999px; box-shadow: 0 6px 24px rgba(20,30,50,.18); backdrop-filter: blur(8px);
}
.rd__lbtn {
  flex: none; width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%;
  background: none; color: var(--ink-deep); font: inherit; font-weight: 800; font-size: .82rem;
  display: grid; place-items: center; cursor: pointer;
}
.rd__lbtn:hover { background: rgba(0,0,0,.06); }
.rd__lbtn svg { width: 20px; height: 20px; }
.rd__lplay { width: 3rem; height: 3rem; background: var(--bar); color: #fff; }
.rd__lplay:hover { background: var(--bar-hi); }
.rd__lplay svg { width: 24px; height: 24px; }
.rd__lrate { width: auto; min-width: 2.8rem; padding: 0 .5rem; border-radius: 999px; }
.rd__lvoice {
  min-width: 0; max-width: 9rem; height: 2.2rem; padding: 0 .4rem; margin: 0 .15rem;
  border: 1px solid rgba(47,74,114,.2); border-radius: 999px; background: transparent;
  color: var(--ink-deep); font: inherit; font-size: .8rem;
}
html.rd-listening .rd__toast { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }

html.rd-dark .rd__text .is-speaking { background: rgba(143,176,221,.13); box-shadow: 0 0 0 .35em rgba(143,176,221,.13); }
html.rd-dark .rd__listen { background: rgba(32,35,40,.96); border-color: rgba(255,255,255,.12); }
html.rd-dark .rd__lbtn, html.rd-dark .rd__lvoice { color: #e3ded5; }
html.rd-dark .rd__lbtn:hover { background: rgba(255,255,255,.08); }
html.rd-dark .rd__lplay { background: #6f93c7; color: #111316; }
html.rd-dark .rd__lvoice { border-color: rgba(255,255,255,.18); }
html.rd-dark .rd__lvoice option { background: #1b1d21; }

/* A phone fits the whole reading bar: listen, copy, share, the Aa menu
   and save/delete. */
@media (max-width: 440px) {
  .rd__bar { gap: .05rem; padding: .3rem .3rem; }
  .rd__barbtn { min-width: 2.2rem; padding: 0 .3rem; }
  .rd__barbtn svg { width: 20px; height: 20px; }
  .rd__textbtn { padding: 0 .65rem; }
}
@media (max-width: 360px) {
  .rd__barbtn { min-width: 2rem; padding: 0 .2rem; }
  .rd__textbtn { padding: 0 .55rem; }
}

/* The More menu on the list (js/reader.js gearMenu): actions, not
   settings, so a small menu dressed like the site's dialogs. */
.rd__menu {
  position: absolute; top: calc(100% - 1.2rem); right: -.4rem; z-index: 20;
  min-width: 15rem; padding: .35rem; text-align: left;
  background: #fdfcf8; border: 0; border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
}
.rd__menu[hidden] { display: none; }
/* on the list it hangs from the More button in the blue bar */
.topbar .rd__menu { top: calc(100% + .35rem); right: .5rem; color: var(--ink-deep); }
.rd__menuitem {
  position: relative; display: block; width: 100%; padding: .7rem .85rem; border: 0; border-radius: var(--radius-sm);
  background: none; color: var(--ink-deep); font: inherit; font-size: .95rem; font-weight: 600; text-align: left; cursor: pointer;
}
.rd__menuitem[hidden] { display: none; }
.rd__menuitem:hover, .rd__menuitem:focus-within { background: rgba(47,74,114,.08); }
/* the label holding the file input shows the ring for it */
.rd__menuitem:has(.rd__pdfin:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
/* The file picker fills its menu item, so a tap anywhere on it opens it. */
.rd__pdfin { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* The reading bar's Aa menu: a text size slider and light/dark/auto over
   the typefaces, each name shown in its own face. */
.rd__fontmenu { top: calc(100% + .4rem); right: .4rem; max-height: 70vh; overflow-y: auto; }
.rd__sizer {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .85rem .5rem; color: var(--ink-deep);
}
.rd__themes { flex-wrap: nowrap; margin: 0 .5rem .3rem; }
.rd__themebtn { flex: 1; }
.rd__fontlist { margin-top: .35rem; padding-top: .3rem; border-top: 1px solid rgba(47,74,114,.12); }
.rd__sizea { font-family: var(--font-display); font-weight: 700; font-size: .85rem; line-height: 1; }
.rd__sizea--big { font-size: 1.4rem; }
.rd__sizein { flex: 1; min-width: 0; margin: 0; accent-color: var(--bar); cursor: pointer; }
.rd__fontitem { font-size: 1.05rem; padding: .55rem .85rem .55rem 2.1rem; }
.rd__fontitem small { display: block; font-size: .72rem; font-weight: 400; color: var(--ink-soft); }
.rd__check { position: absolute; left: .7rem; top: .75rem; width: 1rem; height: 1rem; color: var(--ink); visibility: hidden; }
.rd__fontitem[aria-checked="true"] .rd__check { visibility: visible; }
html.rd-dark .rd__menu { background: #25282d; border-color: rgba(255,255,255,.12); }
html.rd-dark .rd__menuitem { color: #e3ded5; }
html.rd-dark .rd__menuitem:hover, html.rd-dark .rd__menuitem:focus-visible { background: rgba(255,255,255,.08); }
html.rd-dark .rd__sizer { color: #e3ded5; }
html.rd-dark .rd__themebtn { background: transparent; border-color: rgba(255,255,255,.2); color: #e3ded5; }
html.rd-dark .rd__themebtn:hover { background: rgba(255,255,255,.08); }
html.rd-dark .rd__themebtn[aria-pressed="true"] { background: #e3ded5; border-color: #e3ded5; color: #111316; }
html.rd-dark .rd__fontlist { border-color: rgba(255,255,255,.12); }
html.rd-dark .rd__sizein { accent-color: #8fb0dd; }
html.rd-dark .rd__fontitem small { color: #9a958c; }
html.rd-dark .rd__check { color: #8fb0dd; }

/* Self-hosted reading faces (SIL Open Font License, fonts/OFL-*.txt), Latin
   subsets as Google Fonts serves them. A browser fetches one only when it's used. */
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/literata-400-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('/fonts/literata-400-700-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/source-serif-4-400-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('/fonts/source-serif-4-400-700-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Merriweather'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/merriweather-400-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Merriweather'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('/fonts/merriweather-400-700-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300 600; font-display: swap; src: url('/fonts/inter-300-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/atkinson-next-400-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('/fonts/atkinson-next-400-700-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('/fonts/lexend-400-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ------------------------------------------------------------ search -- */
/* The Search pill, beside Add a note, opens the box; closing it clears it. */
.rd__addrow { gap: .5rem; }
.rd__findbtn[aria-expanded="true"] { background: var(--ink); color: #fff; }
.rd__findbtn[aria-expanded="true"]:hover { background: var(--ink-deep); color: #fff; }
.rd__find { margin: 0 0 .8rem; }
.rd__findin {
  display: block; width: 100%; box-sizing: border-box; padding: .65rem .9rem;
  border: 1px solid rgba(47,74,114,.25); border-radius: 999px; background: #fff; color: #1f2329;
  font: inherit; font-size: 1rem;
}
.rd__findnote { margin: .45rem .9rem 0; font-size: .82rem; color: var(--ink-soft); }
.rd__findnote:empty { display: none; }
.rd__itemsnip { font-size: .86rem; line-height: 1.4; color: var(--ink-deep); opacity: .85; }
.rd__itemlink mark { background: rgba(255,200,60,.45); color: inherit; border-radius: 2px; padding: 0 .05em; }
/* In the article, the matched words glow, then fade. */
.rd__hit { color: inherit; border-radius: 2px; animation: rd-hit 4s ease-out forwards; }
@keyframes rd-hit { 0%, 55% { background: rgba(255,200,60,.6); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .rd__hit { animation: none; background: rgba(255,200,60,.4); } }
.rd__shows { justify-content: flex-start; margin: .55rem 0 0; }

/* --------------------------------------------- find in the article -- */
/* The magnifier in the reading bar opens a row under its buttons, so the
   box, the count and the arrows stay in reach as the article scrolls. */
.rd__bar { flex-wrap: wrap; }
.rd__bar [data-act="find"][aria-expanded="true"] { background: var(--ink); color: #fff; }
.rd__inrow { flex: 1 0 100%; min-width: 0; display: flex; align-items: center; gap: .15rem; padding: .3rem 0 .1rem; }
.rd__infind {
  flex: 1; width: 0; min-width: 0; padding: .5rem .85rem; border: 1px solid rgba(47,74,114,.25); border-radius: 999px;
  background: #fff; color: #1f2329; font: inherit; font-size: 1rem;
}
.rd__incount { flex: none; min-width: 3.6rem; padding: 0 .3rem; font-size: .82rem; color: var(--ink-soft); text-align: center; white-space: nowrap; }
.rd__incount:empty { min-width: 0; padding: 0; }
.rd__inrow .rd__barbtn:disabled { opacity: .35; cursor: default; background: none; }
.rd__inrow .rd__barbtn svg { width: 20px; height: 20px; }
.rd__fm { background: rgba(255,200,60,.42); color: inherit; border-radius: 2px; }
.rd__fm.is-on { background: #ff9f1c; color: #1f2329; box-shadow: 0 0 0 2px #ff9f1c; }
html.rd-dark .rd__bar [data-act="find"][aria-expanded="true"] { background: #e3ded5; color: #111316; }
html.rd-dark .rd__infind { background: #1b1d21; border-color: rgba(255,255,255,.2); color: #e3ded5; }
html.rd-dark .rd__incount { color: #9a958c; }
html.rd-dark .rd__fm { background: rgba(255,200,60,.3); }
html.rd-dark .rd__fm.is-on { background: #ffb347; color: #111316; box-shadow: 0 0 0 2px #ffb347; }

/* Straight on the wash: in winter and summer, the season's wash ink
   (seasons.css), as the app's, since --ink-soft is hard to read on them. */
:is(html[data-season="winter"], html[data-season="summer"]) :is(.rd__count, .rd__empty) {
  --ink: var(--wash-ink);
  --ink-deep: var(--wash-ink-deep);
  --ink-soft: var(--wash-ink-soft);
}
