/* Refractive education pages — established clinic navy, blue and teal identity. */
.refractive-page { --refractive-ink: var(--ink); --refractive-paper: var(--bg); --refractive-line: var(--line); }
.refractive-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(ellipse at 87% 8%, rgba(66,184,170,.16), transparent 35%), linear-gradient(115deg, var(--navy), var(--navy-2) 76%, var(--navy-3));
  padding: 26px 0 clamp(50px, 7vw, 84px);
}
.refractive-hero::after { content: ""; position: absolute; width: min(48vw, 590px); aspect-ratio: 1; right: -16vw; top: -35%; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 76px rgba(66,184,170,.03); pointer-events: none; }
.refractive-hero > .container { position: relative; z-index: 1; }
.refractive-hero .breadcrumbs, .refractive-hero .breadcrumbs a { color: #c6d5e8; }
.refractive-hero .breadcrumbs a:hover { color: #fff; }
.refractive-hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .8fr); gap: clamp(32px, 7vw, 94px); align-items: center; padding-top: clamp(38px, 6vw, 74px); }
.refractive-hero-copy { max-width: 740px; }
.refractive-kicker { display: flex; align-items: center; gap: 12px; color: #7bd2c5; text-transform: uppercase; font-size: .72rem; letter-spacing: .19em; font-weight: 800; margin-bottom: 19px; }
.refractive-kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.refractive-hero h1 { max-width: 14ch; color: #fff; font-size: clamp(2.65rem, 6.1vw, 5.15rem); letter-spacing: -.035em; line-height: 1.04; margin: 0 0 18px; overflow-wrap: anywhere; }
.refractive-hero .refractive-tagline { max-width: 58ch; color: #d3ebf1; font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.75; margin: 0; }
.refractive-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.refractive-hero .btn-outline-light { border-color: rgba(255,255,255,.55); color: #fff; }
.refractive-hero .btn-outline-light:hover { color: var(--navy); background: #fff; }
.refractive-hero-note { max-width: 52ch; color: #b8d4df; font-size: .82rem; line-height: 1.55; margin: 19px 0 0; }
.refractive-hero-art { min-width: 0; margin: 0; position: relative; }
.refractive-art-frame { padding: clamp(10px, 1.5vw, 16px); overflow: hidden; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.6); border-radius: 42% 42% 18px 18px; box-shadow: 0 24px 58px rgba(0,20,26,.25); transform: rotate(1deg); }
.refractive-art-frame img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 38% 38% 12px 12px; }
.refractive-hero-art figcaption { max-width: 44ch; color: #c6d5e8; font-size: .73rem; line-height: 1.45; text-align: center; margin: 14px auto 0; }
.refractive-reading { background: var(--refractive-paper); padding: clamp(34px, 5vw, 68px) 0 clamp(52px, 7vw, 90px); }
.refractive-reading-grid { display: grid; grid-template-columns: minmax(0, 235px) minmax(0, 1fr); gap: clamp(26px, 5vw, 74px); align-items: start; }
.refractive-rail { position: sticky; top: calc(var(--header-h) + 22px); display: grid; gap: 18px; min-width: 0; }
.refractive-toc, .refractive-rail-appointment { min-width: 0; padding: 19px 18px; background: #fff; border: 1px solid var(--refractive-line); border-radius: 16px; }
.refractive-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; cursor: pointer; list-style: none; color: var(--navy); font-size: .77rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.refractive-toc summary::-webkit-details-marker { display: none; }
.refractive-toc summary::after { content: "+"; font-size: 1.2rem; }
.refractive-toc[open] summary { margin-bottom: 12px; }
.refractive-toc[open] summary::after { content: "−"; }
.refractive-toc nav { max-height: min(48vh, 440px); overflow-y: auto; scrollbar-gutter: stable; }
.refractive-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: refractive-toc; }
.refractive-toc li { margin: 0; counter-increment: refractive-toc; }
.refractive-toc a { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 7px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; line-height: 1.45; transition: color .18s ease, padding-left .18s ease; }
.refractive-toc a::before { content: counter(refractive-toc, decimal-leading-zero); color: var(--blue); font: 700 .66rem/1.8 var(--font-body); }
.refractive-toc a:hover { color: var(--navy); padding-left: 4px; }
.refractive-rail-appointment { padding: 21px; color: #d3ebf1; background: var(--navy); border-color: var(--navy); }
.refractive-rail-label { display: block; color: #7bd2c5; font-size: .67rem; font-weight: 800; letter-spacing: .11em; line-height: 1.5; text-transform: uppercase; }
.refractive-rail-appointment h2 { margin: 7px 0 8px; color: #fff; font-family: var(--font-body); font-size: 1.14rem; line-height: 1.3; }
.refractive-rail-appointment p { color: #d3ebf1; font-size: .86rem; line-height: 1.55; margin: 0 0 15px; }
.refractive-rail-appointment .btn { width: 100%; padding: 12px 14px; font-size: .82rem; }
.refractive-article { min-width: 0; max-width: 850px; padding: clamp(23px, 4vw, 54px); background: #fff; border: 1px solid var(--line); border-radius: 5px 22px 22px 22px; box-shadow: 0 12px 36px rgba(20,58,59,.055); }
.refractive-article .quick-answer { color: var(--ink); background: var(--cyan-soft); border-left-color: var(--cyan); margin: 0 0 26px; }
.refractive-answer-label { display: block; margin-bottom: 5px; color: var(--blue); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.refractive-article .emergency-callout { margin: 26px 0; }
.refractive-content { color: var(--refractive-ink); font-size: 1.02rem; line-height: 1.86; overflow-wrap: anywhere; }
.refractive-content h2, .refractive-content h3 { color: var(--navy); scroll-margin-top: calc(var(--header-h) + 22px); }
.refractive-content h2 { margin: 1.75em 0 .55em; padding-top: .25em; font-size: clamp(1.55rem, 2.7vw, 2rem); letter-spacing: -.02em; }
.refractive-content h2:first-child { margin-top: .45em; }
.refractive-content h2::after { content: ""; display: block; width: 44px; height: 2px; margin-top: 13px; background: var(--blue); }
.refractive-content h3 { margin-top: 1.5em; font-size: 1.25rem; }
.refractive-content p { max-width: 72ch; }
.refractive-content li::marker { color: var(--cyan); }
.refractive-content a { color: var(--blue); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.refractive-content a:hover { color: var(--blue-dark); text-decoration-color: currentColor; }
.refractive-explainer { margin: 34px 0 0; padding: clamp(12px, 2vw, 22px); background: var(--bg); border: 1px solid var(--line); border-radius: 16px; }
.refractive-explainer img { display: block; width: 100%; height: auto; border-radius: 10px; }
.refractive-explainer figcaption { color: var(--muted); font-size: .78rem; line-height: 1.5; text-align: center; margin-top: 12px; }
.refractive-quiz { margin: 34px 0; }
.refractive-quiz h2 { margin: 0 0 6px; font-size: 1.45rem; }
.refractive-quiz > p { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.refractive-quiz-submit { margin-top: 18px; }
.refractive-quiz .quiz-result { margin-top: 18px; }
.refractive-article .disclaimer-box { color: var(--muted); background: var(--bg); border-color: var(--line); margin-top: 36px; }
.refractive-article .byline { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 26px; }
.refractive-page :target { scroll-margin-top: calc(var(--header-h) + 20px); }
.refractive-page .faq-item { border-color: var(--line); }
.refractive-page .faq-q { color: var(--navy); }
.refractive-page .faq-q .faq-icon { color: var(--blue); }
.refractive-page .faq-item.open .faq-icon { background: var(--blue); color: #fff; }
.refractive-page .section-grey { background: var(--bg); }
.refractive-page .section-grey .card { background: #fff; }
@media (max-width: 900px) {
  .refractive-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(220px, .72fr); gap: 28px; }
  .refractive-reading-grid { grid-template-columns: 205px minmax(0, 1fr); gap: 23px; }
}
@media (max-width: 680px) {
  .refractive-hero { padding-top: 20px; }
  .refractive-hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 34px; gap: 22px; }
  .refractive-hero h1 { max-width: 16ch; font-size: clamp(2.4rem, 11.5vw, 4rem); }
  .refractive-hero-art { width: min(100%, 480px); margin-inline: auto; }
  .refractive-art-frame { width: 87%; margin-inline: auto; }
  .refractive-reading-grid { grid-template-columns: minmax(0, 1fr); }
  .refractive-rail { position: static; }
  .refractive-toc nav { max-height: 42vh; }
  .refractive-toc ol { columns: 2; column-gap: 22px; }
  .refractive-toc li { break-inside: avoid; }
  .refractive-toc a { font-size: .77rem; }
  .refractive-rail-appointment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; }
  .refractive-rail-label, .refractive-rail-appointment h2, .refractive-rail-appointment p { grid-column: 1; }
  .refractive-rail-appointment .btn { grid-column: 2; grid-row: 1 / span 3; width: auto; }
  .refractive-article { padding: 22px 19px; }
  .refractive-content { font-size: .97rem; }
}
@media (max-width: 400px) {
  .refractive-actions { align-items: stretch; flex-direction: column; }
  .refractive-actions .btn { width: 100%; }
  .refractive-toc ol { columns: 1; }
  .refractive-rail-appointment { display: block; }
  .refractive-rail-appointment .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .refractive-page *, .refractive-page *::before, .refractive-page *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
