/* Forum (/forum, js/forum.js; vorher Wunschliste /ideas): weiße Seite, Kopf wie überall, links Bereiche mit Zahlen und
   Regeln, rechts Suche und eine flache Liste mit feinen Linien, ein Beitrag mit Antworten darunter.
   Farben über die Variablen aus app.css; Leer-/Ladezustand und Marken aus board.css. */

html, body, .fm-page { background: var(--surface); }

/* Kopf wie auf den übrigen Seiten: gleiche Breite wie die Startseite, helle Fläche über die ganze Breite */
.fm-page .hdr { width: calc(100% - 2 * var(--gutter)); }
html:not(.scrolled) .fm-page .hdr:not(.hdr-static)::after { background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper), 0 1px 0 100vmax var(--line-soft); }

/* Aufbau */
.fm { flex: 1; width: calc(100% - 2 * var(--gutter)); max-width: 1172px; margin: 0 auto; padding: 36px 0 72px; display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 48px; align-items: start; box-sizing: border-box; }
.fm-main { min-width: 0; }
.fm-side { position: sticky; top: 92px; display: flex; flex-direction: column; }
.fm-new { height: 40px; border: 0; border-radius: 8px; background: var(--signal); color: #FFFFFF; font: 600 14.5px "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; transition: background-color .15s; }
.fm-new:hover { background: var(--signal-hover); }
.fm-nav { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.fm-nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 38px; padding: 0 10px; border-radius: 7px; color: var(--tx); font-size: 14.5px; text-decoration: none; }
.fm-nav a:hover { background: var(--surface-2); }
.fm-nav a[aria-current="page"] { background: var(--tint); font-weight: 600; }
.fm-nav small { color: var(--tx3); font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.fm-rules { margin-top: 18px; padding: 16px 10px 0; border-top: 1px solid var(--line-soft); font-size: 13px; line-height: 1.5; color: var(--tx2); }
.fm-rules h2 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.fm-rules p { margin: 0 0 8px; }
.fm-rules a { color: var(--ink); overflow-wrap: anywhere; }

/* Liste: Kopf, Suche, Zeilen */
.fm-head { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fm-head h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.fm-sort { display: flex; gap: 2px; }
.fm-sort button { height: 32px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--tx2); font: 500 14px "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; }
.fm-sort button:hover { color: var(--ink); }
.fm-sort button[aria-pressed="true"] { background: var(--tint); color: var(--ink); font-weight: 600; }
.fm-tools { margin-top: 12px; display: flex; gap: 8px; }
.fm-search { flex: 1; min-width: 0; height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--tx3); transition: border-color .15s; }
.fm-search:focus-within { border-color: var(--ink); }
.fm-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--ink); font: 400 14.5px "Schibsted Grotesk", system-ui, sans-serif; }
.fm-search input::placeholder { color: var(--tx3); }
.fm-search input::-webkit-search-cancel-button { display: none; }
.fm-select { flex: none; max-width: 46%; height: 40px; padding-block: 0; padding-inline: 12px 30px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23586374' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; -webkit-appearance: none; color: var(--ink); font: 400 14px "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; }
[dir="rtl"] .fm-select { background-position: left 10px center; }
.fm-list .bd-flash { margin-top: 14px; }
.fm-list .bd-empty, .fm-list .bd-alert { margin-top: 14px; }
.fm-mine { margin-top: 14px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.fm-mine b { font-weight: 600; }
.fm-mine span:not(.bd-st) { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.fm-mine a { color: var(--ink); overflow-wrap: anywhere; }

.fm-rows { list-style: none; margin: 10px 0 0; padding: 0; }
.fm-row { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.fm-row-main { flex: 1; min-width: 0; }
.fm-row-t { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.fm-row-t a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.fm-row-t a::after { content: ""; position: absolute; inset: 0; }
.fm-row:hover .fm-row-t a { text-decoration: underline; text-decoration-color: rgba(15, 20, 28, 0.3); text-underline-offset: 3px; }
.fm-row-b { margin: 3px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; line-height: 1.45; color: var(--tx2); }
.fm-row-side { flex: none; min-width: 52px; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; font-size: 12.5px; color: var(--tx3); white-space: nowrap; }
.fm-count { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--tx2); font-variant-numeric: tabular-nums; }
.fm-more { display: block; margin: 16px auto 0; height: 38px; padding: 0 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 500 14px "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; }
.fm-more:hover { border-color: var(--ink); }

/* Stimme */
.fm-vote { position: relative; z-index: 1; flex: none; width: 38px; height: 44px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: 600 13px "Schibsted Grotesk", system-ui, sans-serif; font-variant-numeric: tabular-nums; line-height: 1; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
button.fm-vote:hover { border-color: var(--ink); }
.fm-vote.on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.fm-vote.off { cursor: default; background: var(--surface-2); color: var(--tx2); }

/* Angaben unter dem Titel */
.fm-meta { margin: 7px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; font-size: 12.5px; line-height: 1.4; color: var(--tx3); }
.fm-sep { color: var(--line-strong); }
.fm-av { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tint); color: var(--tx3); font-weight: 600; line-height: 1; overflow: hidden; }
.fm-av-team { background: var(--ink); }
.fm-av-team img { width: 58%; height: auto; }
.fm-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.fm-st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.fm-st-new { color: var(--tx2); }
.fm-st-plan { color: #2F5BB7; }
.fm-st-work { color: #B26A00; }
.fm-st-ok { color: var(--ok-tx); }
.fm-st-off { color: var(--tx3); }
.fm-flag { position: relative; z-index: 1; margin-inline-start: auto; padding: 0 4px; border: 0; border-radius: 4px; background: none; color: var(--tx3); font: 400 12.5px "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; }
.fm-flag:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* Ein Beitrag */
.fm-back { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; color: var(--tx2); font-size: 13.5px; text-decoration: none; }
.fm-back:hover { color: var(--ink); }
.fm-post article { margin-top: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
.fm-post-top { display: flex; align-items: flex-start; gap: 14px; }
.fm-post-head { flex: 1; min-width: 0; }
.fm-post-head h1 { margin: 0; font-size: 23px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; overflow-wrap: anywhere; }
.fm-post-body { margin-top: 16px; padding-inline-start: 52px; font-size: 15px; line-height: 1.6; }
.fm-post-body p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.fm-post-body .i-callout { margin: 0 0 12px; }
.fm-post-body .i-techview { margin: 14px 0 0; }
.fm-replies h2 { margin: 22px 0 6px; font-size: 14.5px; font-weight: 600; }
.fm-replies ul { list-style: none; margin: 0; padding: 0; }
.fm-replies li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.fm-replies li > div { flex: 1; min-width: 0; }
.fm-reply-h { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; font-size: 13px; color: var(--tx3); }
.fm-reply-h b { color: var(--ink); font-weight: 600; }
.fm-team { padding: 1px 6px; border-radius: 4px; background: #FCE9E5; color: var(--signal); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.fm-reply-b { margin: 3px 0 0; font-size: 14.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.fm-none { margin: 4px 0 0; color: var(--tx3); font-size: 14px; }
.fm-replies .i-ok { margin-top: 12px; }
.fm-reply-f { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.fm-reply-f label { font-size: 13.5px; font-weight: 600; }
.fm-reply-f textarea { min-height: 88px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; resize: vertical; background: var(--surface); color: var(--ink); font: 400 14.5px/1.5 "Schibsted Grotesk", system-ui, sans-serif; box-sizing: border-box; }
.fm-reply-f textarea:focus { border-color: var(--ink); }
.fm-reply-f > div:last-child { display: flex; justify-content: flex-end; }
.fm-send { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--ink); color: #FFFFFF; font: 600 14px "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; }
.fm-send:disabled { background: var(--tint); color: var(--tx3); cursor: default; }

/* Dialog: Art Wunsch | Fehler */
.rk { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 10px; background: var(--tint); }
.rk-opt { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 7px; background: none; color: var(--tx2); font: 600 14px "Schibsted Grotesk", system-ui, sans-serif; cursor: pointer; }
.rk-opt[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 20, 28, 0.1); }

/* Hinweise */
.i-callout { padding: 12px 14px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-soft); font-size: 14.5px; line-height: 1.55; }
.i-ok { margin: 0; font-size: 14px; color: var(--ok-tx); }

/* Technik im Fehler-Dialog (nur fürs Team) und beim eigenen Beitrag */
.i-tech { margin: 18px 0 0; padding: 14px 16px 16px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.i-tech-h { padding: 0; margin: 0; font-size: 15px; font-weight: 600; }
.i-tech-p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--tx2); }
.i-tech-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.i-tech-grid .field { margin: 0; }
.i-lang-f select, .i-tech select { cursor: pointer; }
.i-rules { margin-top: 14px; }
.i-techview dl { margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; }
.i-techview dt { font-size: 12.5px; color: var(--tx3); }
.i-techview dd { margin: 1px 0 0; font-size: 14.5px; overflow-wrap: anywhere; }

/* Melden: Grund wählen */
.i-reasons { margin: 16px 0 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 4px; }
.i-reason { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 15px; cursor: pointer; }
.i-reason:hover { background: var(--surface-2); }
.i-reason input { width: 17px; height: 17px; margin: 0; accent-color: var(--ink); }

/* „Gibt es das schon?“ im Dialog */
.similar { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); }
.similar-h { margin: 0; font-size: 15px; font-weight: 600; }
.similar-p { margin: 2px 0 0; font-size: 14px; color: var(--tx2); }
.similar ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.similar li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; font-size: 15px; }
.similar a { font-weight: 500; overflow-wrap: anywhere; }
.similar-meta { font-size: 13px; color: var(--tx3); white-space: nowrap; }

/* Handy: Knopf, Bereiche zum Wischen, Liste, Regeln ganz unten */
@media (max-width: 759.98px) {
  .fm { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding-top: 18px; }
  .fm-side { display: contents; }
  .fm-new { order: 1; }
  .fm-nav { order: 2; margin: 0 -20px; padding: 0 20px; flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .fm-nav::-webkit-scrollbar { display: none; }
  .fm-nav a { flex: none; height: 36px; white-space: nowrap; }
  .fm-main { order: 3; }
  .fm-rules { order: 4; margin-top: 10px; padding-inline: 0; }
  .fm-row { gap: 11px; }
  .fm-row-side { min-width: 0; }
  .fm-post-body { padding-inline-start: 0; }
  .i-tech-grid { grid-template-columns: minmax(0, 1fr); }
}
