/* Shared styles for the Diag Hive tool sites. Dark, phone-first, no external fonts. */
:root {
  --bg: #0d111a;
  --surface: #151b27;
  --surface-2: #1c2433;
  --border: #2a3446;
  --text: #e8ecf3;
  --muted: #9aa5b8;
  --accent: #ff8a33;
  --accent-ink: #1a0f05;
  --ok: #34c77b;
  --warn: #ffb020;
  --bad: #ff5a5f;
  --cold: #5cc8ff;
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--text); line-height: 1.15; margin-right: auto; }
.brand b { font-size: 19px; letter-spacing: .2px; }
.brand b span { color: var(--accent); }
.brand small { color: var(--muted); font-size: 12px; }
.nav { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav a.lang { color: var(--muted); }

/* Content */
main { padding: 24px 0 48px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 10px; }
h3 { font-size: 18px; margin: 20px 0 6px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 760px) { .grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } }

/* Forms */
.form { display: grid; gap: 14px; }
.row2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input, select {
  width: 100%; font: inherit; font-size: 17px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { font: inherit; font-size: 15px; background: transparent; color: var(--muted); border: 0; padding: 9px 14px; cursor: pointer; min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.units { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0 0 16px; font-size: 14px; color: var(--muted); }
.btn { display: inline-block; white-space: nowrap; font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 12px 18px; text-decoration: none; cursor: pointer; min-height: 46px; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Results */
.result { border-left: 5px solid var(--border); }
.result.ok { border-left-color: var(--ok); }
.result.warn { border-left-color: var(--warn); }
.result.bad { border-left-color: var(--bad); }
.result h2 { margin-top: 0; }
.badge { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 2px 10px; margin-right: 6px; }
.badge.ok { background: rgba(52,199,123,.15); color: var(--ok); }
.badge.warn { background: rgba(255,176,32,.15); color: var(--warn); }
.badge.bad { background: rgba(255,90,95,.15); color: var(--bad); }
.badge.cold { background: rgba(92,200,255,.15); color: var(--cold); }
.meters { display: grid; gap: 10px; margin: 14px 0; }
.meter { font-size: 14px; }
.meter .bar { position: relative; height: 10px; border-radius: 6px; background: var(--surface-2); margin-top: 4px; }
.meter .band { position: absolute; top: 0; bottom: 0; background: rgba(52,199,123,.35); border-radius: 6px; }
.meter .dot { position: absolute; top: -4px; width: 4px; height: 18px; background: var(--text); border-radius: 2px; }
.note { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 15px; }
.note.cold { border: 1px solid rgba(92,200,255,.5); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--surface-2); position: sticky; top: 0; }
tr.freeze td:first-child::after { content: " ❄"; color: var(--cold); }

/* Tool list */
.tool { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.tool:hover { border-color: var(--accent); }
.tool b { font-size: 17px; }
.tool span { color: var(--muted); font-size: 14px; }
.tool em { font-style: normal; color: var(--accent); font-size: 14px; font-weight: 600; }

details { border-bottom: 1px solid var(--border); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }
.safety { border: 1px solid rgba(255,176,32,.5); }

/* Footer */
.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; padding: 24px 0 40px; }
.foot a { color: var(--muted); }
.foot .links { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 480px) {
  h1 { font-size: 25px; }
  .row2 { grid-template-columns: 1fr; }
}
