:root {
  color-scheme: light;
  --ink: #172431;
  --muted: #5c6d7a;
  --line: #dce4e8;
  --surface: #ffffff;
  --canvas: #f3f7f8;
  --teal: #006d72;
  --teal-dark: #004e53;
  --teal-soft: #e4f3f2;
  --warning: #8a5100;
  --warning-bg: #fff4dc;
  --error: #8b1e2d;
  --error-bg: #fdecef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
}

.hero {
  color: #fff;
  background: linear-gradient(120deg, #003f45 0%, #00767a 100%);
  border-bottom: 5px solid #79c6c2;
}

.hero__inner, .layout, footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero__inner { padding: 42px 0 38px; }
.top-nav { display: flex; justify-content: space-between; margin-bottom: 24px; }
.top-nav a { color: #d9efee; text-decoration: none; font-weight: 750; }
.eyebrow, .step {
  margin: 0 0 6px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow { color: #bfe8e6; }
h1 { max-width: 850px; margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
.hero__summary { margin: 16px 0 0; font-size: 1.08rem; color: #d9efee; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .85fr);
  gap: 24px;
  padding: 32px 0;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(18, 46, 55, .07);
}
.form-card { padding: 28px; }
.result-card, .evidence-card { padding: 24px; }
.result-column { display: grid; gap: 20px; position: sticky; top: 20px; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
.step { color: var(--teal); }
h2 { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.privacy { max-width: 260px; margin: 0; color: var(--muted); font-size: .85rem; text-align: right; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field__label { font-weight: 750; }
.field__input-wrap { position: relative; display: block; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 86px 10px 12px;
  border: 1px solid #aebcc4;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
}
.field input:focus { outline: 3px solid rgba(0, 109, 114, .18); border-color: var(--teal); }
.field__unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .84rem; }
.field__range { color: var(--muted); font-size: .78rem; }
.primary-button {
  width: 100%;
  margin-top: 24px;
  padding: 14px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--teal);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.primary-button:hover { background: var(--teal-dark); }

.result-label { margin: 24px 0 2px; color: var(--muted); }
.result-value { margin: 0; color: var(--teal-dark); font-size: 3rem; font-weight: 850; letter-spacing: -.04em; }
.result-value span { font-size: 1rem; letter-spacing: 0; }
.empty-result { margin: 22px 0 0; padding: 28px 18px; border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark); text-align: center; }
.limitation, .model-note { margin: 16px 0 0; color: var(--muted); font-size: .82rem; }
.limitation { padding: 12px; border-left: 3px solid #d59731; background: #fff9ec; color: #6f4b10; }
.metrics, .model-details { display: grid; gap: 0; margin: 20px 0 0; }
.metrics div, .model-details div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 750; text-align: right; }
.evidence-card h2 { margin-bottom: 14px; }
.model-details { font-size: .87rem; }
.secondary-link { display: inline-block; margin-top: 18px; color: var(--teal); font-weight: 750; text-decoration: none; }
.manual { width: min(980px, calc(100% - 32px)); margin: 0 auto; display: grid; gap: 20px; padding: 28px 0; }
.prose { padding: 28px; }
.prose h2 { margin-bottom: 14px; }
.prose p { max-width: 85ch; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--teal); }
.callout { margin: 18px 0; padding: 14px; border-left: 4px solid #d59731; background: #fff9ec; color: #65460f; }

.alert { margin: 0 0 20px; padding: 12px 14px; border-radius: 9px; font-size: .9rem; }
.alert--error { color: var(--error); background: var(--error-bg); }
.alert--warning { margin-top: 18px; color: var(--warning); background: var(--warning-bg); }
.alert ul { margin: 8px 0 0; padding-left: 20px; }

footer { padding: 0 0 40px; color: var(--muted); font-size: .88rem; }
footer strong { color: var(--ink); }

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .result-column { position: static; grid-row: auto; }
  .layout--has-prediction .result-column { grid-row: 1; }
  .section-heading { align-items: start; flex-direction: column; }
  .privacy { text-align: left; }
}

@media (max-width: 560px) {
  .hero__inner, .layout, footer { width: min(100% - 22px, 1180px); }
  .hero__inner { padding: 30px 0; }
  .layout { padding: 18px 0; }
  .form-card, .result-card, .evidence-card { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
}
