:root {
  color-scheme: light;
  --ink: #111821;
  --paper: #f4f6f1;
  --paper-strong: #ffffff;
  --line: #cdd4cd;
  --line-dark: #839088;
  --blue: #2457ff;
  --blue-dark: #163bb4;
  --orange: #ff5d32;
  --lime: #c8ff43;
  --muted: #66716b;
  --shadow: 0 28px 80px rgba(17, 24, 33, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(17, 24, 33, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 33, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.site-shell {
  width: min(1480px, calc(100% - 36px));
  min-height: calc(100svh - 36px);
  margin: 18px auto;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: rgba(244, 246, 241, 0.94);
  box-shadow: var(--shadow);
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 74px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line-dark);
}

.brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--ink);
  color: var(--lime);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 17px;
  letter-spacing: -0.035em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.11em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.locale-pill {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line-dark);
  background: var(--paper-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.locale-pill i,
.board-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
}

.hero-copy {
  display: flex;
  min-width: 0;
  padding: 32px 40px 28px;
  flex-direction: column;
  justify-content: flex-start;
  border-right: 1px solid var(--line-dark);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow span {
  padding: 6px 9px;
  background: var(--blue);
  color: #fff;
}

.hero h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 850;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.hero h1 .title-line {
  display: block;
  white-space: nowrap;
}

.hero h1 em {
  color: var(--blue);
  font-style: normal;
}

.hero-lede {
  max-width: 610px;
  margin: 14px 0 0;
  color: #3d4943;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.primary-action {
  display: inline-flex;
  min-height: 48px;
  padding: 0 18px;
  align-items: center;
  gap: 24px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.primary-action svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.action-note {
  max-width: 190px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.6;
}

.invite-panel {
  position: relative;
  display: grid;
  max-width: 680px;
  margin-top: 18px;
  padding: 16px 18px;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 15px 22px;
  border: 1px solid var(--line-dark);
  background: var(--paper-strong);
  box-shadow: 8px 8px 0 rgba(36, 87, 255, 0.12);
}

.invite-panel::before {
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 5px;
  background: var(--orange);
  content: "";
}

.invite-heading {
  display: grid;
  gap: 5px;
  align-content: center;
}

.invite-heading span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.invite-heading strong {
  font-size: 13px;
  line-height: 1.45;
}

.invite-code-row {
  display: flex;
  align-items: stretch;
}

.invite-code-row code {
  display: grid;
  min-width: 96px;
  padding: 0 13px;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-right: 0;
  background: var(--paper);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.copy-button {
  display: inline-flex;
  min-height: 46px;
  padding: 0 14px;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: var(--blue-dark);
}

.copy-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.invite-footnote,
.copy-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.copy-status {
  position: absolute;
  right: 18px;
  bottom: 5px;
  color: var(--blue-dark);
  font-weight: 750;
}

.route-board {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 22px 24px 18px;
  flex-direction: column;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
}

.route-board::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 330px;
  height: 330px;
  border: 72px solid rgba(200, 255, 67, 0.14);
  border-radius: 50%;
  content: "";
}

.board-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.board-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.board-status i {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(200, 255, 67, 0.17);
}

.route-map {
  position: relative;
  height: clamp(132px, 16vh, 188px);
  margin: 12px 0 0;
}

.route-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.route-path-muted {
  stroke: rgba(255, 255, 255, 0.27);
  stroke-dasharray: 5 9;
}

.route-path-active {
  stroke: var(--lime);
}

.route-dot {
  position: absolute;
  z-index: 1;
  width: 17px;
  height: 17px;
  border: 4px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
  transform: translate(-50%, -50%);
}

.route-dot-one {
  top: 84%;
  left: 5.7%;
  background: var(--lime);
}

.route-dot-two {
  top: 58%;
  left: 32.7%;
  background: var(--lime);
}

.route-dot-three {
  top: 21.5%;
  left: 59.6%;
  background: var(--lime);
}

.route-dot-four {
  top: 54.5%;
  left: 94.2%;
}

.route-index {
  position: absolute;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.route-index-one {
  top: 70%;
  left: 2%;
}

.route-index-two {
  top: 43%;
  left: 29%;
}

.route-index-three {
  top: 5%;
  left: 57%;
}

.route-index-four {
  top: 39%;
  right: 1%;
}

.route-grid {
  position: relative;
  z-index: 2;
  display: grid;
  margin-top: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.38);
  border-left: 1px solid rgba(255, 255, 255, 0.38);
}

.route-card {
  min-height: 86px;
  padding: 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.38);
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(20, 52, 168, 0.28);
}

.route-card-featured {
  background: var(--lime);
  color: var(--ink);
}

.route-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.route-card h2 {
  margin: 13px 0 5px;
  font-size: 17px;
  letter-spacing: -0.035em;
}

.route-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.73);
  font-size: 11px;
  line-height: 1.5;
}

.route-card-featured p {
  color: rgba(17, 24, 33, 0.68);
}

.board-caption {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 520px;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.55;
}

.board-caption span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
}

.mock-footer {
  display: flex;
  min-height: 54px;
  padding: 0 32px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line-dark);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

@media (max-width: 980px) {
  .site-shell {
    width: min(760px, calc(100% - 24px));
    min-height: auto;
    margin: 12px auto;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    padding: 0 22px;
  }

  .site-nav {
    display: none;
  }

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

  .hero-copy {
    padding: 28px 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .route-board {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .site-shell {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    border: 0;
  }

  .site-header {
    min-height: 62px;
    padding: 0 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  .brand-copy small {
    display: none;
  }

  .locale-pill {
    padding: 7px 8px;
    font-size: 9px;
  }

  .hero-copy {
    min-height: 0;
    padding: 22px 18px 20px;
    justify-content: flex-start;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 9px;
  }

  .hero h1 {
    font-size: clamp(28px, 7.6vw, 36px);
  }

  .hero h1 .title-line {
    white-space: nowrap;
  }

  .hero-lede {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.62;
  }

  .hero-actions {
    margin-top: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .primary-action {
    width: 100%;
    justify-content: space-between;
  }

  .action-note {
    max-width: none;
  }

  .invite-panel {
    margin-top: 14px;
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .invite-code-row {
    width: 100%;
  }

  .invite-code-row code {
    flex: 1;
  }

  .invite-footnote {
    padding-right: 54px;
  }

  .copy-status {
    right: 14px;
    bottom: 4px;
  }

  .route-board {
    min-height: 0;
    padding: 20px 18px 16px;
  }

  .route-map {
    height: 140px;
  }

  .route-card {
    min-height: 76px;
    padding: 12px;
  }

  .route-card h2 {
    font-size: 14px;
  }

  .route-card p {
    font-size: 10px;
  }

  .mock-footer {
    padding: 15px 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-nav a::after,
  .primary-action {
    transition: none;
  }
}

.page-main {
  display: block;
}

.content-section {
  padding: clamp(44px, 5vw, 72px) clamp(24px, 5vw, 72px);
  border-top: 1px solid var(--line-dark);
}

.section-heading {
  display: grid;
  max-width: 760px;
  gap: 18px;
}

.section-heading h2,
.safety-copy h2 {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 40px);
  letter-spacing: -0.05em;
  line-height: 1.15;
}

.section-heading > p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.section-kicker {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.route-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(360px, 1.2fr);
  gap: clamp(28px, 4vw, 56px);
  background: var(--paper-strong);
}

.journey-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-dark);
  list-style: none;
}

.journey-item {
  display: grid;
  min-height: 0;
  padding: 14px 0;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.journey-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.journey-item strong {
  font-size: 17px;
  letter-spacing: -0.025em;
}

.journey-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.journey-state {
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 750;
}

.tools-section {
  background: var(--ink);
  color: #fff;
}

.section-heading-light .section-kicker {
  color: var(--lime);
}

.section-heading-light > p:last-child {
  color: rgba(255, 255, 255, 0.65);
}

.tool-grid {
  display: grid;
  margin-top: 32px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.tool-card {
  display: flex;
  min-height: 196px;
  padding: 20px;
  grid-column: span 2;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  text-decoration: none;
}

.tool-card:first-child,
.tool-card:nth-child(2) {
  grid-column: span 3;
}

.tool-card-active {
  background: var(--blue);
  transition: background 180ms ease, transform 180ms ease;
}

.tool-card-active:hover,
.tool-card-active:focus-visible {
  position: relative;
  z-index: 1;
  background: var(--blue-dark);
  transform: translateY(-5px);
}

.tool-card-planned {
  background: rgba(255, 255, 255, 0.035);
}

.tool-status {
  width: max-content;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tool-card strong {
  margin-top: 38px;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.tool-card p {
  max-width: 330px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  line-height: 1.7;
}

.tool-link {
  margin-top: auto;
  padding-top: 28px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
}

.safety-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(460px, 1.2fr);
  gap: clamp(50px, 9vw, 140px);
  background: var(--orange);
}

.safety-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.safety-copy .section-kicker {
  color: var(--ink);
}

.safety-rules {
  border-top: 1px solid rgba(17, 24, 33, 0.62);
}

.safety-rules p {
  display: grid;
  min-height: 88px;
  margin: 0;
  padding: 18px 0;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(17, 24, 33, 0.35);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.safety-rules span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.footer-copy,
.footer-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.footer-meta a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-shell-inner {
  min-height: calc(100svh - 36px);
}

.tool-main {
  padding: clamp(36px, 4vw, 64px) clamp(24px, 5vw, 72px) clamp(48px, 6vw, 88px);
}

.tool-hero {
  display: grid;
  max-width: 830px;
  gap: 18px;
}

.tool-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -0.05em;
  line-height: 1.12;
}

.tool-hero > p:last-child {
  max-width: 700px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.back-link {
  width: max-content;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--blue);
}

.calculator-layout,
.triage-layout {
  display: grid;
  margin-top: 64px;
  grid-template-columns: minmax(320px, 0.85fr) minmax(380px, 1.15fr);
  gap: clamp(30px, 6vw, 88px);
  align-items: start;
}

.tool-form {
  display: grid;
  gap: 25px;
}

.field-group {
  display: grid;
  gap: 9px;
}

.field-group label,
.choice-group legend {
  font-size: 12px;
  font-weight: 800;
}

.field-group small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.field-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line-dark);
  background: var(--paper-strong);
}

.field-control input,
.field-group select {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  outline: none;
  background: var(--paper-strong);
  color: var(--ink);
  font: 750 16px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.field-control input {
  border: 0;
}

.field-control input:focus,
.field-group select:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.field-control span {
  padding: 0 15px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.result-card,
.triage-result {
  position: sticky;
  top: 24px;
  padding: clamp(30px, 5vw, 62px);
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  box-shadow: 14px 14px 0 rgba(36, 87, 255, 0.16);
}

.result-card::after,
.triage-result::after {
  position: absolute;
  top: -70px;
  right: -70px;
  width: 190px;
  height: 190px;
  border: 45px solid rgba(200, 255, 67, 0.12);
  border-radius: 50%;
  content: "";
}

.result-label {
  position: relative;
  z-index: 1;
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.result-value {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 24px;
  font-size: clamp(58px, 7vw, 100px);
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.result-unit {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.result-breakdown {
  position: relative;
  z-index: 1;
  margin: 38px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.result-breakdown div {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
}

.result-breakdown dt,
.result-breakdown dd {
  margin: 0;
  font-size: 11px;
}

.result-breakdown dt {
  color: rgba(255, 255, 255, 0.6);
}

.result-breakdown dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

.result-card > p {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  line-height: 1.6;
}

.tool-guide {
  margin-top: 76px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.tool-guide summary {
  padding: 22px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.guide-grid {
  display: grid;
  padding: 12px 0 32px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.guide-grid section {
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.guide-grid section:first-child {
  padding-left: 0;
  border-left: 0;
}

.guide-grid h2 {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.guide-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.triage-form {
  padding: 28px;
  border: 1px solid var(--line-dark);
  background: var(--paper-strong);
}

.choice-group {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  border: 0;
}

.choice-group legend {
  margin-bottom: 8px;
}

.choice-group label {
  display: flex;
  min-height: 48px;
  padding: 0 14px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.choice-group input {
  accent-color: var(--blue);
}

.diagnose-button {
  min-height: 54px;
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.diagnose-button:hover,
.diagnose-button:focus-visible {
  background: var(--blue-dark);
}

.triage-result h2 {
  position: relative;
  z-index: 1;
  max-width: 570px;
  margin: 24px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.triage-result > p {
  position: relative;
  z-index: 1;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.7;
}

.triage-result ol {
  position: relative;
  z-index: 1;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: triage;
}

.triage-result li {
  display: grid;
  min-height: 58px;
  padding: 13px 0;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  line-height: 1.55;
  counter-increment: triage;
}

.triage-result li::before {
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  content: "0" counter(triage);
}

.triage-result-alert {
  background: #731f18;
  box-shadow: 14px 14px 0 rgba(255, 93, 50, 0.2);
}

.risk-banner {
  margin-top: 32px;
  padding: 18px 20px;
  border-left: 5px solid var(--orange);
  background: #fff1ec;
  font-size: 11px;
  line-height: 1.65;
}

.error-page {
  display: flex;
  width: min(860px, calc(100% - 36px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 46px 0;
  flex-direction: column;
  justify-content: center;
}

.error-code {
  margin-top: auto;
  color: var(--blue);
  font-size: clamp(118px, 28vw, 340px);
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 0.78;
}

.error-page .section-kicker {
  margin-top: 36px;
}

.error-page h1 {
  margin: 16px 0 0;
  font-size: clamp(36px, 7vw, 72px);
  letter-spacing: -0.06em;
}

.error-page > p:not(.section-kicker) {
  max-width: 570px;
  margin: 20px 0 28px;
  color: var(--muted);
  line-height: 1.7;
}

.error-page .primary-action {
  width: max-content;
  margin-bottom: auto;
}

@media (max-width: 980px) {
  .route-section,
  .safety-section,
  .calculator-layout,
  .triage-layout {
    grid-template-columns: 1fr;
  }

  .tool-card,
  .tool-card:first-child,
  .tool-card:nth-child(2) {
    grid-column: span 3;
  }

  .result-card,
  .triage-result {
    position: relative;
    top: auto;
  }

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

  .guide-grid section:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .content-section,
  .tool-main {
    padding: 36px 18px;
  }

  .section-heading h2,
  .safety-copy h2 {
    font-size: 26px;
  }

  .journey-item {
    grid-template-columns: 42px 1fr;
  }

  .journey-state {
    display: none;
  }

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

  .tool-card,
  .tool-card:first-child,
  .tool-card:nth-child(2) {
    min-height: 164px;
    grid-column: auto;
  }

  .footer-copy,
  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .tool-hero h1 {
    font-size: 30px;
  }

  .calculator-layout,
  .triage-layout {
    margin-top: 42px;
  }

  .result-card,
  .triage-result,
  .triage-form {
    padding: 24px;
  }

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

  .guide-grid section,
  .guide-grid section:nth-child(odd) {
    padding: 0 0 22px;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }

  .error-page {
    width: calc(100% - 36px);
  }

  .article-layout,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
    order: -1;
    margin-bottom: 28px;
  }

  .shot-figure img {
    width: 100%;
  }
}

.page-footer {
  display: flex;
  min-height: 58px;
  padding: 16px 32px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line-dark);
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.article-main,
.legal-main {
  padding: clamp(32px, 4vw, 56px) clamp(24px, 5vw, 72px) clamp(48px, 6vw, 80px);
}

.article-layout,
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 48px;
  align-items: start;
}

.article-hero h1,
.legal-hero h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -0.05em;
  line-height: 1.14;
}

.article-lede,
.legal-lede {
  max-width: 680px;
  margin: 14px 0 0;
  color: #3d4943;
  font-size: 16px;
  line-height: 1.7;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.article-toc,
.legal-aside {
  position: sticky;
  top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line-dark);
  background: var(--paper-strong);
}

.article-toc p,
.legal-aside p {
  margin: 0 0 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.article-toc a,
.legal-aside a {
  display: block;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  text-decoration: none;
}

.article-toc a:hover,
.legal-aside a:hover {
  color: var(--blue);
}

.article-body,
.legal-body {
  max-width: 760px;
}

.article-body h2,
.legal-body h2 {
  margin: 36px 0 12px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.article-body h3,
.legal-body h3 {
  margin: 22px 0 8px;
  font-size: 16px;
}

.article-body p,
.legal-body p,
.article-body li,
.legal-body li {
  color: #2b3530;
  font-size: 15px;
  line-height: 1.8;
}

.article-body p,
.legal-body p {
  margin: 0 0 14px;
}

.article-body ul,
.article-body ol,
.legal-body ul,
.legal-body ol {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.article-body table {
  width: 100%;
  margin: 0 0 18px;
  border-collapse: collapse;
  font-size: 13px;
}

.article-body th,
.article-body td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--paper);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.answer-lead,
.tldr-box {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-left: 5px solid var(--blue);
  background: var(--paper-strong);
}

.tldr-box {
  border-left-color: var(--lime);
  background: #111821;
  color: #fff;
}

.tldr-box strong,
.warn-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.warn-strip {
  margin: 0 0 22px;
  padding: 16px 18px;
  border-left: 5px solid var(--orange);
  background: #fff1ec;
}

.score-grid,
.choice-tree {
  display: grid;
  margin: 0 0 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line-dark);
}

.score-grid div,
.choice-tree div {
  min-height: 92px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.score-grid div:nth-child(2n),
.choice-tree div:nth-child(2n) {
  border-right: 0;
}

.score-grid span,
.choice-tree span {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.timeline {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.timeline li {
  display: grid;
  padding: 14px 0;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.timeline b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--blue);
}

.shot-figure {
  margin: 8px 0 22px;
  padding: 0;
}

.shot-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line-dark);
}

.shot-figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.register-box {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-dark);
  background: var(--paper-strong);
  box-shadow: 8px 8px 0 rgba(36, 87, 255, 0.12);
}

.register-box a {
  display: inline-flex;
  min-height: 44px;
  margin: 10px 0 8px;
  padding: 0 16px;
  align-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.register-box p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}

.related-list {
  display: grid;
  margin: 12px 0 0;
  gap: 8px;
}

.related-list a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.hub-grid {
  display: grid;
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line-dark);
}

.hub-card {
  display: block;
  min-height: 132px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.hub-card:nth-child(2n) {
  border-right: 0;
}

.hub-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hub-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.hub-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.checklist-result {
  padding: 28px;
  background: var(--ink);
  color: #fff;
  box-shadow: 14px 14px 0 rgba(36, 87, 255, 0.16);
}

.checklist-result[data-tone="stop"] {
  background: #731f18;
}

.checklist-result[data-tone="wait"] {
  background: #163bb4;
}

.checklist-result h2 {
  margin: 10px 0 12px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.checklist-result ol {
  margin: 16px 0 0;
  padding-left: 1.1em;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .score-grid,
  .choice-tree,
  .hub-grid {
    grid-template-columns: 1fr;
  }

  .hub-card,
  .hub-card:nth-child(2n),
  .score-grid div,
  .choice-tree div {
    border-right: 0;
  }
}

@media (max-width: 600px) {
  .page-footer,
  .article-main,
  .legal-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
