/* ──────────────────────────────────────────────────────────────────────
   Location Scout — Design-Tokens (Redesign 2026-10, Claude-Design „Entwurf 1")
   HELL ist Standard, Dunkel über [data-theme="dark"]. Eine Akzentfarbe für
   Handlungen und „aktiv", Status nur für Bewertungen (gut/eingeschränkt/
   schlecht), eine neutrale Daten-Skala (--d1…--d5) und höchstens sechs
   Kategoriefarben für Karten-Ebenen (--c1…--c6).

   Die BISHERIGEN Namen (--bg-0, --fg, --fg-mute …) bleiben und zeigen auf die
   neuen Werte — so trägt jede Komponente die neue Palette, ohne dass ihr Code
   angefasst wird. Neue Komponenten nutzen die neuen Namen (--bg, --surface,
   --ink …), siehe docs/redesign/design.
   ────────────────────────────────────────────────────────────────────── */

:root,
[data-theme="light"] {
  /* Neue Namen */
  --bg: #F6F5F2;  --surface: #FFFFFF;  --surface-2: #F0EFEB;
  --ink: #1C1D1F; --ink-2: #4A4D52;    --ink-3: #6B6E74;
  --accent-ink: #FFFFFF;
  --d1: #F1EEF5; --d2: #D7CDE4; --d3: #B4A3CD; --d4: #8C77B1; --d5: #5F4B8B;
  --c1: #3E6DB5; --c2: #B8692F; --c3: #23827F; --c4: #A84D7C; --c5: #6F7F2A; --c6: #7A5BB0;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Flächen (bisherige Namen) */
  --bg-0: var(--bg);          /* Leinwand */
  --bg-1: var(--surface);     /* Fläche */
  --bg-2: var(--surface-2);   /* angehoben */
  --bg-3: #E8E6E1;            /* Hover */
  --bg-inset: #F3F2EE;        /* vertieft (Tabellenkopf) */

  /* Linien */
  --line: #E4E2DD;
  --line-strong: #CDCAC3;
  --line-vivid: #A9A59D;

  /* Text */
  --fg: var(--ink);
  --fg-mute: var(--ink-2);
  --fg-faint: var(--ink-3);
  --fg-vivid: #000000;

  /* Akzent: Handlungen, Links, „aktiv" */
  --accent: #2F55A4;
  --accent-2: #26488F;
  --accent-soft: #E9EEF8;
  --accent-line: rgba(47,85,164,.30);
  --accent-glow: rgba(47,85,164,.28);

  /* Status — nur für Bewertungen, nie dekorativ, nie für Kennzahlen */
  --ok: #2B7550;   --ok-soft: #E5F0E9;   --ok-line: rgba(43,117,80,.30);
  --warn: #8A5E0E; --warn-soft: #F6EEDC; --warn-line: rgba(138,94,14,.30);
  --bad: #AE3628;  --bad-soft: #F8E6E3;  --bad-line: rgba(174,54,40,.30);

  /* Karte */
  --map-bg: #EEEDE9;
  --map-land: var(--map-bg);
  --map-line: rgba(28,29,31,.08);
  --map-pin: var(--accent);

  /* Schatten */
  --shadow-1: 0 1px 2px rgba(28,29,31,.06);
  --shadow-2: 0 6px 24px rgba(28,29,31,.10), 0 1px 3px rgba(28,29,31,.08);
  --shadow-pop: 0 18px 48px -12px rgba(28,29,31,.22), 0 0 0 1px rgba(28,29,31,.06);

  /* Radien */
  --r-1: 4px;
  --r-2: 5px;
  --r-3: 7px;
  --r-4: 8px;
  --r-5: 12px;
  --r-pill: 999px;

  /* Schrift (bisherige Namen) */
  --font-sans: var(--sans);
  --font-serif: var(--serif);
  --font-mono: var(--mono);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #121315;  --surface: #1A1B1E;  --surface-2: #232428;
  --ink: #ECEBE7; --ink-2: #B9B8B3;    --ink-3: #93928D;
  --accent-ink: #0F1420;
  --d1: #221E2B; --d2: #3B3350; --d3: #5F4F82; --d4: #8A75B3; --d5: #BFAEE0;
  --c1: #7EA3E0; --c2: #DE9660; --c3: #5DB8B3; --c4: #D884AE; --c5: #A8B65E; --c6: #AB90DE;

  --bg-3: #2B2D31;
  --bg-inset: #16171A;
  --line: #2D2F33;
  --line-strong: #41444A;
  --line-vivid: #5A5D64;
  --fg-vivid: #FFFFFF;

  --accent: #86A4E3;
  --accent-2: #A3BBEC;
  --accent-soft: #1E273B;
  --accent-line: rgba(134,164,227,.34);
  --accent-glow: rgba(134,164,227,.30);

  --ok: #62BE8E;   --ok-soft: #16281E;   --ok-line: rgba(98,190,142,.32);
  --warn: #DDAE52; --warn-soft: #2A2314; --warn-line: rgba(221,174,82,.32);
  --bad: #EC8275;  --bad-soft: #301B18;  --bad-line: rgba(236,130,117,.32);

  --map-bg: #1C1D20;
  --map-line: rgba(255,255,255,.07);

  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 28px rgba(0,0,0,.45);
  --shadow-pop: 0 20px 60px -10px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body, #app {
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: 100%;
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-2);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Type ramp ───────────────────────────────────────────────────────── */
.t-display {
  font-family: var(--font-serif);
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-weight: 500;
}
.t-h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.t-h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.005em;
  font-weight: 500;
}
.t-h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.t-h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}
.t-body { font-size: 14px; line-height: 1.5; font-weight: 400; }
.t-body-lg { font-size: 15px; line-height: 1.55; font-weight: 400; }
.t-small { font-size: 12.5px; line-height: 1.45; font-weight: 400; }
.t-micro {
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.t-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: -0.005em; }
.t-mute { color: var(--fg-mute); }
.t-faint { color: var(--fg-faint); }
.t-serif { font-family: var(--font-serif); }

/* ── Scrollbars (subtle) ──────────────────────────────────────────────── */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--line-vivid); background-clip: padding-box; border: 2px solid transparent; }

/* ── Selection ───────────────────────────────────────────────────────── */
::selection { background: var(--accent-soft); color: var(--fg); }

/* ── Striped placeholder utility ─────────────────────────────────────── */
.placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-2) 0 8px,
      var(--bg-inset) 8px 16px
    );
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
}
.placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg-1));
  pointer-events: none;
}
.placeholder > span {
  position: relative;
  padding: 4px 8px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

/* ── KBD ────────────────────────────────────────────────────────────── */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--fg-mute);
}
