:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #5b6761;
  --paper: #fbfaf5;
  --panel: #ffffff;
  --line: #d9ded5;
  --mint: #3d8f72;
  --teal: #2c6f78;
  --gold: #c78a28;
  --coral: #d85e4a;
  --plum: #76506b;
  --shadow: 0 24px 70px rgba(23, 32, 29, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(23, 32, 29, 0.1);
  background: rgba(251, 250, 245, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, var(--mint) 0 50%, var(--coral) 50% 100%);
  box-shadow: 0 0 0 5px rgba(61, 143, 114, 0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.section-band {
  position: relative;
  padding: 92px 32px;
}

.hero {
  min-height: calc(100svh - 68px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #eef2ea;
}

.signal-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.hero-inner,
.content-grid,
.section-heading,
.stress-grid,
.model-grid,
.principles-grid,
.source-list,
.site-footer,
.flow-tabs,
.flow-panels {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  align-items: end;
}

.hero-copy {
  max-width: 800px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(3.65rem, 8.6vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.18;
}

.hero-lede {
  max-width: 700px;
  color: #2e3a35;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button,
.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffdf7;
}

.button.secondary,
.tab-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.hero-panel,
.calculator,
.checklist-tool {
  border: 1px solid rgba(23, 32, 29, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
}

.hero-panel p {
  margin: 22px 0 0;
  color: var(--muted);
}

.metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.metric-row strong {
  color: var(--mint);
  font-size: 1.4rem;
}

.metric-row.muted strong {
  color: var(--coral);
}

.metric-label {
  color: var(--muted);
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  gap: 70px;
  align-items: start;
}

.copy-stack p,
.section-heading p,
.content-grid > div > p {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading {
  max-width: 850px;
  margin-bottom: 44px;
}

.stress-grid,
.model-grid,
.principles-grid {
  display: grid;
  gap: 18px;
}

.stress-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 48px;
}

.stress-grid article,
.signal-card,
.principles-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stress-grid article {
  min-height: 220px;
  padding: 24px;
}

.stress-number {
  display: block;
  margin-bottom: 52px;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 900;
}

.model-section {
  background: #f6f2e9;
}

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

.signal-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 26px;
}

.signal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background: var(--mint);
}

.signal-card.crystal::before {
  background: var(--gold);
}

.signal-card.endurance::before {
  background: var(--plum);
}

.card-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-card h3 {
  margin-top: 48px;
  font-size: 1.8rem;
}

.signal-card p,
.signal-card li,
.principles-grid p,
.stress-grid p {
  color: var(--muted);
}

.signal-card ul {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.signal-card li {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.calculator-section {
  background: #edf4f1;
}

.overload-section {
  background: #fffdf7;
}

.overload-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: min(1160px, 100%);
  margin: 48px auto 0;
}

.overload-map::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(216, 94, 74, 0.58), rgba(44, 111, 120, 0.5), transparent);
}

.overload-map article {
  position: relative;
  min-height: 245px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 46px rgba(23, 32, 29, 0.07);
}

.overload-map article::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(216, 94, 74, 0.12);
}

.overload-map article:nth-child(2)::after {
  background: rgba(199, 138, 40, 0.15);
}

.overload-map article:nth-child(3)::after {
  background: rgba(118, 80, 107, 0.14);
}

.map-kicker {
  display: block;
  margin-bottom: 48px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.overload-map p {
  color: var(--muted);
}

.bridge-note {
  width: min(900px, 100%);
  margin: 28px auto 0;
  padding: 22px 24px;
  border-left: 5px solid var(--coral);
  border-radius: 0 8px 8px 0;
  background: #f8efe9;
}

.bridge-note strong {
  display: block;
  margin-bottom: 6px;
}

.bridge-note p {
  margin: 0;
  color: var(--muted);
}

.procedure-section {
  background: #f7f3e8;
}

.procedure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: min(1160px, 100%);
  margin: 0 auto;
}

.procedure-grid article {
  min-height: 330px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(23, 32, 29, 0.07);
}

.procedure-kicker {
  display: block;
  margin-bottom: 58px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.procedure-grid p {
  color: var(--muted);
}

.procedure-close {
  width: min(780px, 100%);
  margin: 28px auto 0;
  padding: 18px 22px;
  border-radius: 8px;
  background: #fffaf0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 800;
}

.calculator {
  padding: 26px;
}

.meter-labels {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
  font-weight: 900;
}

.meter-labels span {
  color: var(--muted);
}

.meter-track {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe3dd;
}

.meter-track span {
  display: block;
  width: 78%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--gold), var(--mint));
  transition: width 220ms ease;
}

.toggle-list,
.choice-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.toggle-list label,
.choice-grid label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.66);
  font-weight: 700;
}

.choice-grid label > span {
  display: grid;
  gap: 2px;
}

.choice-grid strong {
  line-height: 1.2;
}

.choice-grid small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
}

input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.redesign-section {
  background: #fbfaf5;
}

.flow-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.flow-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(23, 32, 29, 0.08);
}

.flow-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  min-height: 190px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.flow-list li:last-child {
  border-right: 0;
}

.flow-list span {
  display: block;
  margin-bottom: 54px;
  color: var(--coral);
  font-weight: 900;
}

.flow-list.redesigned span {
  color: var(--mint);
}

.flow-list p {
  margin: 0;
  color: var(--muted);
}

.principles-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.principles-grid article {
  padding: 22px;
}

.checklist-section {
  background: #f3f1f6;
}

.checklist-tool {
  padding: 24px;
}

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

.recommendation {
  margin-top: 18px;
  padding: 18px;
  border-left: 5px solid var(--plum);
  background: #ffffff;
}

.recommendation span {
  display: block;
  margin-bottom: 8px;
  color: var(--plum);
  font-weight: 900;
}

.recommendation p {
  margin: 0;
  color: var(--muted);
}

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

.recommendation-list article {
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.recommendation-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.recommendation-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.builder-section {
  background: #edf4f1;
}

.builder-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 24px;
  width: min(1160px, 100%);
  margin: 0 auto;
}

.builder-form,
.builder-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(23, 32, 29, 0.08);
}

.builder-form {
  padding: 24px;
}

.field-label,
.builder-fieldset legend {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 900;
}

.builder-form textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.builder-form textarea:focus {
  outline: 3px solid rgba(44, 111, 120, 0.18);
  border-color: var(--teal);
}

.builder-fieldset {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

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

.builder-signal-grid label {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(237, 244, 241, 0.62);
  font-weight: 750;
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.builder-output {
  padding: 24px;
}

.builder-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--muted);
}

.builder-empty span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
}

.builder-empty p {
  max-width: 420px;
  margin-bottom: 0;
}

.builder-plan {
  display: grid;
  gap: 14px;
}

.builder-loading,
.builder-notice {
  padding: 14px 16px;
  border-radius: 8px;
  background: #edf4f1;
  color: var(--teal);
  font-weight: 850;
}

.builder-notice {
  background: #fff4df;
  color: #7a520d;
}

.builder-plan header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.builder-plan header span {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.builder-plan h3 {
  margin-bottom: 8px;
  font-size: 1.7rem;
}

.builder-plan article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}

.builder-plan h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.builder-plan ul,
.builder-plan ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.builder-plan p {
  margin-bottom: 0;
  color: var(--muted);
}

.candidate-section {
  background: #f8f5ed;
}

.sources-section {
  background: #17201d;
  color: white;
}

.sources-section .eyebrow,
.sources-section .section-heading p {
  color: #a7d0c1;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-list a {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f7f5ed;
  text-decoration: none;
}

.source-list a:hover {
  border-color: rgba(255, 255, 255, 0.42);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 32px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer p span {
  display: inline-block;
  margin-left: 10px;
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .section-band {
    padding: 68px 20px;
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
    padding-bottom: 44px;
  }

  .hero-inner,
  .content-grid,
  .builder-shell {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-panel {
    max-width: 520px;
  }

  .stress-grid,
  .model-grid,
  .overload-map,
  .procedure-grid,
  .principles-grid,
  .flow-list {
    grid-template-columns: 1fr;
  }

  .overload-map::before {
    top: 10%;
    bottom: 10%;
    left: 50%;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, transparent, rgba(216, 94, 74, 0.58), rgba(44, 111, 120, 0.5), transparent);
  }

  .flow-list li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flow-list li:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 560px) {
  .choice-grid,
  .builder-signal-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.86rem;
    line-height: 0.96;
  }

  .hero-lede {
    font-size: 1.02rem;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-panel {
    padding: 18px;
  }

  .metric-row {
    padding: 10px 0;
  }

  .metric-row strong {
    font-size: 1.18rem;
  }

  .hero-panel p {
    margin-top: 14px;
    font-size: 0.96rem;
  }

  .site-footer {
    flex-direction: column;
  }
}
