:root {
  --paper: #fff8ed;
  --paper-strong: #ffe9cf;
  --ink: #17201c;
  --muted: #5d665e;
  --line: #d9c9b2;
  --mint: #0d7c66;
  --mint-soft: #d8f1e7;
  --coral: #d9553f;
  --coral-soft: #ffe0d8;
  --blue: #2b5f86;
  --blue-soft: #dcebf3;
  --gold: #c6892d;
  --white: #fffdf8;
  --shadow: 0 18px 50px rgba(42, 31, 18, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(13, 124, 102, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(13, 124, 102, 0.05) 1px, transparent 1px), var(--paper);
  background-size: 34px 34px;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "PingFang SC", serif;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.hero {
  min-height: 92svh;
  padding: 18px clamp(18px, 4vw, 56px) 48px;
  background:
    linear-gradient(
      115deg,
      rgba(255, 248, 237, 0.96) 0 54%,
      rgba(216, 241, 231, 0.72) 54% 100%
    ),
    var(--paper);
}

.topbar,
.hero-grid,
.section,
.compare-band,
footer {
  width: min(1160px, 100%);
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 34px;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(135deg, var(--white), var(--mint-soft));
  box-shadow: inset 0 -8px 0 rgba(13, 124, 102, 0.16);
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-links a {
  padding: 9px 12px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--line);
  background: var(--white);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 470px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(2.4rem, 6.2vw, 5.9rem);
  line-height: 0.97;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-lead {
  max-width: 100%;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.85;
}

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

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.primary-action {
  background: var(--ink);
  color: var(--white);
  box-shadow: 7px 7px 0 var(--gold);
}

.secondary-action {
  background: var(--white);
}

.hero-visual {
  margin: 0;
  position: relative;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
}

.hero-visual figcaption {
  position: absolute;
  left: -22px;
  right: 22px;
  bottom: 18px;
  padding: 14px 16px;
  background: rgba(255, 253, 248, 0.92);
  border-left: 5px solid var(--coral);
  color: var(--ink);
  line-height: 1.6;
  backdrop-filter: blur(10px);
}

.alert-strip {
  width: min(1160px, calc(100% - 36px));
  margin: -28px auto 0;
  padding: 16px 18px;
  background: var(--coral-soft);
  border: 1px solid var(--coral);
  box-shadow: var(--shadow);
  line-height: 1.7;
}

.section {
  padding: clamp(52px, 8vw, 92px) clamp(18px, 3vw, 28px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 30px;
}

.section-heading.compact {
  display: block;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 3.6rem);
  line-height: 1.08;
}

.anatomy-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(300px, 1.15fr);
  gap: 28px;
  align-items: stretch;
}

.anatomy-copy {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
}

.anatomy-copy p {
  margin-top: 0;
  color: var(--muted);
  line-height: 1.8;
}

.plain-list {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding: 12px 0 12px 26px;
  border-top: 1px solid var(--line);
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 20px;
  width: 9px;
  height: 9px;
  background: var(--mint);
  border-radius: 50%;
}

.image-pair {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 12px;
  min-height: 320px;
}

.image-pair img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
  background: #050505;
  border: 1px solid var(--ink);
}

.selector-section {
  padding-top: 42px;
}

.dentition-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--blue-soft);
  border: 1px solid var(--blue);
}

.dentition-toggle span {
  font-weight: 900;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--blue);
}

.segmented button {
  min-width: 84px;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.segmented button.active {
  background: var(--blue);
  color: var(--white);
}

.interactive-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.injury-options {
  display: grid;
  gap: 10px;
}

.injury-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 106px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.injury-card:hover,
.injury-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 5px 5px 0 var(--paper-strong);
  outline: none;
}

.injury-card.active {
  border-color: var(--mint);
  box-shadow:
    inset 5px 0 0 var(--mint),
    6px 6px 0 var(--mint-soft);
}

.injury-icon {
  position: relative;
  width: 70px;
  height: 70px;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
}

.injury-icon::before,
.injury-icon::after {
  content: "";
  position: absolute;
}

.injury-icon::before {
  left: 18px;
  top: 14px;
  width: 34px;
  height: 44px;
  border: 3px solid var(--ink);
  border-top-width: 7px;
  border-radius: 46% 46% 55% 55%;
  background: var(--white);
}

.icon-intrusion::before {
  top: 28px;
}

.icon-avulsion::before {
  top: -4px;
  transform: rotate(-16deg);
}

.icon-avulsion::after {
  left: 20px;
  bottom: 12px;
  width: 30px;
  height: 12px;
  border: 2px dashed var(--coral);
  border-radius: 50%;
}

.icon-displacement::before {
  transform: translateX(9px) rotate(10deg);
}

.icon-loose::after {
  left: 13px;
  top: 12px;
  width: 44px;
  height: 44px;
  border: 2px dashed var(--blue);
  border-radius: 50%;
}

.icon-fracture::after {
  left: 36px;
  top: 22px;
  width: 18px;
  height: 18px;
  background: var(--coral);
  clip-path: polygon(0 0, 100% 25%, 42% 52%, 100% 100%, 0 70%);
}

.icon-soft::before {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.injury-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.02rem;
}

.injury-text span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.result-panel {
  position: sticky;
  top: 14px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
}

.result-kicker {
  color: var(--coral);
  font-weight: 900;
  font-size: 0.86rem;
}

.result-panel h3 {
  margin: 8px 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.result-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.risk-meter {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.risk-meter span,
.risk-meter strong {
  font-weight: 900;
}

.risk-track {
  height: 12px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  overflow: hidden;
}

.risk-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mint);
  transition:
    width 260ms ease,
    background 260ms ease;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.detail-columns h4,
.action-box h4,
.follow-box h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.detail-columns > div,
.action-box,
.follow-box {
  padding: 14px;
  border: 1px solid var(--line);
  background: #fffaf0;
}

.action-box,
.follow-box {
  margin-top: 14px;
}

.action-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.75;
}

.first-aid {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.steps article {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
}

.steps span {
  display: block;
  color: var(--gold);
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1;
}

.steps h3 {
  margin: 12px 0 8px;
  font-size: 1.35rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.compare-band {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: center;
  padding: clamp(42px, 7vw, 74px) clamp(18px, 3vw, 28px);
  background: var(--ink);
  color: var(--white);
}

.compare-copy p {
  max-width: 760px;
  color: rgba(255, 253, 248, 0.78);
  line-height: 1.85;
}

.compare-visual img {
  aspect-ratio: 1;
  object-fit: contain;
  background: #070707;
  border: 1px solid rgba(255, 253, 248, 0.2);
}

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

.checklist label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 112px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  line-height: 1.55;
}

.checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
  flex: 0 0 auto;
  margin-top: 3px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 3vw, 28px) 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-grid,
  .anatomy-layout,
  .interactive-grid,
  .compare-band {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    aspect-ratio: 16 / 10;
  }

  .section-heading,
  .detail-columns,
  .steps,
  .checklist {
    grid-template-columns: 1fr;
  }

  .result-panel {
    position: static;
  }

  .compare-visual {
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-inline: 14px;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 2.55rem);
    line-height: 1.08;
    max-width: 8.6em;
  }

  .hero-lead {
    max-width: 100%;
  }

  .hero-visual figcaption {
    position: static;
    border: 1px solid var(--line);
    border-left: 5px solid var(--coral);
  }

  .alert-strip {
    width: calc(100% - 24px);
  }

  .section {
    padding-inline: 12px;
  }

  .image-pair {
    grid-template-columns: 1fr;
  }

  .dentition-toggle {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    min-width: 0;
    padding-inline: 6px;
  }

  .injury-card {
    grid-template-columns: 62px 1fr;
  }

  .injury-icon {
    width: 58px;
    height: 58px;
  }

  .injury-icon::before {
    left: 15px;
    width: 28px;
    height: 36px;
  }

  footer {
    flex-direction: column;
  }
}
