/* Heartbeat Radar. Tokens aus dem heartbeat Design Guide 2025:
   Obsidian #141414, Amber #FB841C, Blanc #FFFFFF; Sekundär Graphite #434343, Cloud #DDDDDD, Frost #F3F3F3,
   Mahogany #331F0F, Espresso #583A21, Peach #FFBC82, Almond #FEEDDD. Font: Futura PT (Ersatz: Jost). */
:root {
  --obsidian: #141414;
  --surface: #1b1b1b;
  --surface-2: #222222;
  --surface-3: #2a2a2a;
  --line: #2e2e2e;
  --line-strong: #434343;
  --text: #f3f3f3;
  --text-2: #c9c9c9;
  --muted: #8f8f8f;
  --amber: #fb841c;
  --amber-2: #ff9a3d;
  --peach: #ffbc82;
  --almond: #feeddd;
  --mahogany: #331f0f;
  --espresso: #583a21;
  --ok: #7ed3a0;
  --err: #ff6b6b;
  --r-card: 14px;
  --r-lg: 20px;
  --font: 'Jost', 'Futura PT', 'Futura', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--obsidian); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; background: rgba(20,20,20,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-word { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand-sub { font-weight: 500; color: var(--amber); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-left: 2px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link { padding: 8px 14px; border-radius: 999px; color: var(--text-2); font-weight: 500; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--amber); color: #141414; }

.main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 60px; }
.main-wide { max-width: 1440px; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 30px 24px 40px; border-top: 1px solid var(--line); }

/* Section heads */
.section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head .hint { color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--amber); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
.lead { color: var(--text-2); font-size: 16px; max-width: 760px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; }
.tile-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.tile-label { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tile-sub { color: var(--text-2); font-size: 12.5px; margin-top: 6px; }

/* Cards grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.grid-lg { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.post-card.is-own { box-shadow: inset 0 0 0 1px rgba(251,132,28,.35); }
.thumb-wrap { position: relative; background: #0f0f0f; overflow: hidden; }
.thumb-tall { aspect-ratio: 4 / 5; }
.thumb-wide { aspect-ratio: 16 / 9; }
.thumb { width: 100%; height: 100%; object-fit: cover; }
.thumb-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.thumb-dur { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.7); color: #fff; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; }
.thumb-kind { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.7); color: var(--text-2); font-size: 11.5px; padding: 2px 7px; border-radius: 999px; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.card-meta { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.card-meta .handle { color: var(--text-2); font-weight: 500; }
.dot { opacity: .5; }
.card-hook { font-size: 14px; line-height: 1.35; color: var(--text); min-height: 2.6em; }
.card-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.card-metrics { display: flex; gap: 12px; color: var(--muted); font-size: 12.5px; }
.card-metrics span:first-child { color: var(--text-2); font-weight: 500; }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.badge-hot { background: var(--amber); color: #141414; }
.badge-warm { background: rgba(251,132,28,.22); color: var(--peach); border: 1px solid rgba(251,132,28,.5); }
.badge-neutral { background: rgba(255,255,255,.08); color: var(--text-2); }
.badge-cold { background: rgba(255,255,255,.05); color: var(--muted); }
.badge-muted { background: rgba(255,255,255,.05); color: var(--muted); }
.badge-new { background: #fff; color: #141414; }
.badge sup { font-size: 9px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--surface-3); color: var(--text-2); border: 1px solid transparent; }
.chip-machart { background: rgba(251,132,28,.14); color: var(--peach); }
.chip-archetyp { background: rgba(255,255,255,.07); }
.chip-muted { color: var(--muted); }
.chip-error { color: var(--err); border-color: rgba(255,107,107,.4); }
.league { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.league-us { color: #9ecbff; }
.league-dach { color: var(--peach); }
.league-eigen { color: var(--ok); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0 18px; }
.filters select, .filters input { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 12px; font-size: 13.5px; }
.filters .spacer { flex: 1; }
.pill-group { display: inline-flex; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.pill-group a { padding: 5px 12px; border-radius: 999px; font-size: 13px; color: var(--text-2); }
.pill-group a.is-active { background: var(--amber); color: #141414; font-weight: 600; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font-weight: 500; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: var(--amber); }
.btn-primary { background: var(--amber); border-color: var(--amber); color: #141414; font-weight: 600; }
.btn-primary:hover { background: var(--amber-2); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-danger { color: var(--err); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-row input, .form-row select, textarea { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
textarea { width: 100%; min-height: 80px; border-radius: var(--r-card); }
.checkbox { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13.5px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.table-wrap { overflow-x: auto; }
.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.err { color: var(--err); }
.small { font-size: 12.5px; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.panel + .panel { margin-top: 14px; }
.panel h3 { margin-bottom: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
ul.clean { margin: 6px 0 0; padding-left: 18px; }
ul.clean li { margin: 4px 0; }
.ref { color: var(--amber); font-weight: 500; }
details summary { cursor: pointer; color: var(--text-2); }
.pre { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.log { background: #0f0f0f; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-height: 320px; overflow: auto; font-size: 12px; white-space: pre-wrap; color: var(--text-2); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.hero { padding: 26px 28px; border-radius: var(--r-lg); background: linear-gradient(135deg, #1e1a17 0%, #141414 55%, #141414 100%); border: 1px solid var(--line); }
.notice { padding: 12px 16px; border-radius: var(--r-card); background: rgba(251,132,28,.1); border: 1px solid rgba(251,132,28,.35); color: var(--peach); font-size: 13.5px; }
.notice-err { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.35); color: var(--err); }

/* Post-Detail */
.post-head { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
@media (max-width: 900px) { .post-head { grid-template-columns: 1fr; } }
.post-media img { border-radius: var(--r-card); border: 1px solid var(--line); }
.metric-row { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.metric { display: flex; flex-direction: column; }
.metric b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.metric b .badge { font-size: 15px; padding: 5px 12px; }
.metric span { color: var(--muted); font-size: 12.5px; }
.sheet img { width: 100%; }
.pattern-item { padding: 12px 0; border-top: 1px solid var(--line); }
.pattern-item:first-child { border-top: 0; padding-top: 0; }
.pattern-item .muster { font-weight: 600; font-size: 15px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #fff; color: #141414; padding: 10px 16px; border-radius: 999px; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.4); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
