/*
  Oct26 polish layer (2026-10-18)
  Direction B: bright brand colours as fills, darker partners for text,
  soft tinted panels, forest green anchor. Loaded last on every Oct26 page.

  Scope prefix `html:not(#kd-polish)` adds ID-level specificity so these
  rules beat Astro's scoped [data-astro-cid-*] selectors without !important.
  Global element rules (h1-h6, a, :root) stay unprefixed on purpose so that
  more specific component rules (e.g. white hero headings) keep winning.
*/

:root {
  --kd-lime: #66cc33;      /* fill */
  --kd-leaf: #2f7d1e;      /* green text, 5.2:1 on white */
  --kd-mint: #eef9e7;      /* green tint */
  --kd-sky: #33ccff;       /* fill */
  --kd-harbour: #0b6e99;   /* blue text, 5.7:1 on white */
  --kd-skytint: #e6f6fd;   /* blue tint */
  --kd-sun: #f5a04a;       /* fill */
  --kd-rust: #a85a0c;      /* orange text, 5.1:1 on white */
  --kd-peach: #fff1e3;     /* orange tint */
  --kd-forest: #103b31;    /* dark anchor */
  --kd-forest-deep: #0d3129;
  --kd-ink: #1c2b21;

  /* Existing tokens re-pointed to text-safe tones */
  --kd-accent: var(--kd-rust);
  --kd-primary-dark: var(--kd-leaf);
  --kd-radius-lg: 24px;
  --kd-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Site-wide basics ---------- */

h1, h2, h3, h4, h5, h6 { color: var(--kd-leaf); }
a { color: var(--kd-accent); }
a:hover { color: #7f4309; }
:focus-visible { outline-color: var(--kd-harbour); }

/* Text that used the bright lime directly */
html:not(#kd-polish) :is(.split-hero h1, .split-hero__subtitle, .structural-link-card h3,
  .structural-download h3, .reviews-page__intro h2, .advice-card--text .advice-card__title,
  .advice-card:hover .advice-card__title, .advice-filters__button:hover,
  .advice-filters__button.is-active, .article-sections__stat-value) { color: var(--kd-leaf); }
html:not(#kd-polish) .article-sections__stat:nth-child(2) .article-sections__stat-value { color: var(--kd-harbour); }

/* White text on lime fails contrast; use forest text on the same fill */
html:not(#kd-polish) :is(.kd-btn--solid, .kd-btn--solid:hover, .kd-btn--ghost:hover,
  .article-sections__number, .advice-reader__number, .caries-tool__info, .caries-tool__calculate,
  .caries-tool__option--good input:checked + span, .thumb-tool__option input:checked + span,
  .thumb-tool__submit, .ga-guide__button, .office-tour-guide__controls button:hover:not(:disabled),
  .bio-modal__close:hover) { color: var(--kd-forest); }
html:not(#kd-polish) .kd-btn--solid:hover { background: #5bbd2b; border-color: #5bbd2b; }
html:not(#kd-polish) .kd-btn--ghost { color: var(--kd-leaf); border-color: var(--kd-lime); }
html:not(#kd-polish) .kd-btn--ghost:hover { background: var(--kd-mint); color: var(--kd-leaf); }

/* Breadcrumb separators were rewritten to "/" by an earlier path replace */
html:not(#kd-polish) :is(.article-hero__breadcrumbs, .tool-hero__breadcrumbs) li:not(:last-child)::after { content: "/"; }

/* Referral page band: white on lime failed contrast, so it joins the forest family */
html:not(#kd-polish) .structural-pitch { background: var(--kd-forest); box-shadow: 0 0 0 100vmax var(--kd-forest); }
html:not(#kd-polish) .structural-pitch__titles h2 { color: #9be07a; }
html:not(#kd-polish) .structural-pitch__titles h2 + h2 { color: #fff; }
html:not(#kd-polish) .structural-pitch__icon { color: #5ad1ff; }
html:not(#kd-polish) .structural-pitch__card p { color: #e1ecdf; }

/* Header */
html:not(#kd-polish) .site-header__nav a.site-header__cta {
  background: var(--kd-lime);
  color: var(--kd-forest);
}
html:not(#kd-polish) .site-header__nav a.site-header__cta:hover { background: #5bbd2b; color: var(--kd-forest); }
html:not(#kd-polish) .site-header__nav a.site-header__cta.site-header__referral { background: var(--kd-sky); color: var(--kd-forest); }
html:not(#kd-polish) .site-header__nav a.site-header__cta.site-header__referral:hover { background: #1fc1f7; color: var(--kd-forest); }
html:not(#kd-polish) .site-header__nav a:not(.site-header__cta):hover,
html:not(#kd-polish) .site-header__parent:hover { color: var(--kd-leaf); }
html:not(#kd-polish) .site-header__top a:hover { color: #9be07a; }

@media (max-width: 600px) {
  html:not(#kd-polish) .site-header__top-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    font-size: .78rem;
  }
  html:not(#kd-polish) .site-header__top a { white-space: nowrap; }
}

/* Mobile: keep the solid header opaque so the menu button stays visible */
@media (max-width: 920px) {
  html:not(#kd-polish) body.kd-header-solid .site-header__bar,
  html:not(#kd-polish) body:not(:has([data-cinematic-home])) .site-header__bar {
    background: #fff;
    backdrop-filter: none;
  }
  html:not(#kd-polish) .site-header__parent { color: #4b5c51; }
}

/* Footer */
html:not(#kd-polish) .site-footer { background: var(--kd-forest-deep); }
html:not(#kd-polish) :is(.site-footer__inline-link, .site-footer__col a):hover { color: #9be07a; }

/* Article accents use the darker green for markers and borders that carry meaning */
html:not(#kd-polish) .content-blocks__paragraph--intro { border-left-color: var(--kd-lime); }

/* ---------- Homepage ---------- */

/* Hero: a little shorter, with a soft shade behind the headline */
html:not(#kd-polish) .cinematic-hero { height: 90svh; min-height: max(560px, 90svh); }
html:not(#kd-polish) .cinematic-hero__shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 24, 18, .62) 0%, rgba(7, 24, 18, .3) 42%, rgba(7, 24, 18, 0) 70%);
}
@media (max-width: 920px) {
  html:not(#kd-polish) .cinematic-hero__shade::after {
    background: linear-gradient(0deg, rgba(7, 24, 18, .7) 0%, rgba(7, 24, 18, .25) 55%, rgba(7, 24, 18, 0) 80%);
  }
}
html:not(#kd-polish) .cinematic-hero .kd-btn--solid { background: var(--kd-lime); border-color: var(--kd-lime); color: var(--kd-forest); }
html:not(#kd-polish) .cinematic-home__body { border-radius: 32px 32px 0 0; }

/* Intro */
html:not(#kd-polish) #main .home-intro { padding: clamp(56px, 7vw, 80px) 0 0; }
html:not(#kd-polish) #main .home-intro h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.05;
  text-wrap: balance;
}
html:not(#kd-polish) #main .new-patient-home-link { margin: 22px 0 0; }
html:not(#kd-polish) #main .new-patient-home-link .kd-btn {
  background: var(--kd-mint);
  border-color: transparent;
  color: var(--kd-leaf);
}
html:not(#kd-polish) #main .new-patient-home-link .kd-btn:hover { background: #dff3d3; }

/* Three intro cards */
html:not(#kd-polish) #main .home-cards { gap: clamp(20px, 3vw, 32px); padding: 44px 0 16px; }
html:not(#kd-polish) #main .home-card {
  border: 1px solid #e3ebe0;
  border-radius: var(--kd-radius-lg);
  box-shadow: 0 1px 2px rgba(16, 59, 49, .05), 0 10px 30px rgba(16, 59, 49, .06);
  padding-bottom: 26px;
}
html:not(#kd-polish) #main .home-card:hover { box-shadow: 0 2px 4px rgba(16, 59, 49, .06), 0 18px 40px rgba(16, 59, 49, .12); }
html:not(#kd-polish) #main .home-card__media img { aspect-ratio: 3 / 2; }
html:not(#kd-polish) #main .home-card h3 { margin: 8px 24px 0; font-size: 1.45rem; }
html:not(#kd-polish) #main .home-card p { margin: 0 24px; color: #3b4a40; }
html:not(#kd-polish) #main .home-card__actions { margin: auto 24px 0; padding-top: 18px; }
html:not(#kd-polish) #main .home-card__actions .kd-btn { min-height: 44px; padding: 9px 18px; font-size: .88rem; }

/* Audience panels: colour marks who each path is for */
html:not(#kd-polish) #main .home-tiles { margin-top: 0; padding: 40px 0 clamp(64px, 8vw, 96px); background: transparent; }
html:not(#kd-polish) #main .home-tiles__grid { gap: clamp(16px, 2.4vw, 28px); }
html:not(#kd-polish) #main .home-tile {
  --tile-color: var(--kd-lime);
  --tile-text: var(--kd-leaf);
  --tile-bg: var(--kd-mint);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  align-content: center;
  gap: 22px;
  padding: clamp(36px, 4vw, 52px) 24px;
  border-radius: 28px;
  background: var(--tile-bg);
}
html:not(#kd-polish) #main .home-tile:first-child { --tile-color: var(--kd-sky); --tile-text: var(--kd-harbour); --tile-bg: var(--kd-skytint); }
html:not(#kd-polish) #main .home-tile:nth-child(3) { --tile-color: var(--kd-sun); --tile-text: var(--kd-rust); --tile-bg: var(--kd-peach); }
html:not(#kd-polish) #main .home-tile::before,
html:not(#kd-polish) #main .home-tile::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: var(--tile-color);
  opacity: .16;
  transition: transform .6s var(--kd-ease);
}
html:not(#kd-polish) #main .home-tile::before { width: 220px; height: 220px; right: -70px; bottom: -90px; }
html:not(#kd-polish) #main .home-tile::after { width: 72px; height: 72px; left: -18px; top: -18px; opacity: .2; }
html:not(#kd-polish) #main .home-tile:hover::before { transform: scale(1.12); }
html:not(#kd-polish) #main .home-tile h2 { color: var(--tile-text); font-size: clamp(2.5rem, 4.4vw, 3.7rem); }
html:not(#kd-polish) #main .home-tiles .home-tile > a.home-tile__callout { border-color: var(--tile-color); color: var(--kd-ink); }
html:not(#kd-polish) #main .home-tiles .home-tile > a.home-tile__callout::after { color: var(--tile-text); }

/* One forest band for features + counters */
html:not(#kd-polish) #main .cinematic-home .home-features { margin-top: 0; padding: clamp(64px, 8vw, 88px) 0 48px; background: var(--kd-forest); }
html:not(#kd-polish) #main .cinematic-home .home-features h2 {
  max-width: 720px;
  margin: 0 auto 52px;
  color: #9be07a;
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  line-height: 1.08;
  text-wrap: balance;
}
html:not(#kd-polish) #main .home-features__grid { gap: 40px 64px; }
html:not(#kd-polish) #main .cinematic-home .home-feature__icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(51, 204, 255, .14);
  color: #5ad1ff;
}
html:not(#kd-polish) #main .cinematic-home .home-feature h3 { font-size: 1.35rem; }
html:not(#kd-polish) #main .cinematic-home .home-counters { margin: 0; padding: 0 0 clamp(56px, 7vw, 80px); background: var(--kd-forest); }
html:not(#kd-polish) #main .home-counters__grid { padding-top: 44px; border-top: 1px solid rgba(255, 255, 255, .14); }
html:not(#kd-polish) #main .cinematic-home .home-counter__icon { color: #5ad1ff; }
html:not(#kd-polish) #main .cinematic-home .home-counter__value { color: #9be07a; font-variant-numeric: tabular-nums; }
html:not(#kd-polish) #main .cinematic-home .home-counter__title {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: #d7e9d6;
}

/* Dr. Mike */
html:not(#kd-polish) #main .home-group--media { align-items: center; gap: clamp(36px, 5vw, 64px); padding: clamp(64px, 8vw, 96px) 0 clamp(56px, 7vw, 88px); }
html:not(#kd-polish) #main .home-group__media { position: relative; isolation: isolate; }
html:not(#kd-polish) #main .home-group__media::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18px -18px -18px 18px;
  border-radius: 28px;
  background: var(--kd-mint);
}
@media (max-width: 820px) {
  html:not(#kd-polish) #main .home-group__media::before { inset: 12px -10px -12px 12px; }
}
html:not(#kd-polish) #main .home-group__media img { border-radius: 24px; box-shadow: 0 16px 40px rgba(16, 59, 49, .14); }
html:not(#kd-polish) #main .home-group h3 { font-size: clamp(2rem, 3.6vw, 2.7rem); margin-bottom: .4rem; }
html:not(#kd-polish) #main .home-group .content-blocks__paragraph { color: #3b4a40; }

/* Dental home: light sky band breaks up the dark sections */
html:not(#kd-polish) #main .cinematic-home .home-dental-home { margin-top: 0; background: var(--kd-skytint); color: var(--kd-ink); }
html:not(#kd-polish) #main .cinematic-home .home-dental-home h3 { color: var(--kd-harbour); font-size: clamp(2.2rem, 4.6vw, 3.6rem); text-wrap: balance; }
html:not(#kd-polish) #main .cinematic-home .home-dental-home .content-blocks__paragraph { color: #24343a; }

/* Contact and map */
html:not(#kd-polish) #main .home-contact-dropin { padding-top: clamp(40px, 5vw, 64px); }
html:not(#kd-polish) #main .home-contact-dropin .structural-extra { margin-top: 0; }
html:not(#kd-polish) #main .home-contact-dropin .structural-extra__card {
  border-color: #e3ebe0;
  border-radius: var(--kd-radius-lg);
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 59, 49, .06);
  padding: clamp(24px, 3vw, 36px);
}
html:not(#kd-polish) #main .home-contact-dropin .map-embed { border-radius: var(--kd-radius-lg); }
html:not(#kd-polish) #main .home-contact-dropin .contact-details__primary { align-items: flex-start; text-align: left; }

/* Services: not a sequence, so checks instead of numbers */
html:not(#kd-polish) #main .home-services { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); }
html:not(#kd-polish) #main .home-services__kicker {
  text-transform: none;
  letter-spacing: 0;
  color: var(--kd-rust);
  font-size: .95rem;
  font-weight: 700;
}
html:not(#kd-polish) #main .home-services h2 { color: var(--kd-leaf); }
html:not(#kd-polish) #main .home-services__item { align-items: center; min-height: 96px; }
html:not(#kd-polish) #main .home-services__number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--kd-mint);
  font-size: 0;
  color: transparent;
}
html:not(#kd-polish) #main .home-services__number::before {
  content: "";
  width: 16px;
  height: 16px;
  background: var(--kd-leaf);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
html:not(#kd-polish) #main .home-services__text { color: var(--kd-ink); font-weight: 600; }

/* ---------- Motion (subtle; off for reduced-motion) ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* The one orchestrated moment: hero copy arrives on load */
  html:not(#kd-polish) .cinematic-hero__eyebrow { animation: kd-pop .9s var(--kd-ease) .1s both; transform-origin: 0 80%; }
  html:not(#kd-polish) .cinematic-hero h1 { animation: kd-rise .8s var(--kd-ease) .28s both; }
  html:not(#kd-polish) .cinematic-hero__subtitle { animation: kd-rise .8s var(--kd-ease) .4s both; }
  html:not(#kd-polish) .cinematic-hero__actions { animation: kd-rise .8s var(--kd-ease) .52s both; }

  /* Gentle reveal, only when the motion script is running */
  html.kd-motion .kd-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s var(--kd-ease), transform .7s var(--kd-ease);
    transition-delay: var(--kd-delay, 0ms);
  }
  html.kd-motion .kd-reveal.is-in { opacity: 1; transform: none; }
  /* Cards keep their own hover lift once revealed */
  html.kd-motion .home-card.kd-reveal.is-in { transition: opacity .7s var(--kd-ease), transform .2s, box-shadow .2s; }
  html.kd-motion .home-card.kd-reveal.is-in:hover { transform: translateY(-4px); }
}

@keyframes kd-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes kd-pop {
  0% { opacity: 0; transform: translateY(18px) scale(.9) rotate(-4deg); }
  60% { opacity: 1; transform: translateY(-3px) scale(1.02) rotate(1deg); }
  100% { opacity: 1; transform: none; }
}

/* ---------- Article sections: "parent asks, we answer" (2026-10-18, option A) ----------
   Headings are parents' questions, so each becomes a chat bubble beside a small parent
   icon; the answer follows as plain text. A heading-only section with a link (e.g. the
   quiz) becomes an orange action bubble. Replaces the boxed card, gradient and number. */
html:not(#kd-polish) .advice-reader__section {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
  margin-block: 28px clamp(36px, 5vw, 56px);
}
html:not(#kd-polish) .advice-reader__section-header {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
}
html:not(#kd-polish) .advice-reader__number {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--kd-sky);
  box-shadow: none;
  font-size: 0;
  color: transparent;
}
html:not(#kd-polish) .advice-reader__number::before {
  content: "";
  width: 22px;
  height: 22px;
  background: var(--kd-forest);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
html:not(#kd-polish) .advice-reader__section :is(h2, h3, h4) {
  margin: 0;
  padding: 16px 26px;
  border-radius: 26px 26px 26px 6px;
  background: var(--kd-skytint);
  color: #0b5c80;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.15;
}
html:not(#kd-polish) .advice-reader__body,
html:not(#kd-polish) .advice-reader__section--plain .advice-reader__body {
  padding: 20px 0 0 58px;
}
html:not(#kd-polish) .advice-reader__body .content-blocks p { color: #2f3d35; }

/* Heading-only link sections become an action bubble */
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)):has(:is(h2, h3, h4) a) .advice-reader__number { background: var(--kd-sun); }
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)):has(:is(h2, h3, h4) a) .advice-reader__number::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3 8-8'/%3E%3Cpath d='M20 12v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3 8-8'/%3E%3Cpath d='M20 12v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E");
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4):has(a) { padding: 0; background: var(--kd-peach); }
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px 16px 26px;
  color: #8a4a0a;
  text-decoration: none;
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a::after {
  content: "→";
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--kd-sun);
  color: var(--kd-forest);
  font-family: Poppins, Arial, sans-serif;
  font-size: 1.4rem;
  transition: transform .2s var(--kd-ease);
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a:hover::after { transform: translateX(4px); }

@media (max-width: 600px) {
  html:not(#kd-polish) .advice-reader__number { width: 36px; height: 36px; }
  html:not(#kd-polish) .advice-reader__number::before { width: 18px; height: 18px; }
  html:not(#kd-polish) .advice-reader__section :is(h2, h3, h4) { padding: 13px 18px; font-size: 1.3rem; }
  html:not(#kd-polish) .advice-reader__body,
  html:not(#kd-polish) .advice-reader__section--plain .advice-reader__body { padding: 16px 0 0; }
}

/* ---------- Article sections: option B "chapter rail" chosen 2026-10-18; overrides option A above ---------- */
/* Option B "chapter rail" for article sections. Loads after oct26-polish.css and
   overrides its option A rules. Review copy only (/Oct26-preview-b/). */
html:not(#kd-polish) .advice-reader__section {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  column-gap: 32px;
  margin-block: 0 clamp(40px, 5vw, 60px);
  padding-top: 26px;
  border-top: 2px solid var(--kd-ink);
}
html:not(#kd-polish) .advice-reader__section-header { display: contents; }
html:not(#kd-polish) .advice-reader__number {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  position: sticky;
  top: 120px;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: block;
  font-family: Catamaran, Poppins, Arial, sans-serif;
  font-weight: 800;
  font-size: 112px;
  line-height: .8;
  letter-spacing: -3px;
  color: var(--kd-lime);
}
html:not(#kd-polish) .advice-reader__number::before { content: none; }
html:not(#kd-polish) .advice-reader__section:nth-of-type(3n+2) .advice-reader__number { color: var(--kd-sky); }
html:not(#kd-polish) .advice-reader__section:nth-of-type(3n) .advice-reader__number { color: var(--kd-sun); }
html:not(#kd-polish) .advice-reader__section :is(h2, h3, h4),
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4):has(a) {
  grid-column: 2;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--kd-ink);
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a {
  display: inline;
  padding: 0;
  color: var(--kd-ink);
  text-decoration: underline;
  text-decoration-color: var(--kd-sky);
  text-decoration-thickness: 3px;
  text-underline-offset: .18em;
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a::after {
  content: " →";
  display: inline;
  width: auto;
  height: auto;
  background: none;
  color: var(--kd-harbour);
}
html:not(#kd-polish) .advice-reader__body,
html:not(#kd-polish) .advice-reader__section--plain .advice-reader__body { grid-column: 2; padding: 18px 0 0; }
@media (max-width: 700px) {
  html:not(#kd-polish) .advice-reader__section { grid-template-columns: 1fr; }
  html:not(#kd-polish) .advice-reader__number { position: static; grid-row: auto; font-size: 64px; margin-bottom: 10px; }
  html:not(#kd-polish) .advice-reader__section :is(h2, h3, h4), html:not(#kd-polish) .advice-reader__body { grid-column: 1; }
}

/* Specificity fixes: option A and the earlier contrast rule outrank the rail rules
   above, so the rail's number colours and plain quiz heading are pinned here. */
html:not(#kd-polish) .advice-reader__section .advice-reader__number {
  color: var(--kd-lime) !important;
  background: none !important;
}
html:not(#kd-polish) .advice-reader__section:nth-of-type(3n+2) .advice-reader__number { color: var(--kd-sky) !important; }
html:not(#kd-polish) .advice-reader__section:nth-of-type(3n) .advice-reader__number { color: var(--kd-sun) !important; }
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a {
  text-decoration: none;
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a::after {
  content: "Read more";
  display: table;
  margin-top: 14px;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--kd-sky);
  font-family: Poppins, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--kd-harbour);
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a:hover { color: var(--kd-harbour); }
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a[href*="cavity-risk-assessment"]::after { content: "Start the quiz"; }

/* Menu over the homepage hero: keep text white on hover, outline in green */
@media (prefers-reduced-motion: no-preference) and (min-width: 921px) {
  html:not(#kd-polish) body:has([data-cinematic-home]):not(.kd-header-solid) .site-header__nav > ul > li > a:not(.site-header__cta):hover,
  html:not(#kd-polish) body:has([data-cinematic-home]):not(.kd-header-solid) .site-header__nav > ul > li > .site-header__parent:hover,
  html:not(#kd-polish) body:has([data-cinematic-home]):not(.kd-header-solid) .site-header__nav > ul > li.has-children:focus-within > .site-header__parent {
    color: #fff;
    background: transparent;
    box-shadow: inset 0 0 0 2px #66cc33;
  }
}

/* Surgi Centre: summary of the benefits of treatment while asleep (2026-10-18) */
html:not(#kd-polish) .kd-benefits { margin: 1.5rem 0 2.5rem; }
html:not(#kd-polish) .kd-benefits__title {
  margin: 0 0 22px;
  font-family: Catamaran, Poppins, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.1;
  color: var(--kd-ink);
}
html:not(#kd-polish) .kd-benefits__list {
  counter-reset: kd-benefit;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
html:not(#kd-polish) .kd-benefits__list li {
  counter-increment: kd-benefit;
  padding-top: 18px;
  border-top: 2px solid var(--kd-ink);
  color: #2f3d35;
  font-size: 1rem;
  line-height: 1.6;
}
html:not(#kd-polish) .kd-benefits__list li::before {
  content: counter(kd-benefit);
  display: block;
  margin-bottom: 12px;
  font-family: Catamaran, Poppins, Arial, sans-serif;
  font-weight: 800;
  font-size: 64px;
  line-height: .8;
  letter-spacing: -2px;
  color: var(--kd-lime);
}
html:not(#kd-polish) .kd-benefits__list li:nth-child(2)::before { color: var(--kd-sky); }
html:not(#kd-polish) .kd-benefits__list li:nth-child(3)::before { color: var(--kd-sun); }
html:not(#kd-polish) .kd-benefits__list strong {
  display: block;
  margin-bottom: 6px;
  font-family: Catamaran, Poppins, Arial, sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--kd-ink);
}
@media (max-width: 760px) {
  html:not(#kd-polish) .kd-benefits__list { grid-template-columns: 1fr; gap: 22px; }
  html:not(#kd-polish) .kd-benefits__list li { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 14px; }
  html:not(#kd-polish) .kd-benefits__list li::before { grid-row: 1 / span 2; font-size: 52px; margin: 0; }
}
/* The article list box (tinted background, border, padding) and the li+li top margin
   were applying to the benefits list, shifting columns 2 and 3 down. */
html:not(#kd-polish) .advice-reader__body .content-blocks ol.kd-benefits__list {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}
html:not(#kd-polish) .advice-reader__body .content-blocks .kd-benefits__list li,
html:not(#kd-polish) .advice-reader__body .content-blocks .kd-benefits__list li + li { margin-top: 0; padding-left: 0; }
html:not(#kd-polish) .advice-reader__body .content-blocks .kd-benefits__list li { padding-top: 18px; }
html:not(#kd-polish) .advice-reader__body .content-blocks .kd-benefits__title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
html:not(#kd-polish) .advice-reader__body .content-blocks .kd-benefits__title { margin: 0 0 32px; }
/* Closing summary paragraph after numbered sections, aligned with the section text */
html:not(#kd-polish) .advice-reader__body.kd-summary { padding: 26px 0 0 172px; border-top: 2px solid var(--kd-ink); }
@media (max-width: 700px) { html:not(#kd-polish) .advice-reader__body.kd-summary { padding-left: 0; } }
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a[href*="stop-thumb-sucking"]::after { content: "Open the guide"; }
/* Breaking the thumb habit: single column. Number sits above each heading, text runs
   full width, and the dark rule between sections stays. Scoped to this page's layout. */
html:not(#kd-polish) .advice-reader.kd-stacked .advice-reader__section { display: block; }
html:not(#kd-polish) .advice-reader.kd-stacked .advice-reader__number { position: static; display: block; margin: 0 0 14px; font-size: 72px; }
html:not(#kd-polish) .advice-reader.kd-stacked .advice-reader__body { padding: 16px 0 0; }
html:not(#kd-polish) .advice-reader.kd-stacked .advice-reader__body.kd-summary { padding: 26px 0 0; }
/* The summary sits directly in .advice-reader; the rail rule gave it grid-column: 2,
   which created a second column for the whole article. Keep it in the single column. */
html:not(#kd-polish) .advice-reader > .advice-reader__body.kd-summary { grid-column: 1 / -1; }
/* Heading-link labels ("Open the guide", "Start the quiz", "Read more") as the site's
   regular solid pill button instead of an underlined text link */
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a::after {
  display: table;
  margin-top: 18px;
  padding: 11px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--kd-lime);
  color: var(--kd-forest);
  font-family: Poppins, Arial, sans-serif;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
  transition: background-color .15s, transform .15s, box-shadow .15s;
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a:hover::after {
  background: #5bbd2b;
  box-shadow: var(--kd-shadow-md);
  transform: translateY(-2px);
}
html:not(#kd-polish) .advice-reader__section:not(:has(.advice-reader__body)) :is(h2, h3, h4) a:hover { color: var(--kd-ink); }

/* Advice & Info archive: interactive tools band above the article grid (2026-10-18) */
html:not(#kd-polish) .kd-tools { padding: clamp(40px, 5vw, 64px) 0 8px; }
html:not(#kd-polish) .kd-tools__heading {
  margin: 0 0 22px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
  color: var(--kd-ink);
}
html:not(#kd-polish) .kd-tools__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
html:not(#kd-polish) .kd-tools__card {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  overflow: hidden;
  border-radius: var(--kd-radius-lg);
  background: var(--kd-skytint);
  color: var(--kd-ink);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
html:not(#kd-polish) .kd-tools__card + .kd-tools__card { background: var(--kd-mint); }
html:not(#kd-polish) .kd-tools__card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(16, 59, 49, .12); color: var(--kd-ink); }
html:not(#kd-polish) .kd-tools__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
html:not(#kd-polish) .kd-tools__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: clamp(20px, 2.4vw, 30px); }
html:not(#kd-polish) .kd-tools__title { font-family: Catamaran, Poppins, Arial, sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
html:not(#kd-polish) .kd-tools__text { color: #2f3d35; font-size: .98rem; line-height: 1.6; }
html:not(#kd-polish) .kd-tools__btn {
  margin-top: auto;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--kd-lime);
  color: var(--kd-forest);
  font-family: Poppins, Arial, sans-serif;
  font-weight: 700;
  font-size: .92rem;
}
html:not(#kd-polish) .kd-tools__card:hover .kd-tools__btn { background: #5bbd2b; }
@media (max-width: 900px) {
  html:not(#kd-polish) .kd-tools__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  html:not(#kd-polish) .kd-tools__card { grid-template-columns: 1fr; }
  html:not(#kd-polish) .kd-tools__media img { aspect-ratio: 16 / 9; }
}
