:root {
  color-scheme: light;
  --navy: #123a5a;
  --navy-2: #0b2b44;
  --teal: #087f75;
  --teal-soft: #dff7f3;
  --sky: #eaf5fb;
  --ink: #17212b;
  --muted: #536372;
  --line: #d6e1e8;
  --paper: #ffffff;
  --ground: #f3f7f9;
  --amber: #9a5a00;
  --amber-soft: #fff4d6;
  --red: #9b1c1c;
  --red-soft: #fff0f0;
  --shadow: 0 16px 40px rgba(21, 58, 83, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
}
a { color: var(--teal); text-underline-offset: 3px; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--navy-2);
  color: white;
}
.brand {
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 760;
  letter-spacing: -.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--teal);
  font-size: 1.45rem;
  line-height: 1;
}
.print-button, .primary-link, .video-link, .back-link {
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}
.print-button {
  padding: 9px 14px;
  background: white;
  color: var(--navy-2);
}

main { min-height: calc(100vh - 72px); }
.home, .guide { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 70px; }
.home-intro, .guide-hero {
  background: linear-gradient(135deg, var(--navy), #176b79);
  color: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.home-intro { padding: clamp(28px, 5vw, 54px); }
.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  font-weight: 800;
  opacity: .82;
}
h1, h2, h3 { line-height: 1.17; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.55rem); }
h2 { margin: 0 0 14px; font-size: clamp(1.35rem, 3vw, 1.95rem); color: var(--navy-2); }
h3 { margin: 0 0 8px; font-size: 1.15rem; }
.lede { max-width: 760px; margin: 18px 0 0; font-size: 1.08rem; opacity: .95; }
.clinic-note { margin: 22px 0 0; padding: 15px 17px; border-left: 4px solid #78e3d2; background: rgba(255,255,255,.11); border-radius: 8px; }

.procedure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.procedure-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 8px 26px rgba(21, 58, 83, .07);
}
.procedure-card:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: calc(50% - 10px); }
.qr-frame { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.qr-frame img { display: block; width: 100%; height: auto; }
.procedure-card p { margin: 0 0 14px; color: var(--muted); }
.primary-link { display: inline-flex; padding: 10px 14px; background: var(--navy); color: white; }
.small-note { margin: 24px 0 0; color: var(--muted); font-size: .92rem; }

.back-link { display: inline-flex; margin-bottom: 16px; color: var(--navy); }
.guide-hero { padding: clamp(26px, 5vw, 48px); }
.guide-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.guide-hero .lede { max-width: 820px; }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; margin-top: 24px; align-items: start; }
.guide-content { display: grid; gap: 18px; }
.panel {
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.panel ul { padding-left: 1.3em; }
.panel li + li { margin-top: 7px; }
.panel.warning { background: var(--amber-soft); border-color: #efcf93; }
.panel.warning h2 { color: var(--amber); }
.panel.danger { background: var(--red-soft); border-color: #efb5b5; }
.panel.danger h2 { color: var(--red); }
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.timeline div { padding: 14px; border-radius: 12px; background: var(--sky); }
.timeline strong { display: block; color: var(--navy); }

.exercise-list { display: grid; gap: 14px; margin-top: 16px; }
.exercise {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfe;
}
.exercise p { margin: 7px 0 12px; }
.dose { color: var(--navy); font-weight: 760; }
.video-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--teal-soft); color: #075f58; }
.video-link::before { content: "▶"; font-size: .8em; }
.exercise-group + .exercise-group { margin-top: 24px; }
.exercise-group > h3 { color: var(--navy); font-size: 1.28rem; }
.band-note { margin-top: 10px !important; padding: 11px 12px; border-radius: 9px; background: var(--amber-soft); color: #714200; font-weight: 680; }

.result-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.result-table th, .result-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.result-table th { color: var(--navy); }
.guide-sidebar { position: sticky; top: 18px; display: grid; gap: 16px; }
.side-card { padding: 18px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.side-card h2 { font-size: 1.15rem; }
.side-card ol { margin: 0; padding-left: 1.2em; }
.source-list { margin: 0; padding-left: 1.15em; font-size: .94rem; }
.source-list li + li { margin-top: 8px; }
.footer-note { padding: 28px 0 0; color: var(--muted); font-size: .92rem; }
.noscript { margin: 30px; padding: 20px; background: var(--red-soft); }

@media (max-width: 860px) {
  .procedure-grid { grid-template-columns: 1fr; }
  .procedure-card:last-child:nth-child(odd) { grid-column: auto; max-width: none; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header { align-items: flex-start; }
  .brand span:last-child { max-width: 190px; }
  .print-button { padding: 8px 10px; font-size: .9rem; }
  .home, .guide { width: min(100% - 22px, 1120px); padding-top: 18px; }
  .home-intro, .guide-hero { border-radius: 18px; }
  .procedure-card { grid-template-columns: 118px 1fr; gap: 14px; padding: 16px; }
  .timeline { grid-template-columns: 1fr; }
}

@media print {
  body { background: white; font-size: 12pt; }
  .site-header, .print-button, .primary-link, .back-link, .video-link { display: none !important; }
  .home, .guide { width: 100%; margin: 0; padding: 0; }
  .home-intro, .guide-hero { box-shadow: none; border-radius: 0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .procedure-grid { gap: 10px; grid-template-columns: repeat(2, 1fr); }
  .procedure-card { box-shadow: none; break-inside: avoid; padding: 12px; grid-template-columns: 115px 1fr; }
  .procedure-card:last-child:nth-child(odd) { grid-column: 1 / -1; max-width: calc(50% - 5px); }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
  .panel, .exercise { break-inside: avoid; }
}
