:root {
  color-scheme: dark;
  --bg: #081014;
  --surface: #101a20;
  --surface-2: #16242c;
  --surface-3: #1d3039;
  --text: #edf7f8;
  --muted: #98abb0;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #42d39e;
  --accent-2: #58a6ff;
  --warning: #f4bf50;
  --danger: #ff6b6b;
  --good: #32d583;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8f8;
  --surface: #ffffff;
  --surface-2: #eef4f3;
  --surface-3: #dde9e7;
  --text: #102027;
  --muted: #5d6d72;
  --line: rgba(16, 32, 39, 0.12);
  --shadow: 0 16px 48px rgba(26, 52, 61, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(66, 211, 158, 0.12), transparent 34rem),
    linear-gradient(145deg, rgba(88, 166, 255, 0.06), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

body.cookie-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto minmax(12rem, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding: 0.22rem;
  border: 1px solid color-mix(in srgb, var(--accent-2) 32%, var(--line));
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(232, 245, 250, 0.9));
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
}

.main-nav a,
.segment,
.tab {
  color: var(--muted);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.main-nav a {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.main-nav a:hover,
.main-nav a.active-link,
.segment.active,
.tab.active {
  color: var(--text);
  background: var(--surface-3);
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.segmented {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.segment {
  min-width: 2.4rem;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  font-size: 0.86rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.icon-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 23rem);
  gap: clamp(1rem, 3vw, 3rem);
  min-height: calc(100svh - 4.5rem);
  padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 5vw, 5rem) 4rem;
  align-items: center;
}

.page-hero {
  min-height: min(42rem, calc(100svh - 4.5rem));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 58rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.1rem;
  max-width: 16ch;
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.25rem;
  font-size: 1.08rem;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 48rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.beta-note {
  width: fit-content;
  max-width: 48rem;
  margin: 1rem 0 0;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--warning);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--warning) 8%, var(--surface));
  color: var(--text) !important;
  font-size: 0.86rem !important;
}

.hero-actions,
.compare-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 750;
  cursor: pointer;
}

.primary-action {
  color: #061011;
  background: var(--accent);
  border-color: transparent;
}

.secondary-action {
  color: var(--text);
  background: var(--surface);
}

.hero-panel {
  position: relative;
  z-index: 2;
  align-self: end;
  margin-bottom: clamp(1rem, 6vw, 5rem);
}

.status-stack {
  display: grid;
  gap: 0.75rem;
}

.status-pill {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.status-pill span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 99px;
  background: currentColor;
}

.status-pill small {
  color: var(--muted);
}

.good {
  color: var(--good);
}

.warn {
  color: var(--warning);
}

.bad {
  color: var(--danger);
}

.incomplete {
  color: var(--muted);
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
  z-index: 1;
}

.network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.72;
}

.mesh-node {
  position: absolute;
  width: clamp(6rem, 11vw, 10rem);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface-2) 82%, transparent), transparent),
    repeating-linear-gradient(0deg, transparent 0 0.8rem, rgba(255,255,255,0.04) 0.85rem 0.9rem);
  border-radius: 8px;
  transform: rotate(8deg);
}

.n1 { right: 11%; top: 14%; }
.n2 { right: 31%; top: 35%; transform: rotate(-8deg); }
.n3 { right: 8%; bottom: 20%; transform: rotate(13deg); }
.n4 { left: 52%; bottom: 10%; transform: rotate(-4deg); }

.mesh-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent);
  transform-origin: left center;
}

.l1 { width: 30vw; right: 12%; top: 31%; transform: rotate(25deg); }
.l2 { width: 26vw; right: 6%; top: 58%; transform: rotate(-18deg); }
.l3 { width: 28vw; right: 22%; bottom: 21%; transform: rotate(8deg); }

.summary-band {
  padding: 0 clamp(1rem, 5vw, 5rem) 2rem;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metric-strip div {
  min-width: 0;
  padding: 1rem;
  background: var(--surface);
}

.metric-strip span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-strip strong,
.metric strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
}

.tool-section {
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 5rem);
}

.section-heading {
  display: grid;
  gap: 0.25rem;
  max-width: 72rem;
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tab {
  min-height: 2.4rem;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  white-space: nowrap;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
}

.tool-grid {
  grid-template-columns: minmax(18rem, 1.04fr) minmax(18rem, 0.96fr);
  gap: 1rem;
  align-items: start;
}

.control-panel,
.result-panel,
.snapshot-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.control-panel,
.result-panel {
  padding: 1rem;
}

.panel-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.autoscaler-note,
.expert-pg {
  margin: 0 0 1rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.autoscaler-note {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.autoscaler-note strong {
  color: var(--text);
}

.autoscaler-note code {
  color: var(--accent);
}

.expert-pg summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 750;
}

.expert-pg p {
  margin: 0.7rem 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.expert-pg .field {
  max-width: 18rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.field {
  position: relative;
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field.is-required::before {
  content: "Pflicht";
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.08rem 0.38rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.66rem;
  font-weight: 850;
}

.field.is-required {
  padding-top: 1.05rem;
}

.field::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.4rem);
  width: min(18rem, 80vw);
  padding: 0.55rem 0.65rem;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(0.25rem);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 8;
}

.field:hover::after,
.field:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.field:not([data-tip])::after {
  display: none;
}

.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  padding: 0.55rem 0.65rem;
  outline: 0;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 70%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.field.is-invalid {
  color: var(--warning);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: color-mix(in srgb, var(--warning) 70%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 12%, transparent);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric {
  min-height: 5.2rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 8px;
}

.insight-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.insight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 80%, transparent);
  color: var(--muted);
}

.insight i {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: currentColor;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.check-grid input {
  width: 1rem;
  min-height: 1rem;
}

.table-panel {
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 45rem;
}

th,
td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hub-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 1rem;
  min-height: 13.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.hub-card span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: color-mix(in srgb, var(--accent) 82%, var(--text));
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hub-card span::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.hub-card span::after {
  content: "→";
  margin-left: auto;
  color: var(--muted);
  font-size: 1rem;
  transform: translateX(0);
  transition: transform 160ms ease, color 160ms ease;
}

.hub-card span b {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: none;
}

.hub-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.12;
}

.hub-card p {
  margin: 0;
  color: var(--muted);
}

.hub-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  transform: translateY(-2px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 46%),
    var(--surface);
}

.hub-card:hover span::after {
  color: var(--accent);
  transform: translateX(0.2rem);
}

.snapshot-card {
  padding: 1rem;
}

.snapshot-card h3 {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.snapshot-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 1rem;
  margin: 1rem 0 0;
}

.snapshot-card dt {
  color: var(--muted);
}

.snapshot-card dd {
  margin: 0;
  font-weight: 800;
}

.export-section {
  padding-bottom: 6rem;
}

.ops-checklist {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.ops-checklist label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.ops-checklist input,
.cookie-options input {
  width: 1rem;
  min-height: 1rem;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) minmax(15rem, auto) minmax(15rem, auto);
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem clamp(1rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer p {
  max-width: 52rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.footer-pages,
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.footer-pages a,
.footer-legal a,
.site-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
}

.footer-pages a {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-2));
}

.site-footer button:hover,
.footer-legal a:hover,
.footer-pages a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

body.cookie-locked .footer-legal {
  position: relative;
  z-index: 46;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
}

.legal-modal[hidden],
.cookie-banner[hidden] {
  display: none;
}

#cookieFirstLevel[hidden],
.cookie-details[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(48rem, 100%);
  max-height: min(44rem, calc(100svh - 2rem));
  overflow: auto;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.modal-card h3 {
  margin-top: 1.15rem;
}

.modal-card p,
.legal-bullets,
.legal-list {
  color: var(--muted);
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  font-size: 1.35rem;
}

.legal-note {
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--warning) 12%, transparent);
}

.legal-list {
  display: grid;
  grid-template-columns: minmax(8rem, 0.32fr) 1fr;
  gap: 0.65rem 1rem;
  margin: 1rem 0 0;
}

.legal-list dt {
  color: var(--text);
  font-weight: 800;
}

.legal-list dd {
  margin: 0;
}

.legal-bullets {
  padding-left: 1.25rem;
}

.cookie-banner {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: block;
  padding: 0;
  background: transparent;
  pointer-events: auto;
}

.cookie-panel {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 48px));
  padding: 1.45rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #ffffff 8%);
  border-radius: 28px;
  background: #242625;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  color: #f7fbfa;
  pointer-events: auto;
}

.cookie-banner h2 {
  margin-bottom: 0.55rem;
  font-size: 1.25rem;
}

.cookie-copy,
.cookie-help {
  margin: 0 0 1rem;
  color: #eff5f3;
  font-weight: 700;
  line-height: 1.45;
}

.cookie-help {
  color: rgba(247, 251, 250, 0.72);
  font-weight: 600;
  font-size: 0.95rem;
}

.cookie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-links a,
.legal-document a {
  color: var(--accent-2);
  font-weight: 800;
}

.cookie-copy a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cookie-legal-links {
  margin: -0.35rem 0 0.35rem;
}

.cookie-legal-links a {
  color: rgba(247, 251, 250, 0.78);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.cookie-view,
.cookie-details,
.cookie-options,
.cookie-actions,
.cookie-settings-actions {
  display: flex;
  gap: 0.5rem;
}

.cookie-view,
.cookie-details {
  flex-direction: column;
  width: 100%;
}

.cookie-options {
  flex-direction: column;
  margin: 0.35rem 0 0.65rem;
}

.cookie-options label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  flex: 1 1 13rem;
  min-height: 3.4rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.cookie-options strong {
  display: block;
  color: #ffffff;
}

.cookie-options small,
.cookie-options em {
  display: block;
  color: rgba(247, 251, 250, 0.72);
  font-style: normal;
  font-size: 0.84rem;
}

.cookie-actions {
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.cookie-actions button,
.cookie-settings-actions button {
  width: 100%;
  min-height: 3rem;
  color: #f7fbfa;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.cookie-actions button:hover,
.cookie-actions button:focus-visible,
.cookie-settings-actions button:hover,
.cookie-settings-actions button:focus-visible {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.13);
}

.footnote {
  max-width: 70rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
}

.legal-page {
  padding-top: 5.5rem;
}

.legal-document {
  width: min(58rem, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.legal-document h1 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 0.98;
}

.legal-document h2 {
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.legal-document h3 {
  margin-top: 1.1rem;
  margin-bottom: 0.45rem;
}

.legal-document p,
.legal-document li,
.legal-document dd {
  color: var(--muted);
}

.legal-document ul {
  padding-left: 1.2rem;
}

.legal-document dl {
  display: grid;
  grid-template-columns: minmax(8rem, 0.28fr) 1fr;
  gap: 0.55rem 1rem;
  margin: 1rem 0;
}

.legal-document dt {
  color: var(--text);
  font-weight: 800;
}

.legal-document dd {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 30;
  max-width: min(34rem, calc(100vw - 2rem));
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 1rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1050px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-self: start;
    overflow-x: auto;
    width: 100%;
  }

  .hero,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    align-self: auto;
    margin-bottom: 0;
  }

  .metric-strip,
  .snapshot-grid,
  .hub-grid,
  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-pages,
  .footer-legal {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 0.75rem;
  }

  .brand small {
    display: none;
  }

  .header-actions {
    gap: 0.4rem;
  }

  h1 {
    font-size: 3.1rem;
  }

  .hero,
  .tool-section {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .form-grid,
  .metrics,
  .metric-strip,
  .snapshot-grid,
  .hub-grid,
  .check-grid,
  .site-footer,
  .legal-list,
  .legal-document dl {
    grid-template-columns: 1fr;
  }

  .panel-title {
    display: grid;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab {
    flex: 0 0 auto;
  }

  .cookie-banner {
    inset: 0;
    max-height: none;
    overflow: visible;
    transform: none;
  }

  .cookie-panel {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-height: calc(100svh - 32px);
    overflow: auto;
    border-radius: 24px;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    background: #ffffff;
    color: #101820;
  }

  .topbar,
  .hero-visual,
  .hero-actions,
  .tabs,
  .compare-actions,
  .export-actions,
  .export-section,
  .site-footer,
  .legal-modal,
  .cookie-banner,
  .toast {
    display: none;
  }

  .hero,
  .tool-section,
  .summary-band {
    min-height: 0;
    padding: 1rem 0;
  }

  .hero,
  .tool-grid,
  .metric-strip,
  .snapshot-grid {
    grid-template-columns: 1fr;
  }

  .tab-panel {
    display: grid;
    break-inside: avoid;
  }

  .control-panel,
  .result-panel,
  .snapshot-card,
  .metric-strip {
    box-shadow: none;
  }
}
