/* =============================================================
   Invisalign Care Guide — Family Dental Care of Owasso
   Theme lifted from the parent site (familydentalcareofowasso.com):
   Ubuntu headings + Lora body, #121212 ink on #f9f9f9, gold #FDBB2E
   bands, cyan #00AEEF buttons with a hard 2px black border.
   ============================================================= */

/* ---------- tokens ------------------------------------------ */
:root {
  --ground: #f9f9f9;          /* parent site body background */
  --surface: #ffffff;
  --band: #fdbb2e;            /* parent site hero band */
  --band-soft: #fff5e0;
  --tint: #e6f6fd;            /* cyan wash */

  --ink: #121212;
  --ink-strong: #0f0f0f;
  --ink-2: #4d4d4d;
  --ink-3: #767676;

  --line: #ebebeb;
  --line-2: #d4d4d4;

  --cyan: #00aeef;
  --cyan-dark: #008cd2;
  --cyan-ink: #006c9e;        /* darkened for text on light */
  --gold-ink: #7a5600;

  --dark: #2b2b2b;            /* parent site's dark band */

  --ui: "Ubuntu", Arial, Helvetica, sans-serif;
  --body: "Lora", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --gutter: clamp(18px, 4vw, 56px);
  --wide: 1240px;
  --head-h: 70px;
  --r: 10px;                  /* parent site radius */
}

/* ---------- reset ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 20px);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.72 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--cyan-ink); }

:where(a, button, summary, input):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--band); color: var(--ink); }

/* ---------- type -------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--ui);
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.45rem); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 2.7vw, 2.15rem); font-weight: 400; line-height: 1.12; }
h3 { font-size: clamp(1.25rem, 1.9vw, 1.55rem); font-weight: 500; line-height: 1.2; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.lead { max-width: 62ch; font-size: clamp(1.02rem, 1.2vw, 1.14rem); color: var(--ink-2); }

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--ui);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan-ink);
}

.shell { width: min(var(--wide), 100% - var(--gutter) * 2); margin-inline: auto; }

/* ---------- header ------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--head-h);
  display: flex;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand svg { width: 28px; height: 28px; flex: none; color: var(--cyan-dark); }
.brand b { display: block; font-family: var(--ui); font-size: 1rem; font-weight: 700; white-space: nowrap; }
.brand small { display: block; font-family: var(--ui); font-size: .72rem; color: var(--ink-3); white-space: nowrap; }

.head-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--ui);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease);
}
.hbtn svg { width: 17px; height: 17px; }
.hbtn:hover { background: var(--band-soft); }
.hbtn--solid { background: var(--cyan); color: var(--ink-strong); }
.hbtn--solid:hover { background: var(--cyan-dark); }

/* ---------- buttons ----------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 34px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  transition: background-color .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--cyan); color: var(--ink-strong); }
.btn--primary:hover { background: var(--cyan-dark); }
.btn--ghost:hover { background: var(--band-soft); }

/* ---------- hero -------------------------------------------- */
.hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(36px, 5vw, 62px); overflow: hidden; }
.hero-art {
  position: absolute;
  top: 50%;
  right: -2%;
  translate: 0 -50%;
  width: min(560px, 44%);
  aspect-ratio: 1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 52%, transparent 86%);
  mask-image: radial-gradient(closest-side, #000 52%, transparent 86%);
}
#liquid { width: 100%; height: 100%; opacity: 0; transition: opacity 1.1s var(--ease); }
#liquid.is-live { opacity: 1; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle at 44% 40%, rgba(0, 174, 239, .20), rgba(253, 187, 46, .14) 56%, transparent 72%);
}
.hero-art canvas { position: relative; }

.hero-copy { position: relative; max-width: 33rem; }
.hero h1 { margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--cyan-dark); }
.hero .lead { margin-bottom: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-office {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line-2);
  font-size: .94rem;
  color: var(--ink-2);
}
.hero-office a { font-weight: 700; text-decoration: none; }
.hero-office a:hover { text-decoration: underline; }

/* ---------- the three numbers (gold band, like the parent hero) ---- */
.facts {
  background: var(--band);
  border-block: 2px solid var(--ink);
  padding: clamp(34px, 4.5vw, 54px) 0;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 40px); }
.fact { color: var(--ink); }
.fact + .fact { border-left: 1px solid rgba(18, 18, 18, .22); padding-left: clamp(16px, 3vw, 40px); }
.fact b {
  display: block;
  font-family: var(--ui);
  font-weight: 700;
  font-size: clamp(2.4rem, 4.6vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fact b i { font-style: normal; font-size: .34em; font-weight: 500; margin-left: .15em; }
.fact p { margin: 12px 0 0; font-size: .97rem; color: #3a2f12; }

/* ---------- cards / tools ----------------------------------- */
.tools { padding-bottom: clamp(44px, 6vw, 72px); }
.tools-head { margin-bottom: 20px; }
.tools-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr); gap: 16px; }

.card {
  padding: clamp(22px, 2.6vw, 30px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.card h3 { margin-bottom: 4px; }
.card .hint { margin-bottom: 22px; font-size: .94rem; color: var(--ink-2); }

.meals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.meal { display: grid; gap: 6px; }
.meal label { font-family: var(--ui); font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.meal input {
  width: 100%;
  height: 48px;
  padding: 0 12px;
  font-family: var(--ui);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  background: var(--ground);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  -moz-appearance: textfield;
  appearance: textfield;
}
.meal input::-webkit-outer-spin-button,
.meal input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.meal input:focus { border-color: var(--cyan); background: var(--surface); }
.meal small { font-family: var(--ui); font-size: .72rem; color: var(--ink-3); }

.bar {
  position: relative;
  height: 14px;
  margin-top: 20px;
  background: var(--ground);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar i { display: block; height: 100%; width: 0; background: var(--cyan); transition: width .5s var(--ease), background-color .3s; }
.bar.is-short i { background: var(--band); }
.bar-mark { position: absolute; top: -3px; bottom: -3px; left: 91.6667%; width: 2px; background: var(--ink); }
.bar-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-family: var(--ui);
  font-size: .76rem;
  color: var(--ink-3);
}

.readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.readout b {
  font-family: var(--ui);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--cyan);
  color: var(--ink-strong);
  font-family: var(--ui);
  font-size: .85rem;
  font-weight: 500;
}
.badge.is-short { background: var(--band); }
.readout p { width: 100%; margin: 0; font-size: .94rem; color: var(--ink-2); }

.timer { display: grid; justify-items: center; gap: 18px; }
.timer-face {
  font-family: var(--ui);
  font-weight: 700;
  font-size: clamp(3rem, 6.4vw, 4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.timer-face.is-done { color: var(--cyan-dark); }
.timer-state { margin-top: 2px; font-family: var(--ui); font-size: .88rem; color: var(--ink-2); }
.timer-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.timer-actions .btn { min-height: 48px; padding-inline: 26px; font-size: .95rem; }

/* ---------- guide ------------------------------------------- */
.guide { padding-bottom: clamp(48px, 7vw, 80px); }

.guide-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}
.guide-bar h2 { flex: 1 1 14rem; }

.search { position: relative; flex: 0 1 340px; min-width: 220px; }
.search svg {
  position: absolute;
  left: 16px; top: 50%;
  translate: 0 -50%;
  width: 17px; height: 17px;
  color: var(--ink-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 50px;
  padding: 0 42px;
  font-family: var(--ui);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r);
}
.search input::placeholder { color: var(--ink-3); font-family: var(--ui); }
.search input:focus { border-color: var(--cyan-dark); }
.search-clear {
  position: absolute;
  right: 10px; top: 50%;
  translate: 0 -50%;
  width: 30px; height: 30px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-2);
}
.search-clear:hover { background: var(--line); }
.search.has-value .search-clear { display: grid; }

.guide-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: start;
}

.contents {
  position: sticky;
  top: calc(var(--head-h) + 20px);
  max-height: calc(100vh - var(--head-h) - 48px);
  overflow-y: auto;
  padding-right: 6px;
}
.contents h4 {
  margin: 0 0 10px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contents ol { margin: 0; padding: 0; list-style: none; }
.contents a {
  display: flex;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 6px;
  font-family: var(--ui);
  font-size: .92rem;
  line-height: 1.35;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.contents a .n { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .84rem; }
.contents a:hover { background: var(--surface); color: var(--ink); }
.contents a.is-active { background: var(--band); color: var(--ink); font-weight: 700; }
.contents a.is-active .n { color: var(--ink); }
.contents li.is-hidden { display: none; }

.chapters { display: grid; gap: clamp(34px, 4.5vw, 54px); }

.chapter { scroll-margin-top: 0; }
.chapter.is-hidden { display: none; }
.chapter-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 16px; }
.chapter-head .n {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--band);
  font-family: var(--ui);
  font-size: .85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chapter-head h3 { flex: 1 1 auto; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--ui);
  font-size: .76rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}
.chapter-body { max-width: 66ch; }
.chapter-body strong { font-weight: 700; }

.chapter-body ul { margin: 0 0 1.05em; padding: 0; list-style: none; display: grid; gap: 9px; }
.chapter-body ul li { position: relative; padding-left: 26px; }
.chapter-body ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: .72em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

.note {
  margin: 22px 0;
  padding: 18px 22px;
  border: 1px solid var(--line-2);
  border-left: 5px solid var(--cyan);
  border-radius: var(--r);
  background: var(--tint);
}
.note--warn { border-left-color: var(--band); background: var(--band-soft); }
.note b { font-weight: 700; }

figure { margin: 22px 0 0; }
.figure {
  display: grid;
  place-items: center;
  padding: clamp(14px, 2vw, 22px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.figure img { width: min(100%, var(--w, 100%)); height: auto; }
figcaption { margin-top: 10px; font-size: .88rem; color: var(--ink-2); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; gap: 12px; }
.figures figure { margin: 22px 0 0; }

/* ---------- tray-by-tray arch illustration ------------------ */
.archviz {
  margin: 26px 0 0;
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.archviz-stage {
  display: grid;
  place-items: center;
  padding: 6px 0 14px;
}
.archviz svg { width: min(340px, 100%); height: auto; }

.archviz .tooth {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: none;
}
.archviz .groove { stroke: var(--ink-3); stroke-width: 1.2; stroke-linecap: round; }
.archviz #archTeeth > g { transition: transform .22s linear; }

.aligner-band {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 31;
  stroke-opacity: .26;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-opacity .25s var(--ease);
}
.archviz.hide-aligner .aligner-band { stroke-opacity: 0; }

.archviz-ui {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.archviz-read {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}
.archviz-read b {
  font-family: var(--ui);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.archviz-read span { font-family: var(--ui); font-size: .9rem; color: var(--ink-2); }

.archviz input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  accent-color: var(--cyan-dark);
  cursor: pointer;
}

.archviz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.archviz-actions .btn { min-height: 46px; padding-inline: 28px; font-size: .95rem; }
.archviz-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ui);
  font-size: .92rem;
  color: var(--ink-2);
  cursor: pointer;
}
.archviz-toggle input { width: 17px; height: 17px; accent-color: var(--cyan-dark); cursor: pointer; }

.archviz figcaption { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  .archviz #archTeeth > g { transition: none; }
}

.examples { display: grid; gap: 10px; margin: 18px 0; }
.example {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-size: .98rem;
}
.example i {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--band);
  font-family: var(--ui);
  font-style: normal;
  font-size: .8rem;
  font-weight: 700;
}

.acc { display: grid; gap: 9px; margin: 18px 0; }
.acc details { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  font-family: var(--ui);
  font-weight: 500;
  list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "";
  width: 9px; height: 9px;
  flex: none;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  rotate: 45deg;
  transition: rotate .2s var(--ease);
}
.acc details[open] summary::after { rotate: -135deg; }
.acc .acc-body { padding: 0 20px 18px; color: var(--ink-2); }

.video-btn {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
  padding: 9px 24px 9px 9px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--surface);
  font-family: var(--ui);
  font-size: .96rem;
  font-weight: 500;
  transition: background-color .2s var(--ease);
}
.video-btn i {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--ink-strong);
}
.video-btn i svg { width: 12px; height: 12px; }
.video-btn:hover { background: var(--band-soft); }

.no-results { display: none; padding: 44px 0; color: var(--ink-2); }
.no-results.is-on { display: block; }
.no-results b { display: block; font-family: var(--ui); font-size: 1.2rem; color: var(--ink); margin-bottom: 6px; }

/* ---------- help band --------------------------------------- */
.help {
  padding: clamp(36px, 5vw, 58px);
  margin-bottom: clamp(44px, 6vw, 72px);
  background: var(--band);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  text-align: center;
}
.help h2 { margin-bottom: 12px; }
.help .lead { margin: 0 auto 24px; color: #3a2f12; }
.help .hero-cta { justify-content: center; }
.help .btn--ghost { background: var(--surface); }

/* ---------- footer ------------------------------------------ */
.site-footer { padding: clamp(40px, 5vw, 60px) 0 32px; background: var(--dark); color: #d8d8d8; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, .8fr)); gap: clamp(24px, 4vw, 54px); }
.site-footer h4 {
  margin: 0 0 14px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--band);
}
.site-footer .big { font-size: 1.1rem; line-height: 1.55; color: #fff; }
.site-footer nav { display: grid; gap: 9px; }
.site-footer nav a, .site-footer nav button {
  font-family: var(--ui);
  font-size: .95rem;
  color: #d8d8d8;
  text-align: left;
  width: fit-content;
}
.site-footer nav a:hover, .site-footer nav button:hover { color: #fff; text-decoration: underline; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: .84rem;
  color: #9a9a9a;
}
.foot-base p { margin: 0; max-width: 62ch; }

/* ---------- back to top ------------------------------------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  font-family: var(--ui);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  translate: 0 8px;
  transition: opacity .25s var(--ease), translate .25s var(--ease), visibility .25s;
}
.to-top.is-on { opacity: 1; visibility: visible; translate: 0 0; }
.to-top:hover { background: var(--band); }
.to-top svg { width: 15px; height: 15px; }

/* ---------- video dialog ------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(18, 18, 18, .68);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s var(--ease), visibility .22s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal-card {
  width: min(940px, 100%);
  background: #000;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
}
.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  background: var(--surface);
  font-family: var(--ui);
  font-weight: 500;
}
.modal-close {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.modal-close:hover { background: var(--band); }
.modal iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }

/* ---------- responsive -------------------------------------- */
@media (max-width: 1040px) {
  .hero { display: flex; flex-direction: column; }
  .hero .shell { order: 2; }
  .hero-art {
    order: 1;
    position: relative;
    top: auto; right: auto; translate: none;
    width: min(300px, 56%);
    margin: 0 auto 18px;
  }
  .hero-copy { max-width: none; }
}

@media (max-width: 900px) {
  /* .guide-layout must drop out of grid here, not just go to one
     column: a grid item's sticky position is confined to its own
     grid area, so a stuck .contents would un-stick almost at once.
     Plain block flow lets it stay pinned through the whole list. */
  .guide-layout { display: block; }
  .contents {
    position: sticky;
    top: var(--head-h);
    z-index: 40;
    max-height: none;
    background: var(--ground);
    padding: 10px 0 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line-2);
  }
  .contents ol { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
  .contents ol::-webkit-scrollbar { display: none; }
  .contents a { white-space: nowrap; border: 1px solid var(--line-2); background: var(--surface); }
  .chapter { scroll-margin-top: 78px; }
  .tools-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; gap: 22px; }
  .fact + .fact { border-left: 0; border-top: 1px solid rgba(18, 18, 18, .22); padding-left: 0; padding-top: 22px; }
}

@media (max-width: 760px) {
  :root { --head-h: 64px; }
  body { font-size: 16px; }
  .meals { grid-template-columns: 1fr 1fr; }
  .brand small { display: none; }
  .hide-sm { display: none; }
  .hero { padding-top: 24px; }
  .hero-art { width: min(200px, 44%); margin-bottom: 10px; }
  .foot-grid { grid-template-columns: 1fr; }
  .guide-bar h2 { flex-basis: 100%; }
  .search { flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .hero-cta { display: grid; }
  .hero-cta .btn { width: 100%; }
}

/* ---------- reduced motion ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- print ------------------------------------------- */
@media print {
  .site-header, .hero-art, .tools, .to-top, .modal,
  .contents, .help, .search, .video-btn { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .guide-layout { grid-template-columns: 1fr; }
  .chapter { break-inside: avoid; page-break-inside: avoid; }
  .facts { background: #fff; border-color: #000; }
  a { color: #000; text-decoration: none; }
  .site-footer { background: #fff; color: #000; }
  .site-footer a, .site-footer .big, .site-footer nav a, .site-footer h4 { color: #000; }
}
