:root {
  --paper: rgba(255, 252, 246, 0.92);
  --paper-strong: rgba(255, 252, 246, 0.98);
  --ink: #1f2330;
  --muted: #5d6474;
  --line: rgba(31, 35, 48, 0.12);
  --teal: #246a73;
  --coral: #dd6e42;
  --sage: #7c9885;
  --rose: #b33951;
  --shadow: 0 18px 50px rgba(65, 42, 12, 0.12);
  --success: #2f7a44;
  --warning: #b88a19;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(221, 110, 66, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(36, 106, 115, 0.16), transparent 24%),
    radial-gradient(circle at 50% 120%, rgba(124, 152, 133, 0.18), transparent 34%),
    linear-gradient(155deg, #f7f2e8 0%, #ebe2d3 45%, #d8ccb2 100%);
}

.shell {
  width: min(1480px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px 8px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
}

.hero {
  padding: 10px 8px 20px;
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--coral);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 0.95;
}

.lede {
  margin: 16px 0 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.65;
}

.hero-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chip,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-chip {
  background: rgba(255, 252, 245, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 20px rgba(82, 57, 20, 0.08);
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sidebar,
.main-stack {
  display: grid;
  gap: 18px;
}

.main-stack {
  min-width: 0;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.outcome-card {
  background:
    radial-gradient(circle at top right, rgba(36, 106, 115, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(249, 243, 234, 0.92));
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head h2 {
  margin: 0;
}

.badge {
  background: rgba(36, 106, 115, 0.12);
}

.field,
.stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.field label,
.metric-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px auto;
  gap: 10px;
  align-items: center;
}

.input-row.compact-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

input[type="number"],
input[type="text"],
select,
button {
  font: inherit;
}

input[type="number"],
input[type="text"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.unit,
.helper-text {
  color: var(--muted);
}

.helper-text {
  margin: 0;
  line-height: 1.55;
}

.helper-text a {
  color: var(--teal);
}

.hidden {
  display: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(31, 35, 48, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.62), transparent 38%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(247, 241, 231, 0.76));
}

.highlight-card {
  border-color: rgba(36, 106, 115, 0.22);
  box-shadow: inset 0 0 0 1px rgba(36, 106, 115, 0.08);
}

.metric-label {
  display: block;
  color: var(--muted);
}

.metric-value {
  display: block;
  margin-top: 8px;
  font-size: 1.38rem;
  line-height: 1.08;
}

.limiter-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(31, 35, 48, 0.08);
}

.limiter-value {
  display: block;
  margin-top: 8px;
  font-size: 1.65rem;
  line-height: 1;
}

.bar-stack {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 35, 48, 0.08);
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 140ms ease;
}

.bar-1 {
  background: linear-gradient(90deg, rgba(124, 152, 133, 0.8), #7c9885);
}

.bar-2 {
  background: linear-gradient(90deg, rgba(36, 106, 115, 0.7), #246a73);
}

.bar-3 {
  background: linear-gradient(90deg, rgba(221, 110, 66, 0.72), #dd6e42);
}

.bar-4 {
  background: linear-gradient(90deg, rgba(179, 57, 81, 0.72), #b33951);
}

.stat-list {
  display: grid;
  gap: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 35, 48, 0.08);
}

.stat-row strong {
  text-align: right;
}

.note-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.note-list li + li {
  margin-top: 8px;
}

.site-footer {
  width: min(1480px, calc(100vw - 28px));
  margin: 0 auto 24px;
  padding-bottom: 10px;
  color: rgba(31, 35, 48, 0.75);
  font-size: 0.92rem;
  line-height: 1.6;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-top: 4px;
}

.site-footer a {
  color: var(--teal);
}

@media (max-width: 1180px) {
  .app-layout,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .shell,
  .site-footer {
    width: min(100vw - 18px, 100%);
  }

  .card {
    padding: 16px;
    border-radius: 18px;
  }

  .input-row,
  .metric-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

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