:root {
  color-scheme: light;
  font: 100%/1.5 system-ui, -apple-system, sans-serif;
  color: #17243a;
  background: #f4f6f9;
  --muted: #4c5c71;
  --border: #d6dfe9;
  --navy: #1e304a;
  --surface: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: 1.16rem; line-height: 1.25; }
.shell { width: min(68rem, 100% - 3rem); margin-inline: auto; }
.masthead { background: #142238; color: #fff; }
.masthead-inner, .banner-inner, .overview, .guide, .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.masthead-inner { min-height: 4rem; justify-content: flex-start; font-weight: 650; }
.brand-mark {
  border: 1px solid #8295ae;
  border-radius: .45rem;
  padding: .25rem .42rem;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
}
.demo-banner { background: #fff2ce; color: #5e4112; border-bottom: 1px solid #eddba7; }
.banner-inner { padding-block: .65rem; }
.banner-inner p { font-size: .84rem; }
.demo-banner button { background: #fff8e7; border-color: #b6a17a; }

main { padding-block: 2rem 3rem; }
.overview { margin-bottom: 1.5rem; }
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .075em;
  font-size: .72rem;
  font-weight: 800;
  margin-bottom: .45rem;
}
.lede { color: var(--muted); margin-top: .6rem; max-width: 32rem; }
.balance-card {
  display: grid;
  gap: .1rem;
  min-width: 13rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .8rem;
  padding: .8rem 1rem;
}
.balance-card span, .balance-card small { font-size: .8rem; color: var(--muted); }
.balance-card strong { font-size: 1.65rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.guide, .panel, .feedback:not(:empty) {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: .8rem;
}
.guide { background: #eaf1fa; border-color: #ccdbee; padding: 1rem 1.15rem; }
.guide p:last-child, .panel-header p { color: var(--muted); font-size: .875rem; margin-top: .25rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
button, select, input { font: inherit; }
button {
  min-height: 44px;
  padding: .55rem .85rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  font-size: .875rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.primary { color: #fff; background: var(--navy); }
.primary:hover { background: #2e486b; }
.secondary { color: var(--navy); background: var(--surface); border-color: #aab8c9; }
.secondary:hover { background: #f1f5fb; }
button:disabled { background: #dae2ec; color: #435166; cursor: default; }
:focus-visible { outline: 3px solid #1664be; outline-offset: 3px; }

.panel { background: var(--surface); box-shadow: 0 2px 4px #14223808; }
.panel-header { padding: 1rem 1.15rem; }
form, #entry-review { border-top: 1px solid var(--border); padding: 1rem 1.15rem; }
.fields, .review-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.fields label { display: grid; align-content: start; gap: .35rem; font-size: .875rem; font-weight: 650; }
.fields input, .fields select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: .45rem .6rem;
  border: 1px solid #aab8c9;
  border-radius: .4rem;
  background: #fff;
  color: inherit;
  font-size: 1rem;
}
.fields small { color: var(--muted); font-weight: 400; }
[aria-invalid="true"] { border-color: #a31c2c !important; }
.error { margin-top: .55rem; color: #a31c2c; }
.form-actions { margin-top: 1rem; }
.review-summary { background: #f4f7fb; padding: .85rem; border-radius: .45rem; }
dt { color: var(--muted); font-size: .8rem; }
dd { font-weight: 650; overflow-wrap: anywhere; }
.review-check { display: flex; align-items: center; gap: .55rem; min-height: 44px; margin-top: .6rem; }
.review-check input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--navy); }
.feedback:not(:empty) { background: #eaf7ef; border-color: #b4d9c0; color: #17472e; padding: .75rem 1rem; }

.scroll-hint { display: none; }
.register-scroll { overflow-x: auto; border-radius: 0 0 .8rem .8rem; }
.register-scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; min-width: 48rem; border-collapse: collapse; text-align: left; font-size: .875rem; }
th, td { padding: .7rem .85rem; border-top: 1px solid var(--border); }
th { color: #405168; background: #f0f4f8; white-space: nowrap; }
td:first-child { white-space: nowrap; }
td small { display: block; color: var(--muted); margin-top: .15rem; }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.new-row { background: #eef8f2; }

@media (max-width: 816px) {
  .scroll-hint { display: block; }
}

@media (max-width: 620px) {
  .shell { width: calc(100% - 2rem); }
  main { padding-block: 1.3rem 2rem; }
  .overview, .guide { flex-direction: column; align-items: stretch; }
  .fields { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner-inner { flex-wrap: wrap; gap: .55rem; }
  .panel-header { align-items: flex-start; flex-wrap: wrap; }
}
