/* --- Shared Style (used by BSA calculator and fluids table) --- */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --accent: #690204;       /* Primary accent */
  --accent-weak:#fce4e4;   /* light tint of accent */
  --shadow: 0 10px 20px rgba(2,6,23,.06), 0 2px 6px rgba(2,6,23,.05);
  --radius: 16px;
}

@media (prefers-color-scheme: dark){
  :root {
    --bg:#0b1220;
    --card:#0f172a;
    --text:#e5e7eb;
    --muted:#94a3b8;
    --border:#1f2937;
    --accent:#ff6b6b;
    --accent-weak:#2d1111;
    --shadow: 0 10px 20px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.4);
  }
}

* { box-sizing:border-box }
html,body { height:100% }
body {
  margin:0;
  background:var(--bg);
  color:var(--text);
  font: 500 16px/1.6 "Noto Sans", sans-serif;
}

/* Layout */
.wrap { max-width: 1100px; margin: 48px auto; padding: 0 20px; }
.card {
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.head {
  padding:20px 22px;
  border-bottom:1px solid var(--border);
  display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px;
}
.head h1 {
  margin:0;
  font-size:clamp(18px,2.4vw,22px);
  font-weight:700;
  letter-spacing:.2px;
}
.head .sub { margin-left:auto; font-size:14px; color:var(--muted); }

/* Buttons */
.toolbar { width:100%; display:flex; gap:8px; flex-wrap:wrap; margin-top:6px; }
.pill {
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--border); background:var(--card);
  padding:6px 10px; border-radius:999px; font-size:13px; color:var(--muted);
}
.pill b { color:var(--text); font-weight:600 }
.btn {
  margin-left:auto; padding:8px 12px; border-radius:10px;
  border:1px solid var(--border);
  background:linear-gradient(#fff,#f6f7fb);
  color:#0f172a; font-weight:600; cursor:pointer;
}
@media (prefers-color-scheme: dark){ .btn{background:#111827; color:#e5e7eb} }
.btn:hover { border-color:var(--accent) }
.btn.secondary { background:transparent; color:var(--accent); border-color:var(--accent); }

/* Table */
.table-wrap { position:relative; overflow:auto; }
table { width:100%; border-collapse:separate; border-spacing:0; min-width:820px; }
caption { text-align:left; padding:14px 22px; color:var(--muted); font-size:14px; }
thead th {
  position:sticky; top:0; z-index:2;
  background:linear-gradient(var(--card), var(--card));
  color:var(--accent);
  font-weight:700; text-align:center;
  padding:12px 10px; border-bottom:1px solid var(--border);
  white-space:nowrap;
}
tbody td, tbody th {
  padding:12px 10px; border-bottom:1px solid var(--border);
  vertical-align:middle;
}
tbody tr:nth-child(odd){
  background: color-mix(in oklab, var(--card) 90%, var(--accent-weak));
}
/* First column sticky */
tbody th, thead th:first-child {
  position:sticky; left:0; z-index:1; text-align:left;
  background:linear-gradient(var(--card), var(--card));
}
tbody th { font-weight:700; color:var(--text); }
.tag {
  display:inline-block; font-size:12px; padding:2px 6px; border-radius:6px;
  background:var(--accent-weak); color:var(--accent); margin-left:6px;
}
.note { color:var(--muted); font-size:13px; padding:14px 22px 6px; }

/* References */
.refs {
  margin: 8px 22px 20px; padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: color-mix(in oklab, var(--card) 96%, var(--accent-weak));
  border-radius: 10px;
}
.refs h2 {
  margin: 0 0 6px 0; font-size: 14px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.refs ol { margin: 6px 0 0 18px; padding: 0; font-size: 14px; line-height: 1.5; }
.refs li { margin-bottom: 6px; }
.refnote { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* Footer */
.foot {
  display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between;
  padding:10px 22px 18px; border-top:1px solid var(--border);
  color:var(--muted); font-size:13px;
}
.mono { font-family: ui-monospace, monospace; }
.nowrap { white-space:nowrap; }
.hl { background:var(--accent-weak); padding:0 6px; border-radius:6px; }

/* Small screens */
@media (max-width: 640px){
  .head{gap:8px}
  .head .sub{width:100%; margin-left:0}
  .btn{width:100%}
  caption{padding-bottom:0}
}

