/* ============================================================================
   sehat.css — SehatCheck-only layer. Loads after styles.css + data.css.
   Adds: the site accent, the 3D arc-gauge hero, calculator UI, band strips.
   Pure CSS/SVG. No images, no libraries.
   ========================================================================== */

/* ------------------------------------------------------------- site accent */
body[data-site="sehat"] { --accent: #0891b2; --accent-2: #0e7490; --accent-3: #22d3ee; --accent-soft: #e6f7fb; }
:root[data-theme="dark"] body[data-site="sehat"] { --accent: #22d3ee; --accent-2: #67e8f9; --accent-3: #06b6d4; --accent-soft: rgba(34, 211, 238, .14); }

/* band colours, theme-aware */
body[data-site="sehat"] {
  --b-under: #0284c7; --b-normal: #0d9488; --b-over: #d97706; --b-obese: #dc2626;
  --dial-face: #f3f6fb; --dial-face-2: #ffffff; --dial-rim: #dbe3f0; --dial-ink: #0b1020;
}
:root[data-theme="dark"] body[data-site="sehat"] {
  --b-under: #38bdf8; --b-normal: #2dd4bf; --b-over: #fbbf24; --b-obese: #f87171;
  --dial-face: #0e1626; --dial-face-2: #131d31; --dial-rim: #24304a; --dial-ink: #eef2ff;
}

/* ------------------------------------------------------------ the 3D gauge */
.gauge {
  max-width: 460px; margin: 26px auto 0; position: relative;
}
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge-face { fill: url(#scFace); }
.gauge-rim { fill: none; stroke: var(--dial-rim); }
.gauge-tick { stroke: var(--muted); opacity: .55; }
.gauge-tlab { fill: var(--muted); font-family: var(--font); font-size: 11px; font-weight: 650; text-anchor: middle; }
.gauge-hub-1 { fill: var(--dial-ink); opacity: .92; }
.gauge-hub-2 { fill: var(--dial-face-2); }
.gauge-val { fill: var(--dial-ink); font-family: var(--font); font-size: 52px; font-weight: 800; letter-spacing: -2.4px; text-anchor: middle; }
.gauge-cap { fill: var(--muted); font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-anchor: middle; text-transform: uppercase; }
.gauge-band { fill: var(--dial-ink); font-family: var(--font); font-size: 15px; font-weight: 750; text-anchor: middle; }

.sc-needle {
  transform-box: view-box; transform-origin: 200px 200px;
  animation: sc-sweep 2.4s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes sc-sweep {
  from { transform: rotate(-180deg); }
  to   { transform: rotate(var(--needle-angle, -90deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .sc-needle { animation: none; transform: rotate(var(--needle-angle, -90deg)); }
}
/* once a user starts typing, the needle tracks the input instead of replaying */
.sc-needle.settled { animation: none; transform: rotate(var(--needle-angle, -90deg)); transition: transform .45s cubic-bezier(.2,.9,.25,1); }
.gauge-needle-body { fill: var(--dial-ink); }
.gauge-needle-hi { fill: #fff; opacity: .28; }

/* ------------------------------------------------------- band result strip */
.bands { display: grid; gap: 8px; margin-top: 16px; }
.band {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); font-size: .9rem;
}
.band i { width: 10px; height: 10px; border-radius: 50%; background: var(--bc); display: block; }
.band .bl { font-weight: 650; color: var(--ink); }
.band .br { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; }
.band.on { border-color: var(--bc); background: color-mix(in srgb, var(--bc) 9%, var(--surface)); box-shadow: 0 0 0 1px var(--bc) inset; }
.band.on .bl::after { content: " · you are here"; color: var(--bc); font-weight: 700; font-size: .82rem; }

/* two classifications side by side — the differentiator */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
@media (max-width: 720px) { .dual { grid-template-columns: 1fr; } }
.dual-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-xs); }
.dual-col.lead { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), var(--shadow-sm); }
.dual-col h3 { font-size: .95rem; font-weight: 750; letter-spacing: -.02em; margin-bottom: 3px; }
.dual-col .who { font-size: .77rem; color: var(--muted); margin-bottom: 13px; }
.dual-col .bands { margin-top: 0; }
.dual-tag { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; margin-bottom: 9px; }

/* ------------------------------------------------------------ calculator UI */
.sc-calc { max-width: 720px; margin: 26px auto 0; text-align: left; }
.sc-calc .card-body { padding: 22px; }
.ht-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .ht-row { grid-template-columns: 1fr; } }
.sc-out {
  margin-top: 18px; padding: 18px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); text-align: center;
}
.sc-out .v { font-size: clamp(2.2rem, 8vw, 3.2rem); font-weight: 800; letter-spacing: -.05em; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.sc-out .u { font-size: .9rem; color: var(--muted); font-weight: 650; margin-top: 6px; }
.sc-out .verdict { margin-top: 12px; font-size: 1.02rem; font-weight: 700; }
.sc-out .verdict small { display: block; font-weight: 500; color: var(--muted); font-size: .82rem; margin-top: 4px; }
.sc-nojs { margin-top: 14px; font-size: .82rem; color: var(--muted); }

/* the plain-language range pill used on ideal-weight pages */
.range-pill {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 14px 22px;
  border-radius: 999px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: var(--shadow-sm); font-variant-numeric: tabular-nums;
}
.range-pill b { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; letter-spacing: -.04em; color: var(--accent); }
.range-pill span { color: var(--muted); font-size: .9rem; font-weight: 650; }

/* height / weight quick-jump keypad */
.jump { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 7px; }
.jump a {
  display: block; text-align: center; padding: 10px 6px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none;
  font-size: .88rem; font-weight: 700; color: var(--ink); transition: .16s; box-shadow: var(--shadow-xs);
}
.jump a small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.jump a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.jump a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* tool launcher cards on the home page */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.tool {
  display: block; text-decoration: none; color: inherit; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-xs); transition: .2s; position: relative; overflow: hidden;
}
.tool::after {
  content: ""; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); pointer-events: none;
}
.tool:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: var(--shadow); }
.tool .ti { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 13px; }
.tool .ti svg { width: 20px; height: 20px; }
.tool h3 { font-size: 1.05rem; font-weight: 750; letter-spacing: -.025em; margin-bottom: 6px; }
.tool p { font-size: .87rem; color: var(--muted); line-height: 1.55; }
.tool .go { display: inline-block; margin-top: 12px; font-size: .83rem; font-weight: 700; color: var(--accent); }

/* row highlight used in the long fallback tables */
table.data tr.self th, table.data tr.self td { font-weight: 700; }
table.data td.b-under { color: var(--b-under); font-weight: 700; }
table.data td.b-normal { color: var(--b-normal); font-weight: 700; }
table.data td.b-over { color: var(--b-over); font-weight: 700; }
table.data td.b-obese { color: var(--b-obese); font-weight: 700; }

/* honest-source line under formulas */
.formula {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 16px; color: var(--ink); overflow-x: auto; white-space: nowrap;
}
.cite { font-size: .78rem; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.cite b { color: var(--ink-2); font-weight: 650; }

/* medical caution block — YMYL pages carry one */
.caution {
  border: 1px solid color-mix(in srgb, #dc2626 26%, var(--line)); border-left: 3px solid #dc2626;
  background: color-mix(in srgb, #dc2626 5%, var(--surface));
  border-radius: var(--radius-sm); padding: 15px 18px; font-size: .89rem; color: var(--ink-2); line-height: 1.6; margin-top: 18px;
}
.caution strong { color: var(--ink); }

/* ============================================================================
   AAA layer — the calm clinical instrument
   The dual-band motif recurs on every page that states a weight; the two
   handoff buttons are drawn as instrument controls (square corners, hairline
   bezel, indexed 01/02) rather than as marketing cards.
   ========================================================================== */

/* ------------------------------------------- per-height dual-band diagram
   AAA+++ 2026-07-31: geometry is UNCHANGED — the rectilinear bezel, the two
   9-unit band rows, the outlined healthy window and the shaded disagreement
   columns are the site's identity and are not re-drawn. Only the ink is
   re-tinted so the drawing survives warm basalt: strokes move to --ink-2
   (pure white on basalt reads as a glare, not a nib), and the disagreement
   shading moves from a hardcoded 7% to a per-theme value, because 7% of a
   light ink on a dark ground disappears entirely.                          */
.bandchart-static { margin-top: 26px; }
.bandchart-static .bc-healthy {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.6;
  stroke-opacity: .85;
}
.bandchart .bc-dis { opacity: .07; }
.bandchart .marker { stroke: var(--ink-2); }
:root[data-theme="dark"] .bandchart .bc-dis { opacity: .16; }
:root[data-theme="dark"] .bandchart-static .bc-healthy { stroke-opacity: 1; stroke-width: 1.8; }
:root[data-theme="dark"] .bandchart .band-edge { stroke: var(--line-2); }
/* the coloured band rows are inline fills from the published band tables; on
   basalt they sit slightly hot, so the whole plot is knocked back one notch
   rather than any single band being re-coloured (which would decouple the
   drawing from the table it is generated from). */
:root[data-theme="dark"] .bandchart svg rect[fill^="#"] { opacity: .74; }
.bandchart .bc-unit {
  transform: translateX(-100%);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .66rem;
}
.bandchart .figure-cap strong { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 460px) {
  .bandchart-static svg { height: 148px; }
  .bc-axis span { font-size: .66rem; }
}

/* -------------------------------------------------------- instrument buttons
   Squared, hairline, indexed. Deliberately NOT a rounded card: this site is a
   measuring device and its controls should read as part of the housing.    */
.nextsteps {
  max-width: 720px;
  margin: 26px auto 0;
  text-align: left;
  border-top: 1px solid var(--line-2);
  padding-top: 16px;
}
.ns-h {
  font-size: .66rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 4px;
}
.ns-note { font-size: .84rem; color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
.ns-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .ns-row { grid-template-columns: 1fr; } }

.ns {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 15px;
  text-decoration: none; color: inherit;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 3px;                       /* instrument corners, not pill */
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
  transition: border-color .16s, background .16s;
}
:root[data-theme="dark"] .ns { box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent); }
.ns:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.ns:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ns-i {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 2px;
  font-size: .66rem; font-weight: 800; letter-spacing: .04em;
  color: var(--accent); background: var(--surface-2);
  font-variant-numeric: tabular-nums;
}
.ns-b { display: block; min-width: 0; }
.ns-t { display: block; font-size: .94rem; font-weight: 750; letter-spacing: -.015em; color: var(--ink); }
.ns-s { display: block; font-size: .77rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.ns-go { width: 18px; height: 18px; flex: none; margin-left: auto; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .ns { transition: none; } }

/* ------------------------------------------------- the contrarian-essay link
   §6.5.4: the dual-BMI essay is this site's citable asset, so it gets a fixed
   position and a spec-voice register on every page that states a BMI — never
   a button, because it is an argument, not a call to action.               */
.essay-link {
  margin-top: 14px;
  padding-left: 13px;
  border-left: 2px solid var(--accent);
  text-transform: none;
  letter-spacing: .01em;
  line-height: 1.55;
}
.essay-link a { color: var(--ink-2); }
.essay-link a:hover { color: var(--ink); }

/* the answer block, unboxed (§4). The unit rides the mono voice; the range is
   never collapsed to a point figure on this site, so the dash is part of the
   typography rather than an afterthought. */
.answer.aaa .stat-display { color: var(--ink); display: inline-block; margin: 2px 0 6px; }
.answer.aaa .kicker { display: block; margin-bottom: 2px; }
.answer.aaa p { max-width: 62ch; }
.answer.aaa .num { font-variant-numeric: tabular-nums lining-nums; }

/* the armour band sits above the answer and never carries an ad or a colour
   alarm — hairline, warm, one accent keel. §6.5.2. */
.ymyl { margin-bottom: 22px; }
.ymyl + .answer.aaa { margin-top: 0; }

/* row labels sit with their rows on the static per-height chart */
.bc-plot { position: relative; }
.bc-rowlab {
  position: absolute; left: 0; pointer-events: none;
  font-size: .64rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted);
}
