/* Hết Hú — giao diện cho điện thoại, bấm bằng một ngón cái.
   Nút cao tối thiểu 56px, chữ tối thiểu 18px, tương phản cao. */

:root {
  --bg: #0f1720;
  --card: #ffffff;
  --ink: #14181e;
  --ink-soft: #4a525e;
  --line: #c9d1dc;
  --primary: #0b6bcb;
  --primary-ink: #ffffff;
  --warn: #b02a17;
  --warn-bg: #fff1ee;
  --accent: #e8590c;
  --ok: #1f7a3f;
  --pad: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

.top {
  padding: 14px var(--pad) 10px;
  color: #fff;
  text-align: center;
}
.brand { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.tagline { font-size: 16px; color: #a8b6c6; }

main { padding: 0 var(--pad) 48px; }

.screen {
  display: none;
  background: var(--card);
  border-radius: 18px;
  padding: 20px 18px 22px;
  margin: 0 auto;
  max-width: 560px;
}
.screen.is-on { display: block; }

h1 { font-size: 25px; line-height: 1.25; margin: 4px 0 12px; }
h2 { font-size: 21px; margin: 22px 0 10px; }
p  { margin: 10px 0; }

.hint { color: var(--ink-soft); font-size: 18px; }
.note {
  font-size: 17px; color: var(--ink-soft);
  background: #f2f5f9; border-radius: 12px; padding: 12px 14px;
}

ul.warn { list-style: none; padding: 0; margin: 12px 0; }
ul.warn li {
  background: var(--warn-bg);
  border-left: 6px solid var(--warn);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 18px;
}

/* ---------- nút ---------- */
button.big {
  display: block;
  width: 100%;
  min-height: 60px;
  padding: 15px 18px;
  margin-top: 12px;
  border: none;
  border-radius: 14px;
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
button.big:active { transform: translateY(1px); }
.primary { background: var(--primary); color: var(--primary-ink); }
.ghost   { background: #eef2f7; color: var(--ink); border: 2px solid var(--line); }
.warn-btn{ background: #fff; color: var(--warn); border: 3px solid var(--warn); }
button:disabled { opacity: .5; }

/* ---------- thẻ chọn máy ---------- */
.cards { display: grid; gap: 14px; margin-top: 14px; }
.card {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  font-family: inherit;
  font-size: 18px;
  cursor: pointer;
  min-height: 56px;
}
.card:active, .card.sel { border-color: var(--primary); background: #f0f7ff; }
.card .cname { font-size: 21px; font-weight: 800; margin-bottom: 2px; }
.card .cdesc { font-size: 17px; color: var(--ink-soft); }
.card svg.art { width: 100%; height: auto; display: block; margin-bottom: 8px; }

/* ---------- thanh mức tiếng ---------- */
.meter-wrap { margin: 18px 0 6px; }
.meter-label { font-size: 17px; color: var(--ink-soft); margin-bottom: 6px; }
.meter {
  height: 26px; background: #e7ecf3; border-radius: 13px; overflow: hidden;
  border: 2px solid var(--line);
}
.meter-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #2f9e44 0%, #74b816 55%, #f08c00 80%, #e03131 100%);
  transition: width .06s linear;
}
.meter-state { font-size: 17px; margin-top: 6px; min-height: 26px; font-weight: 600; }

.countdown { text-align: center; margin: 10px 0; }
.countdown span {
  display: inline-block; min-width: 110px;
  font-size: 62px; font-weight: 800; color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ---------- kết quả ---------- */
.diag {
  background: #f0f7ff;
  border: 3px solid var(--primary);
  border-radius: 16px;
  padding: 16px;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
}
.diag.second { background: #f7f4ff; border-color: #6741d9; }

.step {
  display: block;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fff;
}
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 19px;
  margin-bottom: 8px;
}
.step p { margin: 0 0 10px; font-size: 19px; }
.step svg.art { width: 100%; height: auto; display: block; background: #fbfcfe; border-radius: 10px; }

/* ---------- khối số cho thợ ---------- */
.numbers { margin-top: 22px; border: 3px dashed #8b93a1; border-radius: 16px; overflow: hidden; }
.numbers > button {
  width: 100%; text-align: left; background: #f4f6fa; border: none;
  padding: 16px 14px; font-size: 19px; font-weight: 700; font-family: inherit;
  min-height: 56px; cursor: pointer; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.numbers .chev { font-size: 16px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.numbers .body { padding: 4px 14px 16px; display: none; }
.numbers.open .body { display: block; }
.numbers .why { font-size: 17px; color: var(--ink-soft); margin: 10px 0 14px; }
.numbers table { width: 100%; border-collapse: collapse; font-size: 18px; }
.numbers td { padding: 9px 0; border-bottom: 1px solid #e2e7ee; vertical-align: top; }
.numbers td.k { color: var(--ink-soft); padding-right: 12px; width: 52%; }
.numbers td.v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.numbers .hero { margin: 14px 0 6px; padding: 12px 14px; background: #f0f7ff; border-radius: 12px; }
.numbers .hero-k { font-size: 17px; color: var(--ink-soft); }
.numbers .big-num { font-size: 34px; font-weight: 800; color: var(--primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.numbers .flag {
  background: var(--warn-bg); border-left: 6px solid var(--warn);
  border-radius: 10px; padding: 11px 12px; margin-top: 12px; font-size: 17px;
}
.numbers .tip { background: #f2f5f9; border-radius: 10px; padding: 11px 12px; margin-top: 12px; font-size: 17px; }
.numbers h3 { font-size: 18px; margin: 18px 0 4px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 16px; font-weight: 700; }
.badge.high { background: #d3f9d8; color: #1f7a3f; }
.badge.mid  { background: #fff3bf; color: #8a6100; }
.badge.low  { background: #ffe3e3; color: #b02a17; }

ol.fallback { padding-left: 24px; }
ol.fallback li { margin-bottom: 12px; font-size: 19px; }

.noresult { background: var(--warn-bg); border: 3px solid var(--warn); border-radius: 16px; padding: 16px; }
.noresult h1 { margin-top: 0; }
ul.tips { padding-left: 22px; }
ul.tips li { margin-bottom: 9px; }

.sep { height: 1px; background: #e2e7ee; margin: 22px 0; border: 0; }

/* ---------- Ghi danh tác giả ---------- */
.credit { max-width: 560px; margin: 0 auto; padding: 4px var(--pad) 28px; }
.credit button {
  display: block; width: 100%; min-height: 56px;
  background: transparent; border: 2px solid #2c3a49; border-radius: 14px;
  color: #a8b6c6; font-family: inherit; font-size: 18px; font-weight: 600;
  padding: 14px; cursor: pointer;
}
.credit button:active { background: #1a2430; }

.sheet {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 11, 17, .72);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.sheet[hidden] { display: none; }
.sheet-card {
  background: var(--card); color: var(--ink);
  border-radius: 18px; padding: 20px 18px 22px;
  width: 100%; max-width: 560px; margin: auto 0 0;
}
.sheet-card h1 { font-size: 25px; margin: 0 0 12px; }
.sheet-card h2 { font-size: 20px; margin: 20px 0 6px; }
.sheet-card p { font-size: 18px; }
.sheet-card .ab-contact { font-size: 20px; font-weight: 700; }
.sheet-card .rights { color: var(--ink-soft); font-size: 17px; }

/* dấu ghi nguồn trong khối số */
.numbers .mark {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #e2e7ee;
  font-size: 16px; color: var(--ink-soft); text-align: center; font-weight: 600;
}
