/* politforum.net — editorial theme. System fonts plus self-hosted fonts (no third-party font requests). */

/* Desktop palette (owner's colour scheme) - edit these to retheme the whole site. */
:root {
  --bg:        #073642;
  --fg:        #c8dbec;
  --base:      #002b36;
  --text:      #c8dbec;
  --accent:    #005270;
  --on-accent: #ffffff;
  --border:    #073642;
  --muted:     #c8dbec;
  --warning:   #938d6d;
  --error:     #268bd2;
  --success:   #5f8e5b;
}

/* Theme roles, derived from the palette above. */
:root {
  --paper: var(--base);
  --paper-raised: var(--bg);
  --ink: var(--text);
  --ink-soft: color-mix(in srgb, var(--muted) 85%, var(--base));
  --ink-faint: color-mix(in srgb, var(--muted) 62%, var(--base));
  --rule: color-mix(in srgb, var(--border) 80%, var(--text));
  /* --accent is too dark to read as text on --base; this lighter tint is ~6:1. */
  --accent-text: color-mix(in srgb, var(--accent) 50%, #ffffff);
  --focus: var(--error);

  /* Colour emojis first ("PF Emoji" in static/richtext: device emojis or Twemoji, emoji code points only).
     Otherwise fonts like DejaVu (system-ui on Linux) answer with monochrome emoji glyphs. */
  --emoji: "PF Emoji";
  --serif: var(--emoji), Charter, "Bitstream Charter", "Sitka Text", Cambria, "Iowan Old Style", Georgia, serif;
  --sans: var(--emoji), system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --measure: 40rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent-text) 55%, transparent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 0.5rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: var(--measure); margin-inline: auto; }
.column-wide { max-width: 56rem; margin-inline: auto; }

/* ---------- Masthead ---------- */

.masthead { padding-top: 1.25rem; }
.masthead__top {
  display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.masthead__brand { text-align: center; padding: 1.25rem 0 1rem; }
.wordmark {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.25rem); line-height: 1; letter-spacing: -0.02em;
  text-decoration: none; color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.wordmark span { color: var(--accent-text); }
.tagline {
  margin: 0.6rem 0 0; font-family: var(--sans); font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-soft);
}

.mainnav {
  background: var(--paper-raised); border-block: 1px solid var(--rule);
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600;
}
.mainnav ul {
  list-style: none; margin: 0 auto; padding-block: 0.55rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 2rem;
}
.mainnav a { display: block; padding: 0.3rem 0.7rem; border-radius: 3px; text-decoration: none; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8rem; }
.mainnav a[aria-current="page"] { color: var(--on-accent); background: var(--accent); }

/* ---------- Shared bits ---------- */

main { padding-block: 2.5rem 4rem; }

.kicker {
  margin: 0 0 0.5rem; font-family: var(--sans); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text);
}
.kicker .sep { color: var(--ink-faint); margin-inline: 0.35em; }
.kicker .soft { color: var(--ink-faint); }

.section-label {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.5rem; font-family: var(--sans); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.section-label::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }

.more-link {
  display: inline-block; margin-top: 2rem; font-family: var(--sans); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; border-bottom: 2px solid var(--accent-text); padding-bottom: 0.1rem;
}

.media { display: block; overflow: hidden; background: var(--paper-raised); border-radius: 2px; }
.media img { width: 100%; transition: transform 0.4s ease; }
a.media:hover img { transform: scale(1.02); }

/* ---------- Home: lead story ---------- */

.lead {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2.5rem; align-items: center;
  padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--rule);
}
.lead__title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 1rem; }
.lead__title a { text-decoration: none; }
.lead__teaser { margin: 0; color: var(--ink-soft); font-size: 1.15rem; }

.home-intro { max-width: var(--measure); margin: 0 auto 3rem; text-align: center; color: var(--ink-soft); font-size: 1.2rem; font-style: italic; }

/* ---------- Cards ---------- */

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.75rem 2rem; }
.card .media { margin-bottom: 1rem; }
.card__title { font-size: 1.3rem; line-height: 1.22; margin: 0 0 0.6rem; letter-spacing: -0.01em; }
.card__title a { text-decoration: none; }
.card__teaser { margin: 0; font-size: 1rem; color: var(--ink-soft); }

.list { display: grid; gap: 2.25rem; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.75rem; align-items: start; padding-bottom: 2.25rem; border-bottom: 1px solid var(--rule); }
.row:last-child { border-bottom: 0; }
.row .card__title { font-size: 1.55rem; }

.page-header { text-align: center; margin-bottom: 3rem; }
.page-header h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 0.75rem; letter-spacing: -0.02em; }
.page-header .intro { color: var(--ink-soft); margin: 0 auto; max-width: var(--measure); }

.pagination { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; font-family: var(--sans); font-size: 0.9rem; }
.pagination a { font-weight: 600; text-decoration: none; }
.pagination .status { color: var(--ink-faint); }

/* ---------- Post ---------- */

.post__header { text-align: center; margin-bottom: 2.25rem; }
.post__title { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 1.25rem; }
.post__lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.post__feature { margin: 0 auto 2.75rem; max-width: 60rem; }
.post__feature figcaption, .prose figcaption { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-faint); margin-top: 0.6rem; }

.prose > * + * { margin-top: 1.25em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { line-height: 1.25; letter-spacing: -0.01em; margin: 2.2em 0 0.6em; }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.3rem; }
.prose h4 { font-size: 1.1rem; font-family: var(--sans); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 1.1em 0; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--accent-text); }
.prose blockquote {
  margin: 1.8em 0; padding: 0.2em 0 0.2em 1.4em; border-left: 3px solid var(--accent-text);
  font-size: 1.2rem; font-style: italic; color: var(--ink-soft);
}
.prose hr { border: 0; text-align: center; margin: 2.5em 0; }
.prose hr::after { content: "\2022\2002\2022\2002\2022"; color: var(--ink-faint); letter-spacing: 0.3em; }
.prose figure { margin: 2em 0; }
.prose iframe, .prose video, .prose embed { max-width: 100%; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 0.5em; text-align: left; }

/* Ghost cards kept as raw HTML: neutralise their layout so they sit in the column. */
.prose .kg-card { margin: 2em 0; }
.prose .kg-file-card a { text-decoration: none; }

.download {
  display: flex; align-items: center; gap: 1rem; margin: 1.75em 0 !important;
  padding: 1rem 1.15rem; background: var(--paper-raised); border: 1px solid var(--rule); border-left: 4px solid var(--accent-text);
  font-family: var(--sans); text-decoration: none; border-radius: 2px;
}
.download:hover { border-color: var(--accent-text); color: inherit; }
.download__badge {
  flex: none; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  background: var(--accent); color: var(--on-accent); padding: 0.35rem 0.5rem; border-radius: 2px;
}
.download__title { font-weight: 600; font-size: 0.98rem; line-height: 1.35; }
.download__hint { display: block; font-weight: 400; font-size: 0.8rem; color: var(--ink-faint); }

.post__footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-family: var(--sans); font-size: 0.9rem; color: var(--ink-faint); }
.tags { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags a { display: block; border: 1px solid var(--rule); padding: 0.15rem 0.65rem; border-radius: 999px; font-size: 0.8rem; text-decoration: none; }
.tags a:hover { border-color: var(--accent-text); }

.more-posts { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid var(--rule); }

/* ---------- Account pages, forms, messages ---------- */

.account-links a { text-decoration: none; color: var(--accent-text); font-weight: 600; }

.account-page main > :not(.messages) { max-width: 30rem; margin-inline: auto; padding-inline: var(--gutter); }
.account-page main h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 1rem; }
.account-page main h2 { font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 2rem 0 0.75rem; }
.account-page main p { margin: 0 0 1rem; }
.panel { padding-block: 0.5rem; }
.plain-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }

form { font-family: var(--sans); font-size: 0.95rem; }
form p, form > div { margin: 0 0 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 0.65rem 0.75rem; font: inherit; color: var(--text);
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 3px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
input[type=checkbox] { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; vertical-align: -0.2rem; margin-right: 0.4rem; }
label:has(input[type=checkbox]) { display: inline; font-weight: 400; }
.helptext, form ul.errorlist + *, form small { display: block; font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.3rem; }
form ul:not(.errorlist) { font-size: 0.8rem; color: var(--ink-faint); margin: 0.4rem 0 0; padding-left: 1.1rem; }
ul.errorlist { list-style: none; padding: 0; margin: 0 0 0.4rem; color: var(--error); font-size: 0.85rem; font-weight: 600; }

button, .button {
  display: inline-block; font: 600 0.95rem var(--sans); cursor: pointer; text-decoration: none;
  padding: 0.65rem 1.25rem; border-radius: 3px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--on-accent);
}
button:hover, .button:hover { filter: brightness(1.2); color: var(--on-accent); }
button.secondary, .button.secondary { background: transparent; color: var(--text); border-color: var(--rule); }

.messages { margin-bottom: 1.5rem; }
.message { max-width: 40rem; margin: 0 auto 0.5rem; padding: 0.75rem 1rem; font: 0.95rem var(--sans); border-radius: 3px;
  background: var(--paper-raised); border-left: 4px solid var(--accent-text); }
.message--success { border-left-color: var(--success); }
.message--warning { border-left-color: var(--warning); }
.message--error { border-left-color: var(--error); }

/* ---------- Forum ---------- */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.forum { font-family: var(--sans); font-size: 1rem; }
.forum h1 { font-family: var(--serif); font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.15; margin: 0 0 0.5rem; }
.forum .meta { color: var(--ink-faint); font-size: 0.88rem; }
.forum-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1.5rem; margin-bottom: 2rem; font-size: 0.9rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; color: var(--ink-faint); }
.crumbs a { text-decoration: none; color: var(--accent-text); }
.forum-tools { display: flex; align-items: center; gap: 1rem; }
.forum-tools a { text-decoration: none; color: var(--accent-text); font-weight: 600; }
.forum-tools input { width: 14rem; padding: 0.4rem 0.6rem; }
.forum-head { margin-bottom: 1.75rem; }
.forum-head .button { margin-top: 0.75rem; }
.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 2.5rem; align-items: start; }
/* threads: info boxes left of the posts, so the right side stays free for the thesaurus panel */
/* The layout spans the full window: boxes flush left at the page edge, posts centred in the window
   (an empty column of the same width on the right balances the boxes). With the thesaurus open, the window
   minus the panel is the stage and the posts centre between boxes and panel. */
:root { --th-w: 0px; }
.forum-layout.sidebar-left { width: calc(100vw - var(--th-w)); margin-left: calc(50% - (100vw - var(--th-w)) / 2);
  padding-inline: var(--gutter); grid-template-columns: 17rem minmax(0, 52rem) 17rem; justify-content: space-between; }
.forum-layout.sidebar-left > .sidebar { grid-column: 1; grid-row: 1; text-align: left; justify-items: stretch; }
.forum-layout.sidebar-left > :not(.sidebar) { grid-column: 2; grid-row: 1; }
body.thesaurus-open .forum-layout.sidebar-left { grid-template-columns: 17rem minmax(0, 52rem) 0; justify-content: space-between; }
html { overflow-x: clip; }  /* 100vw includes the scrollbar; never let that become a sideways scroll */
/* below ~1300 px a balancing right column would squeeze the posts: they fill the width instead */
@media (max-width: 81rem) { .forum-layout.sidebar-left { grid-template-columns: 17rem minmax(0, 1fr) 0; } }
.forum-area { margin-bottom: 2.5rem; }
.forum-area .section-label a { text-decoration: none; }

.topic-list, .thread-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.topic-list li, .thread-list li { display: grid; gap: 0.2rem; padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--rule); }
.topic-name, .thread-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.topic-desc { color: var(--ink-soft); font-size: 0.92rem; }
.topic-stats, .thread-meta { color: var(--ink-faint); font-size: 0.82rem; }
.thread-meta a { color: var(--accent-text); }
.thread-list li.is-unread .thread-title::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent-text); margin-right: 0.5rem; vertical-align: 0.15rem; }
.new { color: var(--accent-text); font-weight: 600; }
.badge { display: inline-block; font: 600 0.68rem var(--sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 0.1rem 0.4rem; border-radius: 3px; border: 1px solid var(--rule); color: var(--ink-faint); vertical-align: 0.15rem; }

.forum-post { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 1.25rem; margin-bottom: 1rem; scroll-margin-top: 1.5rem; }
.forum-post:target { border-color: var(--accent-text); box-shadow: 0 0 0 1px var(--accent-text); }
.forum-post.is-hidden { opacity: 0.6; border-style: dashed; }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-bottom: 0.6rem; font-size: 0.85rem; }
.post-head .author { font-weight: 700; color: var(--text); }
.post-time { color: var(--ink-faint); text-decoration: none; }
.hidden-note { color: var(--warning); font-size: 0.85rem; font-weight: 600; margin: 0 0 0.5rem; }
.post-body { font-family: var(--serif); font-size: 1.05rem; }
.post-body > * + * { margin-top: 0.9em; }
.post-body pre { overflow-x: auto; background: var(--paper); padding: 0.75rem; border-radius: 3px; font-size: 0.9rem; }
.post-body code { font-size: 0.92em; }
.attachments { margin-top: 1rem; display: grid; gap: 0.75rem; }
.att-image img { max-height: 22rem; width: auto; border-radius: 3px; border: 1px solid var(--rule); }
.download.small { margin: 0 !important; padding: 0.55rem 0.8rem; }
.post-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; margin-top: 0.9rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.85rem; }
.post-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.post-buttons a { color: var(--accent-text); text-decoration: none; }
.reactions { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.reaction { font: inherit; font-family: var(--emoji), var(--sans); font-size: 1.1rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--rule); background: transparent; color: var(--text); cursor: pointer; line-height: 1.4;
  transition: transform 160ms cubic-bezier(.34, 1.56, .64, 1), background-color 160ms ease, opacity 160ms ease; }
.reaction:hover, .reaction:focus-visible { transform: scale(1.18) rotate(-4deg); }
.reaction:active { transform: scale(0.9); transition-duration: 60ms; }
.reaction.is-mine { animation: reaction-pop 420ms cubic-bezier(.34, 1.56, .64, 1); box-shadow: 0 0 12px color-mix(in srgb, var(--accent-text) 35%, transparent); }
@keyframes reaction-pop { 35% { transform: scale(1.4) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .reaction, .reaction.is-mine { transition: none; animation: none; } }
.reaction.is-empty { opacity: 0.85; }
.reaction.is-empty:hover { opacity: 1; }
.reaction.is-mine { border-color: var(--accent-text); background: color-mix(in srgb, var(--accent) 40%, transparent); }
.reaction:hover { filter: none; color: var(--text); }
.reaction span:not(.e3d) { font-size: 0.8rem; color: var(--ink-soft); }

form.inline { display: inline-flex; align-items: center; gap: 0.35rem; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; text-decoration: none; }
.link-button:hover { filter: none; color: var(--text); text-decoration: underline; }
.link-button.danger { color: var(--warning); }
.mini-input { width: 7rem !important; padding: 0.15rem 0.4rem !important; font-size: 0.8rem !important; }
button.small, .button.small { padding: 0.35rem 0.75rem; font-size: 0.82rem; }
.thread-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.reply-form { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper-raised); }
.reply-form h1, .reply-form h2 { font-family: var(--serif); margin: 0 0 1rem; }
.reply-form h2 { font-size: 1.25rem; }
.narrow-form { max-width: 46rem; }
.editor { margin-bottom: 1rem; }
.editor textarea { font-family: var(--sans); line-height: 1.5; resize: vertical; background: var(--paper); }
.editor-tabs { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.78rem; color: var(--ink-faint); margin-bottom: 0.35rem; }
.preview:not(:empty) { margin-top: 0.75rem; padding: 0.9rem 1rem; border: 1px dashed var(--rule); border-radius: 3px; font-family: var(--serif); }
.file-label { margin-top: 1rem; font-weight: 600; }
.upload-list { list-style: none; padding: 0; margin: 0.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.upload-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.5rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); font-size: 0.82rem; }
.upload-list img { width: 3rem; height: 3rem; object-fit: cover; border-radius: 3px; }
.upload-list .link-button { font-size: 1.1rem; line-height: 1; color: var(--warning); }
.upload-hint { margin-top: 0.4rem !important; }
.upload-hint.is-error { color: var(--error) !important; font-weight: 600; }
.notice { margin-top: 2rem; padding: 1rem 1.25rem; border-left: 4px solid var(--accent-text); background: var(--paper-raised); }

.sidebar { display: grid; gap: 1.25rem; }
.governance { font-size: 0.88rem; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem; display: grid; gap: 1.25rem; }
.governance h2 { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 0.6rem; color: var(--ink-soft); }
.governance .who { font-weight: 600; margin-right: 0.4rem; }
.governance li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.governance textarea, .governance input[type=email], .governance select { margin-bottom: 0.6rem; }
.governance label { font-size: 0.82rem; }
.mod-menu { position: relative; }
.mod-menu summary { cursor: pointer; color: var(--warning); list-style: none; }
.mod-menu summary::-webkit-details-marker { display: none; }
.mod-menu form { position: absolute; right: 0; bottom: 1.8rem; z-index: 2; display: flex; gap: 0.5rem; align-items: center; padding: 0.6rem; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; white-space: nowrap; }
.mod-menu .mini-input { width: 12rem !important; }
.apply summary { cursor: pointer; color: var(--accent-text); font-weight: 600; margin-top: 0.5rem; }
.apply form { margin-top: 0.75rem; }

.vote blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--accent-text); color: var(--ink-soft); }
.tally { margin: 1.5rem 0; }
.tally-bar { position: relative; height: 0.75rem; border-radius: 999px; background: var(--paper-raised); border: 1px solid var(--rule); overflow: hidden; }
.tally-bar span { display: block; height: 100%; background: var(--success); }
.tally-bar i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); }
.vote-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.vote-buttons .is-mine { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.forum-tree, .forum-tree ul { list-style: none; margin: 0; padding: 0; }
.forum-tree > li { border-bottom: 1px solid var(--rule); }
.forum-tree > li:first-child { border-top: 1px solid var(--rule); }
.tree-node > summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 0.25rem 1rem; padding: 0.75rem 0.25rem; cursor: pointer; list-style: none; }
.tree-node > summary::-webkit-details-marker { display: none; }
.tree-label { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.tree-label::before { content: "▸"; display: inline-block; width: 1rem; color: var(--accent-text); transition: transform 0.15s ease; }
.tree-node[open] > summary .tree-label::before { transform: rotate(90deg); }
.tree-name { color: var(--text); }
.tree-open { order: 3; margin-left: auto; font-size: 0.8rem; font-weight: 600; color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.tree-open:hover { text-decoration: underline; }
.tree-right { display: contents; }
.tree-area > summary .tree-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.tree-topic > summary .tree-name { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.tree-stats { color: var(--ink-faint); font-size: 0.8rem; order: 2; margin-left: 1rem; }
.tree-node > summary:hover .tree-name { color: var(--accent-text); }
.tree-desc { margin: -0.4rem 0 0.6rem 1.75rem; color: var(--ink-soft); font-size: 0.9rem; }
.tree-children { margin: 0 0 0.6rem 0.6rem !important; padding-left: 1rem !important; border-left: 1px solid var(--rule); }
.tree-thread { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.15rem 1rem; padding: 0.35rem 0 0.35rem 1.1rem; }
.tree-thread a { text-decoration: none; }
.tree-thread.is-unread > a { font-weight: 700; }
.tree-thread.is-unread > a::before { content: ""; display: inline-block; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent-text); margin-right: 0.45rem; vertical-align: 0.1rem; }
.tree-topic .tree-topic > summary .tree-name { font-size: 1rem; }
.tree-empty, .tree-more { padding-left: 1.1rem !important; }
.tree-empty { color: var(--ink-faint); font-size: 0.88rem; padding: 0.4rem 0.25rem; }
.tree-more a { color: var(--accent-text); font-size: 0.85rem; }
.tree-node > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .tree-label::before { transition: none; } }
.drag-handle { display: none; cursor: grab; color: var(--ink-faint); margin-right: 0.35rem; font-size: 1.1rem; line-height: 1; }
.restructuring .drag-handle { display: inline; }
.restructuring summary[data-node] { cursor: grab; border-radius: 3px; }
.restructuring summary[data-node]:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.is-dragging { opacity: 0.4; }
.drop-before { box-shadow: inset 0 3px 0 var(--accent-text); }
.drop-after { box-shadow: inset 0 -3px 0 var(--accent-text); }
.drop-inside { background: color-mix(in srgb, var(--accent) 45%, transparent) !important; outline: 1px dashed var(--accent-text); }
[data-restructure][aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

@media (max-width: 960px) {
  .forum-layout, .forum-layout.sidebar-left, body.thesaurus-open .forum-layout.sidebar-left { grid-template-columns: minmax(0, 1fr); }
  .forum-layout.sidebar-left { width: auto; margin-left: 0; padding-inline: 0; }
  .forum-layout.sidebar-left > .sidebar, .forum-layout.sidebar-left > :not(.sidebar) { grid-column: 1; grid-row: auto; }
  .forum-tools input { width: 100%; }
}

/* ---------- Profiles, friends, notifications ---------- */

.avatar { display: inline-block; width: var(--size, 40px) !important; height: var(--size, 40px) !important; max-height: none !important; margin: 0 !important; border-radius: 50%; object-fit: cover; flex: none; vertical-align: middle; background: var(--paper-raised); }
.avatar--initials { width: var(--size); height: var(--size); display: inline-grid; place-items: center; font: 700 calc(var(--size) * 0.4) / 1 var(--sans);
  color: #fff; background: hsl(var(--hue) 35% 32%); }
.account-links { display: inline-flex; align-items: center; gap: 1rem; }
.bell { position: relative; display: inline-flex; color: var(--text) !important; }
.bell-count { position: absolute; top: -0.45rem; right: -0.6rem; min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem; border-radius: 999px;
  background: var(--error); color: #fff; font-size: 0.65rem; font-weight: 700; display: grid; place-items: center; }
.me-link { display: inline-flex; align-items: center; gap: 0.4rem; }

.user-chip { position: relative; display: inline-flex; }
.user-link { display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; font-weight: 600; color: var(--text); }
.user-link:hover { color: var(--accent-text); }
.hovercard { display: none; position: absolute; z-index: 20; left: 0; top: calc(100% + 0.4rem); width: 19rem; padding: 1rem;
  background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
  font: 400 0.88rem/1.45 var(--sans); color: var(--text); text-align: left; }
.user-chip:hover .hovercard:not(:empty), .user-chip:focus-within .hovercard:not(:empty) { display: block; }
.hovercard::before { content: ""; position: absolute; left: 0; right: 0; top: -0.5rem; height: 0.5rem; } /* keeps hover alive across the gap */
.card-head { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.6rem; }
.card-name { font: 700 1.05rem var(--serif); text-decoration: none; }
.card-head .meta { margin: 0.1rem 0 0; }
.card-about { margin: 0 0 0.75rem; color: var(--ink-soft); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; margin-top: 0.6rem; }
.sub-menu { position: relative; }
.sub-menu > summary { list-style: none; cursor: pointer; }
.sub-menu > summary::-webkit-details-marker { display: none; }
.sub-menu form { position: absolute; z-index: 25; top: calc(100% + 0.3rem); left: 0; width: 16rem; padding: 0.8rem; display: grid; gap: 0.4rem;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 10px 30px rgb(0 0 0 / 0.4); font-size: 0.85rem; }
.sub-menu form p { margin: 0; }

.profile-page { font-family: var(--sans); }
.profile-head { display: flex; gap: 1.75rem; align-items: flex-start; margin-bottom: 2.5rem; }
.profile-head .avatar { width: 160px; height: 160px; border: 3px solid var(--rule); }
.profile-head .avatar--initials { --size: 160px; }
.profile-id h1 { font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.1 var(--serif); margin: 0.3rem 0 0.3rem; }
.profile-id p { margin: 0; }
.profile-layout { display: grid; grid-template-columns: 18rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.profile-info dl { margin: 0 0 2rem; display: grid; gap: 0.2rem; }
.profile-info dt { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.7rem; }
.profile-info dd { margin: 0; word-break: break-word; }
.friend-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.wall-form { padding: 1rem; margin-bottom: 1.5rem; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 6px; display: grid; gap: 0.6rem; }
.wall-form-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.wall-form-row input[type=url] { flex: 1 1 14rem; }
.file-pick { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; font-weight: 600; cursor: pointer; color: var(--accent-text); }
.file-pick input { max-width: 12rem; font-size: 0.8rem; }
.wall-post { padding: 1rem; margin-bottom: 1rem; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 6px; }
.wall-post header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.wall-post .wall-delete { margin-left: auto; }
.wall-post p { margin: 0 0 0.6rem; font-family: var(--serif); font-size: 1.05rem; }
.wall-post > a > img { max-height: 28rem; width: auto; border-radius: 4px; margin-bottom: 0.5rem; }
.wall-link { display: block; padding: 0.6rem 0.8rem; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; color: var(--accent-text); word-break: break-all; }

.profile-edit { font-family: var(--sans); max-width: 60rem; }
.pf-row { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.pf-label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.pf-sub { display: block; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 0.6rem 0 0.25rem; }
.pf-avatar { display: flex; gap: 1rem; align-items: center; }
.pf-vis select { width: 100%; }
.pf-custom { border: 1px solid var(--rule); border-radius: 4px; padding: 0.4rem 0.7rem 0.7rem; margin: 0.5rem 0 0; display: grid; gap: 0.25rem; font-size: 0.85rem; }
.pf-custom label { font-weight: 400; margin: 0; }
.pf-save { position: sticky; bottom: 0; padding: 1rem 0; background: var(--paper); }

.friend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.friend-groups { flex-wrap: wrap; gap: 0.75rem !important; font-size: 0.85rem; }
.friend-groups label { font-weight: 400; margin: 0; }
.group-list { display: grid; gap: 0.5rem; margin-bottom: 2rem; }
.group-chip { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.group-chip input[type=text] { width: 16rem; }

.notification-list { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--rule); font-family: var(--sans); }
.notification-list li { border-bottom: 1px solid var(--rule); }
.notification-list a { display: flex; gap: 0.75rem; align-items: center; padding: 0.75rem 0.25rem; text-decoration: none; }
.notification-list a > span { display: grid; gap: 0.15rem; }
.notification-list li.is-unread a { font-weight: 700; }
.notification-list li.is-unread a::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent-text); flex: none; }

@media (max-width: 760px) {
  .profile-head { flex-direction: column; }
  .profile-layout, .pf-row { grid-template-columns: 1fr; }
  .hovercard { width: min(19rem, 85vw); }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--paper-raised); border-top: 1px solid var(--rule); padding-block: 2rem 3rem; font-family: var(--sans); font-size: 0.85rem; color: var(--ink-faint); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer strong { font-family: var(--serif); font-size: 1.1rem; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { text-decoration: none; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 1rem; }
  .masthead__top .dateline-place { display: none; }
  .post__lede { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .media img { transition: none; }
}

/* editing posts and wall entries */
.edit-attachments { margin: 1rem 0; border: 1px solid var(--rule); border-radius: 4px; padding: 0.5rem 1rem; font-family: var(--sans); font-size: 0.9rem; }
.edit-attachments label { display: flex; align-items: center; gap: 0.5rem; }
.edit-attachment-thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: 3px; }
.wall-post header .wall-edit { font-family: var(--sans); font-size: 0.8rem; margin-left: 0.5rem; }
.wall-edit-image { display: flex; align-items: center; gap: 1rem; font-family: var(--sans); font-size: 0.9rem; }
.wall-edit-image img { width: 8rem; border-radius: 4px; }
.form-error { color: var(--rt-urgent, #ff6b6b); font-family: var(--sans); }
.forum-post .deleted-note { font-family: var(--sans); font-size: 0.9rem; font-style: italic; color: var(--ink-faint); margin: 0.5rem 0 0; }
.delete-menu summary { color: var(--rt-urgent, #ff6b6b); }

/* deleted content, appeals */
.deleted-box { margin-top: 0.5rem; }
.deleted-content { margin: 0.5rem 0; padding: 0.5rem 0.75rem; border-left: 3px solid var(--rt-urgent, #ff6b6b); background: color-mix(in srgb, var(--rt-urgent, #ff6b6b) 8%, transparent); }
.deleted-content summary { font-family: var(--sans); font-size: 0.85rem; cursor: pointer; }
.deleted-actions { display: flex; gap: 1rem; align-items: flex-start; font-family: var(--sans); font-size: 0.85rem; }
.deleted-banner { margin: 1rem 0 1.5rem; padding: 1rem 1.25rem; border: 1px solid var(--rt-urgent, #ff6b6b); border-radius: 6px;
  background: color-mix(in srgb, var(--rt-urgent, #ff6b6b) 10%, var(--paper-raised)); }
.deleted-banner h1, .deleted-banner h2 { margin-top: 0; color: var(--rt-urgent, #ff6b6b); }
.delete-reason { border: 0; padding: 0; margin: 0 0 0.5rem; font-family: var(--sans); font-size: 0.85rem; }
.delete-reason label { display: block; }
.delete-reason textarea, .deleted-actions textarea, .appeal textarea { width: 100%; margin-top: 0.35rem; }
.appeals > li { margin-bottom: 1rem; }
.appeal { padding: 0.6rem 0.9rem; border-radius: 6px; background: var(--paper-raised); border-left: 4px solid var(--rt-warning, #ffd75f); }
.appeal--granted { border-left-color: var(--rt-ok, #6fd08c); }
.appeal--rejected { border-left-color: var(--rule); }
.appeal blockquote { margin: 0.4rem 0; }
button.danger, .button.danger { background: #c62828; border-color: #c62828; color: #fff; }
.vote-banner { border-color: var(--rt-warning, #ffd75f); background: color-mix(in srgb, var(--rt-warning, #ffd75f) 10%, var(--paper-raised)); }
.vote-banner h2 { color: var(--rt-warning, #ffd75f); }
.appeal-form .delete-reason label { margin-bottom: 0.35rem; }

/* sign-up bot protection */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
altcha-widget { display: block; margin: 0.75rem 0 1rem; --altcha-color-base: var(--paper-raised); --altcha-color-text: var(--ink);
  --altcha-color-border: var(--rule); --altcha-border-radius: 6px; --altcha-color-border-focus: var(--focus); }

/* Argumentationslexikon */
.lexikon .lede { font-size: 1.15rem; color: var(--ink-soft); }
.lexikon-search input { width: 100%; max-width: 28rem; }
.lexikon-group { margin-top: 2rem; }
.lexikon-group.depth-1 > h2 { border-bottom: 1px solid var(--rule); padding-bottom: 0.3rem; }
.lexikon-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.5rem 1.25rem; }
.lexikon-list li { display: flex; flex-direction: column; padding: 0.5rem 0.75rem; border-left: 3px solid var(--rt-urgent, #ff6b6b); background: var(--paper-raised); border-radius: 0 4px 4px 0; }
.lexikon-list li.pol-technik { border-left-color: var(--rt-warning, #ffd75f); }
.lexikon-list li.pol-positiv { border-left-color: var(--rt-ok, #6fd08c); }
.lexikon-list a { font-family: var(--sans); font-weight: 600; text-decoration: none; }
.lexikon-list span { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.4; }
.lexikon-entry h2 { font-size: 1.15rem; margin-top: 1.5rem; }
.lexikon-related, .lexikon-neighbours, .lexikon-sources { margin-top: 2rem; }
.lexikon-related .lexikon-list { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.neighbour-links { font-family: var(--sans); font-size: 0.92rem; line-height: 1.9; }
.lexikon-sources { border-top: 1px solid var(--rule); padding-top: 1rem; font-family: var(--sans); font-size: 0.9rem; }
.lexikon-sources h2 { font-size: 1rem; margin: 0 0 0.4rem; }
.review-badge { display: inline-block; margin-left: 0.3rem; padding: 0.05rem 0.55rem; border-radius: 999px; font-weight: 600;
  background: color-mix(in srgb, var(--rt-ok, #6fd08c) 22%, transparent); color: var(--rt-ok, #6fd08c); }
.lexikon-filter { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip { font-family: var(--sans); font-size: 0.85rem; padding: 0.2rem 0.75rem; border: 1px solid var(--rule); border-radius: 999px;
  text-decoration: none; color: var(--ink-soft); }
.chip:hover, .chip:focus-visible { color: var(--text); border-color: var(--ink-soft); }
.chip.is-active { color: var(--text); background: var(--paper-raised); border-color: var(--ink-soft); font-weight: 600; }
.chip.pol-fehler.is-active { border-color: var(--rt-urgent, #ff6b6b); }
.chip.pol-technik.is-active { border-color: var(--rt-warning, #ffd75f); }
.chip.pol-positiv.is-active { border-color: var(--rt-ok, #6fd08c); }
.az-index { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 1.5rem; position: sticky; top: 0; z-index: 2; padding-block: 0.5rem;
  background: var(--paper); border-bottom: 1px solid var(--rule); }
.az-index a { font-family: var(--sans); font-weight: 600; min-width: 2rem; text-align: center; padding: 0.2rem 0.4rem; border-radius: 4px; text-decoration: none; }
.az-index a:hover, .az-index a:focus-visible { background: var(--paper-raised); }
.lexikon-group[id^="buchstabe-"] { scroll-margin-top: 3.5rem; }
.lexikon-foot { margin-top: 3rem; }

/* credits */
.credit-balance { font-family: var(--sans); font-size: 1.1rem; }
.credit-balance > span:first-child { font-size: 2.4rem; font-weight: 700; color: var(--rt-ok, #6fd08c); margin-right: 0.25rem; }
.ledger { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.9rem; }
.ledger th, .ledger td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--rule); text-align: left; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger .kind-hold td, .ledger .kind-release td { color: var(--ink-faint); }

/* KI-Überprüfung */
.ai-dialog { font-family: var(--sans, inherit); max-width: min(42rem, 94vw); width: 100%; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-raised);
  color: var(--ink); padding: 1.25rem 1.5rem; box-shadow: 0 24px 64px rgb(0 0 0 / 60%); }
.ai-dialog::backdrop { background: rgb(0 20 26 / 70%); backdrop-filter: blur(2px); }
.ai-dialog h2 { margin-top: 0; font-size: 1.3rem; }
.ai-dialog-body { max-height: 70vh; overflow: auto; }
.ai-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.ai-price strong { color: var(--rt-warning, #ffd75f); font-size: 1.2em; }
.ai-wait { display: flex; align-items: center; gap: 0.75rem; }
.ai-spinner { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 3px solid var(--rule); border-top-color: var(--accent-text); animation: ai-spin 0.8s linear infinite; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-result h4 { font-family: var(--sans); font-size: 0.95rem; margin: 1rem 0 0.4rem; }
.ai-summary { font-size: 1.05rem; }
.ai-findings { padding-left: 1.4rem; }
.ai-findings li { margin-bottom: 0.9rem; padding-left: 0.5rem; border-left: 3px solid var(--rt-warning, #ffd75f); }
.ai-findings li.sev-3 { border-left-color: var(--rt-urgent, #ff6b6b); }
.ai-findings li.sev-1 { border-left-color: var(--rule); }
.ai-findings blockquote { margin: 0.3rem 0; font-style: italic; }
.ai-better span { font-family: var(--sans); font-weight: 700; color: var(--rt-ok, #6fd08c); }
.ai-clean { color: var(--rt-ok, #6fd08c); font-weight: 600; }
.ai-positives li::marker { content: "✓  "; color: var(--rt-ok, #6fd08c); }
.ai-footer { margin-top: 1rem; font-size: 0.8rem; }

/* Bewertungen: Vergleich KI / Publikum und Equalizer */
:root { --q-ai: #7fb2ff; --q-pub: #c79bff; }
.quality { margin-top: 0.75rem; font-family: var(--sans); }
.q-compare { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; max-width: 34rem; padding: 0.6rem 0.75rem 0.3rem;
  border-radius: 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent); }
.q-col { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.q-bars { display: flex; align-items: flex-end; gap: 4px; height: 5.5rem; }
.q-bar { position: relative; width: 0.85rem; height: calc(var(--v) * 10%); min-height: 3px; border-radius: 4px 4px 2px 2px;
  transition: height 500ms cubic-bezier(.2, .9, .3, 1.1); }
.q-bar.q-ai { background: linear-gradient(180deg, #b3d1ff, var(--q-ai)); box-shadow: 0 0 10px color-mix(in srgb, var(--q-ai) 50%, transparent); }
.q-bar.q-pub { background: linear-gradient(180deg, #e5ccff, var(--q-pub)); box-shadow: 0 0 10px color-mix(in srgb, var(--q-pub) 50%, transparent); }
.q-bar.is-empty { background: var(--rule); box-shadow: none; }
.q-bar b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 0.65rem; color: var(--ink-soft); padding-bottom: 2px; }
.q-label { font-size: 0.68rem; color: var(--ink-faint); text-align: center; line-height: 1.1; text-decoration: none; }
a.q-label:hover, a.q-label:focus-visible { color: var(--text); text-decoration: underline; }
.q-legend { font-size: 0.75rem; color: var(--ink-faint); margin: 0.3rem 0 0; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.q-key { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-right: 0.25rem; vertical-align: middle; }
.q-key.q-ai { background: var(--q-ai); } .q-key.q-pub { background: var(--q-pub); }
.q-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: baseline; margin-top: 0.4rem; font-size: 0.85rem; }
.q-ai-details { flex-basis: 100%; }
.q-ai-details summary { cursor: pointer; color: var(--accent-text); }
.q-message { font-size: 0.85rem; color: var(--rt-ok, #6fd08c); }
.q-form { margin-top: 0.75rem; padding: 0.9rem 1rem; border-radius: 12px; background: color-mix(in srgb, var(--paper-raised) 85%, #000);
  border: 1px solid var(--rule); max-width: 36rem; }
.q-form[hidden] { display: none; }
.eq { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; margin: 0.5rem 0 0.9rem; }
.eq-col { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; position: relative; }
.eq-value { font-size: 1.15rem; font-weight: 700; min-height: 1.5rem; color: var(--ink); }
.eq-value.pop { animation: eq-pop 260ms cubic-bezier(.34, 1.56, .64, 1); }
@keyframes eq-pop { 40% { transform: scale(1.35); } }
.eq-slider { writing-mode: vertical-lr; direction: rtl; appearance: none; -webkit-appearance: none; width: 1.6rem; height: 9rem; margin: 0;
  background: transparent; cursor: pointer; --v: 5; }
.eq-slider::-webkit-slider-runnable-track { width: 1.6rem; border-radius: 8px;
  background: linear-gradient(to top, transparent calc(var(--v) * 10%), rgb(0 0 0 / 62%) 0),
              repeating-linear-gradient(to top, transparent 0 calc(10% - 2px), rgb(0 0 0 / 55%) calc(10% - 2px) 10%),
              linear-gradient(to top, #ff6b6b, #ffd75f 50%, #6fd08c);
  box-shadow: inset 0 0 0 1px var(--rule), 0 0 14px color-mix(in srgb, #6fd08c 25%, transparent); }
.eq-slider::-moz-range-track { width: 1.6rem; height: 100%; border-radius: 8px;
  background: linear-gradient(to top, transparent calc(var(--v) * 10%), rgb(0 0 0 / 62%) 0),
              repeating-linear-gradient(to top, transparent 0 calc(10% - 2px), rgb(0 0 0 / 55%) calc(10% - 2px) 10%),
              linear-gradient(to top, #ff6b6b, #ffd75f 50%, #6fd08c); }
.eq-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 2.2rem; height: 0.9rem; border-radius: 6px; background: #fff;
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgb(255 255 255 / 70%); transition: transform 120ms ease; }
.eq-slider::-moz-range-thumb { width: 2.2rem; height: 0.9rem; border-radius: 6px; background: #fff; border: 0;
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgb(255 255 255 / 70%); }
.eq-slider:active::-webkit-slider-thumb { transform: scale(1.12); }
.eq-slider:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.eq-col.is-unset .eq-slider { filter: grayscale(1) brightness(0.7); opacity: 0.55; }
.eq-col.is-unset .eq-value { color: var(--ink-faint); }
.eq-col label { font-size: 0.72rem; text-align: center; line-height: 1.15; color: var(--ink-soft); }
.eq-clear { position: absolute; top: 0; right: 0; background: none; border: 0; color: var(--ink-faint); cursor: pointer; font-size: 0.9rem; padding: 0 0.2rem; }
.eq-col.is-unset .eq-clear { visibility: hidden; }
@media (max-width: 30rem) { .eq-slider { height: 7rem; } .q-label, .eq-col label { font-size: 0.62rem; } }
@media (prefers-reduced-motion: reduce) { .q-bar, .eq-value.pop { transition: none; animation: none; } }
.draft-check { margin: 0.35rem 0 0; font-family: var(--sans); font-size: 0.85rem; }
.discussion-profile { margin-top: 1.5rem; font-family: var(--sans); }
.dp-summary { font-size: 1.05rem; font-family: var(--serif); }
.dp-groups { display: flex; gap: 1.25rem; margin: 0.5rem 0 0.75rem; }
.dp-group { display: flex; flex-direction: column; align-items: center; }
.dp-group-value { font-size: 1.8rem; font-weight: 700; color: var(--q-pub); text-shadow: 0 0 12px color-mix(in srgb, var(--q-pub) 45%, transparent); }
.dp-areas { margin-top: 0.75rem; }
.dp-mini { margin: 0.5rem 0; display: grid; gap: 0.2rem; font-family: var(--sans); font-size: 0.72rem; }
.dp-mini-row { display: grid; grid-template-columns: 6.5rem 1fr 2rem; align-items: center; gap: 0.4rem; }
.dp-mini-label { color: var(--ink-faint); }
.dp-mini-track { height: 0.4rem; border-radius: 3px; background: var(--rule); overflow: hidden; }
.dp-mini-track span { display: block; height: 100%; width: calc(var(--v) * 10%); background: linear-gradient(90deg, #ff6b6b, #ffd75f 50%, #6fd08c); }
.dp-mini b { text-align: right; }

/* Fluent Emoji 3D (static/js/emoji3d.js): the glyph stays in the text but is pushed out of a clipped 1.25em box,
   the image fills the box. Colour-font glyphs ignore `color: transparent`, hence text-indent + overflow. */
.e3d { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -0.36em; overflow: hidden; white-space: nowrap;
  text-indent: 110%; background: var(--e3d) center / contain no-repeat; line-height: 1; }
.e3d::selection { background: transparent; }
.reaction .e3d, .rt-emoji-btn .e3d { width: 1.5em; height: 1.5em; vertical-align: -0.35em; }
.e3d-jumbo .e3d { width: 3.2em; height: 3.2em; vertical-align: middle; background-image: var(--e3d-hd); margin: 0.1em 0.05em; }

/* Thesaurus side panel (forum threads): right third, search pinned on top */
.thesaurus { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(33.333vw, 100vw); min-width: 20rem; max-width: 100vw;
  display: flex; flex-direction: column; background: var(--paper-raised); border-left: 1px solid var(--rule);
  box-shadow: -18px 0 40px rgb(0 0 0 / 35%); animation: th-in 180ms ease-out; }
.thesaurus[hidden] { display: none; }
@keyframes th-in { from { transform: translateX(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .thesaurus { animation: none; } }
.th-head { position: sticky; top: 0; padding: calc(0.9rem + env(safe-area-inset-top, 0px)) 1rem 0.9rem; border-bottom: 1px solid var(--rule);
  background: var(--paper-raised); display: grid; gap: 0.6rem; }
.th-title { display: flex; align-items: center; justify-content: space-between; }
.th-title h2 { margin: 0; font-size: 1.2rem; }
.th-close { font-size: 1.6rem; line-height: 1; background: none; border: 0; color: var(--ink-soft); cursor: pointer; padding: 0.1rem 0.4rem; }
.th-close:hover, .th-close:focus-visible { color: var(--text); }
.th-head input { width: 100%; }
.th-body { flex: 1; overflow-y: auto; padding: 0.75rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
.th-count { margin: 0 0 0.5rem; }
.th-letter h3 { font-size: 0.95rem; margin: 1rem 0 0.35rem; color: var(--ink-soft); border-bottom: 1px solid var(--rule); }
.th-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.th-list li { border-left: 3px solid var(--rt-urgent, #ff6b6b); background: var(--paper); border-radius: 0 4px 4px 0; }
.th-list li.pol-technik { border-left-color: var(--rt-warning, #ffd75f); }
.th-list li.pol-positiv { border-left-color: var(--rt-ok, #6fd08c); }
.th-list a { display: grid; gap: 0.1rem; padding: 0.4rem 0.6rem; text-decoration: none; color: var(--text); }
.th-list a:hover, .th-list a:focus-visible { background: color-mix(in srgb, var(--paper-raised) 60%, transparent); }
.th-list strong { font-family: var(--sans); font-size: 0.92rem; }
.th-list span { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.th-entry h3 { margin: 0.2rem 0 0.3rem; font-size: 1.3rem; }
.th-entry h4 { margin: 1.1rem 0 0.3rem; font-size: 0.95rem; }
.th-entry blockquote { margin: 0; padding-left: 0.8rem; border-left: 3px solid var(--rule); font-style: italic; }
.th-lede { font-size: 1.02rem; color: var(--ink-soft); }
.th-back { margin-bottom: 0.4rem; }
.th-related { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.th-empty { color: var(--ink-soft); }
/* wide screens: the thread moves aside instead of being covered */
@media (min-width: 62rem) { body.thesaurus-open { --th-w: max(33.333vw, 20rem); }
  body.thesaurus-open main, body.thesaurus-open .site-footer { margin-right: var(--th-w); transition: margin-right 180ms ease-out; } }
@media (max-width: 40rem) { .thesaurus { left: 0; width: auto; min-width: 0; } }
.governance select, .governance input { max-width: 100%; }

/* Thesaurus topic filter: every row on one grid - checkbox | ~/&/! switch | name | count */
.th-filters { border: 0; padding: 0; margin: 0.1rem 0 0; min-width: 0; font-family: var(--sans); position: relative; }
.th-filter-head { display: flex; align-items: baseline; gap: 0.75rem; }
.th-filters legend { float: left; padding: 0; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.th-legend { font-size: 0.75rem; color: var(--ink-faint); }
.th-legend b { font-family: var(--mono, ui-monospace, monospace); color: var(--ink-soft); }
.th-reset { font-size: 0.8rem; margin-left: auto; }
.th-roots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 0.9rem; margin-top: 0.35rem; align-items: start; }
.th-root { min-width: 0; }
.th-root:has(.th-subs:not([hidden])) { grid-column: 1 / -1; }
.th-row { display: grid; grid-template-columns: 1rem 1.55rem minmax(0, 1fr) 2rem; align-items: center; gap: 0.4rem; min-height: 1.75rem;
  font-size: 0.85rem; line-height: 1.25; }
.th-row input.th-box { margin: 0; width: 1rem; height: 1rem; accent-color: var(--accent-text, #7cc4e4); cursor: pointer; }
.th-op { width: 1.55rem; height: 1.4rem; padding: 0; border-radius: 4px; border: 1px solid var(--rule); background: var(--paper);
  color: var(--ink-soft); font-family: var(--mono, ui-monospace, monospace); font-weight: 700; font-size: 0.85rem; cursor: pointer; line-height: 1; }
.th-op:hover, .th-op:focus-visible { border-color: var(--ink-soft); color: var(--text); }
.th-op[data-op="and"] { color: var(--rt-ok, #6fd08c); border-color: color-mix(in srgb, var(--rt-ok, #6fd08c) 55%, var(--rule)); }
.th-op[data-op="not"] { color: var(--rt-urgent, #ff6b6b); border-color: color-mix(in srgb, var(--rt-urgent, #ff6b6b) 55%, var(--rule)); }
.th-name { min-width: 0; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.th-row-root .th-name { font-weight: 600; }
button.th-name { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 0.35rem; }
button.th-name:hover, button.th-name:focus-visible { text-decoration: underline; }
.th-chev { color: var(--ink-soft); font-size: 0.8rem; }
.th-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-faint); font-size: 0.78rem; }
.th-subs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.05rem 0.9rem; margin: 0.15rem 0 0.35rem 0.5rem;
  padding-left: 0.85rem; border-left: 1px solid var(--rule); }
.th-subs[hidden] { display: none; }
.th-balloon { grid-column: 1 / -1; position: relative; margin: 0.45rem 0 0.4rem; padding: 0.6rem 0.75rem; border-radius: 8px; font-size: 0.85rem;
  background: color-mix(in srgb, var(--rt-warning, #ffd75f) 16%, var(--paper)); border: 1px solid color-mix(in srgb, var(--rt-warning, #ffd75f) 60%, var(--rule)); }
.th-balloon::before { content: ""; position: absolute; top: -7px; left: 1.6rem; width: 12px; height: 12px; transform: rotate(45deg);
  background: inherit; border-left: inherit; border-top: inherit; }
.th-balloon[hidden] { display: none; }
.th-balloon-text { margin: 0 0 0.5rem; }
.th-balloon-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.th-conflict { margin: 0 0 0.5rem; padding: 0.5rem 0.7rem; border-radius: 6px; font-size: 0.85rem;
  background: color-mix(in srgb, var(--rt-warning, #ffd75f) 14%, transparent); border-left: 3px solid var(--rt-warning, #ffd75f); }
.th-head { max-height: 62vh; overflow-y: auto; }
@media (max-width: 26rem) { .th-roots, .th-subs { grid-template-columns: minmax(0, 1fr); } }

.th-search-balloon { margin-top: 0.5rem; }
.th-search-balloon::before { left: 1rem; }
.th-choices { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; margin-top: 0.4rem; }
.th-choice { font-family: var(--mono, ui-monospace, monospace); font-size: 0.85rem; padding: 0.25rem 0.6rem; border-radius: 6px; cursor: pointer;
  background: var(--paper); color: var(--text); border: 1px solid var(--rule); text-align: left; }
.th-choice:hover, .th-choice:focus-visible { border-color: var(--rt-ok, #6fd08c); color: var(--rt-ok, #6fd08c); }
.th-formula { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--ink-soft); }
.th-formula code { font-size: 0.8rem; color: var(--text); overflow-wrap: anywhere; }
.lexikon-ambiguous { margin-top: 0.75rem; padding: 0.6rem 0.8rem; border-radius: 8px; font-family: var(--sans); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
  background: color-mix(in srgb, var(--rt-warning, #ffd75f) 14%, transparent); border-left: 3px solid var(--rt-warning, #ffd75f); }
.lexikon-ambiguous .chip { font-family: var(--mono, ui-monospace, monospace); }
