/* Agora — a quiet, typographic interface for research mathematics. */
/* Colours are defined once with light-dark(light, dark), which follows the
   root's color-scheme: "light dark" (the default Agora theme: the visitor's
   system setting), or fixed by a theme (data-theme on <html>, chosen in the
   footer or Settings). Themes override these tokens; see the end of the file. */
:root {
  color-scheme: light dark;
  --bg: light-dark(#fbfaf7, #15161a);
  --surface: light-dark(#ffffff, #1c1e23);
  --surface-2: light-dark(#f4f2ed, #23262c);
  --ink: light-dark(#1c1d21, #e8e6e1);
  --ink-2: light-dark(#3d3f45, #c9c6bf);
  --muted: light-dark(#6e6f73, #9a9890);
  --rule: light-dark(#e4e1d9, #2e3138);
  --rule-strong: light-dark(#cfcbc0, #3d414a);
  --accent: light-dark(#2c4f8f, #8fb0ef);
  --accent-ink: light-dark(#ffffff, #0f1420);
  --accent-soft: light-dark(#e8eef9, #1e2a42);
  --good: light-dark(#2d7a4b, #6cc48d);
  --good-soft: light-dark(#e3f1e8, #1b3125);
  --danger: light-dark(#a23a2f, #ef8c80);
  --danger-soft: light-dark(#f8e6e3, #3a201d);
  --warn-soft: light-dark(#fbf3dc, #362f1a);
  --chip: light-dark(#eef0f4, #262a33);
  --chip-ink: light-dark(#33415c, #c3cde0);
  --shadow: 0 1px 2px light-dark(rgba(20, 20, 30, .06), rgba(0, 0, 0, .3)), 0 4px 16px light-dark(rgba(20, 20, 30, .05), rgba(0, 0, 0, .25));
  /* Primary buttons and the top bar have their own tokens, so a theme can set
     them apart from links (the Overflow theme: orange buttons, a dark bar). */
  --primary: var(--accent);
  --primary-ink: var(--accent-ink);
  --topbar-bg: var(--surface);
  --topbar-rule: var(--rule);
  --topbar-ink: var(--ink);
  --topbar-ink-2: var(--ink-2);
  --topbar-muted: var(--muted);
  --topbar-hover: var(--surface-2);
  --topbar-field: var(--surface-2);
  --topbar-field-ink: var(--ink);
  --topbar-field-border: var(--rule);
  --heading-weight: 600;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 8px;
  --gutter: 20px;
  --page-max: 1180px;
}
:root[data-theme="agora-light"] { color-scheme: light; }
:root[data-theme="agora-dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--sans);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: var(--heading-weight); line-height: 1.25; color: var(--ink); margin: 0 0 .5em; }
h1 { font-size: 1.85rem; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }
h4 { font-size: .95rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.danger { color: var(--danger); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--surface); padding: 6px 10px; }
[hidden] { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-rule); position: sticky; top: 0; z-index: 20; }
/* Anchor targets (#crawlers, #review, …) land below the sticky top bar, which wraps to two rows on narrow screens. */
html { scroll-padding-top: 76px; }
@media (max-width: 980px) { html { scroll-padding-top: 110px; } }
.topbar-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); height: 56px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--topbar-ink); font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark rect { fill: var(--topbar-ink); }
.brand-mark path { fill: none; stroke: var(--topbar-bg); stroke-width: 6.5; stroke-linecap: round; stroke-linejoin: round; }
.footer .brand-mark rect { fill: var(--ink); }
.footer .brand-mark path { stroke: var(--surface); }
.footer .brand-mark { width: 20px; height: 20px; margin-right: 4px; vertical-align: -5px; }
.mainnav { display: flex; gap: 4px; }
.mainnav a { color: var(--topbar-ink-2); padding: 6px 10px; border-radius: 6px; font-weight: 500; }
.mainnav a:hover { background: var(--topbar-hover); text-decoration: none; }
.mainnav a[aria-current] { color: var(--topbar-ink); background: var(--topbar-hover); }
.search { flex: 1; max-width: 380px; margin-left: auto; }
.search input { width: 100%; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--topbar-field-border); background: var(--topbar-field); color: var(--topbar-field-ink); }
.search input::placeholder { color: var(--topbar-muted); }
.search input:focus { background: var(--surface); color: var(--ink); }
.account { display: flex; align-items: center; gap: 8px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 20px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--topbar-hover); }
.topbar .rep { color: var(--topbar-ink-2); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 180px; padding: 6px; display: flex; flex-direction: column; }
.menu-pop a, .menu-pop .linklike { padding: 7px 10px; border-radius: 5px; color: var(--ink); text-align: left; font-size: .93rem; width: 100%; }
.menu-pop a:hover, .menu-pop .linklike:hover { background: var(--surface-2); text-decoration: none; }
.menu-pop a, .menu-pop .linklike { display: flex; align-items: center; gap: 10px; }
.mi { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.menu-pop a:hover .mi, .menu-pop .linklike:hover .mi { color: var(--ink); }
.menu-sep { border-top: 1px solid var(--rule); margin: 5px -6px; }
.menu-label { padding: 4px 10px 2px; font: 600 .7rem/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.flash { max-width: var(--page-max); margin: 14px auto 0; padding: 10px 14px; background: var(--good-soft); color: var(--ink); border-radius: var(--radius); width: calc(100% - 2 * var(--gutter)); }
.flash-warn { background: var(--warn-soft); }

/* ---------- Page layout ---------- */
.page { flex: 1; width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 28px var(--gutter) 64px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; align-items: start; }
.cols-even { grid-template-columns: 1fr 1fr; gap: 32px; }
.col-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
.narrow { max-width: 820px; margin: 0 auto; }
.narrow-wide { max-width: 1000px; margin: 0 auto; }
.footer { border-top: 1px solid var(--rule); background: var(--surface); }
.footer-inner { max-width: var(--page-max); margin: 0 auto; padding: 18px var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer a { color: var(--muted); }
.theme-picker { display: flex; align-items: center; gap: 6px; }
.theme-picker label { font-weight: 400; font-size: .86rem; }
.theme-picker select { width: auto; height: 28px; padding: 0 28px 0 8px; font-size: .84rem; background-position: right 9px center; }
.theme-option { white-space: normal; align-items: flex-start; }
.theme-option input { margin-top: 4px; }

.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; }
.card h4 { margin-bottom: 10px; }
.card + .card { margin-top: 0; }
section.card { margin-bottom: 20px; }
.notice { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; background: var(--warn-soft); }
.notice-danger { background: var(--danger-soft); }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font: 500 .92rem var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-sm { height: 30px; padding: 0 11px; font-size: .86rem; }
.btn-xs { height: 24px; padding: 0 8px; font-size: .78rem; border-radius: 5px; }
.btn-block { width: 100%; height: 40px; }
.btn[disabled] { opacity: .55; cursor: default; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
form.inline { display: inline; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 7px; padding: 8px 11px;
}
/* The native control (glossy on macOS) doesn't match the inputs; draw a plain chevron instead. */
select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b8c90' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 10px 6px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { font-family: var(--mono); font-size: .9rem; line-height: 1.5; resize: vertical; }
label { font-weight: 600; font-size: .92rem; display: block; }
label.check { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack > label { margin-top: 6px; margin-bottom: -4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1; min-width: 200px; }
.row-end { display: flex; gap: 10px; justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid2 label { margin-bottom: 4px; }
.hint { font-size: .84rem; color: var(--muted); margin: -4px 0 4px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; }

/* ---------- Hero & lists ---------- */
.hero { padding: 10px 0 26px; border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.hero h1 { font-size: 2.05rem; max-width: 720px; }
.hero p { color: var(--ink-2); max-width: 680px; font-size: 1.03rem; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.list-head h1, .list-head h2 { margin: 0; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin: 8px 0 0; align-items: flex-end; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; font-size: .92rem; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs-fill { flex: 1; }
.tabs-sm a { padding: 4px 10px; font-size: .86rem; }
.kind-filter { width: auto; height: 30px; padding: 0 8px; font-size: .86rem; margin-bottom: 5px; }
.tlist { list-style: none; margin: 0; padding: 0; }
.titem { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 16px 2px; border-bottom: 1px solid var(--rule); }
.titem.is-deleted { opacity: .55; }
.tstats { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; font-size: .82rem; color: var(--ink-2); padding-top: 2px; }
.tstats b { font-weight: 600; }
.stat { white-space: nowrap; padding: 1px 6px; border-radius: 4px; }
.stat.answered { border: 1px solid var(--good); color: var(--good); }
.stat.accepted { background: var(--good); color: #fff; }
.ttitle { font-size: 1.1rem; margin: 0 0 4px; font-weight: 600; }
.ttitle a { color: var(--ink); }
.ttitle a:hover { color: var(--accent); text-decoration: none; }
.texcerpt { color: var(--ink-2); font-size: .92rem; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tfoot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.tmeta { font-size: .84rem; color: var(--muted); margin-left: auto; }
.who { font-weight: 500; }
.rep { font-weight: 600; color: var(--ink-2); font-size: .85em; }
.menu summary .badge { vertical-align: 0; }
.menu-role { display: none; padding: 7px 10px; font-size: .8rem; color: var(--muted); border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; background: var(--chip); color: var(--chip-ink); font-size: .8rem; font-weight: 500; line-height: 1.7; }
.chip:hover { text-decoration: none; filter: brightness(.96); }
.chip-area { background: transparent; border: 1px solid var(--rule-strong); color: var(--ink-2); font-family: var(--mono); font-size: .75rem; }
.kind { display: inline-block; font: 600 .68rem/1.6 var(--sans); text-transform: uppercase; letter-spacing: .06em; padding: 0 6px; border-radius: 3px; vertical-align: 2px; background: var(--surface-2); color: var(--ink-2); }
.kind-paper { background: light-dark(#efe7f7, #2d2340); color: light-dark(#5b3b86, #cdb6ef); }
.kind-discussion { background: light-dark(#e5f0f2, #1d3236); color: light-dark(#2a5f69, #9fd0d9); }
.kind-announcement { background: light-dark(#f8ecd9, #3a2e17); color: light-dark(#7a5212, #edc98a); }
.kind-question { background: var(--accent-soft); color: var(--accent); }
.badge { display: inline-block; font: 600 .7rem/1.6 var(--sans); padding: 0 6px; border-radius: 3px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; vertical-align: 2px; }
.badge-bot { background: var(--chip); color: var(--chip-ink); }
.pager { display: flex; gap: 4px; margin: 22px 0 8px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid var(--rule); padding: 0 8px; font-size: .9rem; }
.pager .cur { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager .gap { border: 0; }
.count { margin-top: 8px; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.search-big { display: flex; gap: 8px; margin: 10px 0 14px; }

/* Sidebar */
.stats-card { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 14px 8px; }
.stats-card b { display: block; font-size: 1.3rem; font-family: var(--serif); }
.stats-card span { font-size: .78rem; color: var(--muted); }
.stats-wide { grid-template-columns: repeat(5, 1fr); margin-bottom: 10px; }
.stats-wide a { color: inherit; }
.arealist { list-style: none; margin: 0; padding: 0; columns: 1; font-size: .88rem; max-height: 340px; overflow: auto; }
.arealist a { display: block; padding: 3px 6px; color: var(--ink-2); border-radius: 4px; }
.arealist a:hover, .arealist a[aria-current] { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.code { font-family: var(--mono); font-size: .76rem; color: var(--muted); display: inline-block; min-width: 58px; }
.related, .mini { list-style: none; margin: 0; padding: 0; }
.invites li { justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--rule); }
.related li, .mini li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: .9rem; align-items: baseline; }
.mini li { grid-template-columns: auto 1fr auto; }
.related li:last-child { border-bottom: 0; }
.score-pill { min-width: 30px; text-align: center; font-size: .78rem; font-weight: 600; padding: 0 5px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); }
.score-pill.accepted { background: var(--good); color: #fff; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---------- Thread ---------- */
.thread-head { border-bottom: 1px solid var(--rule); padding-bottom: 14px; margin-bottom: 20px; }
.thread-head h1 { font-size: 1.75rem; margin: 6px 0 8px; }
.kicker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.thread-meta { display: flex; gap: 18px; flex-wrap: wrap; }
.post { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 4px 0 22px; }
.reply { border-top: 1px solid var(--rule); padding-top: 22px; }
.reply.is-accepted { }
.is-deleted .post-body { opacity: .55; }
.votes { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 2px; }
.vote { width: 38px; height: 32px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--muted); cursor: pointer; font-size: .85rem; line-height: 1; }
.vote:hover { color: var(--accent); border-color: var(--accent); }
.vote.on.up { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.vote.on.down { background: var(--danger); color: #fff; border-color: var(--danger); }
.score { font: 600 1.2rem var(--serif); padding: 4px 0; }
.accept-mark { color: var(--good); font-size: 1.6rem; line-height: 1; margin-top: 6px; }
.post-main { min-width: 0; }
.post-tags { margin: 14px 0 6px; }
.source { margin: 4px 0; overflow-wrap: anywhere; }
/* Where an imported thread comes from, with its tags and source: set apart from the post by a faint tint and a hairline rule. */
.provenance { margin: 0 0 18px; padding: 10px 14px; background: var(--surface-2); border-left: 2px solid var(--rule-strong); border-radius: 0 6px 6px 0; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.provenance p { margin: 0; }
.provenance .post-tags { margin: 8px 0 0; }
.provenance .source { margin: 6px 0 0; }
.post-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; flex-wrap: wrap; align-items: flex-start; }
.post-actions { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); padding-top: 4px; }
.post-actions a, .post-actions .linklike { color: var(--muted); }
.post-actions a:hover, .post-actions .linklike:hover { color: var(--accent); }
.accept-btn { color: var(--good) !important; font-weight: 600; }
.usercard { background: var(--surface-2); border-radius: 6px; padding: 8px 12px; min-width: 210px; }
.reply .usercard { background: transparent; border: 1px solid var(--rule); }
#q .usercard { background: var(--accent-soft); }
.usercard-row { display: flex; gap: 9px; align-items: center; margin-top: 4px; font-size: .9rem; line-height: 1.35; }
.avatar { --h: 210; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; flex: none; background: light-dark(hsl(var(--h) 45% 88%), hsl(var(--h) 30% 26%)); color: light-dark(hsl(var(--h) 45% 28%), hsl(var(--h) 60% 85%)); font: 600 .82rem var(--sans); letter-spacing: .02em; }
.avatar-sm { width: 28px; height: 28px; font-size: .72rem; border-radius: 50%; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.6rem; border-radius: 12px; }
img.avatar { display: inline-block; object-fit: cover; background: var(--surface-2); }
.avatar-edit { display: flex; gap: 18px; align-items: flex-start; }
.avatar-edit .stack { gap: 8px; min-width: 0; }
.avatar-edit p { margin: 0; }
.avatar-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avatar-upload input[type=file] { max-width: 100%; font-size: .86rem; }
.replies-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; margin: 18px 0 0; }
.replies-head h2 { margin: 0; }
.replies-head .tabs { border: 0; margin: 0; }
/* Replies by manuscript, on threads presenting several. */
.ms-filter { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; margin: 10px 0 2px; }
.ms-filter a { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 2px 10px; line-height: 1.5; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-2); font-size: .84rem; }
.ms-filter a:hover { text-decoration: none; border-color: var(--rule-strong); }
.ms-filter a[aria-current] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.ms-filter .ms-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.ms-filter .ms-title .math { white-space: nowrap; }
.ms-filter .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.ms-empty { margin: 12px 0; }
.reply-about { margin: 0 0 6px; color: var(--muted); }
.ms-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ms-pick label { margin: 0; }
.ms-pick select { flex: 1; min-width: 0; max-width: 100%; }
.reply-form { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.join-prompt p:last-child { margin: 0; }

/* Attachments */
.attachments { margin: 18px 0 6px; border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; background: var(--surface); }
.attachments h4 { margin: 0 0 6px; }
.attachments ul { list-style: none; margin: 0; padding: 0; }
.pdf { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; border-top: 1px solid var(--rule); }
.pdf:first-child { border-top: 0; }
.pdf a:not(.btn) { overflow-wrap: anywhere; flex: 1; min-width: 160px; }
.pdf-icon { font: 700 .62rem var(--sans); color: #fff; background: #b8432f; border-radius: 3px; padding: 2px 4px; letter-spacing: .04em; }
.pdf-inline { width: 100%; height: 78vh; border: 1px solid var(--rule); border-radius: 6px; margin-top: 6px; background: var(--surface-2); }

/* ---------- Rendered post bodies ---------- */
/* contain: paint keeps typeset math (negative \kern, \raisebox) from drawing over the page. */
.post-body { font-family: var(--serif); font-size: 1.06rem; line-height: 1.62; color: var(--ink); overflow-wrap: break-word; contain: paint; }
.post-body > :first-child { margin-top: 0; }
.post-body p, .post-body ul, .post-body ol, .post-body blockquote, .post-body pre, .post-body table { margin: 0 0 .9em; }
.post-body h1, .post-body h2, .post-body h3, .post-body h4 { margin: 1.3em 0 .5em; font-family: var(--serif); text-transform: none; letter-spacing: 0; color: var(--ink); }
.post-body h1 { font-size: 1.4rem; } .post-body h2 { font-size: 1.25rem; } .post-body h3 { font-size: 1.1rem; } .post-body h4 { font-size: 1rem; }
.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body li + li { margin-top: .25em; }
.post-body blockquote { background: var(--accent-soft); border-radius: 8px; padding: .55em 1em; color: var(--ink-2); }
.post-body code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; font-size: .84em; }
.post-body pre { background: var(--surface-2); padding: 12px 14px; border-radius: 6px; overflow-x: auto; line-height: 1.45; }
.post-body pre code { background: none; padding: 0; font-size: .84rem; }
.post-body img { max-width: 100%; height: auto; border-radius: 4px; }
.post-body table { border-collapse: collapse; display: block; overflow-x: auto; font-size: .95rem; }
.post-body th, .post-body td { border: 1px solid var(--rule); padding: 5px 10px; }
.post-body th { background: var(--surface-2); }
.post-body hr { border: 0; border-top: 1px solid var(--rule); margin: 1.5em 0; }
.post-body a { overflow-wrap: anywhere; }
.math.display { display: block; overflow-x: auto; overflow-y: hidden; margin: .8em 0; padding: 2px 0; text-align: center; }
.math.inline { white-space: normal; }
.katex { font-size: 1.08em; }
.katex-display { margin: 0; }
.katex-error { color: var(--danger) !important; font-family: var(--mono); font-size: .85em; }
.env { margin: 1em 0; padding: .7em 1em; border-radius: 10px; background: var(--accent-soft); }
.env > :last-child { margin-bottom: 0; }
.env-head { font-weight: 700; font-style: normal; margin-right: .3em; }
.env-theorem, .env-lemma, .env-proposition, .env-corollary, .env-conjecture, .env-claim { font-style: italic; }
.env-theorem .env-head, .env-lemma .env-head, .env-proposition .env-head, .env-corollary .env-head, .env-conjecture .env-head, .env-claim .env-head { font-style: normal; }
.env-definition, .env-remark, .env-example, .env-notation, .env-question, .env-problem { background: var(--good-soft); }
.env-proof { background: none; padding: 0; border-radius: 0; }
.env-proof .env-head { font-style: italic; font-weight: 600; }
.qed { float: right; }
.citation { white-space: nowrap; }
.cite { font-weight: 500; }
a.mention { font-weight: 500; white-space: nowrap; }
.cite.pending { color: var(--muted); font-family: var(--mono); font-size: .85em; }
.cite.missing { color: var(--danger); border-bottom: 1px dotted var(--danger); }
.references { margin-top: 1.4em; padding-top: .8em; border-top: 1px solid var(--rule); font-size: .92rem; }
.references h4 { font-family: var(--sans); font-size: .78rem; margin-bottom: .4em; }
.references ol { padding-left: 1.8em; margin: 0; }
.references li { margin: .3em 0; }
.references li:target { background: var(--warn-soft); }
.references cite { font-style: italic; }
.footnotes { font-size: .9rem; color: var(--ink-2); border-top: 1px solid var(--rule); margin-top: 1.4em; padding-top: .6em; }

/* ---------- Editor ---------- */
.editor { border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--surface); overflow: hidden; }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.editor.dragging { border-color: var(--accent); border-style: dashed; }
.toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px 6px; border-bottom: 1px solid var(--rule); background: var(--surface-2); align-items: center; }
.toolbar button { height: 28px; min-width: 30px; padding: 0 8px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ink-2); font: 500 .84rem var(--sans); cursor: pointer; }
.toolbar button:hover { background: var(--surface); border-color: var(--rule); }
.toolbar .sep { width: 1px; height: 18px; background: var(--rule-strong); margin: 0 4px; }
.toolbar .help { margin-left: auto; font-size: .8rem; padding: 0 6px; }
.editor textarea { border: 0; border-radius: 0; box-shadow: none !important; min-height: 180px; padding: 12px 14px; background: var(--surface); }
.upload-status { padding: 6px 14px; font-size: .84rem; background: var(--accent-soft); border-top: 1px solid var(--rule); }
.preview-label { font: 600 .7rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 14px 0; border-top: 1px dashed var(--rule-strong); background: var(--bg); }
.input-narrow { max-width: 10rem; }
.link-warning { margin: 6px 14px 0; font-size: .9rem; }
.preview { padding: 6px 14px 14px; min-height: 60px; background: var(--bg); font-size: 1rem; }
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.kindopt { display: flex; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 8px; cursor: pointer; font-weight: 400; background: var(--surface); }
.kindopt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.kindopt input { margin-top: 3px; }
.kindopt span { display: flex; flex-direction: column; }
.kindopt small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.import-box { background: var(--accent-soft); border-color: transparent; }
.import-box .row { margin-top: 8px; }

/* Dialogs */
.dialog { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 20px 22px; width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(10, 12, 18, .45); }
.dialog h3 { margin: 0; }
.cite-result .ref { padding: 6px 0; border-top: 1px solid var(--rule); font-size: .9rem; }
.cite-result .err { color: var(--danger); font-size: .9rem; }
.dialog-pdf { width: min(1100px, calc(100vw - 24px)); height: calc(100vh - 40px); padding: 0; display: none; flex-direction: column; overflow: hidden; }
.dialog-pdf[open] { display: flex; }
.dialog-pdf iframe { flex: 1; border: 0; width: 100%; background: #525659; }
.pdf-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-size: .9rem; gap: 10px; }
.pdf-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Auth & misc pages ---------- */
.authbox { max-width: 440px; margin: 30px auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 28px 30px; box-shadow: var(--shadow); }
.authbox h1 { font-size: 1.6rem; }
.errorbox { text-align: center; }
.err-code { font: 600 3rem var(--serif); color: var(--rule-strong); margin: 0; }
.prose { font-family: var(--serif); font-size: 1.05rem; line-height: 1.65; }
.prose h2 { margin-top: 1.4em; }
.prose code, .prose pre { font-size: .85rem; }
.prose pre { background: var(--surface-2); padding: 12px 14px; border-radius: 6px; overflow-x: auto; font-family: var(--mono); }

/* About: the founders' motivation, ethics statement and people, then how the site works. */
.about { max-width: 720px; }
.about-intro { padding: 8px 0 4px; }
.about-kicker { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 0 0 .6em; }
.about-intro h1 { font-size: 2.3rem; margin-bottom: .45em; }
.about-lead { font-size: 1.24rem; line-height: 1.55; color: var(--ink); }
.about p { color: var(--ink-2); }
.about-ethics { margin: 2em 0; padding: 18px 22px 8px; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.about-ethics h2 { margin: 0 0 .5em; font-size: 1.12rem; }
.about-ethics ul { margin: 0 0 10px; padding-left: 1.2em; }
.about-ethics li { margin-bottom: .35em; }
.about-ethics li::marker { color: var(--accent); }
.about-more { font: .86rem var(--sans); margin-left: 4px; white-space: nowrap; }
.about-more::after { content: " →"; }
.about-people h2 { margin-top: 0; }
.about-team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.about-team li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.about-team-name { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--ink); line-height: 1.3; }
.about-team-aff { font: .84rem/1.4 var(--sans); color: var(--muted); }
.about-team-role { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-top: 4px; }
.about-howto { margin-top: 2.4em !important; padding-top: 1.2em; border-top: 1px solid var(--rule); }
.about h3 { margin-top: 1.5em; }
@media (max-width: 640px) {
  .about-intro h1 { font-size: 1.8rem; }
  .about-lead { font-size: 1.12rem; }
  .about-ethics { padding: 14px 16px 6px; }
  .about-team { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.writing td { vertical-align: top; }
.writing td pre { margin: 0; background: none; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.table select { width: auto; padding: 3px 26px 3px 8px; background-position: right 8px center; font-size: .86rem; }
.admin details summary { cursor: pointer; }
.admin .row select { width: auto; }
.admin-tabs { margin-bottom: 18px; }
.tab-count { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: .75rem; text-align: center; }
.attention { margin: 0; padding-left: 1.2em; }
.attention li { margin: 4px 0; }
.tag-toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; }
.tag-toolbar .audit-filters { flex: 1 1 420px; margin-top: 0; }
.synonym { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 0 2px 0 7px; margin: 1px 0; border: 1px dashed var(--rule-strong); border-radius: 4px; font-size: .8rem; color: var(--ink-2); }
.synonym .linklike { color: var(--muted); padding: 0 4px; }
.tag-table td:first-child .chip { white-space: nowrap; }
.tag-actions { display: grid; gap: 8px; max-width: min(560px, calc(100vw - 2 * var(--gutter) - 24px)); padding: 8px 0 4px; }
.tag-actions .row > input { min-width: 0; }
.audit-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.audit-filters input { flex: 1 1 200px; width: auto; }
.audit-filters select { width: auto; }
.table-scroll { overflow-x: auto; }
.audit-table code { font-size: .82rem; }
.audit-table tr:has(+ .audit-more) td { border-bottom: 0; padding-bottom: 2px; }
.audit-more td { padding-top: 0; }
.audit-kind { font-size: .72rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 4px; padding: 0 4px; }
.audit-outcome { font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.audit-success { background: var(--good-soft); color: var(--good); }
.audit-denied { background: var(--warn-soft); color: light-dark(#8a5a00, #e8c172); }
.audit-error { background: var(--danger-soft); color: var(--danger); }
.audit-dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; }
.audit-dl dt { color: var(--muted); }
.audit-dl dd { margin: 0; overflow-wrap: anywhere; }
.log { max-height: 320px; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 6px; }
.domains { list-style: none; padding: 0; columns: 2; font-size: .9rem; margin-top: 14px; }
.domains li { break-inside: avoid; padding: 2px 0; }
pre.source { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .82rem; background: var(--surface-2); padding: 10px 12px; border-radius: 6px; max-height: 480px; overflow: auto; }
.access-request .prewrap { white-space: pre-wrap; }
.access-request ul.mini { margin: 0; padding-left: 1.1em; }
.access-request form.stack { margin-top: 8px; }
.flag blockquote { margin: 8px 0; padding: 8px 12px; border-radius: 8px; background: var(--danger-soft); }

/* Profile & people */
.profile-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.profile-head h1 { margin: 0 0 2px; }
.affil { font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); margin: 0 0 4px; }
.repbox { text-align: center; padding: 10px 18px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.repbox b { display: block; font: 600 1.5rem var(--serif); }
.repbox span { font-size: .78rem; color: var(--muted); }
.bio { margin-bottom: 18px; }
.people { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 16px 0; }
.people li { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); align-items: flex-start; }
/* Profile: lists beside a sidebar of counts, areas and tags. Wide screens use
   the full frame, put posts and replies side by side, and flow a posts-only
   list into two columns rather than leave an empty half. */
.profile { max-width: 1100px; margin: 0 auto; }
.profile-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.profile-lists { display: grid; gap: 28px; min-width: 0; }
.profile-side { display: flex; flex-direction: column; gap: 14px; }
.profile-list li { grid-template-columns: auto minmax(0, 1fr) auto; break-inside: avoid; }
.pl-meta { display: block; margin-top: 1px; }
.pl-meta .fam-dot { width: 7px; height: 7px; margin-right: 5px; }
.profile-areas { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.profile-areas a { display: flex; align-items: center; padding: 3px 4px; color: var(--ink-2); border-radius: 4px; }
.profile-areas a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.pa-name { flex: 1; min-width: 0; }
.pa-n { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
@media (max-width: 980px) { .profile-cols { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1440px) { .profile { max-width: none; } }
@media (min-width: 1600px) {
  .profile-cols { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
  .profile-lists { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .profile-lists.no-replies { grid-template-columns: minmax(0, 1fr); }
  .profile-lists.no-replies .profile-list { columns: 2; column-gap: 40px; }
}
.taggrid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.taggrid li { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.taggrid p { margin: 6px 0 0; }
.taginfo { margin: 4px 0 6px; color: var(--ink-2); }
.areagrid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.areagrid a { display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); height: 100%; }
.areagrid a:hover { border-color: var(--accent); text-decoration: none; }
.areagrid b { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; }
  .topbar-inner { flex-wrap: wrap; height: auto; min-height: 56px; padding-top: 10px; padding-bottom: 0; row-gap: 4px; }
  .mainnav { order: 10; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; width: calc(100% + 2 * var(--gutter)); }
  .mainnav a { padding: 4px 10px; font-size: .9rem; white-space: nowrap; }
}
@media (max-width: 640px) {
  :root { --gutter: 14px; }
  body { font-size: 15px; }
  .topbar-inner { gap: 10px; }
  .brand-name { display: none; }
  .role-badge { display: none; }   /* no room beside the search box; the menu says it instead */
  .menu-role { display: block; }
  .search { max-width: none; }
  .titem { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .tstats { flex-direction: row; align-items: center; gap: 10px; }
  .post { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .vote { width: 32px; height: 28px; }
  .grid2, .cols-even { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.55rem; }
  .thread-head h1 { font-size: 1.4rem; }
  .profile-head { grid-template-columns: auto 1fr; }
  .repbox { grid-column: 1 / -1; }
  .stats-wide { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
  .domains { columns: 1; }
  .usercard { min-width: 0; width: 100%; }
  .authbox { padding: 22px 18px; margin: 10px auto; }
}

/* ---------- Comments, notifications ---------- */
.comments { margin-top: 12px; border-top: 1px solid var(--rule); font-size: .9rem; }
.comment { padding: 6px 0 6px 2px; border-bottom: 1px solid var(--rule); line-height: 1.5; color: var(--ink-2); contain: paint; }
.comment:target { background: var(--warn-soft); }
.comment { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); }
.comment[hidden] { display: none; }
.comment-vote { display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding-top: 1px; }
.comment-score { font-weight: 600; color: var(--ink-2); font-size: .85rem; min-height: 1.2em; }
.comment-up { background: none; border: 0; padding: 0 4px; font-size: .7rem; line-height: 1; color: var(--muted); cursor: pointer; opacity: 0; }
.comment:hover .comment-up, .comment-up:focus-visible, .comment-up.on { opacity: 1; }
@media (hover: none) { .comment-up { opacity: .7; } }
.comment-up.on { color: var(--accent); }
.comment-edit { display: inline; margin-left: 4px; }
.comment-edit > summary { display: inline; list-style: none; color: var(--muted); font-size: .85rem; }
.comment-edit > summary::-webkit-details-marker { display: none; }
.comment-edit[open] { display: block; margin-top: 4px; }
.show-comments { display: inline-block; margin-top: 6px; }
.comment-body p { display: inline; margin: 0; }
.comment-body .math.display { display: inline-block; margin: 0; }
.comment-meta { color: var(--muted); white-space: nowrap; }
.comment-meta form button { font-size: 1rem; line-height: 1; padding: 0 4px; color: var(--muted); }
.add-comment { padding-top: 6px; }
.add-comment summary { list-style: none; cursor: pointer; color: var(--muted); }
.add-comment summary::-webkit-details-marker { display: none; }
.comment-form { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.comment-form textarea { min-height: 54px; font-family: var(--sans); font-size: .9rem; }
.inline-details { display: inline; position: relative; }
.inline-details summary { list-style: none; display: inline; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }
.close-form { position: absolute; z-index: 5; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 12px; box-shadow: var(--shadow); width: min(420px, 80vw); margin-top: 6px; }
.bell { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--topbar-muted); }
.bell:hover { background: var(--topbar-hover); color: var(--topbar-ink); text-decoration: none; }
.bell.has-unread { color: var(--topbar-ink); }
.bell-count { position: absolute; top: 0; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font: 700 .66rem/17px var(--sans); text-align: center; }
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--rule); }
.notes li.unread { background: var(--accent-soft); }
.note-kind { font: 600 .68rem/1.8 var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

/* ---------- Reputation: bounties, badges, revisions ---------- */
.bounty-pill { display: inline-block; background: #1f6fb2; color: #fff; font: 700 .72rem/1.6 var(--sans); padding: 0 6px; border-radius: 3px; vertical-align: 2px; }
.bounty-notice { background: var(--accent-soft); }
.bounty-btn { color: #1f6fb2 !important; font-weight: 600; }
/* Badges: metallic chips with a glossy medal. Each level sets its own palette. */
.badge-chip {
  --b-bg1: #f4f4f6; --b-bg2: #e6e7eb; --b-ink: #33363d; --b-edge: #c9ccd3;
  --b-m1: #ffffff; --b-m2: #b9bec7; --b-m3: #7d8592; --b-glow: rgba(125, 133, 146, .35);
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 6px; border-radius: 999px;
  background: linear-gradient(135deg, var(--b-bg1), var(--b-bg2)); color: var(--b-ink);
  border: 1px solid var(--b-edge); font: 600 .84rem/1.5 var(--sans); letter-spacing: .01em;
  box-shadow: 0 1px 0 light-dark(rgba(255, 255, 255, .6), rgba(255, 255, 255, .08)) inset, 0 1px 3px var(--b-glow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.badge-chip:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 1px 0 light-dark(rgba(255, 255, 255, .6), rgba(255, 255, 255, .08)) inset, 0 4px 12px var(--b-glow); }
.badge-chip .dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 30%, var(--b-m1) 0 18%, var(--b-m2) 45%, var(--b-m3) 100%);
  box-shadow: 0 0 0 1.5px var(--b-m3), 0 0 6px var(--b-glow);
}
.badge-novice {
  --b-bg1: light-dark(#effbe9, #1f4a2a); --b-bg2: light-dark(#c9efc0, #14311c); --b-ink: light-dark(#1f5a2b, #b6f0bd); --b-edge: light-dark(#9bd79a, #3f8a52);
  --b-m1: #f3fff0; --b-m2: #7fd38a; --b-m3: #2f8a45; --b-glow: light-dark(rgba(70, 180, 100, .4), rgba(110, 210, 130, .35));
}
.badge-bronze {
  --b-bg1: light-dark(#e3fbf6, #12443c); --b-bg2: light-dark(#a9eadb, #0b2e28); --b-ink: light-dark(#0d5548, #9ff0dc); --b-edge: light-dark(#6fd0bb, #2f9a83);
  --b-m1: #e8fffa; --b-m2: #3cc4a6; --b-m3: #11806b; --b-glow: light-dark(rgba(30, 170, 140, .42), rgba(60, 200, 170, .35));
}
.badge-silver {
  --b-bg1: light-dark(#e8f1ff, #1b3566); --b-bg2: light-dark(#b5d0ff, #112347); --b-ink: light-dark(#123e8a, #b9d3ff); --b-edge: light-dark(#7fa8f0, #3d6cc4);
  --b-m1: #f0f6ff; --b-m2: #4f8ef0; --b-m3: #1d4fb8; --b-glow: light-dark(rgba(60, 120, 230, .45), rgba(90, 150, 255, .38));
}
.badge-gold {
  --b-bg1: light-dark(#fff6c9, #5c4500); --b-bg2: light-dark(#ffd54a, #3b2c00); --b-ink: light-dark(#5c3d00, #ffe27a); --b-edge: light-dark(#e9b415, #b68a00);
  --b-m1: #fffbe0; --b-m2: #f7c21b; --b-m3: #a86f00; --b-glow: light-dark(rgba(240, 180, 0, .55), rgba(255, 200, 30, .4));
}
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.badgegrid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.badgegrid li { padding: 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.badgegrid p { margin: 6px 0 0; }
.revision .rev-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; font-size: .9rem; }
.rev-num { font: 700 .8rem var(--sans); background: var(--ink); color: var(--bg); border-radius: 4px; padding: 1px 7px; }
.diff ins { background: var(--good-soft); color: var(--ink); text-decoration: none; }
.diff del { background: var(--danger-soft); color: var(--ink); text-decoration: line-through; }
.privileges .ok { color: var(--good); font-weight: 600; }
/* Badge cards: a soft wash of the tier's colour (no side bars). */
.badgegrid li.lvl-novice { background: linear-gradient(135deg, light-dark(#f2fcef, #16301b), var(--surface) 70%); border-color: light-dark(#c9ecc4, #2b5a33); }
.badgegrid li.lvl-bronze { background: linear-gradient(135deg, light-dark(#e9faf6, #10302b), var(--surface) 70%); border-color: light-dark(#b5e8dc, #22594f); }
.badgegrid li.lvl-silver { background: linear-gradient(135deg, light-dark(#ecf3ff, #16284a), var(--surface) 70%); border-color: light-dark(#c3d6fb, #2b4a85); }
.badgegrid li.lvl-gold { background: linear-gradient(135deg, light-dark(#fff8dc, #352a07), var(--surface) 70%); border-color: light-dark(#f3dc8a, #6b5410); }

/* ---------- Semantic colours for areas and tags ----------
   Each family sets --f-bg (fill), --f-ink (text), --f-edge (border) and --f-dot (marker). */
.chip[class*="fam-"] { background: var(--f-bg); color: var(--f-ink); border: 1px solid var(--f-edge); }
.chip[class*="fam-"]:hover { filter: none; border-color: var(--f-dot); }
.chip-area[class*="fam-"] { font-weight: 600; }
.chip-cross[class*="fam-"] { font-weight: 500; background: transparent; border-style: dashed; }
.chip { border: 1px solid transparent; }
.chip-count { opacity: .65; font-weight: 500; }
/* Special tags */
.chip.tag-verified { background: light-dark(#e3f7e8, #15361f); color: light-dark(#17602f, #a9ebb9); border: 1px solid light-dark(#8fd6a2, #2f7a46); font-weight: 600; }
.chip.tag-verified::before { content: "✓"; font-weight: 700; color: light-dark(#22a04b, #5fd685); }
/* Area markers in lists and the Areas page */
.fam-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--f-dot, var(--rule-strong)); margin-right: 7px; vertical-align: 1px; flex: none; }
.arealist a[aria-current] { background: var(--f-bg); color: var(--f-ink); }



/* ---------- Wide screens ----------
   The frame grows with the viewport; list pages gain a left rail, and threads with
   PDFs dock a reader beside the discussion. Prose keeps a readable measure. */
.cols-3 { grid-template-columns: 270px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "left main" "side main"; } /* areas always on the left */
.cols-3 > .col-main { grid-area: main; }
.cols-3 > .col-left { grid-area: left; }
.cols-3 > .col-side { grid-area: side; position: static; }
.arealist-group + .arealist-group { margin-top: 10px; }
.arealist-family { display: flex; align-items: center; font: 600 .74rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--f-ink); margin: 0 0 3px 6px; }
.arealist-family .fam-dot { width: 8px; height: 8px; }
.arealist { max-height: none; }
.pdf-dock { display: none; padding: 0; overflow: hidden; }
@media (min-width: 1440px) {
  :root { --page-max: 1360px; }
  .narrow-wide { max-width: 1100px; }
}
@media (min-width: 1600px) {
  :root { --page-max: 1680px; --gutter: 28px; }
  .cols { gap: 36px; }
  .cols-3 { grid-template-columns: 250px minmax(0, 1fr) 310px; grid-template-rows: auto; grid-template-areas: "left main side"; }
  .cols-3 > .col-left, .cols-3 > .col-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; }
  .thread-cols:not(.dock-open) { max-width: 1400px; margin: 0 auto; grid-template-columns: minmax(0, 1fr) 340px; }
  .dock-open { grid-template-columns: minmax(0, 1fr) minmax(480px, 44%); }
  .dock-open > .col-side { top: 72px; }
  .dock-open .pdf-dock { display: flex; flex-direction: column; height: calc(100vh - 92px); }
  .pdf-dock iframe { flex: 1; width: 100%; border: 0; background: #525659; }
  .pdf-dock-bar { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--rule); font-size: .86rem; }
  .pdf-dock-bar select { flex: 1; padding: 4px 28px 4px 8px; background-position: right 10px center; font-size: .84rem; }
  .pdf-dock-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
  .dock-open > .col-side > .card:not(.pdf-dock) { display: none; } /* facts/related give way to the reader */
  .narrow-wide { max-width: 1240px; }
  .post-body { font-size: 1.1rem; }
}
@media (min-width: 1800px) {
  body { font-size: 16px; }
}
@media (min-width: 2200px) {
  :root { --page-max: 1880px; }
  .cols-3 { grid-template-columns: 280px minmax(0, 1fr) 340px; }
}
@media (max-width: 980px) {
  .cols-3 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "left"; grid-template-rows: auto; }
}

/* ---------- No greys: every chip and label carries a hue ----------
   Hues are spread around the wheel so families stay distinguishable. */
.fam-algebra     { --f-bg: light-dark(#f3ebff, #2e1a52); --f-ink: light-dark(#5b21b6, #d8c4ff); --f-edge: light-dark(#cfb5fb, #5b3a9e); --f-dot: light-dark(#7c3aed, #a78bfa); }   /* purple 270 */
.fam-logic       { --f-bg: light-dark(#fce8fd, #3d1442); --f-ink: light-dark(#86198f, #f5c2f9); --f-edge: light-dark(#f0abfc, #86288f); --f-dot: light-dark(#c026d3, #e879f9); }   /* fuchsia 300 */
.fam-physics     { --f-bg: light-dark(#ffe6ee, #43121f); --f-ink: light-dark(#9f1239, #ffc1d1); --f-edge: light-dark(#fda4c0, #8f2442); --f-dot: light-dark(#e11d48, #fb7194); }   /* rose 345 */
.fam-probability { --f-bg: light-dark(#ffedd9, #42200c); --f-ink: light-dark(#9a3412, #ffcfa6); --f-edge: light-dark(#fdba8c, #92451a); --f-dot: light-dark(#ea580c, #fb923c); }   /* orange 25 */
.fam-general     { --f-bg: light-dark(#f1f9d6, #263510); --f-ink: light-dark(#3f6212, #d4f09a); --f-edge: light-dark(#c5e286, #4d6b1c); --f-dot: light-dark(#65a30d, #a3e635); }   /* lime 80 */
.fam-discrete    { --f-bg: light-dark(#e3f8e8, #12351f); --f-ink: light-dark(#166534, #aef0c0); --f-edge: light-dark(#9ee0b0, #23733d); --f-dot: light-dark(#16a34a, #4ade80); }   /* green 140 */
.fam-geometry    { --f-bg: light-dark(#ddf7f3, #0f3632); --f-ink: light-dark(#115e59, #a1efe3); --f-edge: light-dark(#93ddd2, #1d7068); --f-dot: light-dark(#0d9488, #2dd4bf); }   /* teal 175 */
.fam-analysis    { --f-bg: light-dark(#e3edff, #172a57); --f-ink: light-dark(#1e40af, #bcd0ff); --f-edge: light-dark(#a9c3fb, #2f53a8); --f-dot: light-dark(#2563eb, #60a5fa); }   /* blue 220 */
/* Tags without an area yet: sky. Imported-source tag and labels: indigo. */
.chip { background: light-dark(#e2f3fc, #0d2f45); color: light-dark(#075985, #b5e3fb); border-color: light-dark(#9fd3f0, #1f5a7d); }
.chip.tag-source { background: light-dark(#e8e9ff, #22234f); color: light-dark(#3730a3, #c7caff); border: 1px solid light-dark(#b4b8fb, #3f43a3); font-weight: 600; }
.chip.tag-source::before { content: "⤓"; font-weight: 700; color: light-dark(#4f46e5, #a5b4fc); }
.badge-bot, .badge { background: light-dark(#e8e9ff, #22234f); color: light-dark(#3730a3, #c7caff); }
.score-pill { background: light-dark(#e3edff, #172a57); color: light-dark(#1e40af, #bcd0ff); }
.chip-area:not([class*="fam-"]) { background: light-dark(#e2f3fc, #0d2f45); color: light-dark(#075985, #b5e3fb); }


/* ---------- Areas page: panels (default) and map views ---------- */
.areas-head { align-items: center; }
.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
.view-toggle a { padding: 4px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .9rem; }
.view-toggle a:hover { text-decoration: none; color: var(--ink); }
.view-toggle a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.area-panels { column-width: 430px; column-gap: 16px; margin-top: 18px; } /* masonry flow: panels keep their natural heights */
.area-panel { background: var(--f-bg); border-radius: 16px; padding: 18px 20px 14px; break-inside: avoid; margin-bottom: 16px; }
.area-panel h2 { font-size: 1.08rem; color: var(--f-ink); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; }
.area-panel-total { font: 600 .8rem var(--sans); opacity: .8; }
.area-panel ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 2px 18px; }
.area-panel li a { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; color: var(--ink); }
.area-panel li a:hover { text-decoration: none; }
.area-panel li a:hover .area-name { text-decoration: underline; text-decoration-color: var(--f-dot); text-underline-offset: 3px; }
.area-name { font-family: var(--serif); }
.area-count { color: var(--f-ink); font-weight: 600; font-size: .85rem; font-variant-numeric: tabular-nums; }
.area-panel li.is-empty .area-count { opacity: .45; }
.area-map { display: grid; gap: 20px; margin-top: 18px; }
.area-map-head { font-size: 1rem; color: var(--f-ink); margin: 0 0 8px; display: flex; align-items: center; }
.area-map ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.area-map li { flex: 0 1 var(--tile-w); min-width: 0; } /* same scale on every row, so sizes compare across families */
.area-map li a { display: flex; flex-direction: column; justify-content: space-between; height: 88px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--f-dot) var(--strength), var(--f-bg)); color: var(--f-ink); }
.area-map li a.tile-dark { color: #fff; }
.area-map li a:hover { text-decoration: none; outline: 2px solid var(--f-dot); outline-offset: 2px; }
.tile-name { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
.tile-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; opacity: .92; font-variant-numeric: tabular-nums; }
.tile-meta .code { font-family: var(--mono); font-size: .76rem; min-width: 0; color: inherit; }


/* Settings: account identity at the top of the Profile panel */
.account-row { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 4px 0 18px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); }
.account-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-row dt { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.account-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.private-pill { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--surface); color: var(--accent); font: 600 .7rem/1.7 var(--sans); vertical-align: 1px; }

/* ---------- Security settings & two-step sign-in ---------- */
.settings-tabs { margin-bottom: 18px; }
.sec-section { margin-bottom: 16px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-head h2 { margin: 0; }
.status-pill { font: 600 .74rem/1.8 var(--sans); padding: 0 10px; border-radius: 999px; background: var(--danger-soft); color: var(--danger); }
.status-pill.on { background: var(--good-soft); color: var(--good); }
.mfa-pill { display: inline-block; margin-right: 4px; padding: 0 7px; border-radius: 999px; background: var(--good-soft); color: var(--good); font: 600 .74rem/1.7 var(--sans); }
/* Admin member list: the short columns keep to one line; name and affiliation take the rest. */
.members-table th { white-space: nowrap; }
.members-table td:first-child { min-width: 12em; }
.member-email-change { position: relative; }
.member-email-change summary { list-style: none; cursor: pointer; width: max-content; }
.member-email-change summary::-webkit-details-marker { display: none; }
.search-big select { width: auto; flex: none; }
.passkeys { list-style: none; padding: 0; margin: 12px 0; }
.passkeys li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); }
.pk-main { flex: 1; min-width: 0; }
.pk-icon { font-size: 1.2rem; }
.add-passkey summary { list-style: none; display: inline-flex; }
.add-passkey summary::-webkit-details-marker { display: none; }
.add-passkey[open] summary { margin-bottom: 10px; }
.totp-setup { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.totp-setup img { border-radius: 8px; background: #fff; padding: 8px; image-rendering: pixelated; }
.totp-setup .stack { flex: 1; min-width: 240px; }
.secret { font: 600 1rem var(--mono); letter-spacing: .06em; background: var(--accent-soft); padding: 6px 10px; border-radius: 6px; overflow-wrap: anywhere; }
.codes { font: 600 1rem/1.9 var(--mono); background: var(--accent-soft); border-radius: 8px; padding: 12px 16px; columns: 2; margin: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.upload-hint { padding: 6px 14px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--rule); background: var(--surface); }

/* ---------- Post composer ----------
   Narrow screens: one column. Wide screens: write and preview side by side,
   with the post's settings in a sticky sidebar. */
.composer { max-width: 820px; margin: 0 auto; }
.composer-form { display: flex; flex-direction: column; gap: 16px; }
.composer-side .card { padding: 14px 16px; }
.composer-side label { margin-bottom: 4px; }
.cross-areas { margin-top: 8px; }
.cross-areas summary { cursor: pointer; font-size: .9rem; }
.cross-list { max-height: 280px; overflow-y: auto; margin-top: 6px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 6px; }
.cross-list fieldset { margin-bottom: 8px; display: flex; flex-direction: column; gap: 2px; }
.cross-list legend { font-size: .78rem; color: var(--muted); padding: 0; margin-bottom: 2px; }
.cross-list label.check { white-space: normal; }
.cross-list label:has(input:disabled) { color: var(--muted); }
.composer-tips h4 { margin-bottom: 8px; }
.composer-tips dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0 0 10px; }
.composer-tips dt code { font-size: .78rem; }
.composer-tips dd { margin: 0; color: var(--muted); }
@media (min-width: 1400px) {
  .composer { max-width: min(1560px, 100%); }
  .composer-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
  .composer-side { position: sticky; top: 76px; }
  .composer .kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .composer .editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "tb tb" "in pl" "in lw" "in pv" "st pv" "hn pv"; grid-template-rows: auto auto auto 1fr auto auto; }
  .composer .editor > .toolbar { grid-area: tb; }
  .composer .editor > textarea { grid-area: in; min-height: 62vh; border-right: 1px solid var(--rule); resize: none; }
  .composer .editor > .upload-status { grid-area: st; }
  .composer .editor > .upload-hint { grid-area: hn; }
  .composer .editor > .preview-label { grid-area: pl; border-top: 0; }
  .composer .editor > .link-warning { grid-area: lw; }
  .composer .editor > .preview { grid-area: pv; max-height: 62vh; overflow-y: auto; }
}

/* ---------- Area filters ---------- */
.filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.filter-search input { width: 220px; height: 32px; padding: 0 12px; border-radius: 16px; font-size: .88rem; }
.filter-tags { flex: 1; min-width: 0; }
.chip.is-picked { outline: 2px solid var(--f-dot, var(--accent)); outline-offset: 1px; font-weight: 600; }
.clear-filters { white-space: nowrap; }

/* ---------- Theme: Overflow ----------
   Close to MathOverflow's look, on Agora's layout. Values measured from
   mathoverflow.net (October 2026): near-black top bar, white page, system
   sans-serif throughout, blue links, bold grey-bordered tags, orange primary
   buttons, green answer counts, a light grey footer. Light only. */
:root[data-theme="overflow"] {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f2f3;
  --ink: #0c0d0e;
  --ink-2: #3b4045;
  --muted: #6a737c;
  --rule: #e3e6e8;
  --rule-strong: #babfc5;
  --accent: #166ac2;
  --accent-ink: #ffffff;
  --accent-soft: #ebf4fb;
  --good: #18864b;
  --good-soft: #e6f4ec;
  --danger: #c22e32;
  --danger-soft: #fdf2f2;
  --warn-soft: #fdf7e2;
  --chip: #ffffff;
  --chip-ink: #222222;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 4px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .05);
  --primary: hsl(29.57 89.03% 53.53%);
  --primary-ink: #ffffff;
  --topbar-bg: #0c0d0e;
  --topbar-rule: #0c0d0e;
  --topbar-ink: #ffffff;
  --topbar-ink-2: hsl(210 8% 85%);
  --topbar-muted: hsl(210 8% 75%);
  --topbar-hover: hsl(210 8% 25%);
  --topbar-field: hsl(210 8% 25%);
  --topbar-field-ink: #ffffff;
  --topbar-field-border: hsl(210 8% 45%);
  --heading-weight: 400;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif;
  --serif: var(--sans);
  --radius: 6px;
}
[data-theme="overflow"] body { font-size: 14px; }
[data-theme="overflow"] h1 { font-size: 27px; letter-spacing: 0; }
[data-theme="overflow"] .brand { font-weight: 600; }
[data-theme="overflow"] a:hover { color: #2583e6; }
[data-theme="overflow"] .topbar .btn:not(.btn-primary) { background: transparent; color: #ffffff; border-color: var(--topbar-field-border); }
[data-theme="overflow"] .topbar .btn:not(.btn-primary):hover { background: var(--topbar-hover); }
[data-theme="overflow"] .topbar .search input { background: var(--topbar-field); color: var(--topbar-field-ink); border-color: var(--topbar-field-border); border-radius: 6px; }
[data-theme="overflow"] .topbar .search input:focus { background: var(--topbar-field); color: var(--topbar-field-ink); border-color: var(--topbar-ink-2); box-shadow: none; }
[data-theme="overflow"] .ttitle { font-size: 17px; font-weight: 400; }
[data-theme="overflow"] .ttitle a { color: var(--accent); }
[data-theme="overflow"] .ttitle a:hover { color: #2583e6; }
[data-theme="overflow"] .tstats { color: var(--ink); font-size: 13px; }
[data-theme="overflow"] .post-body { font-size: 15px; line-height: 1.5; }
[data-theme="overflow"] .post-body blockquote { background: none; border-left: 4px solid #d6d9dc; border-radius: 0; padding: .1em 0 .1em 1em; }
/* Tags: plain, bold, grey-bordered (area colours stay on the area markers). */
[data-theme="overflow"] .chip,
[data-theme="overflow"] .chip[class*="fam-"],
[data-theme="overflow"] .chip-area,
[data-theme="overflow"] .chip.tag-source,
[data-theme="overflow"] .chip.tag-verified { background: #ffffff; color: #222222; border: 1px solid #babfc5; border-radius: 4px; font: 700 12px/1.85 var(--sans); padding: 0 5px; }
[data-theme="overflow"] .chip:hover { background: #f2f2f2; color: #151515; border-color: hsl(210 9% 70%); filter: none; }
[data-theme="overflow"] .chip.tag-verified::before { color: var(--good); }
[data-theme="overflow"] .chip.tag-source::before { color: var(--muted); }
[data-theme="overflow"] .chip.is-picked { outline-color: var(--accent); }
[data-theme="overflow"] .kind,
[data-theme="overflow"] .badge,
[data-theme="overflow"] .badge-bot,
[data-theme="overflow"] .score-pill { background: var(--rule); color: var(--ink-2); }
[data-theme="overflow"] .tabs a[aria-current] { background: var(--rule); color: var(--ink-2); border-bottom-color: transparent; border-radius: 4px 4px 0 0; }
[data-theme="overflow"] .pager .cur { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
[data-theme="overflow"] .footer { background: #e3e6e8; border-top: 0; }
[data-theme="overflow"] .footer-inner { color: #636b74; }
[data-theme="overflow"] .footer a { color: #3b4045; }
[data-theme="overflow"] .footer .brand-mark path { stroke: #e3e6e8; }

/* Watched and ignored tags and areas */
.titem.is-watched { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.titem.is-ignored { opacity: .45; }
.titem.is-ignored:hover, .titem.is-ignored:focus-within { opacity: .8; }
.list-head .watch-control { display: flex; gap: 6px; margin-left: auto; }
.watch-control .is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.watch-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.watch-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.digest-choice { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.digest-choice legend { padding: 0; margin-bottom: 4px; width: 100%; }
.list-head:has(.watch-control) { flex-wrap: wrap; }

/* Suggested edits and the review page */
.review-pill { font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.review-pill:hover { text-decoration: none; background: var(--accent); color: var(--accent-ink); }
.suggestion { margin: 12px 0; }
.suggestion h4 { margin: 12px 0 4px; font-size: .85rem; color: var(--muted); }
.suggestion-summary { font-style: italic; margin: 8px 0; }
.suggestion .source { max-height: 28em; overflow: auto; }
.suggestion-actions { margin-top: 12px; flex-wrap: wrap; }
.suggestion-actions input[type=text] { flex: 1; min-width: 12em; }

/* Locks, protection, community wiki */
.notice-lock { border-color: var(--warn, #c90); }
.wiki-pill { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--good); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-bottom: 4px; }
input.days-input { width: 4.5em; display: inline-block; padding: 2px 6px; }
