/* Editorial refresh (2026-10-10). An additive layer loaded after styles.css,
   theme.css and pages.css: it restyles the chrome around the gallery and adds
   the hero, tools band and footer. It deliberately does NOT touch .grid,
   .grid-item or .grid-item img (Masonry positions those, and the grid look is
   approved), nor the .ap-* platform mocks, which imitate Discord/Instagram/
   TikTok on purpose.

   Palette: ink #0a0a0a, paper #faf9f6, card #fff, band #f1f0ec, rule ink/14%,
   body #3a3a37, muted #5f5f5c. No accent colour, the PFPs are the colour.
   Type: Outfit for everything, Space Mono for eyebrows, labels and counts.
   Dark mode reuses the tokens theme.css already ships (#121214, #1b1b1f,
   #26262b, #e6e6e6, #f2f2f2). */

/* Self-hosted so no request leaves the origin and the files ride the immutable
   cache (see staticCacheControl in src/middleware.js). Outfit is a variable
   font: one file covers 300-700. Replacing a face means renaming its file,
   because the URL has no content hash. font-display: swap keeps text painting
   in the fallback stack. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/outfit-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: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/space-mono-400-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: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/space-mono-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/space-mono-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;
}

:root {
  --ed-ink: #0a0a0a;
  --ed-paper: #faf9f6;
  --ed-card: #ffffff;
  --ed-band: #f1f0ec;
  --ed-rule: rgba(10, 10, 10, 0.14);
  --ed-rule-strong: rgba(10, 10, 10, 0.3);
  --ed-body: #3a3a37;
  --ed-muted: #5f5f5c;
  --ed-quiet: #70706a;
  --ed-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ed-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', monospace;
  --ed-max: 1200px;
}

/* Base */

body {
  font-family: var(--ed-sans);
  background-color: var(--ed-paper);
  color: var(--ed-body);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: var(--ed-ink);
  color: var(--ed-paper);
}

:focus-visible {
  outline: 2px solid var(--ed-ink);
  outline-offset: 2px;
}

/* Header. Structure is untouched: same hover-only dropdowns, same buttons. */

.top-bar {
  background-color: var(--ed-paper);
  border-bottom: 1px solid var(--ed-rule);
  box-shadow: none;
  padding: 14px 24px;
}

.top-bar-content {
  max-width: var(--ed-max);
  gap: 12px 24px;
}

.home-link {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ed-ink);
  line-height: 1.2;
}

.menu {
  gap: 2px;
  align-items: center;
}

.dropbtn,
.dropbtn-category {
  font-family: var(--ed-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-ink);
  padding: 15px 14px;
  margin: 0;
  border-radius: 4px;
}

.dropbtn:hover,
.dropbtn-category:hover {
  background-color: #ecebe6;
  color: var(--ed-ink);
}

.theme-toggle.dropbtn {
  min-height: 44px;
  padding: 0 16px;
  margin-left: 8px;
  border: 1px solid var(--ed-rule-strong);
  border-radius: 999px;
  letter-spacing: 0.12em;
}

.theme-toggle.dropbtn:hover {
  background-color: var(--ed-ink);
  color: var(--ed-paper);
}

.menu-toggle {
  color: var(--ed-ink);
}

/* Dropdown panels */

.dropdown-content {
  background-color: var(--ed-card);
  border: 1px solid var(--ed-rule);
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.08);
}

.dropdown-content a {
  font-family: var(--ed-sans);
  font-size: 15px;
  color: var(--ed-ink);
  padding: 13px 16px;
}

.dropdown-content a:hover {
  background-color: #ecebe6;
}

.dropdown-category-content {
  background-color: var(--ed-card);
  border: 1px solid var(--ed-rule);
  box-shadow: 0 8px 24px rgba(10, 10, 10, 0.08);
  padding: 16px;
  row-gap: 8px;
  column-gap: 8px;
}

/* Chips: the category menu, related categories, tags, image-page links.
   One pill shape everywhere. */

.dropdown-category-content a,
.related-cats a,
.image-tags a,
.image-nav a,
.search-suggest a,
.image-share a,
.image-share button {
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ed-ink);
  background-color: var(--ed-card);
  border: 1px solid rgba(10, 10, 10, 0.18);
  border-radius: 999px;
  padding: 11px 15px;
  box-shadow: none;
}

.dropdown-category-content a:hover,
.related-cats a:hover,
.image-tags a:hover,
.image-nav a:hover,
.search-suggest a:hover,
.image-share a:hover,
.image-share button:hover {
  background-color: var(--ed-ink);
  border-color: var(--ed-ink);
  color: var(--ed-paper);
}

/* Search. Full-width band, underline input, pill button. No markup change,
   so the input keeps its placeholder and stays label-less by design. */

.search-container {
  max-width: none;
  margin: 0;
  padding: 16px 24px;
  background-color: var(--ed-card);
  border-bottom: 1px solid var(--ed-rule);
  text-align: left;
}

.search-form {
  max-width: var(--ed-max);
  margin: 0 auto;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 12px;
}

/* styles.css styles this through `form input[type="text"]`, which outranks a
   bare class, so the underline needs the form in the selector too. */
.search-form .search-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 44px;
  padding: 10px 2px;
  font-family: var(--ed-sans);
  font-size: 17px;
  color: var(--ed-ink);
  background-color: transparent;
  border: 0;
  border-bottom: 2px solid var(--ed-ink);
  border-radius: 0;
  box-shadow: none;
}

.search-form .search-input::placeholder {
  color: var(--ed-muted);
}

.search-button {
  flex: none;
  min-height: 44px;
  margin-left: 0;
  padding: 0 26px;
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background-color: var(--ed-ink);
  border: 1px solid var(--ed-ink);
  border-radius: 999px;
}

.search-button:hover {
  background-color: #2b2b28;
  box-shadow: none;
}

/* Section headings. Flattened out of their card: a rule under the heading,
   nothing else. The text and its level are untouched. */

.heading2,
.heading2.cat-head {
  max-width: var(--ed-max);
  margin: 56px auto 0;
  padding: 0 24px;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  font-size: inherit;
}

.heading2 h2,
.cat-head h2 {
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ed-rule);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ed-ink);
  text-align: left;
}

.cat-intro,
.cat-head .cat-intro {
  margin: 22px 0 0;
  max-width: 68ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ed-body);
  text-align: left;
}

.cat-intro a {
  color: var(--ed-ink);
}

.search-suggest {
  max-width: none;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Sort toggle */

.sort-toggle {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  text-align: left;
}

.sort-toggle a {
  min-height: 44px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  font-weight: 400;
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-ink);
  background-color: var(--ed-card);
  border: 1px solid rgba(10, 10, 10, 0.24);
  border-radius: 999px;
}

.sort-toggle a:hover,
.sort-toggle a.on {
  background-color: var(--ed-ink);
  border-color: var(--ed-ink);
  color: var(--ed-paper);
}

/* The grid's own vote overlay. Pills instead of the square gradient buttons;
   the grid items themselves are untouched. */

.vote {
  gap: 8px;
  flex-wrap: wrap;
}

.vote p,
.vote-count,
.score {
  font-family: var(--ed-mono);
  font-size: 12px;
  color: var(--ed-muted);
  margin: 0;
}

.vote-btn,
.category-button {
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ed-ink);
  background-color: var(--ed-card);
  border: 1px solid rgba(10, 10, 10, 0.24);
  border-radius: 999px;
  padding: 9px 14px;
  margin: 0;
}

.vote-btn:hover,
.vote-btn.upvote:hover,
.vote-btn.downvote:hover,
.vote-btn.download:hover,
.category-button:hover {
  background: var(--ed-ink);
  border-color: var(--ed-ink);
  color: var(--ed-paper);
  box-shadow: none;
}

.vote-form {
  gap: 8px;
  flex-wrap: wrap;
}

/* Touch targets without touching the gallery. These controls render ~41x37,
   under the 44px guideline, but growing them would make every tile taller and
   change grid density. The pseudo-element extends only the hit area, so layout
   is identical and the tap target clears 44px. Vertical growth cannot collide
   with the 8px row gap; horizontal growth is 2px a side. */
.vote-btn,
.category-button {
  position: relative;
}

.vote-btn::after,
.category-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% + 6px);
  height: 44px;
  min-height: 100%;
}

/* Related categories and FAQ under a gallery */

.related-cats,
.cat-faq {
  /* content-box so the 1200 measure matches .heading2 and .grid; pages.css
     makes these border-box, which inset their headings by the 24px gutter. */
  box-sizing: content-box;
  max-width: var(--ed-max);
  margin: 56px auto 0;
  padding: 0 24px;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.related-cats h2,
.cat-faq h2 {
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ed-rule);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ed-ink);
  text-align: left;
}

.related-cats p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  text-align: left;
}

.cat-faq {
  padding-bottom: 8px;
}

.cat-faq h3 {
  margin: 0;
  padding: 20px 0 8px;
  border-top: 1px solid var(--ed-rule);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ed-ink);
}

.cat-faq h3:first-of-type {
  border-top: 2px solid var(--ed-ink);
}

.cat-faq p {
  margin: 0 0 20px;
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ed-body);
}

.cat-faq a {
  color: var(--ed-ink);
}

/* Breadcrumbs */

.crumbs {
  max-width: var(--ed-max);
  margin: 0 auto;
  padding: 28px 24px 0;
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ed-muted);
  text-align: left;
}

.crumbs a {
  color: var(--ed-muted);
}

.crumbs a:hover {
  color: var(--ed-ink);
  text-decoration: none;
}

/* Content pages (about, contact, legal) and the image page shell */

main {
  background-color: var(--ed-card);
  border: 1px solid var(--ed-rule);
  border-radius: 0;
  box-shadow: none;
  padding: 40px;
  margin: 40px auto;
}

main h1 {
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ed-ink);
  text-align: left;
  margin-bottom: 18px;
}

main h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ed-ink);
}

main p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ed-body);
  text-align: left;
}

/* Body links were the browser's default blue, which fights the monochrome
   palette. Ink plus an underline, so they still read as links without colour. */
main a:not([class]) {
  color: var(--ed-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

main a:not([class]):hover {
  color: var(--ed-muted);
}

main.image-page p.image-facts {
  font-family: var(--ed-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ed-muted);
}

main.image-page p.image-nav,
main.image-page p.image-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Hero (home only) */

.ed-hero {
  max-width: var(--ed-max);
  margin: 0 auto;
  padding: 64px 24px 8px;
}

.ed-eyebrow {
  margin: 0 0 20px;
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

/* The display line is a <p>, not a heading: home's outline stays exactly as
   it was (one <h2>, no <h1>), which the design lock asks for. */
.ed-hero-title {
  margin: 0;
  max-width: 15ch;
  font-size: 68px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ed-ink);
}

.ed-hero-title em {
  font-weight: 300;
  font-style: italic;
  color: var(--ed-quiet);
}

.ed-hero-body {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  align-items: flex-start;
  margin-top: 40px;
}

.ed-hero-body > p {
  flex: 999 1 420px;
  min-width: 0;
  max-width: 52ch;
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ed-body);
}

.ed-stats {
  flex: 1 1 300px;
  border: 1px solid rgba(10, 10, 10, 0.2);
  background-color: var(--ed-card);
}

.ed-stats-label {
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ed-rule);
  font-family: var(--ed-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-stats dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.ed-stats div {
  padding: 18px;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
}

.ed-stats div + div {
  border-left: 1px solid var(--ed-rule);
}

.ed-stats dt {
  margin: 4px 0 0;
  font-family: var(--ed-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-stats dd {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ed-ink);
}

/* Buttons shared by the hero and the tools band */

.ed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.ed-btn,
.ed-btn-ghost {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 24px;
  font-family: var(--ed-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--ed-ink);
}

.ed-btn {
  background-color: var(--ed-ink);
  color: var(--ed-paper);
}

.ed-btn:hover {
  background-color: #2b2b28;
}

.ed-btn-ghost {
  background-color: transparent;
  color: var(--ed-ink);
  border-color: var(--ed-rule-strong);
}

.ed-btn-ghost:hover {
  background-color: var(--ed-ink);
  border-color: var(--ed-ink);
  color: var(--ed-paper);
}

/* Tools band */

.ed-band {
  margin-top: 64px;
  background-color: var(--ed-ink);
  color: var(--ed-paper);
}

.ed-band-inner {
  max-width: var(--ed-max);
  margin: 0 auto;
  padding: 72px 24px;
}

.ed-band .ed-eyebrow {
  color: #a3a39c;
}

.ed-band h2 {
  margin: 0;
  max-width: 22ch;
  font-size: 46px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ed-paper);
}

.ed-band h2 em {
  font-weight: 300;
  font-style: italic;
  color: #b6b6ae;
}

.ed-band p {
  margin: 18px 0 0;
  max-width: 48ch;
  font-size: 18px;
  line-height: 1.55;
  color: #d6d6cf;
}

.ed-band .ed-btn {
  background-color: var(--ed-paper);
  color: var(--ed-ink);
  border-color: var(--ed-paper);
}

.ed-band .ed-btn:hover {
  background-color: #e6e5e0;
}

.ed-band .ed-btn-ghost {
  color: var(--ed-paper);
  border-color: rgba(250, 249, 246, 0.5);
}

.ed-band .ed-btn-ghost:hover {
  background-color: var(--ed-paper);
  color: var(--ed-ink);
  border-color: var(--ed-paper);
}

/* Footer */

.ed-footer {
  margin-top: 64px;
  border-top: 1px solid var(--ed-rule);
  background-color: var(--ed-card);
}

.ed-footer-inner {
  max-width: var(--ed-max);
  margin: 0 auto;
  padding: 56px 24px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 36px 48px;
}

.ed-footer-brand {
  flex: 1 1 260px;
}

.ed-footer-brand p:first-child {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ed-ink);
}

.ed-footer-brand p + p {
  margin: 10px 0 0;
  max-width: 32ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ed-muted);
}

.ed-footer nav {
  flex: 1 1 160px;
}

.ed-footer-label {
  margin: 0 0 12px;
  font-family: var(--ed-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

.ed-footer nav a {
  display: block;
  padding: 7px 0;
  font-size: 15px;
  color: var(--ed-ink);
  text-decoration: none;
}

.ed-footer nav a:hover {
  color: var(--ed-muted);
}

.ed-footer-legal {
  max-width: var(--ed-max);
  margin: 0 auto;
  padding: 0 24px 40px;
}

.ed-footer-legal p {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--ed-rule);
  font-family: var(--ed-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-muted);
}

/* Phone. Section headers stack, hero and band shrink, actions go full width. */

@media (max-width: 768px) {
  .top-bar {
    padding: 12px 18px;
  }

  .home-link {
    font-size: 20px;
  }

  .dropbtn,
  .dropbtn-category {
    font-size: 11px;
  }

  .search-container {
    padding: 14px 18px;
  }

  .heading2,
  .heading2.cat-head,
  .related-cats,
  .cat-faq,
  .ed-hero,
  .ed-band-inner,
  .ed-footer-inner,
  .ed-footer-legal,
  .crumbs {
    padding-left: 18px;
    padding-right: 18px;
  }

  .heading2,
  .heading2.cat-head {
    margin-top: 36px;
  }

  .heading2 h2,
  .cat-head h2 {
    font-size: 27px;
  }

  .ed-hero {
    padding-top: 36px;
  }

  .ed-hero-title {
    font-size: 38px;
    max-width: none;
  }

  .ed-hero-body > p {
    font-size: 16px;
  }

  .ed-band-inner {
    padding: 40px 18px;
  }

  .ed-band h2 {
    font-size: 28px;
  }

  .ed-band p {
    font-size: 15px;
  }

  .ed-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ed-actions .ed-btn,
  .ed-actions .ed-btn-ghost {
    justify-content: center;
    min-height: 50px;
  }

  .related-cats h2,
  .cat-faq h2 {
    font-size: 24px;
  }

  main {
    padding: 24px 18px;
    margin: 24px 15px;
  }

  main h1 {
    font-size: 32px;
  }
}

/* Dark mode. Same shapes, the tokens theme.css already uses. */

:root[data-theme='dark'] {
  --ed-ink: #f2f2f2;
  --ed-paper: #121214;
  --ed-card: #1b1b1f;
  --ed-band: #1b1b1f;
  --ed-rule: #2a2a30;
  --ed-rule-strong: #3a3a42;
  --ed-body: #d4d4d4;
  --ed-muted: #9a9a93;
  --ed-quiet: #a3a39c;
}

:root[data-theme='dark'] body {
  background-color: var(--ed-paper);
  color: var(--ed-body);
}

:root[data-theme='dark'] .top-bar,
:root[data-theme='dark'] .search-container {
  background-color: #1b1b1f;
  border-color: var(--ed-rule);
}

:root[data-theme='dark'] .dropbtn:hover,
:root[data-theme='dark'] .dropbtn-category:hover,
:root[data-theme='dark'] .dropdown-content a:hover {
  background-color: #26262b;
  color: #f2f2f2;
}

:root[data-theme='dark'] .theme-toggle.dropbtn:hover,
:root[data-theme='dark'] .search-button:hover {
  background-color: #ffffff;
  color: #121214;
}

:root[data-theme='dark'] .dropdown-content,
:root[data-theme='dark'] .dropdown-category-content {
  background-color: #1b1b1f;
  border-color: var(--ed-rule);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

:root[data-theme='dark'] .dropdown-category-content a,
:root[data-theme='dark'] .related-cats a,
:root[data-theme='dark'] .image-tags a,
:root[data-theme='dark'] .image-nav a,
:root[data-theme='dark'] .search-suggest a,
:root[data-theme='dark'] .image-share a,
:root[data-theme='dark'] .image-share button,
:root[data-theme='dark'] .vote-btn,
:root[data-theme='dark'] .category-button,
:root[data-theme='dark'] .sort-toggle a {
  background-color: #26262b;
  border-color: #33333a;
  color: #e6e6e6;
}

:root[data-theme='dark'] .dropdown-category-content a:hover,
:root[data-theme='dark'] .related-cats a:hover,
:root[data-theme='dark'] .image-tags a:hover,
:root[data-theme='dark'] .image-nav a:hover,
:root[data-theme='dark'] .search-suggest a:hover,
:root[data-theme='dark'] .image-share a:hover,
:root[data-theme='dark'] .image-share button:hover,
:root[data-theme='dark'] .vote-btn:hover,
:root[data-theme='dark'] .vote-btn.upvote:hover,
:root[data-theme='dark'] .vote-btn.downvote:hover,
:root[data-theme='dark'] .vote-btn.download:hover,
:root[data-theme='dark'] .category-button:hover,
:root[data-theme='dark'] .sort-toggle a:hover,
:root[data-theme='dark'] .sort-toggle a.on {
  background-color: #f2f2f2;
  border-color: #f2f2f2;
  color: #121214;
}

:root[data-theme='dark'] .search-form .search-input {
  color: #f2f2f2;
  border-bottom-color: #f2f2f2;
}

:root[data-theme='dark'] .search-button {
  background-color: #f2f2f2;
  border-color: #f2f2f2;
  color: #121214;
}

:root[data-theme='dark'] main,
:root[data-theme='dark'] .ed-stats,
:root[data-theme='dark'] .ed-footer {
  background-color: #1b1b1f;
  border-color: var(--ed-rule);
}

/* theme.css gives these blocks a card surface. The refresh flattens them in
   both themes, so the dark rules need the same treatment. */
:root[data-theme='dark'] .heading2,
:root[data-theme='dark'] .related-cats,
:root[data-theme='dark'] .cat-faq,
:root[data-theme='dark'] .sort-toggle {
  background-color: transparent;
  box-shadow: none;
  color: var(--ed-body);
}

:root[data-theme='dark'] .heading2 h2,
:root[data-theme='dark'] .cat-head h2,
:root[data-theme='dark'] .related-cats h2,
:root[data-theme='dark'] .cat-faq h2,
:root[data-theme='dark'] .cat-faq h3,
:root[data-theme='dark'] .ed-hero-title,
:root[data-theme='dark'] .ed-stats dd,
:root[data-theme='dark'] .ed-footer-brand p:first-child {
  color: #f2f2f2;
}

:root[data-theme='dark'] .cat-faq a,
:root[data-theme='dark'] .cat-intro a,
:root[data-theme='dark'] .ed-footer nav a {
  color: #e6e6e6;
}

:root[data-theme='dark'] .ed-band {
  background-color: #1b1b1f;
  border-top: 1px solid var(--ed-rule);
  border-bottom: 1px solid var(--ed-rule);
  color: #f2f2f2;
}

:root[data-theme='dark'] .ed-band h2 {
  color: #f2f2f2;
}

:root[data-theme='dark'] .ed-band .ed-btn {
  background-color: #f2f2f2;
  border-color: #f2f2f2;
  color: #121214;
}

:root[data-theme='dark'] .ed-band .ed-btn:hover {
  background-color: #ffffff;
}

:root[data-theme='dark'] .ed-band .ed-btn-ghost {
  color: #f2f2f2;
  border-color: #3a3a42;
}

:root[data-theme='dark'] .ed-band .ed-btn-ghost:hover {
  background-color: #f2f2f2;
  border-color: #f2f2f2;
  color: #121214;
}
