@font-face {
  font-family: Bricolage Grotesque;
  src: url("bricolage-grotesque.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: Instrument Serif;
  src: url("instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("inter.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f7f1;
  --white: #fff;
  --ink: #17372f;
  --body: #42574d;
  --green: #123f34;
  --green-link: #205c48;
  --green-light: #ddebdf;
  --lime: #b9df8a;
  --mint: #edf3eb;
  --amber: #fff3d8;
  --line: #d8ded2;
  --control-line: #738a7d;
  --rose: #f8eeeb;
  --red: #7c2929;
  --padding: clamp(1.125rem, 4vw, 2rem);
  --heading: "Bricolage Grotesque", system-ui, sans-serif;
  --radius: 1.25rem;
  scroll-padding-top: 5.5rem;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.62 Inter, system-ui, sans-serif;
}

h1, h2, h3, h4, p, dl, dd {
  margin: 0;
}

h1, h2, h3, h4, legend {
  font-family: var(--heading);
  font-weight: 600;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.875rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.027em;
  max-inline-size: 28ch;
}

h3, h4, legend {
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -0.014em;
}

p, li {
  text-wrap: pretty;
}

img {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

a {
  color: var(--green-link);
  text-underline-offset: .18em;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #24694e;
  outline-offset: 3px;
}

:where(.hero, .section-dark, .topic-footer) :focus-visible {
  outline-color: var(--lime);
}

#main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  z-index: 5;
  inset-block-start: .5rem;
  inset-inline-start: var(--padding);
  transform: translateY(calc(-100% - 1rem));
  border-radius: .5rem;
  background: var(--white);
  padding: .65rem 1rem;
}

.skip-link:focus {
  transform: none;
}

.wrap {
  inline-size: min(100%, 77rem);
  margin-inline: auto;
  padding-inline: var(--padding);
}

.site-header {
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
}

.header-row, .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}

.header-row {
  justify-content: space-between;
  padding-block: .75rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-block-size: 2.875rem;
  max-inline-size: 100%;
  padding: .55rem 1.175rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.button:disabled {
  opacity: .56;
  cursor: default;
}

.button-outline {
  color: var(--green);
  border-color: var(--control-line);
  background: transparent;
}

.button-outline:hover:not(:disabled) {
  background: var(--mint);
  border-color: var(--green);
}

.button-solid {
  color: var(--white);
  background: var(--green);
}

.button-solid:hover:not(:disabled) {
  background: var(--green-link);
}

.button-lime {
  color: var(--ink);
  background: var(--lime);
}

.button-lime:hover {
  background: #d5ecaf;
}

.button-quiet {
  color: var(--white);
  border-color: #a7c8b5;
  background: transparent;
}

.button-quiet:hover {
  background: #123f34;
  border-color: var(--white);
}

.hero {
  color: var(--white);
  border-radius: 0 0 1.75rem 1.75rem;
  background:
    radial-gradient(circle at 94% -5%, #b9df8a24 0 23%, transparent 23.2%),
    radial-gradient(circle at 5% 115%, #d9ebae12 0 20%, transparent 20.2%),
    linear-gradient(124deg, #123f34, #1b5345 62%, #2d746e);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2.75rem, 6vw, 5.25rem);
}

.hero-copy {
  display: grid;
  justify-items: start;
  gap: clamp(1rem, 2.2vw, 1.65rem);
}

.topic-label, .eyebrow {
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .085em;
  line-height: 1.4;
  text-transform: uppercase;
}

.topic-label {
  padding: .42rem .9rem;
  background: #ffffff1c;
  color: #deefbf;
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(3rem, 5.55vw, 5.2rem);
  line-height: .99;
  letter-spacing: -.045em;
}

.hero h1 em {
  color: #d9ebae;
  font: italic 400 1.115em/.88 "Instrument Serif", Georgia, serif;
  letter-spacing: -.01em;
}

.hero-intro {
  max-inline-size: 51ch;
  color: #edf5ee;
  font-size: clamp(1.0625rem, 1.6vw, 1.2rem);
}

.hero .button {
  min-block-size: 3.25rem;
}

.hero-art {
  inline-size: 100%;
  border-radius: 1.625rem;
  box-shadow: 0 20px 44px -24px #092f28b8;
}

.visit-strip {
  border-block-end: 1px solid #e6d8b0;
  background: var(--amber);
}

.visit-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 2rem;
  padding-block: 1.3rem;
}

.visit-strip-grid > div + div {
  padding-inline-start: 1.25rem;
  border-inline-start: 1px solid #d9c896;
}

.visit-strip p {
  margin-block-start: .25rem;
  color: var(--body);
}

.topic-nav {
  position: sticky;
  z-index: 3;
  inset-block-start: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 2px 9px #123f340b;
}

.topic-nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .625rem;
}

.topic-nav-links {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .625rem .25rem .625rem;
  scrollbar-color: #93a99c transparent;
  scrollbar-width: thin;
}

.topic-nav a {
  display: inline-flex;
  flex: none;
  gap: .4rem;
  align-items: center;
  min-block-size: 2.75rem;
  padding-inline: .875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.topic-nav a:hover, .topic-nav a[aria-current="location"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.topic-nav .my-list {
  border-color: #91ad72;
  background: #d9ebae;
  font-weight: 700;
}

.topic-nav .my-list:hover, .topic-nav .my-list[aria-current="location"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.has-section-menu .topic-nav-row {
  display: flex;
  justify-content: space-between;
  min-block-size: 4rem;
}

.has-section-menu .topic-nav-links {
  position: absolute;
  inset: calc(100% + .35rem) var(--padding) auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-block-size: min(63vh, 25rem);
  overflow: auto;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 .9rem 2rem #123f3429;
}

.has-section-menu .topic-nav-links a {
  white-space: normal;
}

.section-menu-toggle[aria-expanded="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.section-menu-toggle[aria-expanded="true"]:hover {
  background: var(--green-link);
}

.list-count {
  min-inline-size: 1.35rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--green);
  font-size: .8125rem;
  text-align: center;
}

.topic-section {
  border-block-end: 1px solid var(--line);
}

.section-layout {
  display: grid;
  gap: clamp(1.25rem, 3.1vw, 2rem);
  padding-block: clamp(2.9rem, 6.25vw, 5.25rem);
}

.section-white {
  background: var(--white);
}

.section-mint {
  background: var(--mint);
}

.section-rose {
  background: var(--rose);
}

.section-dark {
  --ink: var(--white);
  --body: #e1eee3;
  --green-link: #dbefa9;
  color: var(--white);
  background: var(--green);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .53fr);
  align-items: center;
  gap: clamp(1rem, 5vw, 3.5rem);
}

.section-art {
  justify-self: end;
  inline-size: min(100%, 22rem);
  border-radius: var(--radius);
}

.eyebrow {
  color: var(--green-link);
  margin-block-end: .55rem;
}

.section-rose .eyebrow {
  color: var(--red);
}

.lead {
  max-inline-size: 66ch;
  margin-block-start: .9rem;
  color: var(--body);
  font-size: clamp(1.05rem, 1.65vw, 1.2rem);
}

.section-note {
  max-inline-size: 80ch;
  color: var(--body);
}

.card-grid, .tab-list {
  display: grid;
  grid-template-columns: repeat(var(--columns, 1), minmax(0, 1fr));
  gap: 1rem;
}

.cols-2 { --columns: 2; }
.cols-3 { --columns: 3; }
.cols-4 { --columns: 4; }

.card, .callout, .resource {
  display: grid;
  align-content: start;
  gap: .625rem;
  min-inline-size: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.1vw, 1.55rem);
  background: var(--white);
}

.card p, .card ul, .callout p, .resource span {
  color: var(--body);
}

.card ul, .visit-list ul {
  margin: 0;
  padding-inline-start: 1.25rem;
}

.card li + li {
  margin-block-start: .35rem;
}

.callout {
  background: var(--mint);
}

.callout-amber {
  background: var(--amber);
  border-color: #e6d8b0;
}

.callout-white {
  background: var(--white);
}

.text-link {
  width: fit-content;
  font-weight: 650;
}

.text-link:hover, .resource:hover strong {
  text-decoration: underline;
  text-decoration-thickness: .12em;
}

.card-dark {
  --body: #e1eee3;
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.waist-points {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.3rem;
  margin-block: .35rem;
}

.waist-points > div {
  display: flex;
  flex-direction: column-reverse;
  gap: .2rem;
}

.waist-points dd {
  color: #d9ebae;
  font: 600 clamp(1.65rem, 3vw, 2.55rem)/1 var(--heading);
}

.picker, .subsection {
  display: grid;
  min-inline-size: 0;
  gap: .9rem;
}

.picker {
  padding: clamp(.75rem, 2.2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + .35rem);
  background: var(--paper);
}

.subsection {
  margin-block-start: .35rem;
}

.subsection-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
}

.subsection .lead {
  margin: 0 0 .3rem;
}

.tab-list {
  gap: .65rem;
}

.tab-list button {
  display: grid;
  align-content: center;
  min-inline-size: 0;
  gap: .28rem;
  min-block-size: 3.4rem;
  border: 1px solid var(--control-line);
  border-radius: .875rem;
  background: var(--white);
  padding: .7rem .875rem;
  color: var(--ink);
  text-align: start;
  line-height: 1.3;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}

.tab-list button > strong {
  font-family: var(--heading);
  font-size: 1.13rem;
  font-weight: 650;
}

.tab-list button > span {
  color: var(--body);
  font-size: .875rem;
}

.tab-list button:hover {
  background: var(--mint);
  border-color: var(--green);
}

.tab-list button[aria-selected="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.tab-list button[aria-selected="true"] > span {
  color: #e1eee3;
}

.tab-panel {
  margin: 0;
  gap: .7rem;
}

.tab-panel p:not(.eyebrow) {
  max-inline-size: 75ch;
}

.tab-panel .eyebrow {
  color: var(--green-link);
  margin: 0;
}

.section-dark .picker {
  background: transparent;
  border-color: #739d8a;
}

.section-dark .card {
  background: #1c5042;
  border-color: #739d8a;
}

.step-tabs {
  display: flex;
  flex-wrap: wrap;
}

.step-tabs button {
  flex: 1 1 6rem;
  justify-content: center;
  background: transparent;
  color: var(--white);
  border-color: #91b3a2;
  text-align: center;
}

.step-tabs button:hover {
  background: #285b4b;
  border-color: #91b3a2;
}

.step-tabs button[aria-selected="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--green);
}

.goal-picker, .question-picker {
  margin: 0;
}

.goal-picker legend {
  padding: 0 .4rem;
}

.goal-options, .question-options {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-block-start: .45rem;
}

.goal-options label, .question-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  min-block-size: 2.75rem;
  border: 1px solid var(--control-line);
  border-radius: .875rem;
  padding: .62rem .85rem;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.goal-options label {
  border-radius: 999px;
  align-items: center;
}

.goal-options label:has(:checked), .question-options label:has(:checked) {
  border-color: var(--green);
  background: #e1efc9;
}

.goal-options input, .question-options input {
  inline-size: 1.15rem;
  block-size: 1.15rem;
  margin: 0;
  accent-color: var(--green);
}

.question-options input {
  margin-block-start: .23rem;
}

.tab-cards button {
  gap: .6rem;
  align-content: start;
}

.tab-cards img, .daily-card img {
  inline-size: 100%;
  aspect-ratio: 2.2;
  object-fit: cover;
  border-radius: .65rem;
}

.card p.card-label {
  font-size: .875rem;
  font-weight: 650;
  color: var(--green-link);
}

.medication-picker .tab-list {
  --columns: 6;
}

.medication-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem 2rem;
}

.medication-facts dt {
  font-weight: 650;
}

.medication-facts dd, .medication-picker h4 span {
  color: var(--body);
}

.medication-picker h4 span {
  display: inline-block;
  margin-inline-start: .35rem;
  font-size: 1rem;
  font-weight: 500;
}

.care-path {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: care-step;
}

.care-path li::before {
  counter-increment: care-step;
  content: counter(care-step);
  display: grid;
  place-items: center;
  inline-size: 2.15rem;
  block-size: 2.15rem;
  border-radius: 50%;
  background: #d9ebae;
  color: var(--green);
  font-weight: 700;
}

.daily-card img {
  margin-block-end: .35rem;
}

.resource {
  gap: .15rem;
  color: var(--ink);
  text-decoration: none;
}

.resource strong {
  font-family: var(--heading);
  font-size: 1.16rem;
}

.resource:hover {
  border-color: var(--green);
}

.emergency-card {
  border-color: #a65656;
  color: var(--red);
}

.emergency-card a {
  color: var(--red);
}

.question-layout, .download-card, .footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.question-picker {
  min-inline-size: 0;
  padding: 0;
  border: 0;
}

.question-picker legend {
  padding: 0;
  margin-block-end: .45rem;
}

.question-options {
  display: grid;
}

.visit-list {
  gap: .9rem;
}

.visit-list .list-status:empty {
  display: none;
}

.download-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.download-card p {
  margin-block-start: .45rem;
}

.topic-footer {
  background: var(--green);
  color: #e1eee3;
}

.footer-layout {
  grid-template-columns: minmax(0, .62fr) minmax(0, 1fr);
  align-items: center;
  padding-block: 2.25rem;
}

.footer-brand {
  inline-size: min(100%, 15rem);
}

.topic-footer p + p {
  margin-block-start: .4rem;
}

.topic-footer a {
  color: #d9ebae;
}

.topic-footer p + a {
  display: inline-block;
  margin-block-start: .6rem;
}

@media (max-width: 63rem) {
  .cols-4 { --columns: 2; }

  .medication-picker .tab-list {
    --columns: 3;
  }
}

@media (max-width: 48rem) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-inline-size: 13.5ch;
  }

  .hero-break {
    display: none;
  }

  .hero-art {
    max-inline-size: 32rem;
  }

  .visit-strip-grid {
    grid-template-columns: 1fr;
    gap: .85rem;
  }

  .visit-strip-grid > div + div {
    padding: .7rem 0 0;
    border: 0;
    border-block-start: 1px solid #d9c896;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .section-art {
    justify-self: start;
    inline-size: min(100%, 16rem);
  }

  .card-grid.cols-3, .question-layout, .footer-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 33rem) {
  .site-header .brand-header-logo {
    height: clamp(2rem, 9vw, 2.65rem);
  }

  .header-row {
    gap: .5rem;
  }

  .header-row .button {
    padding-inline: .7rem;
    font-size: .875rem;
  }

  .topic-nav a {
    padding-inline: .7rem;
  }

  .hero .actions {
    align-items: flex-start;
  }

  .card-grid, .download-card, .medication-facts {
    grid-template-columns: 1fr;
  }

  .tab-list {
    --columns: 2;
  }

  .medication-picker .tab-list {
    --columns: 2;
  }

  #criteria .tab-list button:last-child {
    grid-column: 1 / -1;
  }

  .download-card .button {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition: none !important;
  }
}

@media print {
  .topic-nav, .actions, .tab-list, .hero-art, .section-art, .site-header {
    display: none !important;
  }

  .hero, .section-dark, .topic-footer, .card-dark, .section-dark .card {
    background: white;
    color: black;
    --ink: black;
    --body: black;
    --green-link: black;
  }

  .hero-intro, .hero h1 em, .topic-label, .waist-points dd, .topic-footer a {
    color: black;
  }

  .section-layout {
    padding-block: 1.25rem;
  }

  [data-panel][hidden] {
    display: grid !important;
  }

  .card, .callout {
    break-inside: avoid;
  }
}
