/* ============================================================================
   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); }
