:root {
  --navy: #0f1b33;
  --navy2: #182a4d;
  --line: #2c416b;
  --orange: #f26b1d;
  --white: #f4f6fb;
  --muted: #a9b6d3;
  --green: #2fbf71;
  --yellow: #f2c230;
  --red: #e5484d;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--navy);
  color: var(--white);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 20px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
}
.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  background: #0a1326;
  border-bottom: 3px solid var(--orange);
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 16px;
}
.bar .title { color: var(--orange); }
main {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
h1 { font-size: 34px; margin: 0; line-height: 1.15; }
h2 { font-size: 24px; margin: 0; color: var(--muted); font-weight: 600; }
p { margin: 0; }
.lead { font-size: 22px; }
.muted { color: var(--muted); font-size: 17px; }
.step { color: var(--orange); font-weight: 700; font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; }
.card {
  background: var(--navy2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
button, a.btn {
  min-height: 56px;
  padding: 0 26px;
  border-radius: 10px;
  border: 2px solid var(--orange);
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.ghost, a.btn.ghost { background: transparent; color: var(--white); border-color: var(--line); }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, a.btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.sentence {
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  padding: 18px 10px;
  border-radius: 12px;
  background: #0a1326;
  border: 2px solid var(--line);
}
.heard { font-size: 22px; }
.heard b { color: var(--orange); }
.meter { height: 22px; border-radius: 11px; background: #0a1326; border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width 80ms linear; }
.listening { color: var(--orange); font-weight: 700; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.verdict { border-width: 3px; }
.verdict h1 { font-size: 40px; }
.verdict.green { border-color: var(--green); }
.verdict.green h1 { color: var(--green); }
.verdict.yellow { border-color: var(--yellow); }
.verdict.yellow h1 { color: var(--yellow); }
.verdict.red { border-color: var(--red); }
.verdict.red h1 { color: var(--red); }
.he { direction: rtl; text-align: right; font-size: 19px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 17px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.summary { font-family: Consolas, monospace; font-size: 15px; background: #0a1326; padding: 8px 10px; border-radius: 8px; overflow-wrap: anywhere; }
details.help { font-size: 17px; }
details.help summary {
  cursor: pointer;
  list-style: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--muted);
}
details.help summary::-webkit-details-marker { display: none; }
details.help p { margin-top: 8px; }
.test { background: #3a2a0a; border: 1px dashed var(--yellow); border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.test input { font: inherit; padding: 8px; width: 100%; margin: 6px 0; }
@media (max-width: 600px) {
  body { font-size: 18px; }
  .bar { padding: 8px 12px; font-size: 13px; }
  main { padding: 14px 12px; }
  h1 { font-size: 28px; }
  .sentence { font-size: 28px; }
  .verdict h1 { font-size: 34px; }
  button, a.btn { padding: 0 18px; }
}
@media (max-height: 700px) {
  body { font-size: 18px; }
  .bar { padding: 6px 24px; }
  main { padding: 10px 24px; gap: 8px; }
  h1 { font-size: 28px; }
  .lead { font-size: 19px; }
  .sentence { font-size: 32px; padding: 10px; }
  .card { padding: 12px 16px; gap: 8px; }
  .verdict h1 { font-size: 32px; }
  .facts { font-size: 15px; gap: 2px 14px; }
  .he { font-size: 17px; }
  .summary { font-size: 13px; padding: 6px 8px; }
  details.help summary { width: 30px; height: 30px; }
}
