:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --text: #15202f;
  --muted: #5b6878;
  --line: #dde3eb;
  --accent: #1d3a6b;
  --accent-ink: #ffffff;
  --accent-soft: #e6edf8;
  --ok: #17803d;
  --ok-soft: #e3f4e8;
  --info: #9a6200;
  --info-soft: #fdf2dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e28;
    --surface-2: #1d2632;
    --text: #e8edf3;
    --muted: #9aa7b6;
    --line: #2b3644;
    --accent: #7ea6e8;
    --accent-ink: #0d1520;
    --accent-soft: #1f2d44;
    --ok: #4cc27a;
    --ok-soft: #173325;
    --info: #f0b44c;
    --info-soft: #35290f;
    --danger: #f2877d;
    --danger-soft: #3a1c1a;
    --shadow: none;
    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.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; }

label { display: block; font-weight: 600; font-size: .95rem; margin: 1rem 0 .4rem; }
input, select {
  width: 100%;
  min-height: 52px;
  padding: .7rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 1.1rem;
}
input:focus, select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
#majorOther { margin-top: .6rem; }

button.primary {
  width: 100%;
  min-height: 56px;
  margin-top: 1.25rem;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
button.primary:disabled { opacity: .6; cursor: progress; }
button.link {
  display: block;
  margin: 1rem auto 0;
  min-height: 44px;
  padding: .5rem 1rem;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.error { color: var(--danger); background: var(--danger-soft); padding: .6rem .8rem; border-radius: 8px; margin: .75rem 0 0; font-size: .95rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .4rem 0 0; }

/* ---------- public check-in ---------- */
body.public {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}
.card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem 1.75rem;
  margin-top: 4vh;
}
.brand { text-align: center; margin-bottom: .5rem; }
.brand .org { margin: 0 0 .25rem; color: var(--muted); font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.brand h1 { font-size: 1.75rem; }
.brand .sub { margin: .35rem 0 0; color: var(--muted); }
.lead { margin: 1rem 0 0; color: var(--muted); }

.result { text-align: center; padding-top: .5rem; }
.result h2 { font-size: 1.4rem; margin-top: .75rem; }
.result p { font-size: 1.1rem; margin: .5rem 0 0; }
.badge { width: 84px; height: 84px; border-radius: 50%; margin: 1rem auto 0; position: relative; }
.badge.ok { background: var(--ok-soft); }
.badge.info { background: var(--info-soft); }
.badge::after { content: ""; position: absolute; inset: 0; margin: auto; }
.badge.ok::after { width: 34px; height: 18px; border-left: 6px solid var(--ok); border-bottom: 6px solid var(--ok); transform: translateY(-4px) rotate(-45deg); }
.badge.info::after { width: 8px; height: 40px; background: linear-gradient(var(--info) 0 68%, transparent 68% 80%, var(--info) 80%); border-radius: 4px; }
