body.plant-page {
  line-height: 1.5;
}

.shell {
  width: min(1160px, calc(100% - 24px));
  margin: 16px auto 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-panel);
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.actions a,
.actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surf2);
  text-decoration: none;
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.actions a:hover,
.actions button:hover {
  border-color: #9fb7ea;
  background: #eff6ff;
  color: var(--acc-strong);
}

.headline {
  margin-top: 14px;
  display: grid;
  gap: 4px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.plant-flag {
  display: inline-flex;
  width: 22px;
  height: 14px;
  border-radius: 3px;
  background: var(--surf2);
  border: 1px solid var(--line);
  overflow: hidden;
  vertical-align: middle;
}

.plant-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 3.8vw, 42px);
  line-height: 1.1;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.subtitle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.plant-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.plant-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
}

.quick-facts {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.qf-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surf2);
}

.qf-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.qf-value {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.loading,
.notfound {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.notfound h2 {
  color: var(--ink);
  margin-top: 0;
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card-head {
  padding: 16px 20px 6px;
}

.card-head h2 {
  margin: 0;
  font-size: 20px;
}

.card-subhead {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* Map */
.plant-map {
  height: 320px;
  margin: 8px 16px 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-note {
  margin: 0 20px 16px;
  font-size: 13px;
  color: var(--muted);
  background: #f8fafc;
  border-left: 3px solid var(--acc);
  padding: 8px 12px;
  border-radius: 6px;
}

/* Manual link (Standort card) */
.plant-manual-link {
  margin: 0 20px 16px;
  display: grid;
  gap: 8px;
}

.plant-manual-link[hidden] { display: none; }

.plant-manual-link .manual-link-mini-splash {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #e2e8f0;
}

.plant-manual-link .manual-link-mini-splash img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.plant-manual-link .manual-link-mini-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 10px;
  color: #1d4ed8;
  text-decoration: none;
}

.plant-manual-link .manual-link-mini-card:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.plant-manual-link .manual-link-mini-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 3px;
  border: 1px solid #dbeafe;
}

.plant-manual-link .manual-link-mini-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.plant-manual-link .manual-link-mini-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.plant-manual-link .manual-link-mini-text {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  line-height: 1.3;
}

.plant-manual-link .manual-link-mini-arrow {
  font-size: 16px;
  line-height: 1;
  color: #1d4ed8;
}

/* Lifecycle chart */
.lifecycle-card {
  padding-bottom: 14px;
}

.lc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 20px 16px;
}

.lc-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 12px;
  border: 1px solid;
  border-radius: 999px;
  white-space: nowrap;
}

.lc-stat-pill-construction {
  border-color: #fed7aa;
  background: #fff7ed;
}

.lc-stat-pill-operating {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.lc-stat-pill-operating.is-ongoing {
  border-color: #4ade80;
}

.lc-stat-pill-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.lc-footnote-mark {
  margin-left: 3px;
  font-size: 10px;
  line-height: 1;
  vertical-align: super;
  opacity: 0.85;
}

.lc-stat-pill-construction .lc-stat-pill-label { color: #92400e; }
.lc-stat-pill-operating    .lc-stat-pill-label { color: #166534; }

.lc-stat-pill-value {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.85);
}

.lc-stat-pill-construction .lc-stat-pill-value { color: #d97706; }
.lc-stat-pill-operating    .lc-stat-pill-value { color: #16a34a; }

.lc-stat-pill-hint {
  font-size: 10px;
  color: #6b7280;
  font-style: italic;
  padding-right: 4px;
}

.lifecycle-chart {
  padding: 12px 20px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.lc-hover-pointer {
  position: absolute;
  top: 12px;
  bottom: 22px;
  width: 0;
  border-left: 2px dashed rgba(15, 23, 42, 0.55);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  z-index: 3;
}

.lc-hover-pointer::before {
  content: attr(data-label);
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.lc-hover-pointer.is-visible {
  opacity: 1;
}

.lc-row {
  transition: opacity 0.12s ease;
}

.lifecycle-chart.is-hovering .lc-row:not(.is-focused):not(.lc-axis) {
  opacity: 0.4;
}

.lc-row.is-focused .lc-track {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.lc-row {
  display: grid;
  grid-template-columns: minmax(100px, 160px) 1fr;
  gap: 14px;
  align-items: center;
}

.lc-row.lc-axis {
  grid-template-columns: minmax(100px, 160px) 1fr;
  margin-top: 2px;
}

.lc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-name small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-top: 1px;
}

.lc-track {
  position: relative;
  height: 22px;
  background: repeating-linear-gradient(
    90deg,
    rgba(100, 116, 139, 0.08) 0 1px,
    transparent 1px 50px
  );
  border-radius: 7px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.lc-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(255,255,255,0.95);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: help;
  transition: filter 0.12s ease;
}

.lc-seg:hover,
.lc-seg.is-focused {
  filter: brightness(1.12);
  outline: 2px solid rgba(15, 23, 42, 0.9);
  outline-offset: -2px;
  z-index: 2;
}

.lc-seg-construction { background: var(--con); }
.lc-seg-operating    { background: var(--op); }
.lc-seg-suspended    { background: var(--sus); }
.lc-seg-shutdown     { background: var(--off); }
.lc-seg-decommissioned { background: var(--dec); }
.lc-seg-planned      { background: var(--pla); }
.lc-seg-review       { background: var(--rev); }
.lc-seg-future {
  background: repeating-linear-gradient(
    45deg,
    rgba(100, 116, 139, 0.28) 0 6px,
    rgba(100, 116, 139, 0.12) 6px 12px
  );
  color: var(--muted);
}

.lc-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: #0f172a;
  pointer-events: none;
}

.lc-marker::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #0f172a;
}

.lc-marker-today {
  background: var(--acc);
}

.lc-marker-today::before {
  background: var(--acc);
  box-shadow: 0 0 0 1px var(--acc);
}

.lc-axis-track {
  position: relative;
  height: 20px;
}

.lc-axis-tick {
  position: absolute;
  top: 0;
  font-size: 11px;
  color: var(--muted);
  transform: translateX(-50%);
  white-space: nowrap;
}

.lc-axis-tick::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 1px;
  height: 4px;
  background: var(--line);
}

.lifecycle-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 6px 20px 10px;
  font-size: 12px;
  color: var(--muted);
}

.lc-l {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lc-sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.lc-l-construction .lc-sw { background: var(--con); }
.lc-l-operating .lc-sw { background: var(--op); }
.lc-l-suspended .lc-sw { background: var(--sus); }
.lc-l-shutdown .lc-sw { background: var(--off); }
.lc-l-decommissioned .lc-sw { background: var(--dec); }
.lc-l-planned .lc-sw { background: var(--pla); }
.lc-l-future .lc-sw {
  background: repeating-linear-gradient(
    45deg,
    rgba(100, 116, 139, 0.28) 0 4px,
    rgba(100, 116, 139, 0.12) 4px 8px
  );
}

.lifecycle-milestones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding: 8px 20px 18px;
}

.ms-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.lifecycle-milestones:has(.ms-item.is-active) .ms-item:not(.is-active) {
  opacity: 0.4;
}

.ms-item:hover,
.ms-item:focus-visible,
.ms-item.is-active {
  border-color: var(--acc);
  background: #eff6ff;
  transform: translateY(-1px);
  outline: none;
}

.ms-year {
  font-size: 18px;
  font-weight: 800;
  color: var(--acc-strong);
  text-align: center;
}

.ms-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.ms-sub {
  font-size: 11px;
  color: var(--muted);
}

/* Units grid */
.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  padding: 10px 20px 16px;
}

.unit-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.unit-name {
  font-weight: 700;
  font-size: 14px;
}

.unit-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.unit-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
}

.unit-meta {
  font-size: 12px;
  color: var(--muted);
}

.unit-rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  row-gap: 4px;
  column-gap: 10px;
  margin-top: 6px;
  font-size: 12px;
}

.unit-rows dt {
  color: var(--muted);
}

.unit-rows dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

.unit-perf {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.unit-perf-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #eff6ff;
  border: 1px solid #bfd2fb;
  border-radius: 999px;
  font-size: 11px;
  color: #143f9f;
}

.units-table-wrap {
  margin: 0 20px 20px;
  padding: 0;
}

.units-table-wrap summary {
  padding: 10px 14px;
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.units-table-wrap[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.units-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background: #fff;
}

.units-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.units-table th,
.units-table td {
  padding: 7px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.units-table th {
  background: var(--surf2);
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.units-table tbody tr:last-child td {
  border-bottom: none;
}

/* Global comparison */
.global-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 0 20px 12px;
}

.gs-item {
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.gs-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.gs-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.global-bar-wrap {
  padding: 6px 20px 20px;
}

.global-bar-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.global-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gb-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.gb-row.is-current .gb-country {
  color: var(--acc-strong);
  font-weight: 700;
}

.gb-country {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gb-track {
  position: relative;
  height: 14px;
  border-radius: 4px;
  background: var(--surf2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.gb-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--acc) 0%, #60a5fa 100%);
}

.gb-row.is-current .gb-fill {
  background: linear-gradient(90deg, #0f766e, #10b981);
}

.gb-value {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Source card */
.source-body {
  padding: 10px 20px 20px;
  color: var(--muted);
  font-size: 13px;
}

.source-body p {
  margin: 0 0 6px;
}

.source-hint {
  font-size: 12px;
  color: var(--muted);
}

.source-footnote {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: pre-wrap;
}

.page-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.page-footer a {
  color: var(--muted);
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--acc);
}

@media (max-width: 640px) {
  .lc-row,
  .lc-row.lc-axis {
    grid-template-columns: 80px 1fr;
    gap: 8px;
  }
  .lc-name {
    font-size: 12px;
  }
  .gb-row {
    grid-template-columns: 110px 1fr 70px;
  }
}
