/* Same design system as volteramc.net (Web/fe-voltera/DESIGN.md): Nunito, navy on light blue-white,
   primary #4382DF, flat cards, solid offset shadows on buttons, no blur shadows. */
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: swap; src: url("fonts/nunito-latin-900-normal.woff2") format("woff2"); }

:root {
  --bg: #F5F8FD;
  --fg: #112E81;
  --primary: #4382DF;
  --primary-shadow: #1A5CBF;
  --secondary: #1E40AF;
  --border: #AACCD6;
  --danger: #EF4444;
  --danger-shadow: #B91C1C;
  --success: #22C55E;
  --white: #ffffff;
  /* muted text: solid colour, 5.4:1 on --bg (opacity-faded navy was below WCAG AA) */
  --muted-fg: #556591;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Nunito", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* nav */
.nav-in { max-width: 64rem; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 24px; }
.logo img { display: block; height: 56px; width: auto; }
.links { display: flex; gap: 24px; margin-left: auto; }
.links a { font-size: 14px; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .04em; }
.links a:hover { color: var(--primary); }
.badge {
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 8px; border: 2px solid var(--fg); background: var(--white); white-space: nowrap;
}
.badge.on { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* hero */
.hero { text-align: center; padding: 40px 16px 32px; }
.hero h1 { font-size: clamp(36px, 7vw, 56px); font-weight: 900; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.01em; }
.hero h1 span { color: var(--primary); }
.hero p { margin: 0 auto; max-width: 36rem; font-size: 18px; font-weight: 700; color: var(--muted-fg); }

/* card */
.main { max-width: 36rem; margin: 0 auto; padding: 0 16px 48px; }
.card { background: var(--white); border-radius: 16px; padding: 32px; }
.card h2 { font-size: 24px; font-weight: 900; margin: 0 0 20px; }
.card h2.sub { font-size: 18px; margin: 28px 0 12px; }
.alert { background: #FEE2E2; color: #B91C1C; font-weight: 700; border-radius: 12px; padding: 16px; margin-bottom: 16px; }

.steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.num {
  flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--bg); font-weight: 900; font-size: 14px; color: var(--primary);
}

/* inputs */
.input {
  width: 100%; min-width: 0; font: inherit; font-weight: 700; color: var(--fg);
  background: var(--bg); border: 2px solid transparent; border-radius: 12px; padding: 12px 16px;
  transition: border-color .15s ease-out;
}
.input:focus { outline: none; border-color: var(--primary); }
.input::placeholder { color: #6C7FB3; } /* large bold text: 3.7:1 */
.code { font-size: 22px; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.login { display: flex; gap: 12px; }
.login .code { flex: 1; }

/* buttons: solid offset shadow like volteramc.net */
.btn {
  --btn-bg: var(--primary); --btn-fg: var(--white); --btn-shadow: var(--primary-shadow);
  font: inherit; font-weight: 900; font-size: 15px; cursor: pointer;
  min-height: 48px; padding: 10px 20px; border: 0; border-radius: 12px;
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: 4px 4px 0 var(--btn-shadow);
  transition: transform .15s ease-out, box-shadow .15s ease-out;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--btn-shadow); }
.btn:active, .btn.down { transform: translate(4px, 4px); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.btn:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: 4px 4px 0 var(--btn-shadow); }
.btn.outline { --btn-bg: var(--white); --btn-fg: var(--fg); --btn-shadow: var(--fg); border: 2px solid var(--fg); }
.btn.danger { --btn-bg: var(--danger); --btn-shadow: var(--danger-shadow); }
.btn.wide { width: 100%; margin-top: 28px; }
.ptt { width: 100%; min-height: 72px; margin-top: 8px; font-size: 17px; touch-action: none; }
.ptt.down { --btn-bg: var(--success); --btn-fg: var(--white); border-color: var(--success); }

.msg { min-height: 1.5em; margin: 16px 0 0; font-weight: 700; color: var(--muted-fg); }
.msg.bad { color: #B91C1C; }
.hint { margin: 20px 0 0; padding-top: 16px; border-top: 2px solid var(--bg); font-size: 14px; font-weight: 700; color: var(--muted-fg); }

/* room */
.me { display: flex; align-items: center; gap: 16px; }
.me-head { display: flex; flex: none; }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.label { font-size: 13px; font-weight: 800; color: var(--muted-fg); }
.name { font-size: 20px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head { width: 32px; height: 32px; border-radius: 4px; image-rendering: pixelated; flex: none; background: var(--bg); }
.head.lg { width: 48px; height: 48px; border-radius: 6px; }

.meter { position: relative; height: 10px; border-radius: 999px; background: var(--bg); margin: 24px 0; overflow: hidden; }
#level { height: 100%; width: 100%; background: var(--border); transform: scaleX(0); transform-origin: left; transition: transform 60ms linear; }
#level.tx { background: var(--primary); }
#thresholdMark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); opacity: .35; left: 50%; }

.fields { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
input[type=range] { width: 100%; accent-color: var(--primary); margin: 0; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--bg); border: 2px solid rgba(17, 46, 129, .05); border-radius: 12px;
}
.list .who { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .bar { width: 72px; height: 6px; border-radius: 999px; background: var(--white); overflow: hidden; flex: none; }
.list .bar i { display: block; height: 100%; width: 100%; background: var(--primary); transform: scaleX(0); transform-origin: left; }
.list li.on { border-color: var(--primary); }
.list .empty { justify-content: center; font-weight: 700; color: var(--muted-fg); border: 0; }

.foot { text-align: center; font-size: 13px; font-weight: 700; color: var(--muted-fg); padding: 0 16px 32px; }

@media (max-width: 560px) {
  .links { display: none; }
  .badge { margin-left: auto; }
  .logo img { height: 48px; }
  .hero { padding: 24px 16px 24px; }
  .card { padding: 24px 20px; }
  .login { flex-direction: column; }
  .me { flex-wrap: wrap; }
  .me .btn { width: 100%; }
}
