:root {
  color-scheme: light;
  --md-primary: #006d4f;
  --md-on-primary: #ffffff;
  --md-primary-container: #c7f4df;
  --md-on-primary-container: #002116;
  --md-secondary: #42665a;
  --md-secondary-container: #d5eee2;
  --md-tertiary: #24678b;
  --md-tertiary-container: #c8e6ff;
  --md-error: #ba1a1a;
  --md-error-container: #ffdad6;
  --md-warning: #8a5600;
  --md-warning-container: #ffddb0;
  --md-surface: #fbfdf9;
  --md-surface-container-lowest: #ffffff;
  --md-surface-container-low: #f4f7f2;
  --md-surface-container: #eef3ed;
  --md-surface-container-high: #e8ede7;
  --md-outline: rgba(25, 28, 25, 0.16);
  --md-outline-variant: rgba(25, 28, 25, 0.1);
  --md-state-hover: rgba(0, 109, 79, 0.08);
  --md-state-focus: rgba(36, 103, 139, 0.18);
  --md-state-pressed: rgba(0, 109, 79, 0.14);
  --canvas: var(--md-surface-container-low);
  --canvas-strong: var(--md-surface-container);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: var(--md-surface-container-lowest);
  --surface-muted: var(--md-surface-container);
  --surface-elevated: rgba(255, 255, 255, 0.78);
  --ink: #111815;
  --ink-soft: #37423c;
  --muted: #68766f;
  --line: var(--md-outline);
  --line-strong: rgba(25, 28, 25, 0.24);
  --green: var(--md-primary);
  --green-strong: #00513a;
  --green-soft: var(--md-primary-container);
  --blue: var(--md-tertiary);
  --blue-soft: var(--md-tertiary-container);
  --amber: var(--md-warning);
  --amber-soft: var(--md-warning-container);
  --red: var(--md-error);
  --red-soft: var(--md-error-container);
  --shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-control: 0 1px 0 rgba(255, 255, 255, 0.85) inset, 0 6px 18px rgba(16, 24, 40, 0.1);
  --radius: 8px;
  --radius-sm: 6px;
  --max: 1320px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  background:
    linear-gradient(180deg, rgba(251, 253, 249, 0.98) 0, rgba(244, 247, 242, 0.98) 340px, var(--canvas) 100%),
    linear-gradient(90deg, rgba(36, 103, 139, 0.055) 0 1px, transparent 1px 88px),
    linear-gradient(0deg, rgba(0, 109, 79, 0.048) 0 1px, transparent 1px 88px);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  line-height: 1.5;
  margin: 0;
  min-height: 100vh;
  text-rendering: geometricPrecision;
}

body::before {
  background: linear-gradient(90deg, transparent 0, rgba(7, 136, 95, 0.08) 22%, rgba(11, 99, 206, 0.08) 52%, transparent 100%);
  content: "";
  height: 1px;
  left: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 72px;
  z-index: 9;
}

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

.skip-link {
  background: var(--green);
  border-radius: var(--radius);
  color: var(--md-on-primary);
  font-weight: 760;
  left: 18px;
  min-height: 42px;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  top: 16px;
  transform: translateY(-12px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  z-index: 40;
}

.skip-link:focus-visible {
  opacity: 1;
  outline: 3px solid var(--md-state-focus);
  outline-offset: 2px;
  pointer-events: auto;
  transform: translateY(0);
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.topbar {
  align-items: center;
  background: color-mix(in srgb, var(--md-surface) 78%, transparent);
  backdrop-filter: blur(22px) saturate(1.35);
  border-bottom: 1px solid rgba(16, 24, 40, 0.1);
  display: grid;
  gap: 20px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 36px);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand-mark {
  align-items: center;
  background: linear-gradient(180deg, #fff, var(--md-primary-container));
  border: 1px solid rgba(0, 109, 79, 0.22);
  border-radius: var(--radius);
  color: var(--green);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand-mark svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

nav {
  align-items: center;
  display: flex;
  gap: 4px;
  justify-content: center;
  min-width: 0;
}

nav a {
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
  min-height: 44px;
  padding: 10px 15px;
  position: relative;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease);
  white-space: nowrap;
}

nav a:hover {
  background: var(--md-state-hover);
  box-shadow: none;
  color: var(--ink);
}

nav a[href="/standortanalyse/"] {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}

nav a[href="/standortanalyse/"]::after {
  background: var(--md-primary);
  border-radius: 999px;
  bottom: 5px;
  content: "";
  height: 3px;
  left: 18px;
  position: absolute;
  right: 18px;
}

.topbar-status {
  align-items: center;
  display: inline-flex;
  gap: 9px;
  justify-content: flex-end;
}

.status-dot {
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(7, 136, 95, 0.12);
  height: 8px;
  width: 8px;
}

.source-pill,
.panel-meta,
.visual-chip,
.risk-token {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  min-height: 32px;
  padding: 8px 12px;
  white-space: nowrap;
}

.source-pill {
  background: var(--md-tertiary-container);
  border-color: rgba(36, 103, 139, 0.22);
  color: var(--blue);
}

.source-pill.fallback {
  background: var(--md-warning-container);
  border-color: rgba(138, 86, 0, 0.24);
  color: #875300;
}

.source-pill.live {
  background: var(--md-primary-container);
  border-color: rgba(0, 109, 79, 0.24);
  color: var(--md-on-primary-container);
}

.shell {
  margin: 0 auto;
  max-width: var(--max);
  padding: 38px clamp(16px, 3vw, 28px) 72px;
}

.intro {
  display: grid;
  gap: 22px;
  margin-bottom: 18px;
}

.hero-panel {
  align-items: stretch;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 253, 249, 0.76));
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
  position: relative;
}

.hero-panel::before {
  background: linear-gradient(90deg, var(--md-primary), var(--md-tertiary), var(--md-warning));
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.hero-copy {
  align-self: center;
  max-width: 760px;
}

h1 {
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.98;
  overflow-wrap: normal;
}

.intro p {
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.45;
  margin-top: 16px;
  max-width: 680px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-facts div {
  background: var(--md-surface-container-lowest);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius);
  min-width: 128px;
  padding: 12px 14px;
}

.hero-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.hero-facts dd {
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.25;
  margin-top: 3px;
}

.hero-visual {
  background:
    linear-gradient(180deg, rgba(16, 24, 28, 0.94), rgba(22, 35, 43, 0.97)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 34px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 34px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 20px 54px rgba(16, 24, 40, 0.2);
  min-height: 234px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.visual-chip {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f2f7ff;
  position: relative;
  z-index: 2;
}

.hero-visual svg {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.grid-line {
  fill: none;
  stroke: #34d399;
  stroke-linecap: round;
  stroke-width: 4;
}

.grid-line.secondary {
  opacity: 0.78;
  stroke: #66a7ff;
}

.grid-line.tertiary {
  opacity: 0.64;
  stroke: #f8c34f;
  stroke-width: 3;
}

.node {
  fill: #e6efff;
  stroke: rgba(16, 24, 40, 0.88);
  stroke-width: 4;
}

.node.primary {
  fill: #34d399;
}

.node.accent {
  fill: #f8c34f;
}

.visual-stats {
  bottom: 18px;
  color: #e7eef8;
  position: absolute;
  right: 18px;
  text-align: right;
}

.visual-stats span,
.visual-stats strong {
  display: block;
}

.visual-stats span {
  color: #a7b4c8;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.visual-stats strong {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.1;
}

.search-panel,
.empty-state,
.loading-state,
.result-header,
.metric-card,
.panel,
.notice,
.error {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search-panel {
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: var(--shadow-control);
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 24px);
  position: relative;
}

.search-panel::before {
  background: linear-gradient(90deg, var(--md-primary), var(--md-tertiary));
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 24px;
  opacity: 0.72;
  position: absolute;
  right: 24px;
  top: 0;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 21px;
  font-weight: 760;
  line-height: 1.15;
}

.section-heading p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 5px;
}

.panel-meta {
  background: var(--md-secondary-container);
  border-color: rgba(66, 102, 90, 0.22);
  color: #102019;
}

.search-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 150px auto;
}

label span {
  color: var(--ink-soft);
  display: block;
  font-size: 13px;
  font-weight: 720;
  margin-bottom: 7px;
}

input,
select,
button {
  border-radius: 999px;
  min-height: 52px;
}

input,
select {
  background: var(--md-surface-container-lowest);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  min-width: 0;
  padding: 0 18px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease);
  width: 100%;
}

input:hover,
select:hover {
  border-color: rgba(25, 28, 25, 0.38);
}

input:focus,
select:focus {
  background: #fff;
  border-color: var(--md-tertiary);
  box-shadow: 0 0 0 4px var(--md-state-focus);
  outline: none;
}

button {
  align-items: center;
  background: var(--md-primary);
  border: 0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18);
  color: var(--md-on-primary);
  cursor: pointer;
  display: inline-flex;
  font-weight: 760;
  gap: 8px;
  justify-content: center;
  overflow: hidden;
  padding: 0 18px;
  position: relative;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), filter 160ms var(--ease);
  white-space: nowrap;
}

button::after {
  background: currentColor;
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 140ms var(--ease);
}

button:hover {
  box-shadow: 0 2px 4px rgba(16, 24, 40, 0.18), 0 10px 20px rgba(0, 109, 79, 0.16);
  filter: brightness(1.02);
  transform: translateY(-1px);
}

button:hover::after {
  opacity: 0.08;
}

button:active {
  transform: translateY(0);
}

button:active::after {
  opacity: 0.14;
}

button:disabled {
  cursor: wait;
  filter: grayscale(0.1);
  opacity: 0.72;
  transform: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--md-state-focus);
  outline-offset: 2px;
}

button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 18px;
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.examples button {
  background: var(--md-surface-container-lowest);
  border: 1px solid var(--md-outline);
  border-radius: 999px;
  box-shadow: none;
  color: var(--md-on-primary-container);
  font-size: 13px;
  font-weight: 720;
  min-height: 48px;
  padding: 0 14px;
}

.examples button:hover {
  background: var(--md-primary-container);
  border-color: rgba(0, 109, 79, 0.24);
  box-shadow: none;
}

.examples button.is-selected {
  background: var(--md-primary-container);
  border-color: rgba(0, 109, 79, 0.28);
  color: var(--md-on-primary-container);
}

.examples button.is-selected::before {
  content: "";
  border: 2px solid currentColor;
  border-left: 0;
  border-top: 0;
  display: inline-block;
  height: 8px;
  margin-right: 2px;
  transform: rotate(45deg) translateY(-1px);
  width: 4px;
}

.results {
  display: grid;
  gap: 18px;
}

.overline {
  color: var(--green-strong);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.empty-state {
  align-items: center;
  background: linear-gradient(180deg, var(--md-surface-container-lowest), var(--md-surface-container-low));
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  min-height: 280px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 38px);
}

.empty-copy h2 {
  color: var(--ink);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.05;
  margin-top: 10px;
}

.empty-copy p {
  font-size: 16px;
  margin-top: 10px;
  max-width: 580px;
}

.empty-graphic {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), color-mix(in srgb, var(--md-primary-container) 68%, white)),
    linear-gradient(90deg, rgba(16, 24, 40, 0.06) 0 1px, transparent 1px 32px),
    linear-gradient(0deg, rgba(16, 24, 40, 0.06) 0 1px, transparent 1px 32px);
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: var(--radius);
  min-height: 180px;
  overflow: hidden;
  position: relative;
}

.empty-graphic svg {
  inset: 0;
  position: absolute;
}

.empty-graphic path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 5;
}

.empty-grid-a {
  stroke: var(--blue);
}

.empty-grid-b {
  stroke: var(--green);
}

.empty-graphic circle {
  fill: #fff;
  stroke: var(--green);
  stroke-width: 5;
}

.empty-metric {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: var(--radius-sm);
  height: 44px;
  position: absolute;
  width: 96px;
}

.empty-metric.one {
  left: 22px;
  top: 18px;
}

.empty-metric.two {
  bottom: 20px;
  right: 20px;
  width: 118px;
}

.loading-state {
  background: var(--md-surface-container-lowest);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 18px;
  padding: 24px;
}

.loading-cluster {
  display: grid;
  gap: 9px;
}

.loading-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.loading-line {
  animation: pulse 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, #e4e9f0, #f8fafc, #e4e9f0);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  height: 17px;
}

.loading-line.short {
  width: 38%;
}

.loading-line.medium {
  width: 64%;
}

@keyframes pulse {
  0% { background-position: 0% 50%; }
  100% { background-position: -200% 50%; }
}

.result-header {
  align-items: center;
  background: linear-gradient(180deg, var(--md-surface-container-lowest), var(--md-surface-container-low));
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  padding: clamp(20px, 3vw, 28px);
}

.result-location {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 58px minmax(0, 1fr);
}

.location-pin {
  align-items: center;
  background: var(--md-primary-container);
  border: 1px solid rgba(0, 109, 79, 0.24);
  border-radius: 999px;
  color: var(--md-on-primary-container);
  display: inline-flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.location-pin svg {
  fill: none;
  height: 28px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 28px;
}

.result-location h2 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.05;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.result-location p {
  color: var(--ink-soft);
  max-width: 760px;
  overflow-wrap: anywhere;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.meta-line span {
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  padding: 6px 8px;
}

.score-panel {
  align-items: center;
  background: linear-gradient(180deg, var(--md-surface-container-lowest), var(--md-surface-container));
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius);
  display: grid;
  gap: 18px;
  grid-template-columns: 128px minmax(0, 1fr);
  padding: 16px;
}

.score-ring {
  align-items: center;
  aspect-ratio: 1;
  background: conic-gradient(var(--ring-color, var(--blue)) calc(var(--score, 0) * 1%), var(--md-surface-container-high) 0);
  border-radius: 50%;
  display: grid;
  justify-items: center;
  padding: 9px;
}

.score-ring-inner {
  align-items: center;
  background: var(--md-surface-container-lowest);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.score-ring strong {
  font-size: 31px;
  font-weight: 760;
  line-height: 1;
}

.score-ring span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.verdict-block {
  min-width: 0;
}

.verdict-block h3 {
  font-size: 22px;
  line-height: 1.12;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.risk-token {
  background: var(--md-tertiary-container);
  border-color: rgba(11, 99, 206, 0.2);
  color: var(--blue);
  max-width: 100%;
  white-space: normal;
}

.risk-token.low {
  background: var(--md-primary-container);
  border-color: rgba(7, 136, 95, 0.22);
  color: var(--green-strong);
}

.risk-token.medium {
  background: var(--amber-soft);
  border-color: rgba(184, 107, 0, 0.22);
  color: #875300;
}

.risk-token.high {
  background: var(--red-soft);
  border-color: rgba(196, 50, 43, 0.22);
  color: var(--red);
}

.metric-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  background: var(--md-surface-container-lowest);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  min-width: 0;
  padding: 16px;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}

.metric-card:hover {
  background: var(--md-surface-container-low);
  border-color: rgba(0, 109, 79, 0.2);
  transform: translateY(-1px);
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.metric-card strong {
  color: var(--ink);
  display: block;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 760;
  line-height: 1.08;
  margin-top: 9px;
  overflow-wrap: anywhere;
}

.analysis-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
}

.analysis-main,
.analysis-rail {
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--md-surface-container-lowest);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 22px rgba(16, 24, 40, 0.045);
  overflow: hidden;
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.panel:hover {
  border-color: rgba(0, 109, 79, 0.18);
  box-shadow: 0 2px 4px rgba(16, 24, 40, 0.06), 0 12px 28px rgba(16, 24, 40, 0.06);
}

.panel-header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 18px;
  position: relative;
}

.panel-header h3 {
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
}

.panel-header p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  max-width: 560px;
}

.panel-number {
  background: var(--md-primary-container);
  border-radius: 999px;
  color: var(--md-on-primary-container);
  font-size: 15px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.mix-bars {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.mix-row {
  display: grid;
  gap: 7px;
}

.mix-row header {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.mix-row strong {
  font-size: 15px;
}

.mix-row span,
.mix-row small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.bar-track {
  background: var(--md-surface-container-high);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: inherit;
  height: 100%;
  min-width: 3px;
}

.mix-row.wind .bar-fill { background: linear-gradient(90deg, #0b63ce, #66a7ff); }
.mix-row.solar .bar-fill { background: linear-gradient(90deg, #e8a100, #f8c34f); }
.mix-row.biomass .bar-fill { background: linear-gradient(90deg, #07885f, #34d399); }
.mix-row.storage .bar-fill { background: linear-gradient(90deg, #46566d, #8b9ab0); }
.mix-row.gas .bar-fill,
.mix-row.thermal .bar-fill { background: linear-gradient(90deg, #b86b00, #dc8a14); }

.network-panel {
  background:
    linear-gradient(180deg, rgba(16, 24, 28, 0.98), rgba(21, 34, 42, 0.98)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 30px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 30px);
  border: 0;
  color: #f8fbff;
}

.network-panel .panel-header {
  border-color: rgba(255, 255, 255, 0.12);
}

.network-panel .panel-header p {
  color: #b6c2d3;
}

.network-map {
  min-height: 224px;
  position: relative;
}

.network-map svg {
  inset: 0;
  position: absolute;
}

.network-legend {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #d9e2ef;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 18px 16px;
}

.network-legend span {
  align-items: center;
  display: inline-flex;
  font-size: 12px;
  font-weight: 720;
  gap: 7px;
}

.legend-line {
  border-radius: 999px;
  display: inline-block;
  height: 3px;
  width: 22px;
}

.legend-line.green { background: #34d399; }
.legend-line.blue { background: #66a7ff; }
.legend-line.amber { background: #f8c34f; }

.table-list {
  display: grid;
}

.table-list.compact .row {
  padding-block: 12px;
}

.row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-width: 0;
  padding: 14px 18px;
  transition: background-color 140ms var(--ease);
}

.row:hover {
  background: var(--md-state-hover);
}

.row:last-child {
  border-bottom: 0;
}

.row strong {
  display: block;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.row small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.row-icon {
  background: var(--md-tertiary-container);
  border: 1px solid rgba(36, 103, 139, 0.22);
  border-radius: 999px;
  height: 28px;
  position: relative;
  width: 28px;
}

.row-icon::before,
.row-icon::after {
  content: "";
  position: absolute;
}

.row-icon::before {
  background: currentColor;
  border-radius: 50%;
  color: var(--blue);
  height: 7px;
  left: 10px;
  top: 6px;
  width: 7px;
}

.row-icon::after {
  border: 2px solid currentColor;
  border-left: 0;
  border-top: 0;
  color: var(--blue);
  height: 7px;
  left: 9px;
  top: 12px;
  transform: rotate(45deg);
  width: 7px;
}

.row-icon.solar,
.row-icon.biomass,
.operator-icon {
  background: var(--md-primary-container);
  border-color: rgba(0, 109, 79, 0.2);
  color: var(--green);
}

.row-icon.wind {
  color: var(--blue);
}

.row-icon.storage,
.flexibility-icon {
  background: var(--md-warning-container);
  border-color: rgba(184, 107, 0, 0.2);
  color: var(--amber);
}

.badge {
  align-self: center;
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  max-width: 170px;
  overflow-wrap: anywhere;
  padding: 5px 8px;
  text-align: center;
}

.empty-row {
  color: var(--muted);
  font-size: 14px;
  padding: 16px 18px;
}

.capacity-list {
  display: grid;
}

.capacity-list div {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 13px 18px;
  transition: background-color 140ms var(--ease);
}

.capacity-list div:hover {
  background: var(--md-state-hover);
}

.capacity-list div:last-child {
  border-bottom: 0;
}

.capacity-list span {
  color: var(--muted);
  font-size: 13px;
}

.capacity-list strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
  text-align: right;
}

.action-list {
  display: grid;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.action-list li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 13px 18px;
  transition: background-color 140ms var(--ease);
}

.action-list li:hover {
  background: var(--md-state-hover);
}

.action-list li:last-child {
  border-bottom: 0;
}

.action-list span {
  align-items: center;
  background: var(--md-primary-container);
  border-radius: 999px;
  color: var(--md-on-primary-container);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.action-list strong {
  color: var(--ink-soft);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.muted-copy {
  color: var(--muted);
  padding: 16px 18px;
}

.notice {
  align-items: start;
  background: var(--amber-soft);
  color: #784900;
  display: grid;
  gap: 7px;
  padding: 14px 16px;
}

.notice strong {
  font-size: 13px;
  text-transform: uppercase;
}

.notice span,
.notice {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.error {
  background: var(--red-soft);
  color: #8c1f1a;
  padding: 16px;
}

.site-footer {
  background: linear-gradient(180deg, #10251d 0%, #071611 100%);
  border-top: 1px solid rgba(128, 209, 174, 0.18);
  color: rgba(255, 255, 255, 0.82);
  overflow: hidden;
  padding: 48px max(18px, calc((100vw - 1180px) / 2)) 28px;
  position: relative;
}

.site-footer::before {
  background: linear-gradient(90deg, transparent, rgba(94, 234, 178, 0.65), rgba(96, 165, 250, 0.38), transparent);
  content: "";
  height: 1px;
  inset: 0 0 auto;
  position: absolute;
}

.footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(170px, 1fr));
}

.site-footer section {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  min-width: 0;
  padding: 18px;
}

.site-footer section:first-child {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(94, 234, 178, 0.18);
}

.site-footer h2 {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.25;
  margin-bottom: 14px;
}

.site-footer p,
.site-footer li,
.footer-meta {
  color: rgba(226, 232, 240, 0.74);
  font-size: 0.9rem;
  line-height: 1.62;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: rgba(226, 232, 240, 0.74);
  overflow-wrap: anywhere;
  transition: color 160ms var(--ease), text-decoration-color 160ms var(--ease);
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(128, 209, 174, 0.64);
  text-underline-offset: 3px;
}

.footer-meta {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 22px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(16, 24, 40, 0.28);
    --line-strong: rgba(16, 24, 40, 0.4);
    --muted: #475467;
  }

  .topbar,
  .search-panel,
  .hero-panel {
    background: #fff;
    backdrop-filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .search-panel,
  .hero-panel {
    background: #fff;
    backdrop-filter: none;
  }
}

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

  nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .hero-panel,
  .result-header,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 220px;
  }

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

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body::before {
    top: 0;
  }

  .topbar {
    align-items: start;
    gap: 12px;
    min-height: 0;
    padding: 14px 16px;
    position: static;
  }

  .topbar-status {
    justify-self: end;
  }

  .shell {
    padding: 24px 14px 52px;
  }

  nav {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .hero-panel {
    padding: 22px;
  }

  h1 {
    font-size: clamp(30px, 8.4vw, 40px);
    word-break: keep-all;
  }

  .section-heading,
  .search-form,
  .empty-state,
  .result-location,
  .score-panel {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 9px;
  }

  .search-form {
    align-items: stretch;
  }

  .empty-state {
    min-height: 0;
  }

  .metric-strip,
  .loading-grid {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .row .badge {
    grid-column: 2;
    justify-self: start;
  }

  .site-footer {
    padding: 38px 14px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .brand small,
  .panel-meta,
  .topbar-status .status-dot {
    display: none;
  }

  nav a {
    font-size: 13px;
    padding-inline: 9px;
  }

  .source-pill {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-header,
  .panel-header {
    padding-inline: 14px;
  }
}
