:root {
  --pageBg: #edf2f7;
  --pageGlow: rgba(0, 33, 71, 0.08);
  --card: #ffffff;
  --ink: #14243d;
  --muted: #4a5d7a;
  --line: #c8d3e2;
  --accent: #002147;
  --accentSoft: rgba(0, 33, 71, 0.08);
  --shadow: 0 12px 28px rgba(0, 33, 71, 0.08);
  --labelRowMin: 2.25em;

  --bad: #b91c1c;
  --mid: #b45309;
  --good: #047857;

  --badBg: rgba(185, 28, 28, 0.08);
  --midBg: rgba(245, 158, 11, 0.16);
  --goodBg: rgba(4, 120, 87, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Times New Roman", Times, "Nimbus Roman No9 L", serif;
  background:
    radial-gradient(circle at top right, var(--pageGlow), transparent 28%),
    linear-gradient(180deg, #f7f9fc 0%, var(--pageBg) 100%);
  color: var(--ink);
  padding: 24px 16px 48px;
}

a {
  color: inherit;
}

.siteShell {
  max-width: 1120px;
  margin: 0 auto;
}

.siteBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid rgba(184, 198, 219, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(0, 33, 71, 0.06);
  backdrop-filter: blur(10px);
}

.siteBrand {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.siteTagline {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
}

.homeHero,
.panel,
.card {
  background: var(--card);
  border: 1px solid #b8c6db;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.homeHero {
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(0, 33, 71, 0.08), rgba(255, 255, 255, 0.98) 55%),
    var(--card);
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.homeHero h1 {
  margin: 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  color: var(--accent);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.04;
}

.homeLead {
  margin: 18px 0 0;
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.heroActions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 26px;
}

.buttonLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.buttonLink:hover {
  transform: translateY(-1px);
}

.primaryLink {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(0, 33, 71, 0.14);
}

.secondaryLink {
  border-color: #9db0cc;
  background: #ffffff;
  color: var(--accent);
}

.statusNote {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.homeGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 24px;
  text-align: center;
}

.panel h2 {
  margin: 0;
  color: var(--accent);
  font-size: 28px;
  line-height: 1.15;
}

.resourceCard p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.resourceCard p {
  margin: 14px 0 0;
}

.resourceCard .buttonLink {
  margin-top: 18px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.managedBy {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
}

.card {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.hdr {
  text-align: center;
}

.hdr h1 {
  margin: 0;
  color: var(--accent);
  font-size: 22px;
  letter-spacing: 0.2px;
}

.sub {
  margin: 8px auto 20px;
  max-width: 860px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 16px;
  align-items: start;
}

.field {
  display: grid;
  grid-template-rows: minmax(var(--labelRowMin), auto) minmax(48px, auto);
  align-content: start;
  min-width: 0;
}

.field > span,
.labelRow span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--labelRowMin);
  margin: 0;
  text-align: center;
}

.labelRow {
  position: relative;
  display: block;
  min-height: var(--labelRowMin);
  margin: 0;
}

.field.has-help {
  grid-template-rows: minmax(var(--labelRowMin), auto) minmax(48px, auto) auto;
}

.labelRow span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--labelRowMin);
  width: 100%;
  padding: 0 36px;
  text-align: center;
}

.field-wide {
  grid-column: 1 / -1;
  max-width: 460px;
  width: 100%;
  justify-self: center;
}

select,
input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
input:focus {
  border-color: rgba(0, 33, 71, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.12);
}

.helpBtn {
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%);
  width: 28px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.helpBtn:hover {
  background: rgba(0, 33, 71, 0.06);
}

.helpText {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
}

button {
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.actions button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(0, 33, 71, 0.14);
}

button.primary {
  width: min(420px, 100%);
  background: var(--accent);
  color: #ffffff;
  border-color: rgba(0, 33, 71, 0.5);
}

button.secondary {
  width: min(420px, 100%);
  background: #ffffff;
  color: var(--accent);
  border-color: #9db0cc;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.result {
  width: min(760px, 100%);
  margin: 16px auto 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pill {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef3f9;
  color: var(--ink);
  font-size: 12px;
}

.big {
  margin-top: 10px;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.result[data-band="red"] {
  border-color: rgba(185, 28, 28, 0.45);
  background: var(--badBg);
}

.result[data-band="red"] .pill {
  border-color: rgba(185, 28, 28, 0.55);
  background: rgba(185, 28, 28, 0.1);
}

.result[data-band="yellow"] {
  border-color: rgba(245, 158, 11, 0.55);
  background: var(--midBg);
}

.result[data-band="yellow"] .pill {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.18);
}

.result[data-band="green"] {
  border-color: rgba(4, 120, 87, 0.45);
  background: var(--goodBg);
}

.result[data-band="green"] .pill {
  border-color: rgba(4, 120, 87, 0.55);
  background: rgba(4, 120, 87, 0.1);
}

.about {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #d5dfeb;
}

.about summary {
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.aboutBody {
  padding-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.fine {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .homeGrid {
    grid-template-columns: 1fr;
  }

  .siteBar {
    flex-direction: column;
    align-items: flex-start;
  }

  .siteTagline {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 760px) {
  body {
    padding: 18px 12px 36px;
  }

  .homeHero,
  .panel,
  .card {
    padding: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .field {
    grid-template-rows: auto minmax(48px, auto);
  }

  .field.has-help {
    grid-template-rows: auto minmax(48px, auto) auto;
  }

  .field > span,
  .labelRow {
    min-height: 1.9em;
  }
}
