:root {
  --navy-dark: var(--slate-900);
  --navy: var(--brand);
  --navy-light: var(--brand-mid);
  --orange: var(--accent);
  --orange-hover: var(--accent);
  --orange-light: var(--accent-light);







  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px color-mix(in srgb, var(--brand) 6%, transparent);
  --shadow-md: 0 8px 24px color-mix(in srgb, var(--brand) 10%, transparent);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--slate-50);
  color: var(--slate-900);
  line-height: 1.6;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* HERO */
.calc-hero {
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--brand) 60%, var(--brand-mid) 100%);
  color: var(--surface);
  padding: 60px 0 46px;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--cta);
}
.calc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(color-mix(in srgb, var(--surface) 3%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in srgb, var(--surface) 3%, transparent) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.calc-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.calc-hero h1 span { color: var(--cta); }
.calc-hero p {
  color: var(--slate-300);
  font-size: 1.05rem;
  max-width: 760px;
  margin-bottom: 24px;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tag {
  background: color-mix(in srgb, var(--surface) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--surface) 12%, transparent);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--slate-200);
}

/* LAYOUT */
.calc-wrapper { padding: 40px 0 60px; }
.calc-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 992px) {
  .calc-grid { grid-template-columns: 1fr; }
}

/* CARDS */
.card-box {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 28px;
}
.card-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--slate-100);
  padding-bottom: 16px;
  margin-bottom: 22px;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* FORM STYLES */
.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.pill-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.2s;
}
.pill-btn:hover, .pill-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--surface);
}

.form-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 600px) {
  .form-group-grid { grid-template-columns: 1fr; }
}
.form-field { margin-bottom: 16px; }
.form-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label small { color: var(--slate-600); font-weight: 400; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--slate-900);
  background: var(--surface);
  transition: border-color 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--cta);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.unit-toggle {
  display: flex;
  background: var(--slate-100);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.unit-opt {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  border-radius: 8px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.2s;
}
.unit-opt.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--black) 6%, transparent);
}

/* RESULTS PANEL */
.result-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.stat-card.featured {
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-mid) 100%);
  color: var(--surface);
  border-color: var(--brand);
}
.stat-card.featured .stat-meta { color: var(--accent-soft); }
.stat-card.featured .stat-val { color: var(--surface); }
.stat-card.featured .stat-desc { color: var(--slate-300); }
.stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--cta);
}
.stat-meta {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--slate-600);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.stat-val {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-desc { font-size: 0.8rem; color: var(--slate-600); }

/* SAFE T-SCORE GAUGE */
.safe-t-box {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}
.safe-t-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 6px;
}
.safe-t-good { background: var(--success-soft); color: var(--success-dark); }
.safe-t-normal { background: var(--warning-bg); color: var(--warning-text); }
.safe-t-bad { background: var(--danger-bg); color: var(--danger-dark); }

/* HEINRICH PYRAMID SVG */
.pyramid-box {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin-bottom: 22px;
}
.pyramid-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.pyramid-level {
  padding: 8px 12px;
  margin: 4px auto;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.2s;
}
.pyr-1 { width: 45%; background: var(--danger); color: var(--surface); }
.pyr-2 { width: 62%; background: var(--accent); color: var(--surface); }
.pyr-3 { width: 80%; background: var(--warning); color: var(--accent-dark); }
.pyr-4 { width: 100%; background: var(--slate-200); color: var(--slate-800); }

/* ACTION BUTTONS */
.btn-row { display: flex; gap: 12px; margin-top: 14px; }
.btn-calc-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary-k3 {
  background: var(--cta);
  color: var(--surface);
}
.btn-primary-k3:hover {
  background: var(--cta-hover);
  color: var(--surface);
}
.btn-outline-k3 {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--slate-300);
}
.btn-outline-k3:hover {
  background: var(--slate-100);
}

/* REFERENCE & CONTENT SECTIONS */
.k3-editorial-section {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 32px;
}
.editorial-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  border-left: 4px solid var(--cta);
  padding-left: 14px;
}
.editorial-p {
  color: var(--slate-700);
  font-size: 0.96rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 20px 0;
}
.ref-table th {
  background: var(--text);
  color: var(--surface);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.ref-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700);
}
.ref-table tr:nth-child(even) td { background: var(--slate-50); }

/* FAQ ACCORDION */
.faq-box { margin-top: 20px; }
/* PRINT STYLES */
@media print {
  body { background: var(--surface); color: var(--black); }
  .calc-hero, .pill-btn, .btn-row, nav, footer, .faq-box, .unit-toggle, .form-input, .k3-editorial-section { display: none !important; }
  .calc-wrapper { padding: 0; }
  .calc-grid { display: block; }
  .card-box { border: none; box-shadow: none; padding: 0; }
  .print-header { display: block !important; border-bottom: 2px solid var(--black); padding-bottom: 12px; margin-bottom: 20px; }
}
.print-header { display: none; }
