:root {
  --guide-paper: #fbfcf9;
  --guide-surface: #f1f6f0;
  --guide-ink: #182a21;
  --guide-muted: #4e6257;
  --guide-line: #d5e2d8;
  --guide-brand: #13543d;
  --guide-brand-dark: #12372b;
  --guide-accent: #237b56;
  --guide-content-width: 76rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--guide-paper);
  color: var(--guide-ink);
  font: 1rem/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--guide-brand); text-underline-offset: .24em; }
a:hover { color: var(--guide-brand-dark); }
a:focus-visible, main:focus-visible {
  outline: 3px solid var(--guide-accent);
  outline-offset: 3px;
}
.skip-link {
  position: absolute;
  z-index: 2;
  top: .75rem;
  left: .75rem;
  padding: .5rem 1rem;
  background: var(--guide-paper);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.guide-header { background: var(--guide-brand-dark); color: var(--guide-paper); }
.guide-header-inner, .guide-intro, .guide-layout {
  width: min(calc(100% - 3rem), var(--guide-content-width));
  margin-inline: auto;
}
.guide-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  min-height: 4.5rem;
  padding-block: .5rem;
}
.guide-brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: 0; font-weight: 750; }
.guide-brand span { color: #cddfd2; font-size: .875rem; font-weight: 500; }
.guide-back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: .85rem;
  border: 1px solid #8bb5a0;
  border-radius: .45rem;
  color: var(--guide-paper);
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.guide-back:hover { background: #20503e; color: var(--guide-paper); }
.guide-back:focus-visible { outline-color: var(--guide-paper); }
.guide-intro { padding-block: clamp(1.75rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); border-bottom: 1px solid var(--guide-line); }
.guide-intro h1 { margin: 0; font-size: clamp(2.1rem, 5.5vw, 3.65rem); font-weight: 740; line-height: 1.08; letter-spacing: -.04em; }
.guide-intro p { max-width: 55ch; margin: .85rem 0 0; color: var(--guide-muted); font-size: clamp(1rem, 2vw, 1.15rem); }

.guide-layout { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 5rem); padding-block: 2rem 4rem; }
.guide-index {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1rem 1.1rem;
  border: 1px solid var(--guide-line);
  border-radius: .75rem;
  background: var(--guide-surface);
}
.guide-index h2 { margin: 0 0 .75rem; font-size: 1.125rem; }
.guide-index-groups { display: grid; gap: 1rem; }
.guide-index h3 { margin: 0 0 .2rem; color: var(--guide-muted); font-size: .875rem; line-height: 1.4; }
.guide-index ul { margin: 0; padding: 0; list-style: none; }
.guide-index a { display: block; margin-inline: -.3rem; padding: .22rem .3rem; border-radius: .25rem; font-size: .9rem; line-height: 1.4; text-decoration: none; }
.guide-index a:hover { background: #e1ede4; text-decoration: underline; }

.guide-content { min-width: 0; width: min(100%, 72ch); }
.guide-content section { scroll-margin-block-start: 1.5rem; }
.guide-content > section { margin: 0; padding-block: 1.5rem 1.75rem; border-bottom: 1px solid var(--guide-line); }
.guide-content > section:first-child { padding-block-start: .15rem; }
.guide-content h2 { margin: 0 0 .65rem; color: var(--guide-brand-dark); font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.022em; line-height: 1.22; }
.guide-content h3 { margin: 1.2rem 0 .35rem; font-size: 1.125rem; line-height: 1.35; }
.guide-content p, .guide-content ol, .guide-content ul { margin: .5rem 0 .75rem; }
.guide-content ol, .guide-content ul { padding-inline-start: 1.35rem; }
.guide-content li + li { margin-block-start: .32rem; }
.guide-content li::marker { color: var(--guide-brand); font-weight: 700; }
.guide-content figure { margin: 1.25rem 0 .25rem; }
.guide-content figure a { display: inline-block; max-width: 100%; vertical-align: top; border-radius: .5rem; }
.guide-content figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--guide-line); border-radius: inherit; }
.guide-content figcaption { margin-top: .4rem; color: var(--guide-muted); font-size: .875rem; }
.guide-content :target > h2 { border-inline-start: .22rem solid var(--guide-accent); padding-inline-start: .65rem; }
.guide-to-index { display: inline-block; margin-block-start: 1.5rem; }

html[data-product-edition="medical"] [data-edition="dental"],
html[data-product-edition="dental"] [data-edition="medical"],
html[data-product-edition="combined"] .guide-brand [data-edition] { display: none; }

@media (max-width: 48rem) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); }
  .guide-index { position: static; max-height: none; overflow: visible; }
  .guide-index-groups { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
  .guide-index a { min-height: 2rem; }
  .guide-content { width: 100%; }
}
@media (max-width: 25rem) {
  .guide-header-inner, .guide-intro, .guide-layout { width: calc(100% - 2rem); }
}
