* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #eef7ff;
  background: #0b1024;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(56, 72, 168, 0.36), transparent 52%),
    radial-gradient(ellipse at 85% 18%, rgba(109, 40, 217, 0.26), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(30, 58, 138, 0.22), transparent 60%),
    #0b1024;
}

main {
  width: min(100% - 2rem, 760px);
  margin: auto;
  padding: 2rem 0 3rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.3rem;
}

h1 {
  font-size: clamp(2.6rem, 8vw, 4rem);
  line-height: 1;
  margin: .35rem 0;
}

h1 span, small, .reading { color: #70ffe0; }

small, .badge {
  letter-spacing: .14em;
  font-size: .71rem;
  font-weight: 750;
}

.badge {
  border: 1px solid #7e82ca;
  padding: .5rem .65rem;
  border-radius: 99px;
}

main > section {
  padding: 1.25rem;
  margin-bottom: .9rem;
  border: 1px solid #394670;
  border-radius: 1.3rem;
  background: rgba(17, 24, 51, 0.88);
}

.hero {
  background: linear-gradient(135deg, #143444, #17213e 65%, #302151);
  box-shadow: 0 12px 45px #0005;
}

h2 {
  margin: .3rem 0 .7rem;
  font-size: 1.15rem;
}

.reading {
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.reading small { font-size: 1rem; }
p, footer { color: #bdcbe0; }

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

button {
  font: inherit;
  font-weight: 650;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid #52698e;
  border-radius: .8rem;
  padding: .55rem .9rem;
  background: #182743;
  color: inherit;
}

button[aria-pressed=true] {
  background: #70ffe0;
  color: #091220;
}

button:disabled {
  opacity: .45;
  cursor: default;
}

button:focus-visible,
#ec-form input:focus-visible,
#ec-form select:focus-visible {
  outline: 2px solid #70ffe0;
  outline-offset: 3px;
}

ul { padding-left: 1.25rem; }
li { margin: .45rem 0; }
footer { font-size: .85rem; }

.ec-grid, .ec-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.ec-block { margin-top: 1rem; }
.ec-block[hidden], .ec-grid[hidden] { display: none; }

#ec-form label {
  display: grid;
  align-content: start;
  gap: .35rem;
  font-size: .92rem;
}

#ec-form input, #ec-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid #52698e;
  border-radius: .65rem;
  background: #182743;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}

#ec-scenario {
  margin: 0 0 .65rem;
  font-size: 1rem;
}

.ec-results { margin: 0; }

.ec-results div {
  min-width: 0;
  padding: .75rem;
  border: 1px solid #354468;
  border-radius: .8rem;
  background: #14213a;
}

.ec-results dt {
  color: #bdcbe0;
  font-size: .85rem;
}

.ec-results dd {
  margin: .3rem 0 0;
  color: #70ffe0;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.ec-note { font-size: .85rem; }
#ec-assumptions {
  margin-top: .75rem;
  padding: .65rem .85rem;
  border-left: 3px solid #70ffe0;
  border-radius: .6rem;
  background: #102036;
  color: #dbe8ff;
  font-size: .88rem;
  line-height: 1.45;
}
#ec-status:empty { display: none; }

@media (max-width: 520px) {
  .ec-grid, .ec-results { grid-template-columns: 1fr; }
}