:root {
  --bg: #fcfcfb;
  --surface: #ffffff;
  --subtle: #f5f5f4;
  --hover: #eeeeec;
  --border: #e5e5e0;
  --border-strong: #d6d3cd;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --brand: #c2410c;
  --brand-soft: #fff7ed;
  --safe: #15803d;
  --safe-bg: #f0fdf4;
  --safe-bd: #bbf7d0;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --warn-bd: #fde68a;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-bd: #fecaca;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(252, 252, 251, 0.94);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
}
.nav { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 750; font-size: 16px; color: var(--ink); letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-badge {
  padding: 2px 7px; border-radius: 5px; background: var(--brand); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav-links a { color: var(--ink-2); font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* Main */
main { padding: 34px 0 72px; }
.breadcrumb {
  font-size: 13px; color: var(--muted); margin-bottom: 14px;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.page-head { padding-bottom: 22px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-safe { background: var(--safe); }
.dot-warn { background: var(--warn); }
.dot-danger { background: var(--danger); }
.dot-brand { background: var(--brand); }
h1 {
  margin: 0 0 10px; font-size: 31px; line-height: 1.22;
  letter-spacing: -0.025em; font-weight: 750; color: var(--ink);
}
.lead { margin: 0; font-size: 16px; color: var(--ink-2); max-width: 780px; }
.section { margin-bottom: 34px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.015em; font-weight: 700; }
.section-sub { font-size: 13px; color: var(--muted); }

/* Panels & Metric Strip */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}
.panel-subtle { background: var(--subtle); }
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--border); gap: 1px; margin-bottom: 26px;
}
.metric { background: var(--surface); padding: 15px 17px; }
.metric-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.metric-val {
  font-size: 21px; font-weight: 750; letter-spacing: -0.02em;
  margin: 4px 0 2px; font-variant-numeric: tabular-nums;
}
.metric-sub { font-size: 12px; color: var(--muted); }

/* Status badges */
.status-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px;
  border: 1px solid transparent;
}
.tag-safe { background: var(--safe-bg); color: var(--safe); border-color: var(--safe-bd); }
.tag-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.tag-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bd); }

/* Controls & Toggle Pills */
.controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.controls-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
select, input[type="number"] {
  width: 100%; height: 38px; padding: 0 10px; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 7px; outline: none;
}
select:focus, input[type="number"]:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}
input[type="range"] { width: 100%; accent-color: var(--ink); cursor: pointer; }
.toggle-group { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 7px; overflow: hidden; }
.toggle-btn {
  border: none; background: var(--surface); color: var(--ink-2); padding: 7px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.toggle-btn.active { background: var(--ink); color: #ffffff; }

/* Progress gauges */
.gauge { margin: 12px 0; }
.gauge-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.gauge-track {
  height: 11px; background: var(--hover); border: 1px solid var(--border);
  border-radius: 99px; overflow: hidden;
}
.gauge-fill { height: 100%; border-radius: 99px; transition: width 0.2s ease; }
.fill-safe { background: var(--safe); }
.fill-warn { background: var(--warn); }
.fill-danger { background: var(--danger); }

/* Tables */
.table-wrap {
  border: 1px solid var(--border); border-radius: 10px; overflow-x: auto; background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; }
tbody tr:last-child td { border-bottom: none; }
th { background: var(--subtle); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
tbody tr:hover td { background: var(--subtle); }
.cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* Callout / Affiliate CTA */
.callout {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: var(--brand-soft); border: 1px solid #fed7aa;
  border-left: 3px solid var(--brand); border-radius: 8px;
  padding: 16px 20px; margin: 24px 0;
}
.callout-neutral {
  background: var(--subtle); border-color: var(--border); border-left-color: var(--ink);
}
.callout-title { font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.callout-desc { font-size: 13px; color: var(--ink-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #ffffff; font-weight: 600; font-size: 13px;
  padding: 9px 16px; border-radius: 7px; white-space: nowrap;
}
.btn:hover { background: #1f2937; text-decoration: none; }
.btn-brand { background: var(--brand); }
.btn-brand:hover { background: #9a3412; }

/* Grids & Index */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 26px; }
.index-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.index-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink); transition: border-color 0.15s, background 0.15s;
}
.index-row:hover { border-color: var(--ink); background: var(--subtle); text-decoration: none; }
.index-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.index-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.index-arrow { color: var(--muted); font-size: 14px; flex-shrink: 0; }

/* FAQ */
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.faq-q { font-weight: 650; font-size: 15px; color: var(--ink); margin-bottom: 5px; }
.faq-a { margin: 0; font-size: 14px; color: var(--ink-2); }

footer {
  border-top: 1px solid var(--border); background: var(--subtle);
  padding: 28px 0; color: var(--muted); font-size: 12px;
}
@media (max-width: 780px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .controls, .controls-2, .grid-2, .index-grid { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .container { padding: 0 16px; }
}