/* ==========================================================================
   q0id.com — shared stylesheet
   one dark theme on purpose. tokens first, then layout, then components.
   ========================================================================== */

:root {
  /* grounds */
  --bg: #0b0808;
  --bg-2: #0e0909;
  --bg-3: #070505;
  --panel: #130c0c;
  --panel-hot: #170b0b;

  /* lines */
  --line: #3b1a1a;
  --line-2: #261212;
  --line-3: #5a2626;
  --line-hot: #6e1a1a;

  /* reds */
  --bar: #4a0f0f;
  --red: #b3201f;
  --red-2: #e0372b;
  --red-3: #8a1a19;
  --red-press: #c42724;

  /* text */
  --text: #e8ddd8;
  --text-hi: #f6e9e4;
  --text-2: #c9bab4;
  --muted: #a8958f;
  --dim: #8f7c76;
  --faint: #5e4a46;
  --on-red: #fff4f1;

  /* accents */
  --link: #f2584a;
  --link-hover: #ffb3a8;
  --pink: #ffb3a8;
  --pink-2: #ffc9c0;
  --salmon: #ff8a7e;
  --amber: #ffd27a;
  --amber-line: #8a5a1a;
  --amber-bg: #2a1a08;

  /* shadows */
  --shadow: #2a0909;
  --shadow-2: #3a0b0b;

  /* type */
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;

  /* hatch used for empty thumbs / banners */
  --hatch: repeating-linear-gradient(135deg, #1f0f0f 0 6px, #170b0b 6px 12px);
}

/* --- base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px),
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  color: var(--text);
  font: 13px/1.55 var(--mono);
}

h1, h2, h3, p, figure, dl, dd, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
pre { font-family: inherit; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

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

::selection { background: var(--red); color: var(--on-red); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  left: 8px;
  top: 8px;
  z-index: 60;
  width: auto;
  height: auto;
  clip: auto;
  padding: 6px 10px;
  background: var(--red);
  color: var(--on-red);
}

[hidden] { display: none !important; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes tick { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .cursor, .live-dot, .ticker__track { animation: none !important; }
}

/* --- text helpers -------------------------------------------------------- */

.hi { color: var(--text-hi); }
.soft { color: var(--text-2); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.pink { color: var(--pink); }
.red { color: var(--red-2); }
.amber { color: var(--amber); }
.small { font-size: 11px; }
.tiny { font-size: 10px; }
.caption { color: var(--muted); font-style: italic; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push { margin-left: auto; }

.kicker { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }

.display {
  font: 700 56px/0.95 var(--cond);
  text-transform: uppercase;
  color: var(--text-hi);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.display--xl { font-size: 60px; }
.display--md { font-size: 52px; }

.lead { max-width: 62ch; color: var(--text-2); text-wrap: pretty; }

.cursor {
  display: inline-block;
  width: 13px;
  height: 26px;
  margin-left: 6px;
  background: var(--red-2);
  animation: blink 1.1s steps(1) infinite;
}
.cursor--sm { width: 8px; height: 14px; margin-left: 4px; vertical-align: -2px; }

/* --- layout -------------------------------------------------------------- */

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }

.page { padding-block: 22px 40px; display: flex; flex-direction: column; gap: 20px; }

.cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.col-left { flex: 1 1 210px; min-width: 0; }
.col-main { flex: 999 1 520px; min-width: 0; }
.col-right { flex: 1 1 240px; min-width: 0; }
.col-side { flex: 1 1 300px; min-width: 0; }
.col-nav { flex: 1 1 170px; min-width: 0; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-xs { display: flex; flex-direction: column; gap: 3px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-sm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.page-head > div { display: flex; flex-direction: column; gap: 6px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--dim); }
.crumbs [aria-current] { color: var(--text-2); }

/* --- top strip + header -------------------------------------------------- */

.topstrip { background: #170909; border-bottom: 1px solid #2c1212; font-size: 11px; color: var(--muted); }
.topstrip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 6px; }
.topstrip__links { display: flex; flex-wrap: wrap; gap: 14px; }

.site-header { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding-block: 18px; }

.logo {
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: #f3e6e1;
}
.logo:hover { color: #f3e6e1; text-decoration: none; }
.logo__dot { color: var(--red-2); }

.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { padding: 7px 12px; border: 1px solid var(--line); color: var(--text); }
.nav a:hover { border-color: var(--line-3); color: var(--text-hi); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--red); border-color: #d23a2e; color: var(--on-red); }

.search { margin-left: auto; display: flex; }
.search input {
  width: 200px;
  padding: 8px 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-right: 0;
  outline: none;
}
.search input:focus { border-color: var(--line-3); }
.search button { padding: 8px 12px; background: #1d1010; border: 1px solid var(--line); }

/* --- category bar -------------------------------------------------------- */

.catbar { background: #120a0a; border-bottom: 1px solid var(--line); font-size: 12px; }
.catbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-block: 8px; }
.catbar__cats { display: flex; flex-wrap: wrap; gap: 2px; }
.catbar__cats a { padding: 3px 9px; border: 1px solid transparent; color: var(--text-2); }
.catbar__cats a:hover { border-color: var(--line); text-decoration: none; }
.catbar__cats a[aria-current="page"] { background: #2a0f0f; border-color: var(--line-hot); color: var(--on-red); }
.catbar__sort { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; color: var(--dim); }
.catbar__sort [aria-current] { color: var(--on-red); text-decoration: underline; }
.catbar__sep { color: var(--line); }

/* --- live ticker --------------------------------------------------------- */

.ticker { background: var(--bg-3); border-bottom: 1px solid var(--line); font-size: 11px; }
.ticker .wrap { display: flex; }
.ticker__label {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  padding: 7px 12px 7px 0;
  border-right: 1px solid var(--line);
  color: var(--pink);
  font-weight: 700;
}
.live-dot { flex: none; width: 7px; height: 7px; background: var(--red-2); animation: blink 1.4s steps(1) infinite; }
.ticker__view { flex: 1; min-width: 0; overflow: hidden; padding-block: 7px; }
.ticker__track {
  display: flex;
  gap: 40px;
  width: max-content;
  white-space: nowrap;
  color: var(--muted);
  animation: tick 45s linear infinite;
}
.ticker__track:hover { animation-play-state: paused; }
.ticker__track b { color: var(--text); }

/* --- panels -------------------------------------------------------------- */

.panel { border: 1px solid var(--line); background: var(--panel); }
.panel--hot { border-color: var(--line-hot); box-shadow: 4px 4px 0 var(--shadow); }
.panel--hot-lg { border-color: var(--line-hot); box-shadow: 5px 5px 0 var(--shadow); }
.panel--term { background: var(--bg-3); }
.panel--warm { border-color: var(--line-hot); background: var(--panel-hot); }

.panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bar);
  border-bottom: 1px solid var(--line-hot);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.panel__bar--hot {
  background: var(--red);
  border-bottom-color: var(--red-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.panel__title {
  font: 700 17px/1.2 var(--cond);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-hi);
}
.panel__title--lg { font-size: 19px; }
.panel__bar--hot .panel__title { color: var(--on-red); }
.panel__icon { flex: none; width: 12px; height: 12px; }
.panel__dots {
  flex: 1;
  height: 8px;
  background-image: radial-gradient(#7a1d1d 1px, transparent 1.3px);
  background-size: 4px 4px;
}
.panel__meta { margin-left: auto; font-size: 11px; color: var(--pink-2); }
.panel__dots + .panel__meta { margin-left: 0; }
.panel__bar--hot .panel__meta { color: #ffe3de; }
a.panel__meta:hover { color: var(--on-red); }

.panel__body { padding: 12px; }
.panel__body--lg { padding: 16px; }
.panel__body--stack { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.panel__note { padding: 10px 12px; border-bottom: 1px solid var(--line-2); font-size: 11px; color: var(--muted); }

.panel__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

/* terminal-style block (stats, changelog, status) */
.term {
  padding: 10px 12px 12px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  white-space: pre-wrap;
}
.term b { font-weight: 400; color: var(--text-hi); }
.term .amber { color: var(--amber); }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--line-3);
  color: var(--text);
  text-align: center;
}
.btn:hover { border-color: #7a3030; color: var(--text-hi); text-decoration: none; }
.btn--primary {
  background: var(--red);
  border-color: var(--red-2);
  border-bottom-color: var(--line-hot);
  color: var(--on-red);
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--shadow-2);
}
.btn--primary:hover { background: var(--red-press); border-color: var(--red-2); color: var(--on-red); }
.btn--primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-2); }
.btn--quiet { border-color: var(--line); color: var(--text-2); }
.btn--outline-red { border-color: var(--red); color: var(--text-hi); font-weight: 700; }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 12px 20px; }
.btn--sm { padding: 6px 12px; }

.textbtn { padding: 0 4px; background: transparent; border: 0; color: var(--link); }
.textbtn:hover { color: var(--link-hover); text-decoration: underline; }
.textbtn--muted { color: var(--muted); }

/* --- badges -------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--line-3);
  font-size: 10px;
  line-height: 1.6;
  color: var(--text);
}
.badge--anim { border-color: var(--red); color: var(--salmon); }
.badge--art { border-color: var(--amber-line); color: var(--amber); }
.badge--wip { border-style: dashed; border-color: var(--dim); color: var(--text-2); }
.badge--code { background: var(--bg-3); border-color: var(--line); color: var(--amber); }
.badge--off { border-color: var(--line); color: var(--muted); }
.badge--hot { background: var(--red); border-color: var(--red); color: var(--on-red); }
.badge--solved { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.badge--lvl { border-color: var(--amber-line); color: var(--amber); }
.badge--count { background: var(--red); border-color: var(--red); color: var(--on-red); }

/* --- pfp ----------------------------------------------------------------- */

.pfp {
  flex: none;
  display: block;
  border: 1px solid var(--line-3);
  background: #1a0f0f;
  object-fit: cover;
}
.pfp--hot { border-color: var(--line-hot); }
.pfp--op { border-color: var(--red); }

/* --- reactions ----------------------------------------------------------- */

.rx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.rx-row__stats { margin-left: auto; }

.rx { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; border: 1px solid var(--line); }
.rx b { color: var(--pink); }
.rx.is-on { background: #3a0e0e; border-color: var(--red); color: var(--on-red); }

button.rx {
  min-height: 28px;
  padding: 0 9px;
  background: #1a0f0f;
  color: var(--text);
  font-size: 12px;
}
button.rx:hover { border-color: var(--line-3); }
button.rx.is-on { background: #3a0e0e; border-color: var(--red); color: var(--on-red); }

.rx-add {
  min-height: 28px;
  padding: 0 9px;
  background: transparent;
  border: 1px dashed var(--line-3);
  color: var(--muted);
  font-size: 12px;
}
.rx-add[aria-expanded="true"] { border-style: solid; border-color: var(--red); background: #1a0f0f; color: var(--on-red); }

.rx-sep { width: 1px; height: 16px; margin: 0 4px; background: var(--line); }

.picker {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--bg-3);
  border: 1px solid var(--red);
  box-shadow: 4px 4px 0 var(--shadow);
}
.picker[hidden] { display: none; }
.picker button {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 5px 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--pink);
  font-weight: 700;
}
.picker button:hover, .picker button:focus-visible { background: #241010; border-color: var(--line-3); }
.picker small { font-size: 9px; font-weight: 400; color: var(--muted); }

/* --- thumbs + cards ------------------------------------------------------ */

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #0a0606;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.thumb > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.thumb--hatch {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hatch);
  font-size: 10px;
  color: var(--dim);
}
.thumb--txt { display: flex; align-items: center; justify-content: center; background: #0e0808; font-size: 16px; color: #6e3a36; }
.thumb__tag { position: absolute; left: 5px; top: 5px; background: var(--bg-3); }

.play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--red);
  border: 1px solid var(--red-2);
}
.play svg { width: 12px; height: 12px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; }

.card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); }
.card:hover { border-color: var(--line-3); color: var(--text); text-decoration: none; }
.card__body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; }
.card__title { font-weight: 700; color: var(--text-hi); }
.card__meta { font-size: 11px; color: var(--muted); }

/* --- feed ---------------------------------------------------------------- */

.feed-item { display: flex; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line-2); }
.feed-item:last-of-type { border-bottom: 0; }
.feed-item__side { flex: 0 0 42px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 9px; color: var(--amber); }
.feed-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.feed-item--pinned { background: #1a0d0d; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11px; color: var(--dim); }
.feed-title { font-weight: 700; font-size: 15px; color: var(--text-hi); }
.feed-title:hover { color: var(--text-hi); }
.excerpt { font-size: 12px; color: var(--text-2); text-wrap: pretty; }

.media { display: block; width: 100%; max-width: 300px; height: auto; background: #0a0606; border: 1px solid var(--line); }
.media--light { background: #120b0b; }
.media-link { position: relative; display: block; width: 100%; max-width: 300px; aspect-ratio: 280 / 110; background: #0a0606; border: 1px solid var(--line); }
.media-link > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.media-link .play { position: absolute; left: 8px; bottom: 8px; }

.code-peek {
  max-width: 100%;
  padding: 8px 10px;
  overflow-x: auto;
  background: var(--bg-3);
  border: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-2);
}
.code-peek .ln { color: var(--faint); }

.pager { display: flex; gap: 3px; }
.pager a, .pager span {
  min-width: 26px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--text);
  text-align: center;
}
.pager a:hover { border-color: var(--line-3); text-decoration: none; }
.pager [aria-current="page"] { background: var(--red); border-color: var(--red); color: var(--on-red); }
.pager .gap { border-color: transparent; color: var(--dim); }

/* --- sidebar lists ------------------------------------------------------- */

.navlist { padding: 8px 0; font-size: 12px; }
.navlist a { display: flex; justify-content: space-between; gap: 8px; padding: 4px 12px; color: var(--text); }
.navlist a:hover { background: #1a0f0f; color: var(--text-hi); text-decoration: none; }
.navlist .count { color: var(--dim); }

.linklist { display: flex; flex-direction: column; gap: 5px; font-size: 12px; }

.rank { padding: 6px 0; font-size: 12px; }
.rank li { display: flex; align-items: center; gap: 8px; padding: 5px 12px; }
.rank__n { flex: 0 0 18px; font: 700 18px/1 var(--cond); }
.rank__name { flex: 1; min-width: 0; color: var(--text-hi); }
.rank__pts { font-size: 10px; color: var(--muted); }

.tagcloud { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 12px 12px; line-height: 1.3; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 1px 6px; border: 1px solid var(--line); color: var(--text-2); font-size: 11px; }
.chip--hot { border-color: var(--red); color: var(--pink); }

.meter { position: relative; display: block; height: 6px; background: #241212; }
.meter--boxed { height: 7px; border: 1px solid var(--line); }
.meter > span { position: absolute; inset: 0 auto 0 0; background: var(--red-2); }
.meter--exp > span { background: repeating-linear-gradient(90deg, var(--red-2) 0 4px, var(--red) 4px 6px); }

.poll { display: flex; flex-direction: column; gap: 9px; padding: 12px; font-size: 11px; }
.poll__opt { display: flex; flex-direction: column; gap: 2px; }
.poll__opt > span:first-child { display: flex; justify-content: space-between; }

.statgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); text-align: center; }
.statgrid > span { display: flex; flex-direction: column; padding: 6px 2px; }
.statgrid > span + span { border-left: 1px solid var(--line); }
.statgrid b { color: var(--text-hi); }
.statgrid small { font-size: 9px; color: var(--muted); }

/* --- forms --------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field__top { display: flex; justify-content: space-between; gap: 8px; }
.label { font-size: 12px; color: var(--text-2); }

.input, .textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  outline: none;
}
.input:focus, .textarea:focus { border-color: var(--line-3); }
.textarea { resize: vertical; }
select.input { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--pink) 50%), linear-gradient(135deg, var(--pink) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
select.input option { background: var(--bg-3); color: var(--text); }
.textarea--code { color: var(--amber); font-family: var(--mono); font-size: 12px; line-height: 1.6; }
::placeholder { color: var(--dim); opacity: 1; }

.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--red); background: #1f0c0c; }
.choice input { margin: 0; accent-color: var(--red-2); }

.check { display: flex; align-items: center; gap: 10px; font-size: 12px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--red-2); }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 190px;
  padding: 20px;
  text-align: center;
  border: 2px dashed var(--red);
  background: repeating-linear-gradient(135deg, #170b0b 0 10px, #140a0a 10px 20px);
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--red-2); background: repeating-linear-gradient(135deg, #1f0d0d 0 10px, #170b0b 10px 20px); }
.dropzone--soft { border: 1px dashed var(--line-3); background: var(--bg-2); min-height: 0; }
.dropzone__title { font: 700 26px/1 var(--cond); text-transform: uppercase; color: var(--text-hi); }

/* segmented / option buttons (layout picker, frame, tabs) */
.opt {
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-2);
}
.opt:hover { border-color: var(--line-3); }
.opt[aria-checked="true"], .opt[aria-selected="true"] { background: #2a0f0f; border-color: var(--red-2); color: var(--on-red); }

.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tabs .opt { flex: 1 1 0; padding: 14px 16px; border: 0; font-weight: 700; }
.tabs .opt[aria-selected="true"] { background: var(--red); box-shadow: inset 0 -3px 0 var(--red-2); }

.subtabs { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 12px; }
.subtabs a { padding: 10px 18px; color: var(--text-2); }
.subtabs a:hover { background: #1a0f0f; text-decoration: none; }
.subtabs a[aria-current="page"] { background: #2a0f0f; color: var(--on-red); box-shadow: inset 0 -3px 0 var(--red-2); }

.sidenav { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel); font-size: 12px; }
.sidenav a { padding: 9px 12px; border-bottom: 1px solid var(--line-2); color: var(--text-2); }
.sidenav a:last-child { border-bottom: 0; }
.sidenav a:hover { background: #1a0f0f; text-decoration: none; }
.sidenav a[aria-current="true"] { background: #2a0f0f; color: var(--on-red); box-shadow: inset 3px 0 0 var(--red-2); }

/* --- comments ------------------------------------------------------------ */

.composer { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.composer__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }

.thread { display: flex; flex-direction: column; padding: 6px 16px 16px; }

.comment { display: flex; flex-direction: column; padding-top: 16px; }
.comment + .comment { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.comment__main { display: flex; gap: 12px; }
.comment__main--sm { gap: 10px; }
.comment__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.comment__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 12px; }
.comment__name { font-weight: 700; color: var(--text-hi); }
.comment__text { color: var(--text); text-wrap: pretty; }
.comment__actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.collapse { padding: 0 3px; background: transparent; border: 0; color: var(--dim); }
.collapse:hover { color: var(--text); }

/* replies hang off a thread line, each joined by a short tick */
.replies { display: flex; flex-direction: column; margin-left: 19px; border-left: 1px solid var(--line); }
.replies--nested { margin-left: 15px; }
.replies[hidden] { display: none; }
.reply { display: flex; padding-top: 14px; }
.reply::before { content: ""; flex: 0 0 16px; height: 1px; margin-top: 16px; background: var(--line); }
.reply > .comment, .reply > .reply-form { flex: 1; min-width: 0; padding-top: 0; }
.reply--composer::before { background: var(--red); margin-top: 18px; }
.more-replies { padding: 4px 0; font-size: 12px; }

.reply-form { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bg-2); border: 1px solid var(--line-3); }
.reply-form__foot { display: flex; justify-content: flex-end; gap: 6px; }

.load-more { display: block; margin-top: 18px; padding: 10px; text-align: center; border: 1px dashed var(--line-3); }
.load-more:hover { border-color: var(--red); text-decoration: none; }

/* --- player -------------------------------------------------------------- */

.player { border: 1px solid var(--line-hot); background: #050303; box-shadow: 4px 4px 0 var(--shadow); }
.player__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 50% 50%, #1a0b0b 0, #050303 70%);
}
.player__label { position: absolute; left: 12px; top: 10px; font-size: 11px; color: var(--dim); }
.player__big {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  background: var(--red);
  border: 1px solid var(--red-2);
  box-shadow: 5px 5px 0 var(--shadow-2);
}
.player__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-2);
}
.player__btn { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; background: transparent; border: 1px solid var(--line); }
.player__track { flex: 1; height: 6px; background: #241212; border: 1px solid var(--line); position: relative; }

.vote { display: flex; gap: 4px; }
.vote button { width: 34px; height: 34px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); }
.vote button:hover { border-color: var(--line-3); }
.vote button[aria-pressed="true"] { background: var(--red); border-color: var(--red-2); color: var(--on-red); font-weight: 700; }

.score { display: flex; align-items: baseline; gap: 6px; }
.score__n { font: 700 34px/1 var(--cond); color: var(--text-hi); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.tags a { padding: 2px 8px; border: 1px solid var(--line); color: var(--text-2); }
.tags a:hover { border-color: var(--line-3); text-decoration: none; }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 14px 16px 6px; font-size: 12px; }
.dl dt { color: var(--muted); }
.dl dd { color: var(--text-hi); word-break: break-all; }

/* --- docs ---------------------------------------------------------------- */

.tree { padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; white-space: pre; color: var(--dim); }
.tree a { color: var(--text-2); }
.tree .dir { color: var(--text); }
.tree [aria-current="page"] { padding: 0 4px; background: var(--red); color: var(--on-red); }

.doc { display: flex; flex-direction: column; gap: 18px; }
.doc h2 { margin-top: 6px; font: 700 28px/1.1 var(--cond); color: var(--text-hi); scroll-margin-top: 16px; }
.doc h2 span { color: var(--red-2); }
.doc p { max-width: 68ch; color: var(--text); text-wrap: pretty; }
.doc__head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tip { display: flex; gap: 12px; padding: 12px 14px; background: var(--panel-hot); border: 1px solid var(--line-3); }
.tip b { flex: none; color: var(--pink); }

.table-box { overflow-x: auto; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { position: relative; padding: 8px 12px; text-align: left; font-weight: 500; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line); }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.table tr:last-child td { border-bottom: 0; }

kbd {
  padding: 1px 6px;
  background: var(--panel-hot);
  border: 1px solid var(--line-3);
  border-bottom-width: 3px;
  font-family: inherit;
  color: var(--text-hi);
}

.codeblock { border: 1px solid var(--line); background: var(--bg-3); }
.codeblock figcaption { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.codeblock pre { padding: 14px 0; overflow-x: auto; font-size: 12px; line-height: 1.8; }
.codeblock .ln { display: inline-block; width: 40px; padding-right: 12px; text-align: right; color: var(--faint); user-select: none; }
.tok-k { color: var(--salmon); }
.tok-v { color: var(--amber); }
.tok-c { color: var(--dim); }

.toc { display: flex; flex-direction: column; gap: 6px; padding-top: 34px; font-size: 12px; }
.toc a { color: var(--text-2); }
.toc a[aria-current="true"] { color: var(--text-hi); }

.pn { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; margin-top: 14px; }
.pn a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); background: var(--panel); }
.pn a:hover { border-color: var(--line-3); text-decoration: none; }
.pn a span:last-child { color: var(--text-hi); }
.pn a:last-child { text-align: right; }

/* local markdown reference */
.player__embed { display: block; width: 100%; height: 420px; border: 0; }
.docs-layout { display: grid; grid-template-columns: 238px minmax(0, 1fr) 180px; gap: 28px; align-items: start; padding-top: 24px; }
.docs-sidebar, .docs-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }
.docs-menu > summary { padding: 12px; color: var(--text-hi); font-size: 12px; cursor: pointer; }
.docs-menu > summary .dim { display: block; margin: 4px 0 0 14px; font-size: 10px; }
.docs-tree { list-style: none; margin: 0; padding: 0 8px 12px; font-size: 12px; line-height: 1.5; }
.docs-tree .docs-tree { margin-left: 8px; padding: 0 0 4px 8px; border-left: 1px solid var(--line); }
.docs-tree a { display: block; padding: 5px 7px; color: var(--text-2); overflow-wrap: anywhere; }
.docs-tree a[aria-current="page"] { background: var(--red); color: var(--on-red); }
.docs-tree summary { padding: 7px; color: var(--text-hi); cursor: pointer; }
.docs-main { min-width: 0; }
.docs-main .crumbs { margin-bottom: 20px; flex-wrap: wrap; }
.docs-toc { padding-top: 8px; }
.docs-toc a { overflow-wrap: anywhere; }
.docs-toc .toc-level-3 { padding-left: 10px; font-size: 11px; }
.markdown { color: var(--text); line-height: 1.8; overflow-wrap: anywhere; }
.markdown > * + * { margin-top: 18px; }
.markdown h1 { font: 700 clamp(32px, 4vw, 46px)/1.08 var(--cond); color: var(--text-hi); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.markdown h2 { margin-top: 36px; font: 700 28px/1.2 var(--cond); color: var(--text-hi); }
.markdown h3 { margin-top: 28px; font: 700 21px/1.3 var(--cond); color: var(--text-hi); }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { scroll-margin-top: 24px; }
.markdown ul, .markdown ol { padding-left: 24px; }
.markdown li + li { margin-top: 7px; }
.markdown li > p + p, .markdown li > ul, .markdown li > ol { margin-top: 8px; }
.markdown code { font: inherit; font-size: .92em; color: var(--pink); background: var(--panel); padding: 2px 4px; }
.markdown pre { background: var(--bg-3); border: 1px solid var(--line); padding: 18px; overflow-x: auto; line-height: 1.75; font-size: 12px; tab-size: 2; }
.markdown pre code { color: var(--text-hi); background: none; padding: 0; white-space: pre; overflow-wrap: normal; }
.markdown table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: 12px; }
.markdown th, .markdown td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; min-width: 110px; }
.markdown th { background: var(--bg-2); color: var(--text-hi); }
.markdown blockquote { padding: 12px 16px; border-left: 3px solid var(--red-2); background: var(--panel); }
.markdown img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.markdown hr { border: 0; border-top: 1px solid var(--line); }
@media (max-width: 1100px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .docs-toc { position: static; grid-column: 2; grid-row: 1; max-height: 190px; padding: 12px; border: 1px solid var(--line); }
  .docs-sidebar { grid-row: 1 / span 2; }
  .docs-main { grid-column: 2; }
}
@media (max-width: 720px) {
  .docs-layout { display: flex; flex-direction: column; gap: 20px; }
  .docs-sidebar, .docs-main, .docs-toc { width: 100%; }
  .docs-sidebar { position: static; max-height: 245px; }
  .docs-toc { order: 1; max-height: 180px; }
  .docs-main { order: 2; }
  .markdown h1 { font-size: 34px; }
  .markdown pre { padding: 12px; }
}

/* --- profile ------------------------------------------------------------- */

.banner { display: flex; align-items: center; justify-content: center; height: 200px; background: repeating-linear-gradient(135deg, #1c0e0e 0 10px, #170b0b 10px 20px); border-bottom: 1px solid var(--line); background-size: cover; background-position: center; }
.banner__ph { padding: 3px 8px; background: var(--bg-3); border: 1px dashed var(--line-3); font-size: 11px; color: var(--muted); }
.prof-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 22px; padding: 0 22px 20px; }
.prof-head__pfp { margin-top: -64px; outline: 4px solid var(--panel); }
.prof-head__info { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; }
.prof-head__name { font: 700 46px/0.95 var(--cond); color: var(--text-hi); overflow-wrap: anywhere; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; padding: 12px; }
.badges span { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border: 1px dashed var(--line-3); background: var(--bg-2); font-size: 9px; color: var(--dim); }
.badges span.locked { border-color: var(--line); background: var(--bg); color: var(--faint); }
.activity li { display: flex; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.activity li:last-child { border-bottom: 0; }
.activity time { flex: 0 0 64px; color: var(--dim); }

/* --- profile editor ------------------------------------------------------ */

.swatch { width: 36px; height: 36px; padding: 0; border: 1px solid var(--bg-3); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--text-hi); outline-offset: 2px; }

.layout-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; padding: 16px; }
.layout-opt { display: flex; flex-direction: column; gap: 8px; padding: 10px; text-align: left; }
.layout-opt strong { font-weight: 700; }
.layout-opt small { font-size: 11px; color: var(--muted); }
.layout-opt[aria-checked="true"] small { color: var(--pink-2); }
.wire { display: flex; height: 44px; padding: 4px; border: 1px solid var(--line); background: var(--bg-3); }
.wire i { display: block; background: var(--line); }
.wire .w-pfp { background: #4a2020; }
.wire .w-hi { background: var(--line-3); }

.swatch--none { background: repeating-linear-gradient(135deg, var(--line-3) 0 3px, var(--bg-3) 3px 7px); }

.pv-mini-banner { height: 56px; background: repeating-linear-gradient(135deg, #1c0e0e 0 8px, #170b0b 8px 16px); border-bottom: 1px solid var(--line); background-size: cover; background-position: center; }

.savebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line-hot); background: var(--panel-hot); }

/* --- downloads ----------------------------------------------------------- */

.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.product { display: flex; flex-direction: column; }
.product__body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 22px 22px 24px; }
.product__name { font: 700 46px/0.95 var(--cond); color: var(--text-hi); }
.product__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.featlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 6px 16px; font-size: 12px; }
.featlist li::before { content: "+ "; color: var(--red-2); }
.callout { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--bg-3); border: 1px dashed var(--line-3); font-size: 12px; }

/* --- footer -------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer--big { border-top-color: var(--line-hot); }
.footer__bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 18px 26px; font-size: 11px; color: var(--dim); }
.footer__bottom--line { border-top: 1px solid var(--line-2); }
.footer__bottom--line .wrap { padding-block: 10px 18px; font-size: 10px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer__top { display: flex; flex-wrap: wrap; gap: 24px 40px; padding-block: 24px 14px; }
.footer__ascii { flex: none; font-size: 7px; line-height: 1; color: var(--red-3); }
.footer__map { flex: 1 1 520px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 18px; font-size: 12px; }
.footer__map nav { display: flex; flex-direction: column; gap: 4px; }
.footer__map h3 { font-size: 10px; font-weight: 400; letter-spacing: 0.1em; color: var(--muted); }
.b88s { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 4px 14px; }
.b88 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 31px;
  border: 1px solid var(--line-3);
  font-size: 8px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

/* --- server-side bits ---------------------------------------------------- */

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--red);
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 12px;
  color: var(--text);
}

.inline-form { display: inline; margin: 0; }
.linkbtn { padding: 0; background: none; border: 0; color: var(--link); font: inherit; cursor: pointer; }
.linkbtn:hover { color: var(--link-hover); text-decoration: underline; }

.alert { padding: 10px 14px; background: #2a0c0c; border: 1px solid var(--red); color: var(--text-hi); font-size: 12px; }
.empty { padding: 22px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.auth-page { align-items: center; padding-block: 48px 64px; }
.auth-box { width: 100%; max-width: 420px; }

.news { display: flex; flex-wrap: wrap; }
.news__date { flex: 0 0 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 6px; background: var(--red); border-right: 1px solid var(--red-2); color: var(--on-red); text-align: center; }
.news__day { font: 700 40px/0.9 var(--cond); }
.news__body { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.news__title { font: 700 28px/1 var(--cond); text-transform: uppercase; color: var(--text-hi); overflow-wrap: anywhere; }
.news__title:hover { color: var(--text-hi); }

.post-title { font: 700 38px/1 var(--cond); text-transform: uppercase; color: var(--text-hi); overflow-wrap: anywhere; }
.post-body, .comment__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-body { color: var(--text); text-wrap: pretty; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.gallery a { display: block; border: 1px solid var(--line); background: var(--bg-3); }
.gallery img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: contain; }
.gallery a:only-child { grid-column: 1 / -1; }

.manage { padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; }
.manage summary { color: var(--muted); cursor: pointer; }
.btn--danger { border-color: var(--red); color: var(--salmon); }
.btn--danger.is-armed { background: var(--red); color: var(--on-red); }
.btn.is-on { background: #3a0e0e; border-color: var(--red); color: var(--on-red); }

.sortpills { display: flex; gap: 4px; font-size: 11px; }
.sortpills a { padding: 2px 8px; border: 1px solid var(--line-hot); color: var(--pink-2); }
.sortpills a:hover { text-decoration: none; border-color: var(--red); }
.sortpills a[aria-current] { background: var(--red); border-color: var(--red); color: var(--on-red); }

.player__soon { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 360px; padding: 18px; text-align: center; background: rgba(7, 5, 5, 0.82); border: 1px solid var(--line); color: var(--text-2); }

.thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-link--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-link--empty { display: flex; align-items: center; justify-content: center; background: var(--hatch); }
.media-link__label { font-size: 11px; color: var(--dim); }

.rank__n--1 { color: var(--amber); }
.rank__n--2 { color: var(--text); }
.rank__n--3 { color: var(--text-2); }
.rank__n--4 { color: var(--muted); }
.rank__n--5 { color: var(--dim); }
.tag--hot { color: var(--link); font-weight: 700; }
.tag--pink { color: var(--pink); }
.tag--soft { color: var(--text-2); }
.tag--muted { color: var(--muted); }

.rx-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* --- comments in each author's own style ---------------------------------
   the author's choices arrive as custom properties on .comment__self.
   every comment resets them, so a reply never inherits its parent's look. */

.comment__self {
  --acc: initial;
  --name-color: initial;
  --frame: initial;
  --name-font: initial;
  --name-size: initial;
}
.comment__name {
  font-weight: 700;
  color: var(--name-color, var(--text-hi));
  font-family: var(--name-font, var(--mono));
  font-size: var(--name-size, 12px);
  overflow-wrap: anywhere;
}
.comment__name:hover { color: var(--name-color, var(--text-hi)); }
.has-frame { padding: 10px; border: var(--frame); background: var(--panel); }
.comment__sig { display: block; margin-top: 2px; padding-top: 6px; border-top: 1px dashed var(--line); font-size: 10px; color: var(--dim); white-space: pre-wrap; overflow-wrap: anywhere; }

.cm-classic { display: flex; border: var(--frame, 1px solid var(--line)); background: var(--panel); }
.cm-classic__side { flex: 0 0 120px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 8px; text-align: center; background: var(--bg-2); border-right: 1px solid var(--line); }
.cm-classic__main { flex: 1; min-width: 0; padding: 12px; }
.cm-card { border: var(--frame, 1px solid var(--line)); background: var(--panel); }
.cm-card__bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-2); border-bottom: 2px solid var(--acc, var(--line-3)); }
.cm-card__body { padding: 10px 12px; }

@media (max-width: 480px) {
  .cm-classic { flex-direction: column; }
  .cm-classic__side { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* profiles wear their owner's accent */
.prof { display: flex; flex-direction: column; gap: 18px; }
.prof--bg { padding: 18px; border: 1px solid var(--line); }
.prof .prof__head { border-color: var(--acc, var(--line-hot)); }
.prof .prof-head__name { color: var(--name-color, var(--text-hi)); }

/* someone's custom css can't paint outside their own box */
.q0u { contain: paint; }

/* --- small screens ------------------------------------------------------- */

/* when the three columns stack, the feed goes first */
@media (max-width: 787px) {
  .cols:not(.cols--keep) > .col-main { order: -1; }
}

@media (max-width: 640px) {
  .display, .display--xl, .display--md { font-size: 42px; }
  .search { margin-left: 0; width: 100%; }
  .search input { flex: 1; width: auto; }
  .catbar__sort { margin-left: 0; }
  .prof-head__name { font-size: 38px; }
}
