@font-face { font-family: 'Archivo Narrow'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Archivo Narrow'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Archivo Narrow'; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: 'Archivo Narrow'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: 'Archivo Narrow'; font-style: italic; font-weight: 600; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: 'Archivo Narrow'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Archivo Narrow'; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Archivo Narrow'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/archivo-narrow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 100; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-100-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 100; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-100-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 200; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-200-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 200; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-200-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 300; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 600; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 800; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: italic; font-weight: 900; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-900-italic.woff2") format("woff2"); }
@font-face { font-family: 'Libre Franklin'; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/libre-franklin-latin-900-normal.woff2") format("woff2"); }
:root {
  --bg-light-base: #f5f7f4;
  --fg-light-base-body: #1f2628;
  --fg-light-base-heading: #1f2628;
  --fg-light-base-muted: #4f5b5e;
  --fg-light-base-link: #0a6a52;
  --fg-light-base-inverse: #1f2628;
  --bg-light-card: #ffffff;
  --fg-light-card-body: #1f2628;
  --fg-light-card-heading: #1f2628;
  --fg-light-card-muted: #4f5b5e;
  --fg-light-card-link: #0a6a52;
  --fg-light-card-inverse: #1f2628;
  --bg-light-elevated: #e2f1ea;
  --fg-light-elevated-body: #1f2628;
  --fg-light-elevated-heading: #1f2628;
  --fg-light-elevated-muted: #4f5b5e;
  --fg-light-elevated-link: #0a6a52;
  --fg-light-elevated-inverse: #1f2628;
  --brand-light-accent: #0a6a52;
  --brand-light-accent-hover: #064d3b;
  --brand-light-on-accent: #ffffff;
  --focus-light-ring: #0a6a52;
  --border-light-default: #5d6a6d;
  --border-light-subtle: #c5d4cd;
}
.bg-surface-base { background: var(--bg-light-base); --fg-body: var(--fg-light-base-body); --fg-heading: var(--fg-light-base-heading); --fg-muted: var(--fg-light-base-muted); --fg-link: var(--fg-light-base-link); --fg-inverse: var(--fg-light-base-inverse); }
.bg-surface-card { background: var(--bg-light-card); --fg-body: var(--fg-light-card-body); --fg-heading: var(--fg-light-card-heading); --fg-muted: var(--fg-light-card-muted); --fg-link: var(--fg-light-card-link); --fg-inverse: var(--fg-light-card-inverse); }
.bg-surface-elevated { background: var(--bg-light-elevated); --fg-body: var(--fg-light-elevated-body); --fg-heading: var(--fg-light-elevated-heading); --fg-muted: var(--fg-light-elevated-muted); --fg-link: var(--fg-light-elevated-link); --fg-inverse: var(--fg-light-elevated-inverse); }
.text-role-body { color: var(--fg-body); overflow-wrap: anywhere; }
.text-role-heading { color: var(--fg-heading); overflow-wrap: anywhere; }
.text-role-muted { color: var(--fg-muted); }
.text-role-link { color: var(--fg-link); }
.text-role-inverse { color: var(--fg-inverse); }
.text-role-link { text-decoration: underline; }
.text-role-link:hover { color: var(--brand-light-accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-light-ring); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.site-logo { max-width: 100%; height: auto; }
.site-menu > summary { list-style: none; cursor: pointer; }
.site-menu > summary::-webkit-details-marker { display: none; }
:where(section[data-section][style]) { background-size: cover; background-position: center; padding: clamp(1.5rem, 4vw, 3rem); }
:where(section[data-section][style] > .bg-surface-card) { padding: clamp(1rem, 3vw, 2rem); }
:where(section[data-section][style] > .bg-surface-card > :first-child) { margin-top: 0; }
:where(section[data-section][style] > .bg-surface-card > :last-child) { margin-bottom: 0; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: static; padding: 0.25rem 0.5rem; outline: 2px solid var(--focus-light-ring); }

/* Repair Compass Signal: a modern pharmacy leaflet. Mint and charcoal on
   off-white, a narrow sans for headings and index numbers, folded panels
   and boxed caution notes. */

:root {
  --narrow: 'Archivo Narrow', 'Arial Narrow', Arial, sans-serif;
  --sans: 'Libre Franklin', Arial, sans-serif;
  --paper: var(--bg-light-base);
  --card: var(--bg-light-card);
  --wash: var(--bg-light-elevated);
  --ink: var(--fg-light-base-body);
  --mint-ink: var(--brand-light-accent);
  --mint-deep: var(--brand-light-accent-hover);
  --mint: #7fd3b5;
  --rule: var(--border-light-default);
  --hair: var(--border-light-subtle);
  --fold: 1.5rem;
  --measure: 40rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --rail: 16.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
}

h1,
h2,
h3 {
  font-family: var(--narrow);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--mint-ink);
  outline-offset: 2px;
}

/* ---------- Frame: rail beside the sheet ---------- */

.leaflet {
  min-height: 100vh;
}

.sheet {
  min-width: 0;
  padding: 0 var(--gutter);
}

/* ---------- Header: top bar on small screens, rail on desktop ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem var(--gutter);
  border-bottom: 2px solid var(--ink);
  box-shadow: inset 0 -5px 0 var(--mint);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  min-height: 44px;
}

.brand .site-logo {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.brand-name {
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
}

.rail-groups {
  display: none;
}

/* Collapsed menu toggle (small screens only) */

.site-menu {
  position: relative;
}

.site-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  font-family: var(--narrow);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  background: var(--card);
}

.menu-icon {
  position: relative;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.site-menu[open] > summary {
  background: var(--wash);
}

.site-menu > ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(22rem, calc(100vw - 2rem));
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  margin: 0;
  padding: 0.75rem 0;
  list-style: none;
  background: var(--card);
  border: 2px solid var(--ink);
  border-top: 6px solid var(--mint);
}

.site-menu ul ul {
  margin: 0 0 0.4rem;
  padding: 0 0 0 1rem;
  list-style: none;
  border-left: 3px solid var(--hair);
  margin-left: 1rem;
}

.site-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-menu > ul > li > a {
  font-family: var(--narrow);
  font-weight: 600;
  font-size: 1.05rem;
}

.site-menu a:hover {
  text-decoration: underline;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  max-width: 64rem;
  margin: 1.25rem auto 0;
  font-size: 0.875rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--rule);
}

/* ---------- Shared pieces ---------- */

main {
  display: block;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 0 clamp(2.5rem, 7vw, 5rem);
}

.page-title h1,
.cover-title h1 {
  margin: 0;
}

.page-title h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.75rem);
  max-width: 24ch;
}

/* The folded corner: the top-right corner is cut and a mint flap sits in it. */
.fold {
  position: relative;
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
}

.fold::after {
  content: "";
  position: absolute;
  top: calc(-1 * var(--edge, 0px));
  right: calc(-1 * var(--edge, 0px));
  width: var(--fold);
  height: var(--fold);
  background: linear-gradient(to bottom left, transparent calc(50% - 1.5px), var(--ink) calc(50% - 1.5px), var(--ink) calc(50% + 1.5px), var(--mint) calc(50% + 1.5px));
  pointer-events: none;
}

.answer-sheet,
.about-sheet,
.contact-head,
.thanks-sheet,
.area-sheet {
  --edge: 2px;
}

.prose {
  max-width: var(--measure);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.6rem;
}

.prose p,
.prose li {
  max-width: 68ch;
}

.prose p {
  margin: 0 0 1rem;
}

.prose a {
  text-underline-offset: 0.18em;
}

.photo-hero,
.photo-inline {
  margin: 0 0 1.5rem;
}

.photo-hero img,
.photo-inline img {
  display: block;
  width: 100%;
  border: 2px solid var(--ink);
}

.photo-hero img {
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

section[data-section][style] {
  margin: 1.5rem 0;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1rem, 3vw, 2rem);
  background-size: cover;
  background-position: center;
}

section[data-section][style] > .bg-surface-card {
  max-width: 34rem;
  padding: 1.25rem 1.4rem;
  border: 2px solid var(--ink);
  border-top: 6px solid var(--mint);
}

section[data-section][style] > .bg-surface-card > h2:first-child {
  margin-top: 0;
}

section[data-section][style] > .bg-surface-card > :last-child {
  margin-bottom: 0;
}

/* Numbered index: the sequence used for topic lists and step indexes. */
.stair {
  counter-reset: stair;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stair li {
  counter-increment: stair;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--hair);
}

.stair li::before {
  content: counter(stair);
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.05rem;
  border: 2px solid var(--ink);
  background: var(--mint);
  color: var(--ink);
}

.stair a {
  font-family: var(--narrow);
  font-weight: 600;
  font-size: 1.2rem;
  text-underline-offset: 0.2em;
}

.index-heading {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

/* ---------- Home: stepped leaflet sections ---------- */

.cover {
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 2px solid var(--ink);
  border-left: 0.75rem solid var(--mint);
}

.cover-title h1 {
  font-size: clamp(2.3rem, 6.5vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  max-width: 14ch;
}

.cover-lines {
  max-width: 36rem;
  margin-top: 1.25rem;
}

.display-line {
  margin: 0;
  padding: 0.6rem 0 0.6rem 0.9rem;
  border-left: 3px solid var(--rule);
  font-size: 1.1rem;
}

.display-line + .display-line {
  margin-top: 0.5rem;
}

.steps {
  counter-reset: step;
  max-width: 44rem;
  margin: 2.5rem 0 0;
}

.steps > p:first-child {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
}

.steps > h2 {
  counter-increment: step;
  position: relative;
  margin: 2.25rem 0 0.6rem;
  padding: 0 0 0.45rem 3.25rem;
  border-bottom: 2px solid var(--ink);
}

.steps > h2::before {
  content: counter(step);
  position: absolute;
  left: 0;
  bottom: 0.4rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.3rem;
  font-weight: 700;
  border: 2px solid var(--ink);
  background: var(--mint);
}

@media (min-width: 48rem) {
  .steps > h2 ~ p {
    padding-left: 3.25rem;
  }
}

.topic-index {
  margin-top: 3rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 2px solid var(--ink);
}

/* ---------- Topic: grid of numbered question panels ---------- */

.topic-head {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border-left: 0.75rem solid var(--mint);
  border-bottom: 2px solid var(--ink);
}

.topic-body {
  max-width: none;
  margin-top: 2rem;
}

.topic-body > p,
.topic-body > h2 {
  max-width: var(--measure);
}

.topic-body > ul {
  counter-reset: question;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr));
  gap: 1rem;
  margin: 1rem 0 2.25rem;
  padding: 0;
  list-style: none;
}

.topic-body > ul > li {
  counter-increment: question;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: none;
  min-height: 8.5rem;
  padding: 1rem 1.1rem 1.15rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  clip-path: polygon(0 0, calc(100% - 1.1rem) 0, 100% 1.1rem, 100% 100%, 0 100%);
}

.topic-body > ul > li::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1.1rem;
  height: 1.1rem;
  background: linear-gradient(to bottom left, transparent 50%, var(--ink) 50%);
}

.topic-body > ul > li::before {
  content: counter(question, decimal-leading-zero);
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--mint-ink);
}

.topic-body > ul > li > a {
  font-family: var(--narrow);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  text-underline-offset: 0.2em;
}

.topic-body > ul > li > a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.topic-body > ul > li:hover {
  background: var(--wash);
}

.topic-body > ul > li:focus-within {
  outline: 3px solid var(--mint-ink);
  outline-offset: -5px;
}

/* ---------- Question: one-column answer with caution boxes ---------- */

.answer > * {
  max-width: 46rem;
}

.answer-sheet {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 2px solid var(--ink);
}

.answer-body {
  margin-top: 1.5rem;
}

.answer-body > p:first-of-type {
  font-size: 1.1rem;
}

.answer-body ol {
  counter-reset: point;
  margin: 0.5rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.answer-body ol > li {
  counter-increment: point;
  position: relative;
  margin: 0 0 0.6rem;
  padding: 0.15rem 0 0 2.75rem;
  min-height: 2rem;
}

.answer-body ol > li::before {
  content: counter(point);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  font-family: var(--narrow);
  font-weight: 700;
  border: 2px solid var(--ink);
  background: var(--mint);
}

/* The closing section of an answer reads as a boxed caution note. */
.answer-body:not(:has(> section[data-section])) > h2:last-of-type {
  margin-top: 2rem;
  margin-bottom: 0;
  padding: 0.85rem 1rem 0.5rem;
  border: 2px solid var(--ink);
  border-bottom: 0;
  font-size: 1.2rem;
}

.answer-body:not(:has(> section[data-section])) > h2:last-of-type ~ * {
  margin: 0;
  padding: 0 1rem 0.85rem;
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}

.answer-body:not(:has(> section[data-section])) > h2:last-of-type ~ :last-child {
  border-bottom: 2px solid var(--ink);
}

.answer-body > section[data-section][style] {
  margin-left: calc(-1 * clamp(1.25rem, 4vw, 2.25rem));
  margin-right: calc(-1 * clamp(1.25rem, 4vw, 2.25rem));
}

.caution {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem 1.1rem 3.5rem;
  position: relative;
  border: 2px solid var(--ink);
}

.caution::before {
  content: "!";
  position: absolute;
  left: 1rem;
  top: 1rem;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  font-family: var(--narrow);
  font-weight: 700;
  border: 2px solid var(--ink);
  background: var(--card);
}

.caution-head {
  margin: 0 0 0.3rem;
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.15rem;
}

.caution-text {
  margin: 0;
  max-width: 60ch;
}

/* ---------- About: two-column panel beside a sourcing note ---------- */

.about-split {
  display: grid;
  gap: 1.25rem;
}

.about-sheet {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 2px solid var(--ink);
}

.about-sheet .prose {
  margin-top: 1.5rem;
}

.sourcing {
  align-self: start;
  padding: 1.25rem 1.25rem 1.4rem;
  border: 2px solid var(--ink);
  border-top: 6px solid var(--ink);
}

.sourcing-head {
  margin: 0 0 0.85rem;
  font-size: 1.3rem;
}

.sourcing-list {
  counter-reset: source;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sourcing-list li {
  counter-increment: source;
  position: relative;
  padding: 0.6rem 0 0.6rem 2.4rem;
  border-top: 1px solid var(--rule);
}

.sourcing-list li::before {
  content: counter(source);
  position: absolute;
  left: 0;
  top: 0.6rem;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  font-family: var(--narrow);
  font-weight: 700;
  border: 2px solid var(--ink);
  background: var(--card);
}

/* ---------- Contact: purpose boxes over a compact form ---------- */

.contact-head {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 2px solid var(--ink);
}

.contact-head .prose {
  margin-top: 1.25rem;
}

.purposes {
  margin-top: 2.25rem;
}

.purposes-heading {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.purpose-grid {
  counter-reset: purpose;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.purpose {
  counter-increment: purpose;
  padding: 1rem 1.1rem 1.15rem;
  border: 2px solid var(--ink);
  border-top: 6px solid var(--mint);
}

.purpose::before {
  content: counter(purpose);
  display: block;
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--mint-ink);
  margin-bottom: 0.5rem;
}

.purpose-head {
  margin: 0 0 0.3rem;
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.15rem;
}

.purpose-text {
  margin: 0;
}

.note-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 2px solid var(--ink);
}

.note-field {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.note-label {
  font-family: var(--narrow);
  font-weight: 600;
  font-size: 1.05rem;
}

.note-input {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--rule);
  border-radius: 2px;
}

.note-input:focus {
  border-color: var(--ink);
}

.note-area {
  resize: vertical;
  min-height: 9rem;
}

.note-button {
  justify-self: start;
  min-height: 44px;
  padding: 0.6rem 1.4rem;
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-light-on-accent);
  background: var(--mint-ink);
  border: 2px solid var(--mint-ink);
  border-radius: 2px;
  cursor: pointer;
}

.note-button:hover {
  background: var(--mint-deep);
  border-color: var(--mint-deep);
}

/* ---------- Thank you: one folded confirmation panel ---------- */

.thanks > * {
  max-width: 40rem;
}

.thanks-sheet {
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 2px solid var(--ink);
}

.check {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.25rem;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.check::before {
  content: "";
  width: 1.1rem;
  height: 0.6rem;
  margin-top: -0.25rem;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: rotate(-45deg);
}

.thanks-sheet .prose {
  margin-top: 1.25rem;
}

.thanks-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  list-style: none;
  border-top: 2px dashed var(--rule);
}

.thanks-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  font-family: var(--narrow);
  font-weight: 600;
  border: 2px solid var(--ink);
  text-underline-offset: 0.2em;
}

/* ---------- Area: split overview beside a numbered list ---------- */

.area-split {
  display: grid;
  gap: 1.25rem;
}

.area-sheet {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 2px solid var(--ink);
}

.area-sheet .prose {
  margin-top: 1.25rem;
}

.area-list {
  align-self: start;
  padding: 1.25rem 1.4rem;
  border: 2px solid var(--ink);
  border-top: 6px solid var(--mint);
}

.area-items > ul:empty {
  display: none;
}

.area-items > ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.stair-flat a {
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: 64rem;
  margin: 0 auto 2rem;
  padding: 1.5rem clamp(1rem, 3vw, 2rem);
  border: 2px solid var(--ink);
  border-top: 6px solid var(--ink);
}

.footer-name {
  margin: 0;
  font-family: var(--narrow);
  font-weight: 700;
  font-size: 1.25rem;
}

.footer-line {
  margin: 0.3rem 0 1rem;
  max-width: 50ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 0.5rem 0;
}

/* ---------- Medium screens ---------- */

@media (min-width: 48rem) {
  .stair li:nth-child(2) { margin-left: 2.5rem; }
  .stair li:nth-child(3) { margin-left: 5rem; }
  .stair li:nth-child(4) { margin-left: 7.5rem; }
  .stair-flat li:nth-child(n) { margin-left: 0; }

  .about-split {
    grid-template-columns: minmax(0, 1.65fr) minmax(15rem, 1fr);
    align-items: start;
  }

  .area-split {
    grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr);
    align-items: start;
  }

  .note-form {
    grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
    align-items: start;
  }

  .note-button {
    grid-column: 2;
  }
}

/* ---------- Desktop: sticky rail with grouped flyouts ---------- */

@media (min-width: 64rem) {
  .leaflet {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    align-items: start;
  }

  .site-header {
    top: 0;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1.75rem;
    padding: 1.5rem 1.1rem;
    border-bottom: 0;
    border-right: 2px solid var(--ink);
    box-shadow: inset -6px 0 0 var(--mint);
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .brand .site-logo {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-name {
    font-size: 1.35rem;
  }

  .rail-toggle {
    display: none;
  }

  .rail-groups {
    display: block;
  }

  .site-nav > ul {
    counter-reset: rail;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--ink);
  }

  .site-nav > ul > li {
    counter-increment: rail;
    border-bottom: 1px solid var(--hair);
  }

  .site-nav > ul > li > a,
  .site-nav-group > summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.55rem 0.25rem;
    font-family: var(--narrow);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
  }

  .site-nav > ul > li > a::before,
  .site-nav-group > summary::before {
    content: counter(rail);
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid currentColor;
  }

  .site-nav > ul > li > a:hover {
    text-decoration: underline;
  }

  .site-nav-group > summary {
    list-style: none;
  }

  .site-nav-group > summary::-webkit-details-marker {
    display: none;
  }

  .site-nav-group > summary::after {
    content: "";
    margin-left: auto;
    width: 0.5rem;
    height: 0.5rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .site-nav-group[open] > summary {
    background: var(--wash);
  }

  .site-nav-group[open] > summary::before {
    background: var(--mint);
  }

  .site-nav-group > ul {
    position: absolute;
    left: 100%;
    top: 0;
    bottom: 0;
    width: 21rem;
    overflow-y: auto;
    margin: 0;
    padding: 1.25rem 1rem;
    list-style: none;
    background: var(--card);
    border-right: 2px solid var(--ink);
    border-left: 2px solid var(--ink);
    box-shadow: inset 0 6px 0 var(--mint);
  }

  .site-nav-group > ul > li {
    border-bottom: 1px solid var(--hair);
  }

  .site-nav-group > ul > li:first-child a {
    font-family: var(--narrow);
    font-weight: 700;
    font-size: 1.2rem;
  }

  .site-nav-group > ul a {
    display: block;
    padding: 0.55rem 0.25rem;
    font-size: 0.95rem;
    line-height: 1.35;
    text-decoration: none;
  }

  .site-nav-group > ul a:hover {
    text-decoration: underline;
  }

  .sheet {
    padding: 0 clamp(1.5rem, 4vw, 3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
