/* Farben und Schrift nach Brand Guide "Add a Little Extra": Rosebeige, Braun, Petrol als einzige Akzentfarbe */
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F4E9E4; --surface: #FFFFFF; --text: #5A4034; --muted: #7A6358; --line: #EBDFD9;
  --accent: #2F6F73; --on-accent: #FFFFFF; --down: #A8482A; --previous: #A8948A; --skeleton: #F1E8E4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17110F; --surface: #221A17; --text: #F0E4DE; --muted: #B8A49A; --line: #382C27;
    --accent: #62B4B8; --on-accent: #10201F; --down: #E8896A; --previous: #75635B; --skeleton: #2E2420;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17110F; --surface: #221A17; --text: #F0E4DE; --muted: #B8A49A; --line: #382C27;
  --accent: #62B4B8; --on-accent: #10201F; --down: #E8896A; --previous: #75635B; --skeleton: #2E2420;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", system-ui, sans-serif; line-height: 1.5; }
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: 32px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.25; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; margin-top: 32px; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
code { font-size: .9em; background: var(--bg); padding: 1px 6px; border-radius: 4px; }
.muted { color: var(--muted); margin: 4px 0 0; font-size: .92rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; flex: none; }

.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; padding-block: 8px; }
.wordmark { font-size: 1.2rem; font-weight: 500; }
.wordmark strong { color: var(--accent); }
.platforms { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.tab { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: .92rem; color: var(--text); text-decoration: none; }
.tab:hover { background: var(--bg); }
.tab.active { background: var(--accent); color: var(--on-accent); }
.tab.soon:not(.active) { color: var(--muted); font-weight: 400; }

main { display: grid; gap: 24px; padding-block: 32px; }
.card { background: var(--surface); border-radius: 20px; padding: 28px 32px; margin: 0; }
.notice { margin: 0; padding: 12px 18px; border-radius: 12px; background: var(--surface); border-left: 4px solid var(--accent); }
.notice.warn { border-left-color: var(--down); }
.empty-state { display: grid; gap: 12px; justify-items: start; }
.empty-state p { margin: 0; max-width: 60ch; }

.login { max-width: 440px; padding-inline: 16px; min-height: 100vh; align-content: center; }
.login .card, .login form { display: grid; gap: 14px; }
.login input[type="password"] { font: inherit; width: 100%; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.login .notice { background: var(--bg); }

.button, .ghost { font: inherit; font-weight: 500; border-radius: 999px; cursor: pointer; text-decoration: none; }
.button { display: inline-block; background: var(--accent); color: var(--on-accent); border: 0; padding: 10px 22px; }
.button:hover { filter: brightness(1.08); }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); padding: 6px 14px; }

.toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.accounts { display: flex; gap: 28px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.accounts li { display: flex; align-items: center; gap: 12px; }
.accounts span { display: grid; }
.accounts small { color: var(--muted); display: flex; align-items: center; }
.avatar { border-radius: 50%; }
.push { margin-left: auto; }

.filters { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.segmented { display: inline-flex; border: 0; margin: 0; padding: 4px; background: var(--surface); border-radius: 999px; }
.segmented label span { display: block; padding: 6px 16px; border-radius: 999px; cursor: pointer; font-size: .92rem; font-weight: 500; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { background: var(--accent); color: var(--on-accent); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.custom { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; }
input[type="date"] { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: -2px; }
.check { font-size: .92rem; }
.range-text { margin-left: auto; color: var(--muted); font-size: .92rem; }
#notes:empty { display: none; }
#notes p { margin: 0; color: var(--muted); font-size: .92rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tile { background: var(--surface); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; min-height: 210px; }
.tile .label { font-size: .85rem; font-weight: 500; color: var(--muted); }
.tile .value { font-size: 2.3rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile.unavailable .value { color: var(--muted); }
.tile .delta { font-size: .9rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--accent); } .delta.down { color: var(--down); }
.delta.flat, .delta.none, .delta.new { color: var(--muted); }
.tile .sub { color: var(--muted); font-size: .82rem; }
.spark { margin-top: auto; height: 40px; }
.spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark small { color: var(--muted); font-size: .75rem; }

.plot { height: 260px; position: relative; margin-top: 16px; }
.plot.small { height: 150px; }
.plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.plot .none { color: var(--muted); font-size: .92rem; display: grid; place-items: center; height: 100%; margin: 0; text-align: center; }
.axis text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.grid line { stroke: var(--line); stroke-width: 1; }
.key { display: inline-block; width: 18px; border-top: 2px solid var(--accent); vertical-align: middle; margin: 0 6px 0 14px; }
.key.prev { border-top: 2px dashed var(--previous); }
details summary { cursor: pointer; font-weight: 500; }
#growth details { margin-top: 20px; }

.tooltip { position: fixed; pointer-events: none; background: var(--text); color: var(--surface); padding: 8px 12px; border-radius: 10px; font-size: .85rem; max-width: 280px; z-index: 10; }
.tooltip strong { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }

.skeleton span, .skeleton.block { display: block; background: var(--skeleton); border-radius: 8px; animation: pulse 1.2s ease-in-out infinite; }
.tile.skeleton span:nth-child(1) { height: 12px; width: 50%; }
.tile.skeleton span:nth-child(2) { height: 36px; width: 70%; margin-top: 8px; }
.tile.skeleton span:nth-child(3) { height: 40px; margin-top: auto; }
.skeleton.block { height: 100%; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skeleton span, .skeleton.block { animation: none; } }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .93rem; }
th { text-align: left; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 10px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.title { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.title img { border-radius: 6px; object-fit: cover; flex: none; }
footer { color: var(--muted); font-size: .9rem; padding-block: 8px 32px; }

@media (max-width: 900px) {
  .wrap { padding-inline: 20px; }
  .card { padding: 20px; }
  .platforms { margin-left: 0; order: 3; width: 100%; }
  #theme { margin-left: auto; }
  .range-text { margin-left: 0; }
}
