:root {
  --ink: #13212b;
  --muted: #4a5c68;
  --paper: #f6f3ea;
  --card: #fffdf8;
  --line: #c9c0af;
  --signal: #0f7b6c;
  --signal-soft: #d8f0ea;
  --amber: #b86a1d;
  --amber-soft: #f5e5d3;
  --olive: #6e7f24;
  --olive-soft: #e6ecc9;
  --rose: #8a3d3a;
  --rose-soft: #f3dddd;
  --navy: #10202a;
  --sky: #d7ece8;
  --shadow: 0 14px 40px rgba(19,33,43,0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 0%, rgba(15,123,108,0.10), transparent 28%), linear-gradient(180deg, #f4efe4 0%, var(--paper) 38%, #f8f6f0 100%);
}

.frame {
  width: min(1320px, calc(100vw - 24px));
  margin: 12px auto 40px;
  border: 1px solid rgba(32,56,69,0.16);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,253,248,0.88);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(255,255,255,0.6);
  border-bottom: 1px solid rgba(32,56,69,0.12);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--signal), #154f59);
  color: white;
  display: grid;
  place-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.brand-title {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control-pill, .lang-btn, .ghost-btn {
  border-radius: 999px;
  border: 1px solid rgba(32,56,69,0.15);
  background: rgba(255,255,255,0.78);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(19,33,43,0.06);
}

.lang-btn {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  min-width: 48px;
}

.lang-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.ghost-btn {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
}

.fake-btn:disabled,
.ghost-btn:disabled,
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 560px;
  background: linear-gradient(135deg, rgba(19,33,43,0.98), rgba(24,50,62,0.95)), var(--navy);
  color: #f4f1ea;
  position: relative;
}

.hero::after {
  content: "IHK Benchmark";
  position: absolute;
  right: 28px;
  top: 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.55);
}

.hero-left {
  padding: 46px 42px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(244,241,234,0.12);
}

.hero-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ccdc5;
  margin: 0;
}

.status-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(156,205,197,0.12);
  border: 1px solid rgba(156,205,197,0.25);
  color: var(--sky);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 800;
  max-width: 11ch;
}

.subhead {
  max-width: 60ch;
  color: rgba(244,241,234,0.84);
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
}

.subhead a {
  color: #9393ef;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.hero-panels {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 26px;
}

.hero-panel, .meta-card, .micro-card, .dial-shell {
  border: 1px solid rgba(244,241,234,0.14);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255,255,255,0.04);
}

.panel-label, .meta-label, .micro-card .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.58);
  margin-bottom: 10px;
}

.panel-value {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff9ef;
}

.panel-value a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.panel-copy, .meta-note, .micro-card .copy {
  font-size: 14px;
  color: rgba(244,241,234,0.76);
  line-height: 1.6;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.hero-right-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 0;
}

.meta-value, .micro-card .value {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: #fff7ea;
}

.hero-right {
  padding: 34px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  align-content: start;
}

.mini-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(244,241,234,0.12);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
}

.mini-toolbar strong {
  display: block;
  font-size: 14px;
  color: #fff7ea;
  margin-bottom: 4px;
}

.mini-toolbar span {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(244,241,234,0.78);
}

.mini-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mini-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244,241,234,0.18);
  background: rgba(255,255,255,0.05);
  color: #f4f1ea;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.mini-btn.primary {
  background: rgba(15,123,108,0.22);
  border-color: rgba(15,123,108,0.40);
}

.mini-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,32,42,0.45);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}

.loader-overlay.active { display: flex; }

.loader-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(19,33,43,0.97), rgba(24,50,62,0.97));
  color: #f4f1ea;
  border: 1px solid rgba(244,241,234,0.12);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.32);
  text-align: center;
}

.loader-ring {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 6px solid rgba(244,241,234,0.12);
  border-top-color: var(--signal);
  border-right-color: var(--amber);
  animation: spin 1s linear infinite;
}

.loader-title {
  margin: 0 0 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.loader-copy {
  margin: 0;
  color: rgba(244,241,234,0.78);
  line-height: 1.6;
  font-size: 14px;
}

.dial-wrap {
  width: min(390px, 100%);
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(rgba(244,241,234,0.18) 0 100%);
  padding: 24px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 22px 70px rgba(0,0,0,0.28);
}

.dial-wrap::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(244,241,234,0.24);
}

.dial {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at center, #f6f3ea 0 52%, #1c3340 52% 53%, #12232d 53% 100%);
  display: grid;
  place-items: center;
  position: relative;
  text-align: center;
}

.dial-score {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(54px, 7vw, 94px);
  line-height: 0.88;
  color: #13212b;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.dial-caption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(11px, 1.5vw, 13px);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.35;
  max-width: 20ch;
  margin-left: auto;
  margin-right: auto;
}

.dial-foot, .score-band {
  margin-top: 14px;
  font-size: 14px;
  color: rgba(244,241,234,0.76);
  text-align: center;
  line-height: 1.6;
}

.score-band {
  font-weight: 700;
  color: #fff7ea;
}

.section { padding: 34px 40px 12px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

h2 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(28px, 3.3vw, 44px);
  line-height: 1;
}

.section-note {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.input-stage, .summary-grid {
  display: grid;
  gap: 16px;
}

.input-stage {
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.summary-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 24px;
}

.summary-box, .matrix-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}

.summary-box { min-height: 220px; }

.summary-box h3, .matrix-card h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-family: 'Manrope', sans-serif;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.pill.good { background: var(--signal-soft); color: var(--signal); }
.pill.mid { background: var(--amber-soft); color: var(--amber); }
.pill.low { background: var(--rose-soft); color: var(--rose); }
.pill.contradiction { background: #eadde9; color: #713b6d; }

.summary-box ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
  color: var(--ink);
}

.product-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
  margin-bottom: 14px;
}

.dropzone {
  border: 1.5px dashed rgba(32,56,69,0.25);
  background: linear-gradient(180deg, #fffefb, #fbf8f0);
  border-radius: 18px;
  padding: 22px;
}

.dropzone-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
}

.dropzone-copy {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
  margin-bottom: 14px;
}

.dropzone-actions, .select-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.programme-meta-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.meta-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meta-field input {
  width: 100%;
  border: 1px solid rgba(32,56,69,0.18);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.meta-field input:focus {
  outline: 2px solid rgba(15,123,108,0.22);
  border-color: var(--signal);
}

.meta-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.primary-action {
  margin-top: 14px;
  background: var(--signal);
  border-color: var(--signal);
  color: white;
}

.method-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: #fffefb;
}

.method-card h3 { margin: 0 0 10px; font-family: 'Manrope', sans-serif; }
.method-card p { margin: 8px 0 0; color: var(--muted); line-height: 1.7; }

.formula-card, .faq-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #f7faf7;
}

.formula-card h4 { margin: 0 0 10px; font: 800 16px 'Manrope', sans-serif; }
.formula-card code {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
  background: #10202a;
  color: #e8f5f1;
  font: 600 12px/1.55 'IBM Plex Mono', monospace;
  white-space: normal;
}
.formula-card code + code { margin-top: 7px; }

.faq-card summary {
  cursor: pointer;
  font: 800 15px 'Manrope', sans-serif;
  color: var(--ink);
}

.formula-details .formula-card {
  margin-top: 12px;
  border: none;
  padding: 0;
  background: transparent;
}

.disclaimer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
  line-height: 1.6;
}

.one-pager .disclaimer {
  margin-top: 10px;
  padding-top: 0;
  border-top: none;
  font-size: 11px;
}

.fake-btn, .select-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(32,56,69,0.14);
  background: white;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.matrix {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 13px 0;
  border-bottom: 1px solid rgba(215,209,196,0.6);
  vertical-align: top;
  line-height: 1.55;
}

tr:last-child td { border-bottom: none; }

.tag {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  cursor: pointer;
}

.tag:hover, .tag:focus-visible {
  filter: brightness(0.94);
  outline: none;
}

.tag-high { background: var(--signal-soft); color: var(--signal); }
.tag-mid-high { background: var(--olive-soft); color: var(--olive); }
.tag-mid { background: var(--amber-soft); color: var(--amber); }
.tag-low { background: var(--rose-soft); color: var(--rose); }

.bars {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.bar-label {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 7px;
}

.track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #ece6d8;
  overflow: hidden;
}

.fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d5b63, var(--signal));
}

.fill-high { background: linear-gradient(90deg, #0c5b50, var(--signal)); }
.fill-mid-high { background: linear-gradient(90deg, #55611c, var(--olive)); }
.fill-mid { background: linear-gradient(90deg, #8a5115, var(--amber)); }
.fill-low { background: linear-gradient(90deg, #6b2e2b, var(--rose)); }

.footer {
  padding: 0 40px 36px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(520px, calc(100vw - 36px));
  background: rgba(16,32,42,0.92);
  color: #f4f1ea;
  border: 1px solid rgba(244,241,234,0.14);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
  display: none;
  z-index: 50;
}

.toast strong { display:block; font-size: 13px; margin-bottom: 4px; }
.toast span { display:block; font-size: 12px; opacity: 0.9; line-height: 1.4; }

.inline-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(32,56,69,0.14);
  background: rgba(255,255,255,0.7);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.inline-status.good { border-color: rgba(15,123,108,0.25); background: rgba(216,240,234,0.7); }
.inline-status.warn { border-color: rgba(184,106,29,0.28); background: rgba(245,229,211,0.78); }
.inline-status.bad { border-color: rgba(138,61,58,0.25); background: rgba(243,221,221,0.75); }

.small-mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.64);
}

.score-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

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

.quote-trigger {
  border: 1px solid rgba(32,56,69,0.14);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}

.quote-trigger:hover {
  background: #f5f1e8;
}

.quote-trigger[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16,32,42,0.42);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(82vh, 900px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.22);
  padding: 22px;
}

.modal-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-title {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  font-size: 26px;
  line-height: 1.05;
}

.modal-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.modal-close {
  border: 1px solid rgba(32,56,69,0.14);
  background: white;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.modal-meta-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fffefb;
}

.modal-meta-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.modal-meta-value {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.criterion-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font: 700 11px 'IBM Plex Sans', sans-serif;
  line-height: 1.2;
}

.criterion-category.strong {
  color: var(--signal);
  background: var(--signal-soft);
}

.criterion-category.partial {
  color: var(--amber);
  background: var(--amber-soft);
}

.criterion-category.gap {
  color: var(--rose);
  background: var(--rose-soft);
}

.criterion-category.contradiction {
  color: #713b6d;
  background: #eadde9;
}

.modal-section {
  margin-top: 18px;
}

.modal-section h4 {
  margin: 0 0 10px;
  font-size: 16px;
  font-family: 'Manrope', sans-serif;
}

.reason-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
  line-height: 1.65;
}

.subrequirement-list {
  display: grid;
  gap: 9px;
}

.subrequirement-item {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) auto minmax(220px, 1.2fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: #fffefb;
}

.subrequirement-label { font-weight: 700; }
.subrequirement-reason { color: var(--muted); font-size: 12px; line-height: 1.45; }
.subrequirement-status {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.subrequirement-status.match { background: var(--signal-soft); color: var(--signal); }
.subrequirement-status.partial { background: var(--amber-soft); color: var(--amber); }
.subrequirement-status.gap { background: var(--rose-soft); color: var(--rose); }
.subrequirement-status.contradiction { background: #eadde9; color: #713b6d; }

.citation-list {
  display: grid;
  gap: 12px;
}

.evidence-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.evidence-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.evidence-column h5 {
  margin: 0;
  font: 800 14px 'Manrope', sans-serif;
}

.citation-reason {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rubric-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px;
  background: #fffefb;
  font-size: 12px;
}

.rubric-item strong { font-family: 'IBM Plex Mono', monospace; }
.transparency-card { width: min(620px, 100%); }
.transparency-copy { font-size: 18px; line-height: 1.7; }
.method-link { color: var(--signal); font-weight: 700; }

.one-pager { display: none; }

.citation-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fffefb;
}

.citation-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.citation-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.citation-side.ihk {
  background: var(--signal-soft);
  color: var(--signal);
}

.citation-side.program {
  background: var(--amber-soft);
  color: var(--amber);
}

.citation-page {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

.citation-quote {
  margin: 0;
  line-height: 1.7;
  color: var(--ink);
}

.empty-note {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

[data-lang] { display: none; }
html.lang-de [data-lang="de"] { display: revert; }
html.lang-en [data-lang="en"] { display: revert; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .hero,
  .summary-grid,
  .matrix,
  .hero-panels,
  .hero-meta,
  .hero-right-grid {
    grid-template-columns: 1fr;
  }

  .hero-left {
    border-right: none;
    border-bottom: 1px solid rgba(244,241,234,0.12);
  }
}

@media (max-width: 760px) {
  .frame { width: min(100vw - 12px, 100%); margin: 6px auto 20px; }
  .topbar, .hero-left, .hero-right, .section, .footer { padding-left: 18px; padding-right: 18px; }
  h1 { max-width: 100%; }
  .section-head, .topbar, .mini-toolbar { align-items: start; flex-direction: column; }
  .topbar-actions, .mini-actions { width: 100%; justify-content: flex-start; }
  .dial-wrap { width: min(320px, 100%); padding: 18px; }
  .dial-wrap::before { inset: 14px; }
  .dial-score { font-size: clamp(46px, 15vw, 74px); }
  .dial-caption { max-width: 18ch; }
  .modal-meta { grid-template-columns: 1fr; }
  .evidence-columns, .rubric-grid, .programme-meta-fields { grid-template-columns: 1fr; }
  .subrequirement-item { grid-template-columns: 1fr; }

  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  td { border: none; padding: 4px 0; }
  td::before {
    content: attr(data-label);
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 3px;
  }
}

@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body { background: white; }
  .frame, .toast, .loader-overlay, .modal-overlay { display: none !important; }
  .one-pager {
    display: block;
    color: #13212b;
    font-family: 'IBM Plex Sans', sans-serif;
  }
  .one-pager header {
    border-bottom: 4px solid var(--signal);
    padding-bottom: 16px;
    margin-bottom: 16px;
  }
  .one-pager header > p:first-child {
    font: 700 12px 'IBM Plex Mono', monospace;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--signal);
  }
  .one-pager h1 { margin: 8px 0; font-size: 30px; }
  .one-pager-source { font-weight: 700; }
  .one-pager-score { margin: 16px 0 4px; font: 800 54px 'Manrope', sans-serif; }
  .one-pager ol { margin: 0; padding: 0; list-style: none; }
  .one-pager li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #d8d2c6;
    font-size: 13px;
  }
  .one-pager footer { margin-top: 16px; color: #4a5c68; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
