/* Voltrus Community. Tokens are voltrus.id's (BaseStyles.astro), converted to hex so contrast can be checked:
   warm off-white paper, near-black ink, one green accent. Light is the default like voltrus.id; dark follows the
   system or the footer switch. Every text pair here was run through the WCAG checker (lowest 5.23:1). */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  /* optional: no swap after first paint, so the font never shifts the layout. */
  font-display: optional;
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: optional;
  src: url("/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #f9f6f1;
  --raised: #ffffff;
  --surface: #f3f0e9;
  --border: #e4e1da;
  --border-strong: #d1cdc5;
  --text: #1d1a14;
  --text-2: #4b473f;
  --muted: #67635a;
  --accent: #176a4e;
  --accent-hover: #00563b;
  --accent-ink: #ffffff;
  --tint: #dbf4e8;
  --tint-ink: #0a553d;
  --bad: #b6322d;
  --warn: #945a00;
  --warn-tint: #fbf1dc;
  --focus: #176a4e;
  --code-bg: #f3f0e9;
  --shadow: 0 1px 2px rgb(60 50 30 / 6%), 0 8px 24px -10px rgb(60 50 30 / 16%);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --wrap: 1120px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #110f0b; --raised: #1d1a15; --surface: #292621; --border: #2e2b26; --border-strong: #3d3933;
    --text: #f4f1ec; --text-2: #c8c4bc; --muted: #a8a49c; --accent: #41dca5; --accent-hover: #5ff3bc; --accent-ink: #0c281d;
    --tint: #153528; --tint-ink: #9fe2c4; --bad: #ef7f74; --warn: #eebc4a; --warn-tint: #2c2412; --focus: #41dca5; --code-bg: #1d1a15;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -8px rgb(0 0 0 / 45%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #110f0b; --raised: #1d1a15; --surface: #292621; --border: #2e2b26; --border-strong: #3d3933;
  --text: #f4f1ec; --text-2: #c8c4bc; --muted: #a8a49c; --accent: #41dca5; --accent-hover: #5ff3bc; --accent-ink: #0c281d;
  --tint: #153528; --tint-ink: #9fe2c4; --bad: #ef7f74; --warn: #eebc4a; --warn-tint: #2c2412; --focus: #41dca5; --code-bg: #1d1a15;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -8px rgb(0 0 0 / 45%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--raised); color: var(--text); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
}
/* The one blurred surface: content scrolling under the sticky bar stays legible. */
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: blur(8px); } }
.site-header .wrap { display: flex; align-items: center; gap: 4px; height: 56px; }
@media (min-width: 768px) { .site-header .wrap { height: 64px; gap: 8px; } }
.wordmark { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; margin-right: auto; }
.wordmark:hover { color: var(--text); }
.wordmark img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.wordmark .wm-sub { font-weight: 500; color: var(--muted); }
@media (max-width: 420px) { .wordmark .wm-brand { display: none; } }
.hnav { display: flex; align-items: center; gap: 2px; }
.hnav a, .hnav button { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 10px; border-radius: 999px; color: var(--text-2); text-decoration: none; font: 600 0.9rem/1 var(--font); background: none; border: 0; cursor: pointer; }
.hnav a:hover, .hnav button:hover { color: var(--text); background: var(--surface); }
.hnav a[aria-current="page"] { color: var(--text); }
.hnav .hide-sm { display: none; }
@media (min-width: 720px) { .hnav .hide-sm { display: inline-flex; } }
/* Visible label on wide screens; on phones it stays for screen readers only. */
@media (max-width: 719px) { .hnav .hide-sm-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.editor-tabs { display: flex; gap: 4px; }
.hnav svg { width: 20px; height: 20px; flex: none; }
.hnav .ask { background: var(--accent); color: var(--accent-ink); padding: 0 14px; margin-left: 4px; }
.hnav .ask .long { display: none; }
@media (min-width: 720px) { .hnav .ask .long { display: inline; } .hnav .ask .short { display: none; } }
.hnav .ask:hover { background: var(--accent-hover); color: var(--accent-ink); }
.badge-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.avatar-btn { padding: 0 4px !important; }

/* ---- Account menu (details/summary: keyboard and touch work without JS) ---- */
.menu { position: relative; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; border-radius: 999px; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--surface); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 60; }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font: 500 0.95rem var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface); }
.menu-panel hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.menu-panel .who { padding: 8px 12px 6px; font-size: 0.85rem; color: var(--muted); }

/* ---- Avatars: uploaded picture or the handle's initial ---- */
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 0.95rem; object-fit: cover; border: 1px solid var(--border); }
.avatar.sm { width: 28px; height: 28px; font-size: 0.8rem; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.6rem; }

/* ---- Layout: page grid with an aside on wide screens ---- */
.page { padding-top: 24px; padding-bottom: 48px; }
@media (min-width: 768px) { .page { padding-top: 32px; padding-bottom: 64px; } }
.with-aside { display: grid; gap: 32px; }
@media (min-width: 960px) { .with-aside { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; } }
.with-aside > * { min-width: 0; }
.page-head { margin-bottom: 20px; }
.page-head p { color: var(--text-2); max-width: 62ch; }
.crumbs { font-size: 0.875rem; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

/* ---- Tabs (links) ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; border-bottom: 1px solid var(--border); }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.subtabs a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: 0.85rem; color: var(--text-2); text-decoration: none; border: 1px solid var(--border); }
.subtabs a[aria-current="page"] { background: var(--surface); color: var(--text); border-color: var(--border-strong); }

/* ---- Topic list: dense rows, not cards. The solved mark is the one place the accent fills a shape. ---- */
.topics { list-style: none; margin: 0; padding: 0; }
.topic { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.topic-title { font-weight: 650; font-size: 1.02rem; line-height: 1.35; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.topic-title:hover { color: var(--accent); text-decoration: underline; }
.topic-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.85rem; color: var(--muted); }
.topic-stat { grid-row: 1; grid-column: 2; text-align: right; font-size: 0.85rem; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.topic-stat strong { display: block; color: var(--text); font-size: 1rem; font-weight: 700; }
@media (min-width: 640px) { .topic-meta { grid-column: 1; } .topic-stat { grid-row: 1 / span 2; } }
.marks { display: inline-flex; gap: 6px; vertical-align: 2px; margin-right: 6px; }
.mark { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface); color: var(--text-2); line-height: 1.6; }
.mark svg { width: 12px; height: 12px; }
.mark.solved { background: var(--tint); color: var(--tint-ink); }
.mark.pending { background: var(--warn-tint); color: var(--warn); }
.cat { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; }
.cat:hover { color: var(--text); text-decoration: underline; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.tag { display: inline-flex; align-items: center; font-size: 0.8rem; color: var(--text-2); text-decoration: none; padding: 0 8px; min-height: 24px; border-radius: 6px; border: 1px solid var(--border); background: var(--raised); }
.tag:hover { border-color: var(--border-strong); color: var(--text); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }

.empty { padding: 32px 0; color: var(--text-2); }
.empty p { margin-bottom: 12px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* ---- Aside: categories ---- */
.aside-block { margin-bottom: 28px; }
.aside-block h2 { font-size: 0.95rem; color: var(--text-2); margin-bottom: 8px; }
.catlist { list-style: none; margin: 0; padding: 0; }
.catlist li { border-bottom: 1px solid var(--border); }
.catlist a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; min-height: 44px; color: var(--text); text-decoration: none; }
.catlist a:hover .catname { text-decoration: underline; }
.catname { font-weight: 600; }
.catlist .count { font-size: 0.8rem; color: var(--muted); }
.catlist .desc { grid-column: 2 / -1; font-size: 0.85rem; color: var(--muted); margin-top: -6px; }

/* ---- Buttons and forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: 650 0.95rem/1 var(--font); cursor: pointer; text-decoration: none; background: var(--accent); color: var(--accent-ink); transition: background-color 0.15s, scale 0.1s; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn:active { scale: 0.98; }
.btn.secondary { background: var(--raised); color: var(--text); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--surface); }
.btn.quiet { background: none; color: var(--text-2); border-color: transparent; padding: 0 12px; }
.btn.quiet:hover { background: var(--surface); color: var(--text); }
.btn.danger { background: var(--raised); color: var(--bad); border-color: var(--border-strong); }
.btn.danger:hover { background: var(--surface); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-weight: 650; margin-bottom: 6px; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 4px 0 0; }
input[type="text"], input[type="email"], input[type="search"], input[type="number"], textarea, select {
  width: 100%; font: 400 1rem/1.5 var(--font); color: var(--text); background: var(--raised);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 200px; resize: vertical; font-family: var(--font); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input.code-input { font: 600 1.6rem/1 var(--mono); letter-spacing: 0.3em; text-align: center; max-width: 240px; }
.radio-list { display: grid; gap: 8px; }
.radio-list label, .check { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--raised); cursor: pointer; font-weight: 500; }
.radio-list input, .check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid var(--border-strong); background: var(--raised); }
.alert.error { border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); color: var(--bad); }
.alert.ok { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--tint-ink); background: var(--tint); }
.alert.note { background: var(--warn-tint); border-color: transparent; color: var(--text); }
.panel { background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
@media (min-width: 640px) { .panel { padding: 28px; } }
.narrow { max-width: 560px; }
.form-wide { max-width: 760px; }

/* ---- Editor ---- */
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--raised); }
.editor:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 1px; }
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border-bottom: 1px solid var(--border); }
.editor-bar button, .editor-bar label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 6px; border: 0; background: none; color: var(--text-2); font: 600 0.85rem var(--font); cursor: pointer; }
.editor-bar button[aria-selected="true"] { background: var(--surface); color: var(--text); }
.editor-bar button:hover, .editor-bar label:hover { color: var(--text); background: var(--surface); }
.editor-bar .grow { flex: 1; }
.editor-bar input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.editor-bar label:focus-within { outline: 2px solid var(--focus); }
.editor textarea { border: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); outline: none !important; min-height: 220px; }
.editor .preview { padding: 12px; min-height: 220px; }
.editor-status { font-size: 0.85rem; color: var(--muted); padding: 6px 12px 8px; min-height: 1.6em; }
.editor-status.error { color: var(--bad); }

/* ---- Topic page ---- */
.topic-head { margin-bottom: 8px; }
.topic-head h1 { overflow-wrap: anywhere; }
.topic-head .topic-meta { margin-bottom: 4px; }
.post { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
@media (min-width: 640px) { .post { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; } .post > .avatar { width: 44px; height: 44px; } }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 6px; font-size: 0.9rem; }
.post-head .name { font-weight: 700; color: var(--text); text-decoration: none; }
.post-head .name:hover { text-decoration: underline; }
.post-head .handle, .post-head time, .post-head .edited { color: var(--muted); }
.post-head .permalink { color: var(--muted); text-decoration: none; margin-left: auto; min-height: 32px; display: inline-flex; align-items: center; }
.role { font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--tint); color: var(--tint-ink); }
.post-note { font-size: 0.875rem; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--warn-tint); margin-bottom: 10px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 10px; margin-left: -12px; }
.post-actions form { display: inline; margin: 0; }
.post-actions .btn { min-height: 40px; }
.like-btn[aria-pressed="true"] { color: var(--accent); }
.like-btn[aria-pressed="true"] svg { fill: currentColor; }
.post.is-accepted { }
.reply-ref { font-size: 0.85rem; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 6px; }

/* The accepted answer sits under the question in the brand tint: the forum's identity motif. */
.answer-box { margin: 4px 0 24px; padding: 16px 18px; border-radius: var(--radius); background: var(--tint); color: var(--text); }
.answer-box .answer-label { display: flex; align-items: center; gap: 8px; font-weight: 750; color: var(--tint-ink); margin-bottom: 8px; }
.answer-box .answer-label svg { width: 20px; height: 20px; }
.answer-box .prose { max-height: 22em; overflow: hidden; position: relative; }
.answer-box .answer-foot { margin-top: 10px; font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); }
.answer-box a { color: var(--tint-ink); font-weight: 650; }

.replies-head { margin-top: 28px; font-size: 1.1rem; }
.notice { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); margin: 16px 0; }
.reply-box { margin-top: 28px; }
.mod-bar { margin: 12px 0 0; padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }
.mod-bar summary { cursor: pointer; font-weight: 650; min-height: 32px; display: flex; align-items: center; }
.mod-bar form { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 8px 0 0; }
.mod-bar select, .mod-bar input { width: auto; min-height: 36px; padding: 4px 8px; font-size: 0.9rem; }

/* ---- Rendered posts ---- */
.prose { overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 0 0 0.9em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose h2 { font-size: 1.2rem; margin-top: 1.2em; }
.prose h3, .prose h4, .prose h5, .prose h6 { font-size: 1.05rem; margin-top: 1.1em; }
.prose blockquote { border-left: 3px solid var(--border-strong); padding: 2px 0 2px 14px; color: var(--text-2); }
.prose code { font: 0.88em/1.5 var(--mono); background: var(--code-bg); padding: 1px 5px; border-radius: 5px; }
.prose pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; max-width: 100%; }
.prose pre code { background: none; padding: 0; font-size: 0.85rem; white-space: pre; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--border); height: auto; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 1.5em 0; }
.prose a.mention { font-weight: 650; text-decoration: none; }
.prose mark, .snippet mark { background: var(--tint); color: var(--tint-ink); border-radius: 3px; padding: 0 2px; }
.prose li > input[type="checkbox"] { margin-right: 6px; }

/* highlight.js, two themes on the same tokens */
.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-type { color: #8a3b9c; }
.hljs-string, .hljs-attr-value, .hljs-template-string { color: #176a4e; }
.hljs-number, .hljs-literal { color: #945a00; }
.hljs-comment, .hljs-quote { color: #67635a; font-style: italic; }
.hljs-title, .hljs-title.function_, .hljs-section { color: #1f5fa6; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-params { color: #a33d2a; }
.hljs-meta { color: #67635a; }
:root[data-theme="dark"] .hljs-keyword, :root[data-theme="dark"] .hljs-built_in, :root[data-theme="dark"] .hljs-type { color: #d6a3e6; }
:root[data-theme="dark"] .hljs-string { color: #7fe0b6; }
:root[data-theme="dark"] .hljs-number, :root[data-theme="dark"] .hljs-literal { color: #eebc4a; }
:root[data-theme="dark"] .hljs-comment, :root[data-theme="dark"] .hljs-meta { color: #a8a49c; }
:root[data-theme="dark"] .hljs-title, :root[data-theme="dark"] .hljs-section { color: #8cc2ff; }
:root[data-theme="dark"] .hljs-attr, :root[data-theme="dark"] .hljs-attribute, :root[data-theme="dark"] .hljs-variable, :root[data-theme="dark"] .hljs-params { color: #f59a85; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hljs-keyword, :root:not([data-theme="light"]) .hljs-built_in, :root:not([data-theme="light"]) .hljs-type { color: #d6a3e6; }
  :root:not([data-theme="light"]) .hljs-string { color: #7fe0b6; }
  :root:not([data-theme="light"]) .hljs-number, :root:not([data-theme="light"]) .hljs-literal { color: #eebc4a; }
  :root:not([data-theme="light"]) .hljs-comment, :root:not([data-theme="light"]) .hljs-meta { color: #a8a49c; }
  :root:not([data-theme="light"]) .hljs-title, :root:not([data-theme="light"]) .hljs-section { color: #8cc2ff; }
  :root:not([data-theme="light"]) .hljs-attr, :root:not([data-theme="light"]) .hljs-attribute, :root:not([data-theme="light"]) .hljs-variable, :root:not([data-theme="light"]) .hljs-params { color: #f59a85; }
}

/* ---- Search ---- */
.search-form { display: flex; gap: 8px; margin-bottom: 12px; }
.search-form input { flex: 1; min-width: 0; }
.filters { margin-bottom: 20px; }
.filters summary { cursor: pointer; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; color: var(--text-2); }
.filters .grid { display: grid; gap: 12px; padding: 8px 0; }
@media (min-width: 640px) { .filters .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hit { padding: 14px 0; border-bottom: 1px solid var(--border); }
.hit .snippet { color: var(--text-2); font-size: 0.92rem; margin: 4px 0; overflow-wrap: anywhere; }

/* ---- Notifications ---- */
.notifs { list-style: none; padding: 0; margin: 0; }
.notifs li { border-bottom: 1px solid var(--border); }
.notifs a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; color: var(--text); text-decoration: none; }
.notifs a:hover .n-text { text-decoration: underline; }
.notifs .unread .n-text { font-weight: 650; }
.notifs .unread .avatar { border-color: var(--accent); }
.n-time { font-size: 0.8rem; color: var(--muted); display: block; }

/* ---- Profile ---- */
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-head h1 { margin: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0 20px; color: var(--text-2); }
.stats strong { color: var(--text); }

/* ---- Mod ---- */
.queue-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.queue-item .prose { max-height: 16em; overflow: auto; padding: 10px 12px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 8px 0; }
.table-wrap { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data th, .data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data th { color: var(--muted); font-weight: 600; }
.user-card { padding: 16px 0; border-bottom: 1px solid var(--border); }
.user-card form { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 8px 0 0; }
.user-card select, .user-card input { width: auto; min-height: 36px; padding: 4px 8px; font-size: 0.9rem; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0 32px; font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-footer a { color: var(--text-2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer a[aria-current="true"] { color: var(--text); font-weight: 700; }
.prefs { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.prefs span { padding: 0 4px 0 8px; }

/* ---- Legal / static ---- */
.doc { max-width: 70ch; }
.doc h2 { margin-top: 1.6em; }

.login-providers { display: grid; gap: 10px; margin-bottom: 8px; }
.login-providers .btn { width: 100%; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: 0.9rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.cf-turnstile { min-height: 65px; margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .post-actions, .reply-box, .mod-bar { display: none; } }

/* Small layout helpers (no inline styles: the CSP forbids them). */
fieldset.plain { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset.plain > legend { padding: 0; }
.label { display: block; font-weight: 650; margin-bottom: 6px; }
textarea.short { min-height: 100px; }
.gap-top { margin-top: 20px; }
.spread { justify-content: space-between; }
.flush { margin: 0; }
