/* TVP — Mixture vapor pressure
   Visual language borrowed from the vibe.dklu.eu.org portal (dark glass, orange accent). */

:root {
  --bg-from: #0d0d1a;
  --bg-to: #0a1628;
  --accent: #fb923c;
  --accent2: #f59e0b;
  --accent-soft: rgba(251, 146, 60, 0.14);
  --teal: #2dd4bf;
  --blue: #6c8ef5;
  --red: #f87171;
  --green: #4ade80;
  --glass-bg: rgba(255 255 255 / 0.045);
  --glass-hover: rgba(255 255 255 / 0.08);
  --glass-border: rgba(255 255 255 / 0.10);
  --text-primary: #e8ecf4;
  --text-secondary: #8b9cc8;
  --text-dim: #64748b;
  --radius: 18px;
  --radius-sm: 10px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-to) 100%);
  color: var(--text-primary);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 18% 12%, rgba(251, 146, 60, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 84% 78%, rgba(108, 142, 245, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.8rem 1.4rem 4rem;
}

/* ── Nav ─────────────────────────────────────────────────────── */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  transition: all var(--transition);
}
.back-btn:hover { background: var(--glass-hover); color: var(--text-primary); }

.nav-shortcuts { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }

/* ── Header ──────────────────────────────────────────────────── */
header { text-align: center; margin-bottom: 2.4rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.logo-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  box-shadow: 0 0 26px rgba(251, 146, 60, 0.35);
}
.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
header h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.7rem; }
header p { color: var(--text-secondary); max-width: 720px; margin: 0 auto; }

.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── Cards ───────────────────────────────────────────────────── */
main { display: flex; flex-direction: column; gap: 1.4rem; }

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.5rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  scroll-margin-top: 1rem;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.card-head h2 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(251, 146, 60, 0.3);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}
.card-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Controls ────────────────────────────────────────────────── */
input, select, button, textarea { font: inherit; color: inherit; }

input[type="text"], input[type="number"], input[type="search"], select {
  background: rgba(10, 16, 30, 0.65);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 0;
}
input:focus, select:focus {
  border-color: rgba(251, 146, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12);
}
input[type="number"] { font-family: var(--mono); }
select { cursor: pointer; }
select option { background: #101a2c; color: var(--text-primary); }

.btn {
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  padding: 0.42rem 0.95rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:hover { background: var(--glass-hover); border-color: rgba(255, 255, 255, 0.2); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #1a1003;
  font-weight: 650;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { color: var(--text-secondary); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.tiny { padding: 0.2rem 0.55rem; font-size: 0.74rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-secondary); }
.field-row { display: flex; gap: 0.4rem; align-items: center; }
.field-row input { flex: 1 1 auto; }
.field.inline { max-width: 260px; margin-bottom: 1rem; }

.cond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.sweep-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 1rem; }

.hint { color: var(--text-dim); font-size: 0.78rem; margin-top: 0.65rem; line-height: 1.5; }
.small { font-size: 0.82rem; color: var(--text-secondary); }
.unit-static { color: var(--text-secondary); font-size: 0.85rem; padding: 0 0.2rem; }

/* ── Search ──────────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-field { display: flex; align-items: center; gap: 0.5rem; }
.search-icon { position: absolute; left: 0.75rem; font-size: 0.9rem; opacity: 0.55; pointer-events: none; }
#search {
  width: 100%;
  padding-left: 2.3rem;
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
  border-radius: 12px;
}

.results {
  position: absolute;
  z-index: 30;
  left: 0; right: 0;
  top: calc(100% + 0.35rem);
  max-height: 380px;
  overflow-y: auto;
  background: #0e1728;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  padding: 0.35rem;
}
.result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: background var(--transition);
}
.result:hover, .result.active { background: rgba(251, 146, 60, 0.14); }
.result-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.result-name { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { font-size: 0.73rem; color: var(--text-secondary); font-family: var(--mono); }
.result-range { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; font-family: var(--mono); }
.result-empty { padding: 0.9rem; text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* ── Mixture table ───────────────────────────────────────────── */
.mix-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }

.mix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 110px 34px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.mix-name { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.mix-name strong { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-name span { font-size: 0.74rem; color: var(--text-secondary); font-family: var(--mono); }
.mix-x { display: flex; flex-direction: column; gap: 0.15rem; }
.mix-x label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.mix-x input { width: 100%; text-align: right; }
.mix-pct { font-family: var(--mono); font-size: 0.82rem; color: var(--teal); text-align: right; }

.mix-sum {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding-left: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.mix-sum b { font-family: var(--mono); color: var(--teal); font-weight: 600; }
.mix-sum.off b { color: var(--accent); }
.mix-sum .note { color: var(--text-dim); }
.mix-remove {
  background: none; border: none; cursor: pointer; color: var(--text-dim);
  font-size: 1.05rem; line-height: 1; padding: 0.2rem; border-radius: 8px;
  transition: all var(--transition);
}
.mix-remove:hover { color: var(--red); background: rgba(248, 113, 113, 0.12); }

.mix-empty {
  margin-top: 1rem;
  padding: 1.6rem 1rem;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 0.87rem;
}

/* ── Result panel ────────────────────────────────────────────── */
.big-result {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(108, 142, 245, 0.07));
  border: 1px solid rgba(251, 146, 60, 0.24);
  margin-bottom: 1.1rem;
}
.big-value { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.big-value .unit { font-size: 1.05rem; font-weight: 600; color: var(--accent); margin-left: 0.35rem; }
.big-label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 0.25rem; }
.big-alt { display: flex; gap: 1.1rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.83rem; color: var(--text-secondary); }
.big-alt b { color: var(--text-primary); font-weight: 600; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; margin-bottom: 1.1rem; }
.kpi {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
}
.kpi-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-secondary); }
.kpi-value { font-family: var(--mono); font-size: 1rem; margin-top: 0.15rem; }
.kpi-value.small { font-size: 0.85rem; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
thead th {
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: right;
  padding: 0.5rem 0.65rem;
  white-space: nowrap;
}
thead th:first-child { text-align: left; }
tbody td {
  padding: 0.45rem 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  text-align: right;
  font-family: var(--mono);
  white-space: nowrap;
}
tbody td:first-child { text-align: left; font-family: inherit; white-space: normal; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
td.num { font-variant-numeric: tabular-nums; }
td .sub { display: block; font-size: 0.72rem; color: var(--text-dim); font-family: var(--mono); }
.col-ref { color: var(--accent); }
.row-warn td { background: rgba(248, 113, 113, 0.07); }

/* ── Steps ───────────────────────────────────────────────────── */
.steps { margin-top: 1.2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid rgba(251, 146, 60, 0.5);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}
.step h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--accent); margin-bottom: 0.45rem; font-weight: 700; }
.step .line {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
  padding: 0.1rem 0;
}
.step .line .muted { color: var(--text-dim); }
.step .note { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.35rem; }
.step .intermediate { color: var(--teal); }

/* ── Warnings / callouts ─────────────────────────────────────── */
.callout {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  margin-top: 0.9rem;
  border: 1px solid;
  line-height: 1.55;
}
.callout.warn { background: rgba(251, 191, 36, 0.09); border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }
.callout.bad { background: rgba(248, 113, 113, 0.09); border-color: rgba(248, 113, 113, 0.3); color: #fecaca; }
.callout.ok { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.28); color: #bbf7d0; }
.callout.info { background: rgba(108, 142, 245, 0.09); border-color: rgba(108, 142, 245, 0.3); color: #c7d2fe; }
.callout strong { color: inherit; }
.callout ul { margin: 0.35rem 0 0 1.1rem; }
.callout li { margin-top: 0.2rem; }

/* ── Chart ───────────────────────────────────────────────────── */
.chart-wrap { margin: 0.4rem 0 1rem; }
#chart { width: 100%; height: 320px; display: block; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: 0.78rem; color: var(--text-secondary); }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }

/* ── Custom component form ───────────────────────────────────── */
.custom-comp { margin-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 0.8rem; }
.custom-comp summary { cursor: pointer; font-size: 0.84rem; color: var(--text-secondary); }
.custom-comp summary:hover { color: var(--text-primary); }
.custom-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-top: 0.85rem;
  align-items: end;
}
.custom-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.74rem; color: var(--text-secondary); }
.custom-form button { grid-column: 1 / -1; justify-self: start; }

/* ── Validation ──────────────────────────────────────────────── */
.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 0.5rem;
  align-items: start;
}
.check .badge {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
}
.check.pass .badge { background: rgba(74, 222, 128, 0.16); color: var(--green); }
.check.fail .badge { background: rgba(248, 113, 113, 0.16); color: var(--red); }
.check-title { font-size: 0.87rem; font-weight: 600; }
.check-body { font-size: 0.8rem; color: var(--text-secondary); font-family: var(--mono); margin-top: 0.15rem; }

/* ── Method section ──────────────────────────────────────────── */
.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.8rem; }
.method-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}
.method-block h3 { font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--accent); }
.method-block p { font-size: 0.8rem; color: var(--text-secondary); }
.eq {
  font-family: var(--mono);
  color: var(--text-primary) !important;
  font-size: 0.8rem !important;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.45rem;
  white-space: nowrap;
  overflow-x: auto;
}

.plain-list { margin: 0.6rem 0 0.8rem 1.2rem; color: var(--text-secondary); font-size: 0.87rem; }
.plain-list li { margin-bottom: 0.2rem; }

footer {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.6rem;
  transform: translate(-50%, 1.5rem);
  background: #101a2c;
  border: 1px solid rgba(251, 146, 60, 0.35);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.83rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .mix-row { grid-template-columns: minmax(0, 1fr) 92px 34px; }
  .mix-row .mix-pct { display: none; }
  .page { padding: 1.2rem 0.9rem 3rem; }
  .big-alt { font-size: 0.78rem; }
}

@media print {
  body { background: #fff; color: #111; }
  .nav-bar, footer, .search-wrap, .card-head-actions, .custom-comp, #sec-sweep .chart-wrap { display: none; }
  .card { border: 1px solid #ccc; background: none; break-inside: avoid; }
  .step, .kpi, .big-result, .method-block, .callout { background: none; }
}

/* ── Offscreen PDF export stage (print-friendly light theme, web layout) ── */
.pdf-stage {
  position: fixed;
  left: -99999px;
  top: 0;
  width: 1120px;
  padding: 28px 32px 24px;
  background: #ffffff;
  color: #0f172a;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  --accent: #c2410c;
  --accent2: #d97706;
  --accent-soft: #fff7ed;
  --teal: #0f766e;
  --blue: #1d4ed8;
  --red: #b91c1c;
  --green: #15803d;
  --glass-bg: #ffffff;
  --glass-hover: #f8fafc;
  --glass-border: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-dim: #64748b;
  pointer-events: none;
  z-index: -1;
}
.pdf-stage .pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid #cbd5e1;
}
.pdf-stage .pdf-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.pdf-stage .pdf-logo-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ea580c, #d97706);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.pdf-stage .pdf-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.15;
}
.pdf-stage .pdf-subtitle {
  font-size: 0.78rem;
  color: #475569;
}
.pdf-stage .pdf-meta {
  text-align: right;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: #475569;
  line-height: 1.45;
}
.pdf-stage .card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.pdf-stage .card-head h2 { color: #0f172a; }
.pdf-stage .step-num {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #c2410c;
}
.pdf-stage .card-head-actions { display: none; }
.pdf-stage .big-result {
  background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
  border: 1px solid #fdba74;
}
.pdf-stage .big-value { font-size: 2.55rem; color: #0f172a; }
.pdf-stage .big-value .unit { color: #c2410c; }
.pdf-stage .big-label { color: #475569; }
.pdf-stage .big-alt { font-size: 0.83rem; color: #475569; }
.pdf-stage .big-alt b { color: #0f172a; }
.pdf-stage .kpi {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}
.pdf-stage .kpi-label { color: #475569; }
.pdf-stage .kpi-value { color: #0f172a; font-weight: 600; }
.pdf-stage .callout.info { background: #eff6ff; border-color: #93c5fd; color: #1e3a8a; }
.pdf-stage .callout.warn { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.pdf-stage .callout.bad { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.pdf-stage .callout.ok { background: #f0fdf4; border-color: #86efac; color: #166534; }
.pdf-stage .step-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.95rem 0 0.5rem;
}
.pdf-stage .table-scroll {
  overflow: visible;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}
.pdf-stage table { font-size: 0.76rem; }
.pdf-stage thead th {
  padding: 0.42rem 0.45rem;
  background: #f1f5f9;
  color: #334155;
  border-bottom: 1px solid #cbd5e1;
}
.pdf-stage tbody td {
  padding: 0.4rem 0.45rem;
  border-top: 1px solid #e2e8f0;
  color: #0f172a;
}
.pdf-stage td .sub { color: #64748b; }
.pdf-stage .col-ref { color: #c2410c; font-weight: 600; }
.pdf-stage .row-warn td { background: #fef2f2; }
.pdf-stage .step {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 3px solid #ea580c;
}
.pdf-stage .step h4 { color: #c2410c; }
.pdf-stage .step .line {
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #0f172a;
}
.pdf-stage .step .line .muted { color: #475569; font-weight: 600; }
.pdf-stage .step .intermediate { color: #0f766e; font-weight: 600; }
.pdf-stage .step .note { color: #475569; }
.pdf-stage .pdf-footer {
  margin-top: 0.9rem;
  padding-top: 0.6rem;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.73rem;
  color: #475569;
}
