/* forum.duxels.com: dark mode ONLY, as all of Duxels (standard 16): there is no light variant. Palette: red #F0392F, green #22B14C, primary blue #2A86FF (buttons, links), page #0B1020,
   cards and panels #121A33, text #E8ECF8, secondary text #A4ADC8. System font stack, mobile first, no external fonts or images.
   The CSP allows only this file for styles: there is no inline style anywhere (test/pages.test.mjs checks the pages carry no style attribute or style tag). */
:root { --bg: #0B1020; --panel: #121A33; --line: #26315a; --text: #E8ECF8; --muted: #A4ADC8; --blue: #2A86FF; --red: #F0392F; --green: #22B14C; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--blue); }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; overflow-wrap: anywhere; }
h2 { font-size: 19px; margin: 28px 0 12px; }
p { margin: 0 0 12px; }

.fx-wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.fx-main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }
.fx-skip { position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff; padding: 8px 12px; z-index: 10; }
.fx-skip:focus { left: 8px; top: 8px; }

/* top bar */
.fx-bar { border-bottom: 1px solid var(--line); background: var(--bg); }
.fx-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.fx-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.fx-brand:hover { color: var(--text); }
.fx-brand-sub { color: var(--muted); font-weight: 500; }
.fx-logo { width: 26px; height: 26px; border-radius: 7px; background: var(--blue); display: inline-block; position: relative; }
.fx-logo::after { content: ""; position: absolute; left: 6px; top: 8px; width: 14px; height: 8px; background: #fff; border-radius: 2px; }
.fx-bar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-lang { color: var(--text); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.fx-lang:hover { border-color: var(--blue); color: var(--text); }
.fx-account { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }

/* breadcrumb and text helpers */
.fx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.fx-sep { opacity: .6; }
.fx-lead, .fx-meta, .fx-empty, .fx-cat-desc { color: var(--muted); }
.fx-meta { font-size: 14px; }
.fx-lead { max-width: 65ch; }
.fx-note { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.fx-error { border-color: var(--red); color: var(--red); }
.fx-ok { border-color: var(--green); color: var(--green); }

/* categories (home) */
.fx-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fx-cat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.fx-cat:hover { border-color: var(--blue); }
.fx-cat-title { font-size: 18px; font-weight: 700; text-decoration: none; }
.fx-cat-desc { margin: 4px 0 6px; }

/* thread lists */
.fx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fx-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.fx-row:hover { border-color: var(--blue); }
.fx-row-main { display: grid; gap: 2px; min-width: 0; }
.fx-row-title { color: var(--text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.fx-row-title:hover { color: var(--blue); text-decoration: underline; }
.fx-row-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.fx-count { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* badges */
.fx-badge { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.fx-lang-es { border-color: var(--blue); color: var(--blue); }
.fx-lang-en { border-color: var(--green); color: var(--green); }
.fx-badge-staff { background: var(--blue); border-color: var(--blue); color: #fff; }

/* thread page */
.fx-thread-title { margin-bottom: 4px; }
.fx-posts { display: grid; gap: 12px; margin: 16px 0; }
.fx-post { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.fx-staff { border-color: var(--blue); }
.fx-post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fx-author { font-weight: 700; overflow-wrap: anywhere; }
.fx-body { overflow-wrap: anywhere; }
.fx-body p:last-child { margin-bottom: 0; }

/* pagination */
.fx-pages { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0; }
.fx-page-of { color: var(--muted); font-size: 14px; }
.fx-page-link { display: inline-block; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; text-decoration: none; min-height: 40px; }
a.fx-page-link:hover { border-color: var(--blue); }
.fx-off { opacity: .45; }

/* composer and alias form (public/compose.js builds them with the DOM, never innerHTML) */
.fx-compose { margin-top: 24px; }
.fx-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.fx-card h2 { margin-top: 0; }
.fx-form label { display: block; margin: 12px 0 6px; font-weight: 600; }
.fx-form input[type=text], .fx-form textarea, .fx-form select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; }
.fx-form textarea { min-height: 140px; resize: vertical; }
.fx-hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.fx-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.fx-btn { display: inline-block; border: 0; border-radius: 10px; padding: 10px 18px; background: var(--blue); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px; }
.fx-btn:hover { filter: brightness(1.1); color: #fff; }
.fx-btn:disabled { opacity: .6; cursor: default; }
.fx-btn-quiet { background: transparent; color: var(--text); border: 1px solid var(--line); }
.fx-turnstile { margin-top: 12px; min-height: 0; }

/* footer and the 404 page */
.fx-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 16px 0 28px; }
.fx-foot p { margin: 0 0 4px; }
.nf { display: grid; place-items: center; min-height: 80vh; text-align: center; margin: 0; }

@media (max-width: 520px) {
  h1 { font-size: 21px; }
  .fx-row { flex-direction: column; }
  .fx-row-side { justify-content: flex-start; }
  .fx-actions .fx-btn { flex: 1 1 auto; text-align: center; }
}
