/* wortmeldung.ch -- mobile-first, eine Spalte, hell/dunkel */

:root {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #ece9e1;
  --text: #1b1a17;
  --text-muted: #5f5b52;
  --border: #d8d3c8;
  --accent: #9c1c1c;
  --accent-text: #ffffff;
  --link: #8a1616;
  --danger: #9c1c1c;
  --ok: #1a7f37;
  --wait: #8a5a00;
  --radius: 8px;
  --wrap: 44rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --surface: #1c1a16;
    --surface-2: #262320;
    --text: #ece7dd;
    --text-muted: #a49d8f;
    --border: #33302a;
    --accent: #e0564f;
    --accent-text: #14130f;
    --link: #e8837c;
    --danger: #e0564f;
    --ok: #3fb950;
    --wait: #d29922;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.08rem; margin: 1.2rem 0 .4rem; }
p { margin: 0 0 .8rem; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 6px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.2rem 0; }
.muted { color: var(--text-muted); }
[hidden] { display: none !important; }   /* schlaegt eigene display-Regeln (z.B. .cookie-note) */
.small { font-size: .85rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.wrap-wide { max-width: min(1180px, 96vw); }

/* Cookie-Hinweis -- rein informativ, dismissable, kein Consent-Wall */
.cookie-note {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 40;
  max-width: 42rem; margin: 0 auto;
  display: flex; gap: .9rem; align-items: center;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .8rem 1rem; box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
  font-size: .84rem;
}
.cookie-note p { margin: 0; color: var(--text-muted); }
.cookie-note .btn { flex: none; }
@media (max-width: 560px) {
  .cookie-note { flex-direction: column; align-items: stretch; text-align: left; }
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; background: var(--surface); padding: .5rem; z-index: 10; }

/* Kopf */
.site-head {
  background: var(--surface);
  border-bottom: 3px double var(--text);
  position: sticky; top: 0; z-index: 20;
}
.head-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: .5rem; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--accent); font-weight: 700; }
.head-nav { display: flex; align-items: center; gap: .2rem; font-size: .95rem; flex-wrap: nowrap; }
.nav-item {
  display: inline-flex; align-items: center; gap: .35rem; color: var(--text);
  padding: .4rem; border-radius: 8px; text-decoration: none; background: none; border: 0;
  font: inherit; cursor: pointer; line-height: 1;
}
.nav-item:hover { text-decoration: none; background: var(--surface-2); }
.nav-item .ico { width: 21px; height: 21px; flex: none; }
.head-nav .btn { color: var(--bg); white-space: nowrap; margin-left: .25rem; }
@media (max-width: 599px) {
  .brand { font-size: 1.12rem; }
  .nav-item .label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .head-nav .btn { padding: .5rem .7rem; }
}
.inline { display: inline; }
.linkish {
  background: none; border: 0; color: var(--accent); cursor: pointer;
  font: inherit; padding: 0; text-decoration: none;
}
.linkish:hover { text-decoration: underline; }
.linkish.danger { color: var(--danger); }

main.wrap { padding-top: 1.2rem; padding-bottom: 3rem; }

/* Flash / Banner */
.flashes { margin-bottom: 1rem; }
.flash { padding: .7rem .9rem; border-radius: 10px; margin-bottom: .5rem; border: 1px solid var(--border); }
.flash-success { border-color: var(--ok); }
.flash-error { border-color: var(--danger); }
.flash-info { border-color: var(--accent); }
.banner { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .7rem .9rem; margin: 1rem 0 0; }

/* Buttons */
.btn {
  display: inline-block; background: var(--text); color: var(--bg);
  border: 0; border-radius: 6px; padding: .7rem 1.1rem; font: inherit; font-weight: 600;
  cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; opacity: .88; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .45rem .8rem; font-size: .9rem; border-radius: 8px; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Karten */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem;
}
.form-card label { display: block; margin: 0 0 .8rem; font-size: .9rem; color: var(--text-muted); }
.form-card input[type=text], .form-card input[type=email], .form-card input[type=password],
.form-card input[type=tel], .form-card input[type=url], .form-card input[type=search],
.form-card input[type=number], .form-card select, .form-card textarea,
.filters input, .filters select {
  display: block; width: 100%; margin-top: .25rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem;
  font: inherit;
}
.form-card textarea { resize: vertical; }
.form-card fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
.form-card fieldset + fieldset { border-top: 1px solid var(--border); padding-top: 1.1rem; }
.form-card legend { padding: 0; font-weight: 700; font-size: .95rem; color: var(--text); }
.form-card .lbl-text { display: block; color: var(--text); font-weight: 600; }
.form-card .help { display: block; margin-top: .3rem; font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.check { display: flex !important; gap: .5rem; align-items: flex-start; flex-direction: row !important; }
.check input { margin-top: .3rem; }
.danger-zone { border-color: var(--danger); }
.danger-zone h2 { color: var(--danger); margin-top: 0; }
.hp { position: absolute !important; left: -5000px !important; width: 1px; height: 1px; }

/* Hinweis nach Login */
.rules-note {
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  padding: .7rem .9rem; margin: 1rem 0 0; font-size: .92rem; border-radius: 0 8px 8px 0;
}

.field-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: -.4rem 0 .8rem; }
.field-hint { display: block; margin-top: .2rem; font-size: .78rem; color: var(--text-muted); }

/* Intro + Filter */
.intro { margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .8rem; }
.intro h1 { font-size: 2.3rem; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
.filters { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem; margin-bottom: 1.2rem; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.filters label { font-size: .8rem; color: var(--text-muted); }

/* Beitragsliste -- editorial, flache Trennlinien statt Karten */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-card { background: transparent; border: 0; border-top: 1px solid var(--border); padding: 1.1rem 0 1.1rem .9rem; margin: 0; position: relative; }
.post-card::before { content: ""; position: absolute; left: 0; top: 1.1rem; bottom: 1.1rem; width: 3px; background: var(--tc, var(--accent)); border-radius: 2px; }
.post-card:first-child { border-top: 0; }
.post-card-main { display: block; color: var(--text); }
.post-card-main:hover { text-decoration: none; }
.post-card-main:hover h2 { text-decoration: underline; text-decoration-color: var(--tc, var(--accent)); }
.post-card.has-cover { display: grid; grid-template-columns: 1fr 96px; gap: .8rem; align-items: start; }
@media (min-width: 560px) { .post-card.has-cover { grid-template-columns: 1fr 150px; gap: 1rem; } }
.post-card-text { min-width: 0; }
.post-cover { display: block; border-radius: 6px; overflow: hidden; background: var(--surface-2); align-self: stretch; }
.post-cover img { width: 100%; height: 100%; min-height: 90px; max-height: 140px; object-fit: cover; display: block; }
.post-card h2 { font-family: var(--serif); margin: .15rem 0 .35rem; font-size: 1.28rem; line-height: 1.25; color: var(--text); }
.post-hero { margin: 1rem 0; }
.post-hero img { width: 100%; max-height: 340px; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.post-hero figcaption { margin-top: .3rem; }
.preview-thumb { max-width: 100%; width: 260px; border-radius: 6px; display: block; margin: .3rem 0; }
.preview-thumb.sm { width: 120px; display: inline-block; vertical-align: middle; }
.post-summary { margin: 0 0 .5rem; color: var(--text-muted); font-size: .96rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: center; font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.src-badge { display: inline-flex; align-items: center; gap: .3rem; background: var(--surface-2); border-radius: 3px; padding: .1rem .45rem; font-size: .72rem; text-transform: none; letter-spacing: 0; color: var(--text-muted); text-decoration: none; }
a.src-badge:hover { color: var(--accent); text-decoration: none; background: var(--border); }
.src-favicon { width: 14px; height: 14px; border-radius: 2px; flex: none; }
.kicker { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tc, var(--accent)); text-decoration: none; }
.kicker:hover { text-decoration: underline; }
a.tag { color: var(--text-muted); font-weight: 600; padding: 0; text-decoration: none; }
a.tag:hover { color: var(--accent); text-decoration: underline; }
.filter-reset { margin: .6rem 0 0; font-size: .85rem; }

/* Verlinkte Portale */
.portal-list { list-style: none; padding: 0; margin: 1rem 0; }
.portal-list li { display: flex; align-items: baseline; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.portal-list a { display: inline-flex; align-items: center; gap: .45rem; }
.dot { opacity: .5; }
.empty, .notice { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem; color: var(--text-muted); }
.notice { border-style: solid; }

.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1.2rem; color: var(--text-muted); }

/* Beitragsdetail */
.post-detail .post-summary-full { font-size: 1.02rem; }
.sources { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.sources ul { list-style: none; margin: .5rem 0; padding: 0; }
.sources li { margin: .7rem 0; }
.source-link { display: inline-flex; gap: .5rem; align-items: center; }
.source-title { color: var(--text); font-weight: 600; }
.source-url { display: block; font-size: .8rem; color: var(--text-muted); word-break: break-all; margin-top: .15rem; }
.source-url:hover { color: var(--accent); }

/* Kommentare */
.comments { margin-top: 1.5rem; }
.comment-form textarea, .reply-form textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem; font: inherit; }
.comment-form { margin-bottom: 1.2rem; }
.comment-form .btn, .reply-form .btn { margin-top: .5rem; }
.comment-list, .reply-list { list-style: none; margin: 0; padding: 0; }
.comment { border-top: 1px solid var(--border); padding: .9rem 0; }
.comment.is-reply { border-top: 1px dashed var(--border); margin-left: 1rem; padding-left: .8rem; border-left: 2px solid var(--surface-2); }
.reply-list { margin-top: .5rem; }
.comment.is-flagged { opacity: .75; }
.comment-head { font-size: .85rem; color: var(--text-muted); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.c-alias { font-weight: 600; color: var(--text); }
.comment-body { margin: .3rem 0 .4rem; white-space: pre-wrap; word-wrap: break-word; }
.comment-actions { display: flex; gap: .8rem; align-items: center; font-size: .85rem; }
.vote { display: inline-flex; align-items: center; gap: .3rem; }
.vote button { background: none; border: 0; cursor: pointer; color: var(--text-muted); font-size: 1rem; line-height: 1; padding: .1rem .2rem; }
.vote button.on { color: var(--accent); }
.vote .score { min-width: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }
.reply-form, .report-form { margin: .6rem 0 .2rem; padding: .6rem; background: var(--surface-2); border-radius: 8px; }
.report-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.report-form select, .report-form input[type=text] { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: .35rem .5rem; font: inherit; }
.report-form input[type=text] { flex: 1; min-width: 8rem; }

.pill { display: inline-block; font-size: .72rem; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.pill-wait { border-color: var(--wait); color: var(--wait); }
.pill-hidden { border-color: var(--danger); color: var(--danger); }
.pill-ok { border-color: var(--ok); color: var(--ok); }
.pill-alert { border-color: var(--danger); color: var(--danger); }

/* Prose / Rechtstexte */
.prose { line-height: 1.7; }
.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .9rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: .4rem .6rem; text-align: left; vertical-align: top; }

/* Fuss */
.site-foot { border-top: 1px solid var(--border); background: var(--surface); margin-top: 2rem; padding: 1.5rem 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .6rem; font-size: .9rem; }
.site-foot .muted { font-size: .82rem; }

/* Spendenhinweis */
.donate-li { list-style: none; }
.donate { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 8px; padding: .8rem 1rem; margin: .2rem 0; }
.donate-pitch { margin: 0 0 .4rem; font-size: .92rem; }
.donate-how { margin: 0; font-size: .9rem; color: var(--text-muted); }
.donate-how code { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 0 .35rem; font-size: .85rem; }
.donate-num { font-weight: 700; color: var(--text); cursor: pointer; border-bottom: 1px dashed var(--border); white-space: nowrap; }
.donate-num:hover, .donate-num:focus { border-bottom-style: solid; outline: none; }
.donate-num-wrap { font-size: .9rem; }
.donate-reveal { font: inherit; font-size: .9rem; color: var(--accent); background: none; border: 0; border-bottom: 1px dashed currentColor; padding: 0; cursor: pointer; }
.donate-reveal:hover, .donate-reveal:focus { border-bottom-style: solid; outline: none; }
.donate-foot { font-size: .82rem; color: var(--text-muted); margin: 0 0 .7rem; }
.donate-foot .donate-reveal { font-size: .82rem; }

/* Brotkrumen, Aehnliche Beitraege, Hubs */
.crumbs { font-size: .82rem; color: var(--text-muted); margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .crumbs-current { color: var(--text); }
.related { border-top: 1px solid var(--border); margin-top: 1.5rem; padding-top: 1rem; }
.related h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.related li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.related li a { font-weight: 600; }
.hub-more { margin-top: 1.5rem; }
.hub-more h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.hub-links { display: flex; flex-wrap: wrap; gap: .4rem .7rem; margin: 0 0 .6rem; }
.hub-links a { font-size: .9rem; padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); }
.hub-links a:hover { border-color: var(--accent); color: var(--accent); }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1.2rem; }
.admin-nav a { padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: .85rem; }
.admin-nav a.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.count { background: var(--surface-2); border-radius: 999px; padding: 0 .5rem; font-size: .9rem; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1rem 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-align: center; color: var(--text); display: block; }
.stat-num { display: block; font-size: 1.8rem; font-weight: 700; }
.stat-lbl { font-size: .8rem; color: var(--text-muted); }
.queue-item .c-quote, .c-quote { background: var(--surface-2); border-left: 3px solid var(--border); padding: .6rem .8rem; margin: .6rem 0; white-space: pre-wrap; border-radius: 0 8px 8px 0; }
.queue-form { margin-top: .6rem; display: flex; flex-direction: column; gap: .5rem; }
.queue-form input[type=text], .queue-form textarea, .queue-form select, .queue-form input[type=url], .queue-form input[type=number] {
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; font: inherit; width: 100%;
}
.report-lines { padding-left: 1.1rem; font-size: .9rem; }
.activity-list { list-style: none; padding: 0; margin: .5rem 0; }
.activity-list li { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.activity-list li:last-child { border-bottom: 0; }
.activity-body { color: var(--text-muted); margin-top: .25rem; }
.data { width: 100%; border-collapse: collapse; font-size: .88rem; display: block; overflow-x: auto; }
.data th, .data td { border: 1px solid var(--border); padding: .45rem .6rem; text-align: left; white-space: nowrap; vertical-align: top; }
.data .row-off { opacity: .5; }
/* Textspalten in breiten Admin-Listen umbrechen lassen */
.data td.cell-title { white-space: normal; min-width: 12rem; max-width: 20rem; }
.data td.cell-text { white-space: normal; min-width: 18rem; max-width: 36rem; color: var(--text-muted); }
@media (min-width: 900px) { .wrap-wide .data { display: table; table-layout: auto; } }
.nowrap { white-space: nowrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .8rem; font-size: .92rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }
.search-results { list-style: none; padding: 0; margin: .3rem 0; }
.search-results li { padding: .4rem .5rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: .3rem; cursor: pointer; }
.setup-steps { display: flex; gap: 1rem; list-style: none; padding: 0; font-size: .9rem; }
.setup-steps .done { color: var(--ok); }
.setup-steps .now { font-weight: 700; }
.mode-switch { border: 1px solid var(--border); border-radius: 8px; padding: .6rem; margin-bottom: .8rem; display: flex; flex-direction: column; gap: .4rem; }
.mode-switch label { display: flex !important; flex-direction: row !important; gap: .5rem; align-items: center; margin: 0; }
.inline-lbl { font-size: .8rem; color: var(--text-muted); }

/* ab Tablet */
@media (min-width: 720px) {
  h1 { font-size: 1.8rem; }
  .intro h1 { font-size: 3rem; }
  .filter-row { grid-template-columns: repeat(4, 1fr); }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .queue-form { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .queue-form input[type=text] { width: auto; flex: 1; }
}
