:root {
  color-scheme: light;
  --bg: #eef2f6;
  --sheet: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #d8e0ea;
  --fill: #f8fafc;
  --accent: #123c63;
  --accent-hover: #0c2c49;
  --focus: #1d4ed8;
  --ok: #166534;
  --ok-bg: #ecfdf3;
  --err: #b42318;
  --err-bg: #fef3f2;
  --warn: #93370d;
  --warn-bg: #fff6ed;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.35;
}

body {
  display: flex;
  justify-content: center;
  padding: 8px;
}

.sheet {
  width: 100%;
  max-width: 420px;
  min-height: calc(540px - 16px);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.brand__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--fill);
}

.brand__name {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.brand__secure {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lock {
  width: 11px;
  height: 11px;
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 0 0 3px 3px;
  position: relative;
  transform: translateY(1px);
}

.lock::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  left: 0.5px;
  top: -5px;
}

.countdown {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

.countdown.is-soon {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: #f9dbaf;
}

.status {
  margin: 36px 8px;
  text-align: center;
  color: var(--muted);
}

.greet {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.2;
}

.summary {
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.summary p {
  margin: 0;
}

.summary p + p {
  margin-top: 4px;
  color: var(--muted);
}

.summary strong {
  font-weight: 700;
}

.form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field {
  margin-bottom: 8px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  padding: 0 12px;
  outline: none;
}

.field input::placeholder {
  color: #94a3b8;
}

.field input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18);
}

.field input[aria-invalid="true"] {
  border-color: var(--err);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.alert {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--err-bg);
  color: var(--err);
  font-size: 13px;
}

.attempts {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.submit {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

.submit:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.35);
  outline-offset: 2px;
}

.submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.disclaimer {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.result {
  margin-top: 8px;
  padding: 16px 14px;
  border-radius: 12px;
  text-align: left;
}

.result h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.result p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.result.is-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.result.is-ok p {
  color: #3f621a;
}

.result.is-err {
  background: var(--err-bg);
  color: var(--err);
}

.result.is-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.noscript {
  max-width: 420px;
  margin: 16px auto;
  text-align: center;
  color: var(--err);
}

[hidden] {
  display: none !important;
}

@media (max-width: 380px) {
  .brand {
    grid-template-columns: auto 1fr;
  }

  .countdown {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
