/* Inter, served from this domain rather than fetched from Google.
   ------------------------------------------------------------------
   This file used to open with an @import of fonts.googleapis.com, which was two
   problems in one line. The CSP set in public/index.php says `style-src 'self'`,
   so the import never resolved and every visitor has in fact been reading the
   system-ui fallback since the day that header went in; and had the policy ever
   been loosened, the fix would have been a request to Google on every page load
   from every reader, which is a thing the privacy policy would then have had to
   describe.

   These are Google's own woff2 subsets of Inter v20 (variable, weight axis
   400-700 — the whole range this stylesheet asks for, so 400, 500, 600 and 700
   all come out of one file per subset), copied into public/assets/fonts/ and
   licensed under the SIL Open Font License 1.1; the licence travels with them in
   OFL.txt. The unicode-range on each block is Google's, and is what keeps the
   cost honest: a page of English text fetches inter-latin.woff2 (48 KB) and
   nothing else, and the Cyrillic, Greek and Vietnamese files are downloaded only
   by a page that actually contains those scripts. Paths are relative to this
   stylesheet, so they resolve at a domain root, in a subfolder, and on a host
   with no rewriting alike.

   To update: fetch https://fonts.googleapis.com/css2?family=Inter:wght@400..700
   with a current browser's user-agent, download the seven files it names, and
   replace the unicode-range lines below with the ones it gives back. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-greek-ext.woff2') format('woff2');
  unicode-range: U+1F00-1FFF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-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 {
  --color-bg: #100b1c;
  --color-surface: #1a1430;
  --color-text: #f1eefa;
  --color-accent: #a89af5;
  --color-accent-2: #b8b1ef;
  --color-divider: color-mix(in srgb, #b6a9dd 20%, transparent);

  /* Tonal ramps - generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f5f2fe;
  --color-neutral-200: #e8e3f7;
  --color-neutral-300: #d5cdec;
  --color-neutral-400: #b8aed6;
  --color-neutral-500: #9c92bd;
  --color-neutral-600: #7d739e;
  --color-neutral-700: #5f567c;
  --color-neutral-800: #3c3457;
  --color-neutral-900: #221b37;

  --color-accent-100: #f5f4ff;
  --color-accent-200: #e7e5fe;
  --color-accent-300: #ddd8ff;
  --color-accent-400: #c4baff;
  --color-accent-500: #a89af5;
  --color-accent-600: #8a7bd8;
  --color-accent-700: #6a5cb0;
  --color-accent-800: #4b4084;
  --color-accent-900: #2e2751;

  --color-accent-2-100: #f5f4ff;
  --color-accent-2-200: #e7e5fe;
  --color-accent-2-300: #d2cefd;
  --color-accent-2-400: #c6c0fb;
  --color-accent-2-500: #a8a1e0;
  --color-accent-2-600: #8a83c2;
  --color-accent-2-700: #5c5783;
  --color-accent-2-800: #4a4573;
  --color-accent-2-900: #2b293a;

  /* Deck section-divider ground. Deck-scale fills only - not interface colors. */
  --color-section: #262a60;
  --color-section-glow: #353b80;
  --color-section-ghost: #4c5397;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-heading-weight: 500;
  --font-body: "Inter", system-ui, sans-serif;

  --space-1: 2.8px;
  --space-2: 5.6px;
  --space-3: 8.4px;
  --space-4: 11.2px;
  --space-6: 16.8px;
  --space-8: 22.4px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  /* Elevation - derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-md: 0 0 0 1px #595d6c, 0 6px 18px rgba(0,0,0,0.55);
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0,0,0,0.65);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.lighten{mix-blend-mode:lighten;background-color:transparent}

/* ══════════════════════════════════════════════════════════════════════════
   Components - built with the above. Plain CSSon plain HTML: no JavaScript.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: var(--color-neutral-500); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* - rules - */
/* Rules fade to transparent at both ends instead of stopping cleanly - a
   Nocturne signature. The ramp is 48px an end (one deck baseline unit),
   painted from the same divider token. Freestanding rules fade; box
   outlines, in-control separators, and short accent marks stay solid. */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent);
}

/* - buttons - */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px -
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { color: var(--color-neutral-100); background: var(--color-accent-800); border-color: var(--color-accent-800); }
.btn-primary:hover { background: var(--color-accent-700); border-color: var(--color-accent-700); }
.btn-primary:active { background: var(--color-accent-900); border-color: var(--color-accent-900); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* - forms - */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { color: var(--color-neutral-100); background: var(--color-accent-800); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* - cards - */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent);
}
/* Community average, right-justified on the kicker line beside the year/type. */
.card-rating { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; }
.card-rating .star { width: 13px; height: 13px; cursor: default; }
.card-rating-num { font-weight: 600; letter-spacing: 0; color: var(--color-text); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* - tags - */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
/* Trusted-reviewer badge, shown inline right after a member's name. */
.trusted-badge {
  display: inline-block; vertical-align: text-bottom;
  width: 16px; height: 16px; margin-left: 4px;
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-accent-2 { background: var(--color-accent-2-800); color: var(--color-accent-2-100); }
.tag-neutral { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }
.tag-selected { background: var(--color-accent-800); border: 1px solid var(--color-accent-800); color: var(--color-neutral-100); }

/* - navigation - */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: none;
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
  display: flex; align-items: center;
}
.nav-wordmark {
  height: 22px; width: auto; display: block;
  filter: brightness(1.8) saturate(0.95);
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--color-accent); }
.nav a[aria-current='page'] {
  color: var(--color-neutral-100); background: var(--color-accent-800);
  padding: 4px 10px; margin: -4px 0; border-radius: var(--radius-md);
}

/* - tables - */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid transparent; /* keeps layout; the row paints the fading rule */
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid transparent;
}
/* Row rules as row-level strips so the end-fade spans the row, not each cell. */
.table thead tr {
  background: linear-gradient(to right,
    transparent, var(--color-divider) 48px,
    var(--color-divider) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr {
  background: linear-gradient(to right,
    transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
    color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}
.table tbody tr:hover {
  /* the hover tint layers over the row rule, which keeps painting */
  background:
    linear-gradient(color-mix(in srgb, var(--color-text) 4%, transparent),
                    color-mix(in srgb, var(--color-text) 4%, transparent)) no-repeat 0 0 / 100% 100%,
    linear-gradient(to right,
      transparent, color-mix(in srgb, var(--color-text) 8%, transparent) 48px,
      color-mix(in srgb, var(--color-text) 8%, transparent) calc(100% - 48px), transparent) no-repeat bottom / 100% 1px;
}

/* - dialog - */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }



/* ------------------------------------------------
   Just How Queer Is This? - application layer.
   Everything above this line is the base sheet and component
   library, unchanged. Everything below is page layout only: no new colours,
   no new type sizes - all values come from the variables above.
   ------------------------------------------------ */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: -9999px; top: var(--space-2); z-index: 10;
  padding: var(--space-2) var(--space-4); background: var(--color-surface);
  border-radius: var(--radius-md);
}
.skip:focus-visible { left: var(--space-4); }

body { min-height: 100vh; }
main { display: block; }

/* - header - */
.nav { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.nav-links { display: flex; gap: var(--space-6); font-size: 14px; margin-right: auto; flex: none; white-space: nowrap; }
.nav-search { flex: 1 1 220px; min-width: 160px; max-width: 340px; }
.nav-actions { display: flex; align-items: center; gap: var(--space-2); flex: none; }
.nav-actions form { display: inline-flex; }

/* - page shells - */
.page { padding: var(--space-8) calc(var(--space-8) * 1.6) calc(var(--space-8) * 2); max-width: 1180px; }
.page.narrow { max-width: 620px; }
.hero { padding: calc(var(--space-8) * 2) calc(var(--space-8) * 1.6) var(--space-8);
        background: linear-gradient(160deg, var(--color-surface) 0%, var(--color-bg) 62%); }
.hero h1 { max-width: 19ch; text-wrap: pretty; margin: 0 0 var(--space-4); }
.lede { max-width: 80ch; color: var(--color-neutral-400); text-wrap: pretty; }
.kicker { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-500); }
.muted { color: var(--color-neutral-500); }
.yes { color: var(--color-accent-300); }
.right { text-align: right; }

.search-row { display: flex; gap: var(--space-2); max-width: 620px; margin-top: var(--space-6); }
.search-row .input { min-height: 44px; }
.filter-bar { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
              padding: var(--space-4) calc(var(--space-8) * 1.6); background: var(--color-surface); }
.filter-bar a.tag { text-decoration: none; }
.filter-bar a.tag:hover { color: var(--color-neutral-100);
  background: color-mix(in srgb, var(--color-accent) 22%, transparent); }
.filter-sep { width: 1px; height: 18px; background: var(--color-divider); margin: 0 var(--space-2); }
.sort-form { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.filter-bar-inline { padding-left: 0; padding-right: 0; background: transparent; }
[hidden] { display: none !important; }

.select { min-height: 34px; padding: 4px var(--space-3); font-size: 13px; width: auto;
  color: var(--color-text); background: var(--color-bg); }
.result-count { margin: 0 0 var(--space-4); font-size: 13px; color: var(--color-neutral-500); }

/* - flashes - */
.flash { margin: 0; padding: var(--space-3) calc(var(--space-8) * 1.6); font-size: 14px;
         background: var(--color-accent-900); }
.flash-warn { background: var(--color-neutral-900); box-shadow: inset 0 0 0 1px var(--color-accent-700); }
.flash .inline { display: inline; }

/* - cards & grids - */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
             gap: var(--space-4); list-style: none; margin: 0; padding: 0; }
.card-grid .card { gap: var(--space-3); }
.card-cover, .title-cover, .queue-cover { display: block; overflow: hidden; border-radius: var(--radius-sm); }
.card-cover img, .title-cover img, .queue-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover { aspect-ratio: 2 / 3; }
.cover-blank { display: block; width: 100%; height: 100%;
  background: repeating-linear-gradient(135deg, var(--color-neutral-900) 0 8px, var(--color-surface) 8px 16px); }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--color-accent); }
.mini-descriptors { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.mini-descriptors li { display: flex; justify-content: space-between; gap: var(--space-3); }
.notice { max-width: 560px; gap: var(--space-3); padding: calc(var(--space-8) * 0.9); }

/* - consensus bars: always a number beside the bar, never colour alone - */
.pct { display: flex; align-items: center; gap: var(--space-3); }
.pct-track { flex: 1 1 120px; min-width: 90px; height: 6px; border-radius: var(--radius-sm);
             background: var(--color-neutral-900); overflow: hidden; }
.pct-fill { height: 100%; background: var(--color-accent); }
.pct-fill-low { height: 100%; background: var(--color-neutral-700); }
.pct-label { font-size: 13px; white-space: nowrap; color: var(--color-accent-300); }
.pct-count { font-size: 12px; color: var(--color-neutral-500); white-space: nowrap; }

/* - title page - */
.title-head { display: grid; grid-template-columns: 200px 1fr; gap: calc(var(--space-8) * 1.2);
              align-items: start; margin-bottom: calc(var(--space-8) * 1.5); }
.title-cover { aspect-ratio: 2 / 3; }
.descriptor-block { margin-bottom: calc(var(--space-8) * 1.5); }
.descriptor-block h2 { margin-bottom: var(--space-3); }
.descriptor-block > .card-meta { display: block; margin-bottom: var(--space-3); }
.table td .card-meta { display: block; }
/* Moderator's "remove from this title", tucked under the descriptor name. */
.descriptor-remove { margin-top: var(--space-2); }
.descriptor-remove summary { display: inline-flex; padding-inline: 0; }
.descriptor-remove form { margin-top: var(--space-2); max-width: 46ch; }
.descriptor-remove .card-meta { margin-bottom: var(--space-2); }
.vote-form { display: inline-flex; gap: var(--space-2); justify-content: flex-end; }
.row-actions { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.chip-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.chip-list a.tag { text-decoration: none; }
.chip-list button.tag { border: 0; cursor: pointer; font: inherit; font-size: 11px; }
.report { margin-top: var(--space-8); }
.report summary { cursor: pointer; color: var(--color-accent); }

/* - moderator-kept links: official site, itch.io, a publisher's own shop - */
.link-admin { display: flex; flex-direction: column; gap: 1px; list-style: none; margin: var(--space-4) 0; padding: 0;
  background: var(--color-divider); border-radius: var(--radius-md); overflow: hidden; }
.link-admin li { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2);
  padding: var(--space-3) var(--space-4); background: var(--color-bg); }
.link-admin-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.link-admin .card-meta { display: block; word-break: break-all; }
.link-edit summary { cursor: pointer; font-size: 13px; color: var(--color-accent); }
.link-edit[open] summary { margin-bottom: var(--space-3); }
.link-edit form { margin-bottom: var(--space-2); }

/* - star rating - */
.rating-widget { display: flex; align-items: center; gap: calc(var(--space-8) * 1.2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.rating-block { display: inline-flex; align-items: center; gap: var(--space-3); }
.rating { display: inline-flex; align-items: center; gap: var(--space-3); margin: 0; }
.rating-label { color: var(--color-neutral-400); font-size: 13px; }
.stars { display: inline-flex; gap: var(--space-1); }
.rating-average { display: inline-flex; align-items: center; gap: var(--space-2); }
.rating-average .star { width: 18px; height: 18px; cursor: default; }
.rating-average-num { font-weight: 600; color: var(--color-text); }
.rating-average-count { font-size: 12px; }
.star {
  display: inline-block; vertical-align: middle;
  width: 26px; height: 26px; padding: 0; border: 0; background: transparent; cursor: pointer;
  background-color: var(--color-neutral-600);
  -webkit-mask: url("jhqit-rate-unfilled.svg") center / contain no-repeat;
          mask: url("jhqit-rate-unfilled.svg") center / contain no-repeat;
  transition: background-color 120ms ease;
}
.star.is-on, .star.is-preview {
  background-color: #f2c14e;
  -webkit-mask-image: url("jhqit-rate-solid.svg");
          mask-image: url("jhqit-rate-solid.svg");
}
.star.is-preview { background-color: #f6d488; }
/* While a preview is active, only the previewed stars read as filled — the
   saved rating beyond the pointer drops back to the empty outline. */
.stars:has(.is-preview) .star:not(.is-preview) {
  background-color: var(--color-neutral-600);
  -webkit-mask-image: url("jhqit-rate-unfilled.svg");
          mask-image: url("jhqit-rate-unfilled.svg");
}
.star:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.stars-static .star { cursor: default; }
.rating-clear { font-size: 12px; }

/* - forms - */
.stack { display: flex; flex-direction: column; gap: var(--space-4); max-width: 560px; }
.stack fieldset { border: 0; padding: 0; margin: 0; }
.stack legend { font-size: 13px; margin-bottom: var(--space-2); }
.field span { display: block; font-size: 13px; margin-bottom: var(--space-1); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.inline { display: inline-flex; gap: var(--space-2); align-items: center; }
select.input { appearance: none; }

/* - profile - */
.profile-head { display: flex; gap: var(--space-6); align-items: center; margin-bottom: calc(var(--space-8) * 1.2); flex-wrap: wrap; }
.avatar { width: 72px; height: 72px; border-radius: 50%; flex: none;
  background: repeating-linear-gradient(135deg, var(--color-neutral-900) 0 8px, var(--color-surface) 8px 16px); }
img.avatar { object-fit: cover; box-shadow: inset 0 0 0 1px var(--color-divider); }
.avatar-field { margin-bottom: var(--space-2); }
.avatar-edit { display: flex; gap: var(--space-4); align-items: flex-start; }
.avatar-edit-body { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; min-width: 0; }
.avatar-edit input[type="file"] { padding: var(--space-2); font-size: 13px; cursor: pointer; }
.avatar-edit input[type="file"]::file-selector-button { font: inherit; margin-right: var(--space-3); padding: 4px var(--space-3);
  border-radius: var(--radius-sm); border: 1px solid var(--color-accent); background: transparent; color: var(--color-accent-300); cursor: pointer; }
.avatar-edit input[type="file"]::file-selector-button:hover { background: color-mix(in oklab, var(--color-accent) 12%, transparent); }
.avatar-report { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-2); max-width: 420px; }
.avatar-report .input { font-size: 13px; padding: 4px var(--space-3); }
.report-avatar img { border-radius: 50%; object-fit: cover; vertical-align: middle; margin: 0 var(--space-2);
  box-shadow: inset 0 0 0 1px var(--color-divider); }
.profile-head h1 { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin: 0 0 var(--space-1); }
.profile-stats { display: flex; gap: calc(var(--space-8) * 1.2); margin: 0 0 0 auto; text-align: right; }
.profile-stats dt { font-size: 12px; color: var(--color-neutral-500); order: 2; }
.profile-stats dd { font-family: var(--font-heading); font-size: 25px; line-height: 1.1; margin: 0; order: 1; }
.profile-stats > div { display: flex; flex-direction: column; }
.tab-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.tab-row a { text-decoration: none; }

/* - submit wizard - */
.step-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-8); }
.step-rule { flex: 1; height: 1px; background: var(--color-divider); }
.result-list { display: flex; flex-direction: column; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.result-list form { display: flex; align-items: flex-start; gap: var(--space-4); }
.result-thumb { flex-shrink: 0; width: 48px; background: var(--color-neutral-800); border-radius: var(--radius-sm); overflow: hidden; }
.result-thumb img { width: 48px; height: auto; display: block; }
.result-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result-actions { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2); flex-shrink: 0; }
.result-actions .btn { white-space: nowrap; text-align: center; justify-content: center; min-width: 11rem; }
@media (max-width: 560px) {
  .result-list form { flex-direction: column; align-items: stretch; }
  .result-actions { flex-direction: row; justify-content: flex-end; }
  .result-actions .btn { min-width: 0; flex: 1; }
}

/* - paradata: behind the work - */
.credits-block .card-meta { max-width: 68ch; display: block; margin-bottom: var(--space-4); }
.credit-list { display: flex; flex-direction: column; gap: 1px; list-style: none; margin: 0 0 var(--space-4); padding: 0;
  background: var(--color-divider); border-radius: var(--radius-md); overflow: hidden; }
.credit { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: var(--space-4); align-items: center;
  padding: var(--space-3) var(--space-4); background: var(--color-bg); }
.credit-who a { font-weight: 500; }
.credit-who .card-meta, .credit-claim .card-meta { display: block; }
.credit-claim { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.credit-source { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; text-align: right; }
.credit-add { margin-top: var(--space-4); }
.credit-add summary { cursor: pointer; display: inline-flex; }
.credit-add form { margin-top: var(--space-4); }
.credit-optout { display: block; max-width: 62ch; margin-top: var(--space-8); }
.quote { border-left: 2px solid var(--color-accent); padding-left: var(--space-3); color: var(--color-neutral-300); }
@media (max-width: 768px) {
  .credit { grid-template-columns: 1fr; gap: var(--space-2); }
  .credit-source { align-items: flex-start; text-align: left; }
}

/* - moderation - */
.queue-list { display: flex; flex-direction: column; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.queue-item { flex-direction: row; gap: var(--space-4); padding: var(--space-4); }
.queue-cover { width: 54px; height: 80px; flex: 0 0 54px; }
.queue-cover:empty { background: repeating-linear-gradient(135deg, var(--color-neutral-900) 0 8px, var(--color-surface) 8px 16px); }
.queue-body { flex: 1; }
.queue-body p { margin: 0 0 3px; }
.queue-actions { display: flex; flex-direction: column; gap: var(--space-2); justify-content: center; }
.queue-actions summary, .trust summary, .confirm summary, .merge summary, .reject summary,
.approve summary { cursor: pointer; list-style: none; }
/* A suggested link is judged on its address, so the whole address has to be readable in the row. */
.queue-body .link-url { word-break: break-all; }
.card-meta.warn { color: var(--color-accent-300); }
.split { display: grid; grid-template-columns: 1fr 380px; gap: var(--space-6); align-items: start; }
.pager { display: flex; gap: var(--space-2); margin-top: var(--space-8); }
.pager a { text-decoration: none; }

/* — home page — */
.kicker.accent { color: var(--color-accent); }
.small { font-size: 13px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-6); }
.section-head h4 { margin: 0; }
.section-head a { font-size: 13px; }
.home-grid { grid-template-columns: repeat(4, 1fr); }
.home-grid .card { padding: 0; overflow: hidden; gap: 0; }
.home-grid .card-body-wrap { display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); }
.home-grid .card-cover { border-radius: 0; }
.home-bar { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 12px; }
.pct-track.thin { height: 3px; flex: none; min-width: 0; width: 100%; }
.home-boxes { display: flex; flex-wrap: wrap; gap: var(--space-6);
  margin-top: calc(var(--space-8) * 1.5); }
.home-box { flex: 1 1 320px; padding: var(--space-6); gap: var(--space-3); }
.home-box h4 { margin: 0; }
.home-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  gap: var(--space-3); }
.home-list li { display: flex; align-items: center; gap: var(--space-3); }
.home-list-cover { display: block; flex: none; width: 30px; height: 44px; overflow: hidden;
  border-radius: var(--radius-sm); }
.home-list-cover img { width: 100%; height: 100%; object-fit: cover; }
.home-list-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.home-list-text a { color: inherit; text-decoration: none; }
.home-list-text a:hover { color: var(--color-accent); }
.home-list-go { font-size: 13px; white-space: nowrap; }
.home-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.home-chips a.tag { text-decoration: none; }
.home-chips a.tag:hover { color: var(--color-neutral-100);
  background: color-mix(in srgb, var(--color-accent) 22%, transparent); }

/* — footer — */

/* - footer - */
.footer { padding: calc(var(--space-8) * 1.5) calc(var(--space-8) * 1.6);
          border-top: 1px solid var(--color-divider); font-size: 13px; max-width: 1180px; }
.footer p { max-width: 70ch; }
.footer-cols { display: flex; flex-wrap: wrap; gap: calc(var(--space-8) * 2); align-items: flex-start; }
.footer-about { flex: 1 1 320px; }
.footer-wordmark { display: block; height: 20px; width: auto; margin-bottom: var(--space-3);
  filter: brightness(1.8) saturate(0.95); }
.footer-col { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col p { margin: 0 0 var(--space-1); }
.footer-fine { display: flex; flex-wrap: wrap; gap: var(--space-4);
  justify-content: space-between; align-items: baseline;
  margin-top: calc(var(--space-8) * 1.2); padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider); }
.footer-fine p { margin: 0; }

/* - mobile: single column, 44px targets - */
@media (max-width: 768px) {
  .page, .hero, .filter-bar, .flash, .footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .sort-form { margin-left: 0; flex-basis: 100%; }
  .footer-cols { gap: var(--space-6); }
  .nav { gap: var(--space-3); }
  .nav-search { order: 5; flex-basis: 100%; max-width: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .title-head { grid-template-columns: 1fr; }
  .title-cover { max-width: 180px; }
  .split { grid-template-columns: 1fr; }
  .profile-stats { margin-left: 0; text-align: left; gap: var(--space-6); }
  .table thead { display: none; }
  .table tr { display: grid; gap: var(--space-2); padding: var(--space-3) 0; }
  .table td { padding: 0; }
  .table td.right { text-align: left; }
  .vote-form { justify-content: flex-start; }
  .vote-form .btn { flex: 1; min-height: 44px; }
  .queue-item { flex-wrap: wrap; }
  .queue-actions { flex-direction: row; width: 100%; }
  .queue-actions .btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* inline voting: the moment between click and tally */
.vote-form[aria-busy="true"] { opacity: .55; pointer-events: none; }
.consensus-cell .pct { transition: opacity 120ms ease; }

/* - notes: why a descriptor fits - */
.note-row td { border-top: 0; padding-top: 0; }
.note-strip { display: flex; gap: var(--space-4); align-items: flex-start;
  border-left: 2px solid var(--color-accent-700); padding-left: var(--space-4); }
.note-strip-empty { border-left-color: var(--color-divider); align-items: center; }
.note-strip-body { flex: 1; min-width: 0; }
.note-strip-actions { display: flex; gap: var(--space-2); flex: 0 0 auto; align-items: center; }
.note-kicker { color: var(--color-accent-300); margin: 0 0 2px; }
.note-text { margin: 0 0 var(--space-2); font-size: 13px; line-height: 1.55;
  color: var(--color-neutral-300); max-width: 80ch; text-wrap: pretty; }
.note-spoiler summary { cursor: pointer; font-size: 13px; color: var(--color-accent); }
.note-spoiler[open] summary { margin-bottom: var(--space-2); }
.note-useful-form { display: inline-flex; }

.notes-page .tab-row { margin: var(--space-4) 0; }
.note-list { display: flex; flex-direction: column; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.note-item { flex-direction: row; gap: var(--space-4); padding: var(--space-4); }
.note-vote { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 0 64px; }
.note-vote .btn { width: 100%; }
.note-count { font-family: var(--font-heading); font-size: 17px; }
.note-body { flex: 1; min-width: 0; }
.note-body .report { margin-top: var(--space-3); }
.note-compose { margin-top: var(--space-8); max-width: 70ch; }
.note-body .note-remove { margin-top: var(--space-2); }
.note-remove summary { cursor: pointer; font-size: 13px; color: var(--color-neutral-500); }
.note-remove summary:hover { color: var(--color-accent); }
.note-remove[open] { margin-top: var(--space-3); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); border: 1px solid var(--color-accent-700);
  background: var(--color-accent-900); max-width: 60ch; }
.note-remove[open] summary { margin-bottom: var(--space-2); color: var(--color-accent-200); }
.note-remove .field { margin: var(--space-2) 0; }
.note-remove-inline { position: relative; }
.note-remove-inline summary::marker, .note-remove-inline summary::-webkit-details-marker { content: ""; display: none; }
.note-remove-inline[open] { position: absolute; right: 0; top: calc(100% + var(--space-2));
  z-index: 20; width: 46ch; background: var(--color-surface, var(--color-neutral-900));
  box-shadow: var(--shadow-md); }
.note-removed { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  border: 1px dashed var(--color-divider); }
.note-removed p { margin: 0; }
.note-removed form { margin-left: auto; }

@media (max-width: 768px) {
  .note-strip { flex-direction: column; }
  .note-strip-actions .btn { min-height: 44px; }
  .note-item { flex-direction: column; }
  .note-vote { flex-direction: row; align-items: center; gap: var(--space-2); }
  .note-vote .btn { width: auto; min-height: 44px; }
}

/* - terms page - */
/* The section jump list at the top of /terms: the tag pill, wrapped in rows. */
.terms-toc {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin: var(--space-6) 0 var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.terms-toc a { text-decoration: none; }
.terms-toc a:hover { background: var(--color-accent-800); color: var(--color-accent-100); }
.page.narrow h2 { scroll-margin-top: var(--space-8); }
.page.narrow h3 { margin-top: var(--space-5); }
.page.narrow ol { padding-left: var(--space-6); }
.page.narrow ol li { margin-bottom: var(--space-2); }
/* Blanks the source document never filled in — visible on purpose so they get filled. */
.terms-blank {
  border-bottom: 1px dashed var(--color-accent-500);
  color: var(--color-accent-300);
}
.terms-contact { color: var(--color-neutral-300); }

/* - glossary - */
/* Definition lines stay readable: the page shell is the wide one, the reading
   column is not. Wider than .narrow because each row carries a term column. */
.glossary-page { max-width: 900px; }

/* A–Z jump index, built from the terms-toc pattern. Letters with no entries
   stay in place, dimmed — a gap-toothed row is harder to aim at than a full one. */
.glossary-index {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin: var(--space-6) 0 var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
/* Tighter than a stock .tag so all 26 letters hold one row at the page width. */
.glossary-index .tag { min-width: 2em; padding-inline: var(--space-2); justify-content: center; text-decoration: none; }
.glossary-index a.tag:hover { background: var(--color-accent-800); color: var(--color-accent-100); }
.glossary-index .is-empty { opacity: 0.3; }

.glossary-section { margin-bottom: calc(var(--space-8) * 1.4); }
.glossary-letter {
  display: flex; align-items: center; gap: var(--space-4);
  font-size: 25px; color: var(--color-accent-300);
  margin-bottom: var(--space-4); scroll-margin-top: var(--space-6);
}
/* The rule runs out from the letter and fades, like .hr does at its ends. */
.glossary-letter::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--color-divider), transparent);
}

/* Hairline-separated rows: one shared divider ground showing through the gaps,
   the same construction as .credit-list. */
.glossary-list {
  display: flex; flex-direction: column; gap: 1px; margin: 0;
  background: var(--color-divider); border-radius: var(--radius-md); overflow: hidden;
}
.glossary-entry {
  display: grid; grid-template-columns: 14rem 1fr; gap: var(--space-4);
  padding: var(--space-3) var(--space-4); background: var(--color-bg);
}
.glossary-entry:hover { background: color-mix(in srgb, var(--color-surface) 65%, var(--color-bg)); }
/* Every term is its own anchor, so a definition can be linked to directly. */
.glossary-entry:target { background: var(--color-accent-900); box-shadow: inset 2px 0 0 var(--color-accent); }
.glossary-entry dt {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  color: var(--color-accent-200); text-wrap: balance;
}
.glossary-entry dd { margin: 0; color: var(--color-neutral-300); text-wrap: pretty; }
.glossary-foot { display: block; max-width: 70ch; }

@media (max-width: 768px) {
  .glossary-entry { grid-template-columns: 1fr; gap: var(--space-1); }
  /* 26 letters is a lot of small targets on a phone - give them some height. */
  .glossary-index .tag { min-width: 2.6em; min-height: 34px; }
}

/* — Messages: a private line between a member and staff — */
.page-head { display: flex; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; }
.page-head h1 { margin: 0; }

.nav-badge {
  display: inline-block; min-width: 1.4em; padding: 0 var(--space-2);
  border-radius: 999px; background: var(--color-accent-500); color: var(--color-neutral-900);
  font-size: 12px; font-weight: 700; line-height: 1.4em; text-align: center;
}

.msg-thread { list-style: none; margin: var(--space-6) 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.msg { display: flex; flex-direction: column; gap: var(--space-1); max-width: 82%; }
.msg-them { align-self: flex-start; align-items: flex-start; }
.msg-mine { align-self: flex-end; align-items: flex-end; }
.msg-bubble {
  padding: var(--space-3) var(--space-4); border-radius: 14px;
  background: var(--color-surface); border: 1px solid var(--color-divider);
}
.msg-mine .msg-bubble { background: var(--color-accent-800); border-color: var(--color-accent-700); }
.msg-body { margin: 0; text-wrap: pretty; }
.msg-meta { margin: 0; }
.msg-reply { margin-top: var(--space-6); max-width: none; }
.msg-status { margin-top: var(--space-4); }
