/*
 * Nordhort brand — design tokens as CSS variables.
 * Source of the values: CLAUDE.md (brand tokens). No color/font values hardcoded in
 * templates — always go through these variables. Token names keep the brand color
 * names (Tiefsee, Stahlblau, ...) on purpose; they are the brand's own vocabulary.
 *
 * Fonts (SIL OFL): Space Grotesk (headings), Inter (body), JetBrains Mono (code /
 * technical values). Self-hosted from static/fonts/ — as long as no font files are
 * present, the respective system fallback applies (see static/fonts/README.md).
 * Deliberately no external font CDN (digital sovereignty).
 */

:root {
  /* Brand colors */
  --c-tiefsee: #122C34;   /* primary dark, text */
  --c-stahlblau: #224870; /* secondary, surfaces */
  --c-hortblau: #2A4494;  /* strong accent */
  --c-lichtblau: #4EA5D9; /* light accent, lines */
  --c-nordlicht: #44CFCB; /* highlight, gradient */
  --c-nebel: #EDF2F4;     /* light background */
  --c-schiefer: #3A4A52;  /* muted body text */
  --c-segel: #FFFFFF;     /* base surface */

  /* Status indicator (dashboard from Phase 1) */
  --c-status-ok: #1E8E3E;
  --c-status-warn-bg: #E0991F;
  --c-status-warn-text: #B5750A;
  --c-status-crit: #D7263D;
  --c-status-critical: #6D28A8;  /* purple — reserved for CVE severity "critical" */

  /* Nord gradient */
  --gradient-nord: linear-gradient(135deg, var(--c-hortblau) 0%, var(--c-nordlicht) 100%);

  /* Semantic roles */
  --bg-page: var(--c-nebel);
  --bg-surface: var(--c-segel);
  --text-strong: var(--c-tiefsee);
  --text-muted: var(--c-schiefer);
  --accent: var(--c-hortblau);
  --line: var(--c-lichtblau);

  /* Typography */
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  /* Dimensions */
  --radius: 10px;
  --shadow: 0 1px 3px rgba(18, 44, 52, 0.12), 0 1px 2px rgba(18, 44, 52, 0.08);
  --maxw: 1100px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-strong);
  background: var(--bg-page);
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-strong);
  line-height: 1.2;
  font-weight: 600;
}

code, pre, .mono { font-family: var(--font-mono); }

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

/* --- Header / navigation --- */
.site-header {
  background: var(--gradient-nord);
  color: var(--c-segel);
  position: relative; /* anchor for the mobile nav dropdown */
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; }
.brand__home {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.brand__home:hover { text-decoration: none; }
.brand__logo {
  height: 30px;
  width: auto;
  display: block;
}
.brand__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--c-segel);
}
.brand__suffix {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--c-segel);
  opacity: 0.8;
}
.nav { display: flex; gap: 1.1rem; align-items: center; }
.nav a {
  color: var(--c-segel);
  opacity: 0.9;
  font-size: 0.95rem;
}
.nav a:hover { opacity: 1; text-decoration: none; }

/* Expandable nav group (e.g. "Werkzeuge") — click-to-open dropdown. */
.nav-group { position: relative; }
.nav-group__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  color: var(--c-segel);
  opacity: 0.9;
}
.nav-group__toggle:hover { opacity: 1; }
.nav-group__caret { font-size: 0.7rem; transition: transform 0.15s ease; }
.nav-group__toggle[aria-expanded="true"] .nav-group__caret { transform: rotate(180deg); }
.nav-group__menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 12rem;
  flex-direction: column;
  background: var(--c-stahlblau);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  padding: 0.35rem 0;
  z-index: 40;
}
.nav-group.is-open .nav-group__menu { display: flex; }
.nav-group__menu a { padding: 0.55rem 1rem; white-space: nowrap; opacity: 0.9; }
.nav-group__menu a:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }

/* Hamburger button — hidden on desktop, shown on small screens. */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0.5rem;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-burger__bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-segel);
}

/* --- Content --- */
.site-main {
  max-width: var(--maxw);
  margin: 2rem auto;
  padding: 0 1.25rem;
}
.card {
  background: var(--bg-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--line);
  padding: 1.5rem 1.75rem;
}

/* --- Footer --- */
.site-footer {
  max-width: var(--maxw);
  margin: 3rem auto 2rem;
  padding: 1rem 1.25rem 0;
  border-top: 1px solid rgba(18, 44, 52, 0.12);
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer__claim { font-style: italic; }

/* --- Status indicator helpers (ready for Phase 1) --- */
.status-dot {
  display: inline-block;
  width: 0.7em; height: 0.7em;
  border-radius: 50%;
  vertical-align: middle;
}
.status-dot--ok { background: var(--c-status-ok); }
.status-dot--warn { background: var(--c-status-warn-bg); }
.status-dot--crit { background: var(--c-status-crit); }
.status-dot--unknown { background: var(--c-schiefer); }

/* --- Monitoring dashboard tiles --- */
.monitor-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.monitor-tile { margin: 0; }
.monitor-tile__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.monitor-tile__name { font-weight: 600; }
.monitor-tile__status { margin: 0.4rem 0 0.6rem; color: var(--text-muted); }
.monitor-tile__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem;
  margin: 0;
  font-size: 0.9rem;
}
.monitor-tile__meta dt { color: var(--text-muted); }
.monitor-tile__meta dd { margin: 0; }
.monitor-tile__error {
  margin: 0.7rem 0 0;
  color: var(--c-status-crit);
  font-size: 0.9rem;
}

/* --- Fleet table (Phase 1) --- */
.fleet {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.fleet th, .fleet td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(18, 44, 52, 0.1);
  vertical-align: top;
}
.fleet th {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fleet tbody tr:hover { background: var(--c-nebel); }

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: nowrap;
}
.badge--ok { background: rgba(30, 142, 62, 0.12); color: var(--c-status-ok); }
.badge--warn { background: rgba(224, 153, 31, 0.16); color: var(--c-status-warn-text); }
.badge--muted { background: rgba(58, 74, 82, 0.12); color: var(--text-muted); }
.badge--crit { background: rgba(215, 38, 61, 0.14); color: var(--c-status-crit); }
.badge--critical { background: rgba(109, 40, 168, 0.14); color: var(--c-status-critical); }
/* Badges used as links (e.g. export actions) — make the click affordance and keyboard
 * focus explicit without changing the badge look. */
a.badge { cursor: pointer; }
a.badge:hover { text-decoration: none; filter: brightness(0.97); }
a.badge:focus-visible { outline: 3px solid var(--c-lichtblau); outline-offset: 2px; }

.warnlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.warnlist li { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Per-row action cluster in tables (edit + delete etc.). */
.row-actions { display: inline-flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.row-actions form { display: inline; }

.detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.export-actions { display: flex; gap: 0.4rem; }
.export-actions .badge { text-decoration: none; }

.planner-form fieldset {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 1.1rem;
}
.planner-form legend {
  font-family: var(--font-head); font-weight: 600; padding: 0 0.4rem; color: var(--text-strong);
}
.planner-form .check { display: flex; align-items: center; gap: 0.55rem; color: var(--text-strong); cursor: pointer; }
.planner-form .check input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; }
.check--all { font-weight: 600; padding-bottom: 0.6rem; margin-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.45rem 0.9rem; }
.check-grid .check {
  padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-surface); transition: border-color 0.12s, background 0.12s;
}
.check-grid .check:hover { border-color: var(--c-lichtblau); }
.check-grid .check:has(input:checked) { border-color: var(--accent); background: rgba(42, 68, 148, 0.06); }

/* Migration planner — stack picker: search + vendor/category filter chips + vendor groups. */
.planner-filters .filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.7rem; }
.planner-filters .filter-row:last-child { margin-bottom: 0; }
.planner-filters .filter-label { font-size: 0.9rem; color: var(--text-muted); }
.planner-filters input[type="search"] {
  font: inherit; width: 100%; max-width: 26rem; padding: 0.45rem 0.6rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-surface); color: var(--text-strong);
}
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
  padding: 0.28rem 0.65rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-surface); color: var(--text-strong); font-size: 0.88rem;
}
.chip input { accent-color: var(--accent); }
.chip:has(input:checked) { border-color: var(--accent); background: rgba(42, 68, 148, 0.08); }
.vendor-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.6rem; }
.vendor-group[hidden] { display: none; }
.vendor-group > summary {
  cursor: pointer; padding: 0.55rem 0.8rem; font-family: var(--font-head); font-weight: 600;
  color: var(--text-strong); list-style-position: inside;
}
.vendor-group > summary:hover { color: var(--accent); }
.vendor-group > .check-grid { padding: 0.2rem 0.8rem 0.8rem; }
.source-option[hidden] { display: none; }
.reservations { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.reservations > li {
  padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); background: var(--bg-surface);
}
.reservations .badge { margin-right: 0.5rem; }
.reservations p { margin: 0.3rem 0 0; }

/* Estimate inputs (user count / data volume / hosting target) + result block. */
.estimate-inputs .input-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.estimate-inputs label { display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--text-muted); }
.estimate-inputs input, .estimate-inputs select {
  font: inherit; padding: 0.45rem 0.55rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-surface); color: var(--text-strong);
  min-width: 12rem;
}
.estimate-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0.4rem 0 0.8rem; }
.estimate-figure { display: grid; gap: 0.15rem; }
.estimate-value { font-family: var(--font-head); font-size: 1.9rem; font-weight: 600; color: var(--accent); }
.estimate-label { font-size: 0.85rem; color: var(--text-muted); }
.estimate-phases { margin: 0.3rem 0 0.8rem 1.1rem; }
.estimate-phases li { margin-bottom: 0.2rem; }

/* --- Button system — single source of truth for cockpit-frontend buttons/links ---
 * One base (.btn) plus variants (primary / secondary / danger / ghost). Works on both
 * <button> and <a class="btn">. Accessible by default: visible focus ring, ~44px touch
 * target, disabled + busy states. All colors come from the brand variables above (no hex).
 * Markup helper: templates/partials/nordhort_button.html. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.55rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.95rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.12s ease, background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  /* Default appearance = primary, so a bare .btn stays the brand button. */
  color: var(--c-segel);
  background: var(--gradient-nord);
  box-shadow: var(--shadow);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--c-lichtblau); outline-offset: 2px; }
.btn:disabled,
.btn[aria-disabled="true"],
.btn.is-busy {
  cursor: not-allowed;
  opacity: 0.55;
  filter: none;
  box-shadow: none;
  pointer-events: none;
}

/* Variants */
.btn--primary { color: var(--c-segel); background: var(--gradient-nord); }
.btn--secondary {
  color: var(--accent);
  background: transparent;
  border-color: var(--c-lichtblau);
  box-shadow: none;
}
.btn--secondary:hover { filter: none; background: rgba(78, 165, 217, 0.10); }
.btn--danger {
  color: var(--c-segel);
  background: var(--c-status-crit);
  box-shadow: none;
}
.btn--danger:hover { filter: brightness(1.06); }
.btn--ghost {
  color: var(--text-strong);
  background: transparent;
  box-shadow: none;
}
.btn--ghost:hover { filter: none; background: rgba(58, 74, 82, 0.10); }

.filterbar { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin: 0 0 1.1rem; }
.filterbar label { display: grid; gap: 0.25rem; font-size: 0.9rem; color: var(--text-muted); }
.filterbar select {
  font: inherit; padding: 0.4rem 0.55rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-surface); color: var(--text-strong);
}
/* Time-range picker for the history charts — brand-styled select with a custom chevron. */
.rangebar { display: flex; align-items: end; gap: 0.75rem; margin: 0; flex-wrap: wrap; }
.rangebar label { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--text-muted); }
.rangebar__select {
  font: inherit; color: var(--text-strong); background-color: var(--bg-surface);
  padding: 0.4rem 2.1rem 0.4rem 0.75rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%232A4494' stroke-width='2' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rangebar__select:hover { border-color: var(--c-hortblau); }
.rangebar__select:focus-visible {
  outline: none; border-color: var(--c-hortblau);
  box-shadow: 0 0 0 3px rgba(42, 68, 148, 0.18);
}

.roadmap li { margin-bottom: 0.75rem; }
.roadmap li > .badge { margin-left: 0.4rem; }

/* --- Messages (Phase 2) --- */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.message {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--line);
  background: var(--bg-surface);
  box-shadow: var(--shadow);
}
.message--success { border-left-color: var(--c-status-ok); }
.message--warning { border-left-color: var(--c-status-warn-bg); }
.message--error { border-left-color: var(--c-status-crit); }

/* --- Test-alert layout (button uses the .btn system) --- */
.test-alert { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.test-alert .hint { color: var(--text-muted); font-size: 0.85rem; }

/* --- History charts (Phase 3.3) --- */
.chart { margin: 1rem 0 1.5rem; }
.chart__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}
/* ECharts container (fleet history charts). */
.chart-canvas { width: 100%; height: 300px; }
.version-timeline { list-style: none; padding: 0; margin: 0.3rem 0 0; }
.version-timeline li { padding: 0.15rem 0; display: flex; gap: 0.6rem; align-items: baseline; }

/* --- Sources monitor (Phase 5) --- */
.qform { display: grid; gap: 0.8rem; max-width: 640px; }
.qform label { display: grid; gap: 0.25rem; font-size: 0.9rem; color: var(--text-muted); }
.qform input[type="text"], .qform input[type="url"], .qform input[type="number"],
.qform select, .qform textarea {
  font: inherit; padding: 0.45rem 0.6rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-surface); color: var(--text-strong);
}
.qform .check, .abfrage-cat .check {
  display: flex; align-items: center; gap: 0.5rem; color: var(--text-strong);
}
.abfrage-controls { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }
.abfrage-controls label { display: grid; gap: 0.25rem; font-size: 0.9rem; color: var(--text-muted); }
.abfrage-cat { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; margin: 0 0 1rem; }
.abfrage-cat legend { font-family: var(--font-head); font-weight: 600; padding: 0 0.4rem; }
.abfrage-cat .check { padding: 0.2rem 0; }
.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li { padding: 0.45rem 0; border-bottom: 1px solid rgba(18,44,52,0.08); }

/* --- Detail view (Phase 1.7) --- */
.detail-back { margin-top: 0; font-size: 0.9rem; }
.card + .card { margin-top: 1.5rem; }
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.25rem;
  margin: 1rem 0;
}
.kv dt { color: var(--text-muted); font-size: 0.9rem; }
.kv dd { margin: 0; }
.raw {
  background: var(--c-tiefsee);
  color: var(--c-nebel);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

/* Wide tables scroll horizontally instead of overflowing the viewport. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Funding module (#300) --- */
/* Standing note (disclaimer / hint block). */
.note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
}
.note--muted {
  border-color: rgba(58, 74, 82, 0.2);
  background: rgba(58, 74, 82, 0.06);
  color: var(--text-muted);
}
.note--warn {
  border-color: rgba(224, 153, 31, 0.35);
  background: rgba(224, 153, 31, 0.1);
  color: #b5750a;
}
/* Retired / de-emphasised table rows. */
.fleet tbody tr.is-muted { color: var(--text-muted); opacity: 0.75; }
/* Inline refine form (region / target group). */
.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
}
.filter-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.filter-form input[type="text"],
.filter-form select {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-strong);
}
/* Economics calculator form. */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0 0 1rem;
}
.calc-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.calc-grid .calc-wide { grid-column: 1 / -1; }
.calc-grid input,
.calc-grid select {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-strong);
}
.calc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.5rem; }
.calc-grid label.calc-check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-strong);
}
.calc-grid label.calc-check input { width: auto; }
.calc-section { margin-top: 0.75rem; }
.calc-section .be-body { padding-top: 0.4rem; }
.calc-section .calc-grid { margin-bottom: 0; }
.calc-section .be-body > .hint { margin: 0 0 0.6rem; }
.scenario-compare { margin: 1.5rem 0; }
/* Result framing — never a naked number; sovereignty context always shown. */
.framing {
  border: 1px solid var(--line);
  border-left: 4px solid var(--hortblau);
  border-radius: var(--radius);
  background: rgba(42, 68, 148, 0.05);
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.25rem;
}
.framing--savings { border-left-color: var(--status-ok, #1e8e3e); background: rgba(30, 142, 62, 0.06); }
.framing--sovereignty { border-left-color: var(--nordlicht, #44cfcb); }
.framing__headline { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; margin: 0 0 0.3rem; }
.framing__botschaft { color: var(--text-muted); margin: 0 0 0.6rem; }
.framing__points { margin: 0 0 1.1rem; padding-left: 1.1rem; }
.framing__points li { margin: 0.2rem 0; }

/* Workflow tabs (Einzelkunde / Szenarienvergleich). */
.calc-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  margin: 0 0 1.25rem;
}
.calc-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 0.6rem 1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
}
.calc-tab:hover { color: var(--text-strong); }
.calc-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.calc-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Focused result head: three primary figures, customer vs. internal clearly separated. */
.result-head {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.9rem;
  margin: 0 0 1.1rem;
}
.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 0.9rem 1rem;
}
.result-card--customer { border-left: 4px solid var(--accent); }
.result-card--breakeven { border-left: 4px solid var(--c-nordlicht); }
/* Internal card visually set apart — it is never customer-facing. */
.result-card--internal {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--c-schiefer) 45%, var(--line));
  background: color-mix(in srgb, var(--c-schiefer) 7%, var(--bg-surface));
}
.result-card__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.result-card--internal .result-card__title { color: var(--c-stahlblau); }
.result-card__big { margin: 0.1rem 0; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; }
.result-card__sub { margin: 0.1rem 0; color: var(--text-muted); }
.result-card__note { margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.result-card__note--ok { color: var(--c-status-ok); font-weight: 600; }
.result-vs { width: 100%; border-collapse: collapse; }
.result-vs th, .result-vs td { padding: 0.25rem 0.4rem; text-align: right; font-variant-numeric: tabular-nums; }
.result-vs thead th { font-size: 0.8rem; color: var(--text-muted); }
.result-vs tbody th { text-align: left; font-weight: 500; color: var(--text-muted); }
.result-vs__nordhort { font-weight: 700; color: var(--accent); }
.reco-line { margin: 0 0 0.75rem; font-size: 0.95rem; }
@media (max-width: 720px) {
  .result-head { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .calc-tab, .result-card { transition: none; }
}
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } }

/* Break-even analysis panel (collapsible, default collapsed). */
.be-panel { margin-top: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); }
.be-panel > summary {
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text-strong);
}
.be-body { padding: 0 0.9rem 0.9rem; }
.be-chart { margin: 0.75rem 0; }
.be-canvas { width: 100%; height: 320px; }
.be-toggle { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }
.be-toggle .btn.is-active { background: var(--gradient-nord); color: var(--c-segel); }

/* Talk-HPB panel (#302): KPI grid, live sliders, per-customer recommendation card. */
.hpb-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.1rem;
}
.hpb-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.hpb-kpi--primary { border-color: var(--c-hortblau); }
.hpb-kpi__label { font-size: 0.78rem; color: var(--text-muted); }
.hpb-kpi__value { font-family: var(--font-mono); font-size: 1.15rem; color: var(--text-strong); }
.hpb-kpi--primary .hpb-kpi__value { color: var(--c-hortblau); }
.hpb-kpi__hint { font-size: 0.78rem; color: var(--text-muted); }
.hpb-kpi .is-pos { color: var(--c-status-ok); }
.hpb-kpi .is-neg { color: var(--c-status-crit); }
.hpb-sliders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.25rem;
  margin: 0 0 1rem;
}
.hpb-sliders label { font-size: 0.85rem; color: var(--text-muted); }
.hpb-sliders output { font-family: var(--font-mono); color: var(--text-strong); }
.hpb-sliders input[type="range"] { width: 100%; accent-color: var(--c-hortblau); }
.hpb-customer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
  margin: 0 0 0.8rem;
}
.hpb-customer label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.hpb-customer input[type="number"] {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-strong);
}
.hpb-customer__check { flex-direction: row; align-items: center; gap: 0.4rem; }
.hpb-reco {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.9rem;
}
.hpb-reco--no_hpb { border-left-color: var(--c-status-ok); }
.hpb-reco--shared { border-left-color: var(--c-hortblau); }
.hpb-reco--dedicated { border-left-color: var(--c-status-warn-bg); }
.hpb-reco__price { color: var(--text-muted); }
@media (max-width: 720px) {
  .hpb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpb-sliders { grid-template-columns: 1fr; }
}

/* Fill-in-together checklist. */
.check-list { margin: 0.4rem 0 1rem; padding-left: 1.2rem; }
.check-list li { margin-bottom: 0.4rem; }
.check-list label { cursor: pointer; }
/* Menu badge: open currency-watcher hint count. */
.nav-badge {
  display: inline-block;
  min-width: 1.2em;
  padding: 0 0.35em;
  border-radius: 999px;
  background: var(--c-nordlicht);
  color: var(--c-tiefsee);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}
/* Currency-watcher hint panel (top of the funding area). */
.hint-panel { border-left: 4px solid var(--c-nordlicht); }
.hint-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.hint-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(18, 44, 52, 0.08);
}
.hint-list__main { display: flex; flex-direction: column; gap: 0.15rem; }
.btn--small { padding: 0.35rem 0.7rem; font-size: 0.85rem; }

/* --- Responsive: tablets and phones --- */
@media (max-width: 720px) {
  .nav-burger { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--c-stahlblau);
    padding: 0.25rem 0;
    box-shadow: var(--shadow);
    z-index: 30;
  }
  .nav--open { display: flex; }
  .nav a {
    opacity: 1;
    padding: 0.8rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  /* The group renders inline within the stacked panel (no overlay). */
  .nav-group { width: 100%; }
  .nav-group__toggle {
    width: 100%;
    justify-content: space-between;
    opacity: 1;
    padding: 0.8rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-group__menu {
    position: static;
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: rgba(0, 0, 0, 0.15);
  }
  .nav-group__menu a {
    padding: 0.7rem 1.25rem 0.7rem 2.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* --- Responsive: phones --- */
@media (max-width: 540px) {
  .site-main { margin: 1.25rem auto; }
  .card { padding: 1.1rem 1rem; }
  .card + .card { margin-top: 1rem; }
  h1 { font-size: 1.5rem; }
  /* Key/value lists stack into a single column. */
  .kv { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .kv dt { margin-top: 0.6rem; }
  /* Slightly tighter tables; horizontal scroll handles the rest. */
  .fleet { font-size: 0.88rem; }
  .fleet th, .fleet td { padding: 0.5rem 0.55rem; }
}
