/* ==========================================================================
   Princess Kahanu Estates Association — site styles
   One stylesheet for the whole site. No build step, no framework.
   ========================================================================== */

/* --------------------------------------------------------------- fonts -- */
@font-face {
  font-family: 'Sanchez';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/sanchez-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------- tokens -- */
:root {
  /* colour — built from the association's own lilac wordmark (#C392E3) */
  --ink: #2b2233;
  --ink-soft: #5f5469;
  --ink-faint: #837891;
  --plum: #5e2a7e;
  --plum-dark: #46205e;
  --orchid: #c392e3;
  --orchid-soft: #e9d7f6;
  --wash: #f6f1fa;
  --paper: #fdfcfe;
  --white: #ffffff;
  --ilima: #b5710d; /* Oʻahu's ʻilima gold, darkened for text contrast */
  --ilima-bright: #e5a52f;
  --ilima-wash: #fdf4e3;
  --line: #e7dcf0;
  --line-strong: #d3c1e2;

  /* type */
  --font-display: 'Sanchez', Georgia, 'Times New Roman', serif;
  --font-ui: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.16rem, 1.09rem + 0.33vw, 1.35rem);
  --step-2: clamp(1.36rem, 1.24rem + 0.58vw, 1.7rem);
  --step-3: clamp(1.6rem, 1.39rem + 1vw, 2.16rem);
  --step-4: clamp(1.88rem, 1.53rem + 1.7vw, 2.9rem);
  --step-5: clamp(2.2rem, 1.6rem + 2.9vw, 3.9rem);

  /* space */
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --section-y: clamp(3rem, 7vw, 5.75rem);
  --radius: 6px;
  --radius-lg: 12px;

  /* the kapa triangle band — the site's one repeating motif */
  --kapa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='18' viewBox='0 0 60 18'%3E%3Cpath d='M0 16.4h60' fill='none' stroke='%23c392e3' stroke-width='2'/%3E%3Cpath d='M0 16.4 15 2.4 30 16.4Z' fill='%23c392e3'/%3E%3Cpath d='M30 16.4 45 2.4 60 16.4' fill='none' stroke='%23c392e3' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--plum-dark);
  line-height: 1.18;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); letter-spacing: -0.015em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p, ul, ol, dl, table, figure { margin: 0 0 1.15em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a {
  color: var(--plum);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ilima); }

strong { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--ilima-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------- helpers -- */
.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.prose { max-width: 68ch; }
.prose > * + h2 { margin-top: 1.9em; }
.prose > * + h3 { margin-top: 1.6em; }

.section { padding-block: var(--section-y); }
.section--wash { background: var(--wash); }
.section--tint { background: var(--white); border-block: 1px solid var(--line); }

.lede {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--plum-dark);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the signature band, used to close a light section */
.kapa-band {
  height: 18px;
  background-image: var(--kapa);
  background-repeat: repeat-x;
  background-position: center bottom;
  opacity: 0.9;
}

/* --------------------------------------------------------------- header -- */
.topbar {
  background: var(--plum-dark);
  color: #e9dcf3;
  font-size: var(--step--1);
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.6rem;
  padding-block: 0.4rem;
}
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--ilima-bright); text-decoration: underline; }
.topbar__place { display: flex; align-items: center; gap: 0.5rem; }
.topbar__contact { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 252, 254, 0.94);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 1; min-width: 0; }
.brand img {
  height: clamp(2.1rem, 5.2vw, 2.9rem);
  width: auto;
}

/* nav ---------------------------------------------------------------- */
.nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 1.1vw, 1.1rem);
  margin: 0;
  padding: 0;
}
.nav__link {
  display: block;
  padding: 0.55rem 0.35rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav__link:hover { color: var(--plum); border-bottom-color: var(--orchid); }
.nav__link[aria-current='page'] {
  color: var(--plum-dark);
  border-bottom-color: var(--plum);
}
.nav__cta {
  margin-left: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  border-bottom: 0;
}
.nav__cta:hover { background: var(--plum-dark); color: #fff; border-bottom-color: transparent; }

/* hamburger */
.nav-toggle {
  display: none;
  width: 2.9rem; height: 2.9rem;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
  color: var(--plum-dark);
}
.nav-toggle__bars { display: block; width: 22px; height: 14px; position: relative; }
.nav-toggle__bars i {
  position: absolute;
  left: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.18s ease, top 0.28s ease;
}
.nav-toggle__bars i:nth-child(1) { top: 0; }
.nav-toggle__bars i:nth-child(2) { top: 6px; }
.nav-toggle__bars i:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(43, 34, 51, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 70;
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-ui);
  font-size: var(--step--1);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--primary { background: var(--plum); color: #fff; }
.btn--primary:hover { background: var(--plum-dark); color: #fff; }
.btn--ghost { border-color: var(--line-strong); color: var(--plum-dark); background: transparent; }
.btn--ghost:hover { border-color: var(--plum); color: var(--plum); background: var(--wash); }
.btn--gold { background: var(--ilima-bright); color: #35240a; }
.btn--gold:hover { background: var(--ilima); color: #fff; }
.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ----------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--orchid-soft), transparent 65%),
    var(--wash);
  padding-block: clamp(2.5rem, 6vw, 4.75rem) clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 1.55rem + 2.45vw, 3.25rem);
  margin-bottom: 0.45em;
  max-width: 13ch;
}
.hero__lede { font-size: var(--step-1); line-height: 1.6; color: var(--ink-soft); max-width: 34ch; }

.hero__facts {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--line-strong);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.hero__facts b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  color: var(--plum);
  line-height: 1.1;
}
.hero__facts span { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.45; display: block; }

/* framed photo — the one decorative flourish */
.framed { margin: 0; }
.framed__media {
  position: relative;
  margin-right: 14px;
  margin-bottom: 14px;
}
.framed__media::before {
  content: '';
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 2px solid var(--orchid);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.framed__media img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
}
.framed figcaption {
  margin-top: 1.9rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--orchid-soft);
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-soft);
}
.framed figcaption b { display: block; color: var(--plum-dark); font-weight: 700; margin-bottom: 0.2rem; }

/* --------------------------------------------------------- page header -- */
.pagehead {
  background:
    radial-gradient(46rem 22rem at 88% -30%, var(--orchid-soft), transparent 70%),
    var(--wash);
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2.25rem, 5vw, 3.25rem);
  border-bottom: 1px solid var(--line);
}
.crumbs {
  font-size: var(--step--1);
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: '›'; margin-right: 0.5rem; color: var(--line-strong); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--plum); text-decoration: underline; }
.pagehead h1 { font-size: var(--step-4); margin-bottom: 0.35em; }
.pagehead .lede { max-width: 60ch; }

/* ---------------------------------------------------------------- notice -- */
.notice {
  background: var(--ilima-wash);
  border-top: 1px solid #f0dcb4;
  border-bottom: 1px solid #f0dcb4;
}
.notice .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  padding-block: 1.15rem;
}
.notice__mark {
  flex: none;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--ilima-bright);
  color: #3b2708;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.notice__text { flex: 1 1 18rem; margin: 0; font-size: var(--step--1); line-height: 1.6; }
.notice__text b { color: #6b4406; }
.notice a { color: var(--ilima); font-weight: 700; }

/* ----------------------------------------------------------------- cards -- */
.section__head { max-width: 58ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head p { color: var(--ink-soft); margin-bottom: 0; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr));
  gap: clamp(1rem, 2.2vw, 1.65rem);
}
.tile {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--orchid);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 2.4vw, 1.9rem);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.tile:hover { border-color: var(--line-strong); border-top-color: var(--plum); transform: translateY(-2px); }
.tile h3 { margin-bottom: 0.45rem; color: var(--plum-dark); }
.tile p { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.65; margin-bottom: 0; }
.tile__more {
  margin-top: auto;
  padding-top: 1.15rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--plum);
}
a.tile:hover .tile__more { color: var(--ilima); }

/* two-column content + aside ------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 2.6vw, 2rem);
}
.panel--wash { background: var(--wash); border-color: var(--line-strong); }
.panel h3 { margin-bottom: 0.75rem; }
.panel + .panel { margin-top: 1.25rem; }
.panel p, .panel li { font-size: var(--step--1); line-height: 1.7; }

.panel--sticky { position: sticky; top: 6.5rem; }

/* callout inside prose */
.callout {
  border-left: 4px solid var(--orchid);
  background: var(--wash);
  padding: 1.15rem 1.35rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-block: 1.75rem;
}
.callout--alert { border-left-color: #c0392b; background: #fdf1ef; }
.callout--alert strong { color: #9c2c1f; }
.callout p { margin-bottom: 0.6em; }
.callout p:last-child { margin-bottom: 0; }

/* checklist */
.ticks { list-style: none; padding: 0; }
.ticks li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.8rem;
  line-height: 1.65;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.72rem; height: 0.72rem;
  border: 2px solid var(--orchid);
  border-top: 0; border-right: 0;
  transform: rotate(-45deg) translateY(-2px);
}

/* numbered steps — used only where the content really is a sequence */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 3.1rem;
  padding-bottom: 1.4rem;
  margin-bottom: 0;
}
.steps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.06rem; top: 2.35rem; bottom: 0.35rem;
  width: 1px;
  background: var(--line-strong);
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: 0.1rem;
  width: 2.15rem; height: 2.15rem;
  border-radius: 50%;
  background: var(--wash);
  border: 1px solid var(--line-strong);
  color: var(--plum);
  font-family: var(--font-display);
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}
.steps h3 { font-size: var(--step-0); margin-bottom: 0.3rem; }
.steps p { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 0; }

/* glossary */
.glossary { margin: 0; }
.glossary div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}
.glossary div:first-child { border-top: 0; padding-top: 0; }
.glossary dt { font-weight: 700; color: var(--plum-dark); }
.glossary dd { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }

/* contact details list */
.details { list-style: none; padding: 0; margin: 0; }
.details li { padding: 0.85rem 0; border-top: 1px solid var(--line); }
.details li:first-child { border-top: 0; padding-top: 0; }
.details span { display: block; font-size: var(--step--1); color: var(--ink-faint); }
.details a, .details b { font-size: var(--step-0); font-weight: 700; color: var(--plum-dark); text-decoration: none; }
.details a:hover { color: var(--ilima); text-decoration: underline; }

/* hours */
.hours { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.hours th, .hours td { padding: 0.55rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.hours th { font-weight: 600; color: var(--ink-soft); width: 42%; }
.hours td { font-weight: 700; color: var(--plum-dark); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours .is-closed { color: var(--ink-faint); font-weight: 500; }

/* ------------------------------------------------------------------ form -- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--step--1); font-weight: 700; color: var(--plum-dark); }
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--white);
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 100%;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--plum); }
.field .hint { font-size: var(--step--1); color: var(--ink-faint); }
.field .error { font-size: var(--step--1); color: #a5281a; font-weight: 600; }
.field.is-invalid input,
.field.is-invalid textarea { border-color: #c0392b; background: #fdf5f4; }
.form__note { font-size: var(--step--1); color: var(--ink-faint); margin: 0; }

/* ---------------------------------------------------------------- footer -- */
.footer { background: var(--plum-dark); color: #d9c9e6; margin-top: auto; }
.footer__band { height: 18px; background-image: var(--kapa); background-repeat: repeat-x; }
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.5vw, 3.25rem);
  padding-block: clamp(2.75rem, 5vw, 4rem);
}
.footer h2 {
  font-size: var(--step-0);
  color: #fff;
  margin-bottom: 1.1rem;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.footer p, .footer li, .footer address { font-size: var(--step--1); line-height: 1.75; font-style: normal; }
.footer a { color: #f0e5f8; text-decoration: none; }
.footer a:hover { color: var(--ilima-bright); text-decoration: underline; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li + li { margin-top: 0.5rem; }
.footer__logo {
  height: 2.5rem;
  width: auto;
  margin-bottom: 1.1rem;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.footer__legal {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-block: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
  font-size: var(--step--1);
  color: #bfaccf;
}
.footer__legal p { margin: 0; }

/* ------------------------------------------------------------ 404 layout -- */
.notfound { text-align: center; padding-block: clamp(3.5rem, 9vw, 7rem); }
.notfound h1 { font-size: var(--step-5); }
.notfound .lede { margin-inline: auto; max-width: 46ch; }
.notfound .btn-row { justify-content: center; }
.notfound .tiles { margin-top: clamp(2.5rem, 5vw, 4rem); text-align: left; }

/* ============================================================ responsive == */

/* tablet / small laptop: the nav is the first thing to break, so it collapses
   at the width the seven links actually stop fitting, not a round number */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; position: relative; z-index: 85; }

  /* `.masthead` has a backdrop-filter, which makes it a stacking context — the
     drawer inside it can't escape. Lift the whole masthead over the scrim when
     the menu is open so the drawer paints on top and the close button stays
     visible and tappable. */
  body.nav-open .masthead { z-index: 90; }

  /* The closed drawer sits off-screen to the right. `clip` stops it widening
     the document without creating a scroll container, so the sticky masthead
     keeps working. */
  body { overflow-x: clip; overflow-y: visible; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 80;
    width: min(21rem, 86vw);
    height: 100dvh;
    background: var(--white);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 44px rgba(43, 34, 51, 0.16);
    padding: 5.5rem 1.75rem 2.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;

    /* Closed state is clipped rather than translated off-screen. A clipped
       element adds nothing to the scrollable area, so the drawer can never
       cause a sideways scrollbar on any browser. */
    clip-path: inset(0 0 0 100%);
    visibility: hidden;
    transition: clip-path 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  }
  body.nav-open .nav {
    clip-path: inset(0);
    visibility: visible;
  }

  /* the contents slide in behind the wipe — inside the clip, so still no
     chance of adding width to the page */
  .nav__list {
    transform: translateX(1.25rem);
    transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
  }
  body.nav-open .nav__list { transform: translateX(0); }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    padding: 0.95rem 0.25rem;
    font-size: var(--step-0);
    border-bottom: 1px solid var(--line);
  }
  .nav__link:hover { border-bottom-color: var(--line); }
  .nav__link[aria-current='page'] { border-bottom-color: var(--line); color: var(--plum); }
  .nav__link[aria-current='page']::before {
    content: '';
    display: inline-block;
    width: 3px; height: 1em;
    background: var(--plum);
    margin-right: 0.6rem;
    vertical-align: -0.15em;
  }
  .nav__cta {
    margin: 1.5rem 0 0;
    text-align: center;
    border-bottom: 0;
    padding: 0.85rem 1.1rem;
  }
  .nav__cta:hover { border-bottom-color: transparent; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: clamp(2.25rem, 7vw, 3rem); }
  .hero__lede { max-width: 48ch; }
  .framed { max-width: 34rem; }
  .framed__media { margin-right: 10px; margin-bottom: 10px; }
  .framed__media::before { inset: 10px -10px -10px 10px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .panel--sticky { position: static; }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 1080px) and (min-width: 901px) {
  .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; max-width: 46ch; }
}

@media (max-width: 560px) {
  html { scroll-padding-top: 5rem; }
  .topbar__place { display: none; }
  .topbar .wrap { justify-content: center; }
  .masthead .wrap { min-height: 4.15rem; }
  .hero__facts { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; padding-top: 1.15rem; }
  .hero__facts li { display: flex; align-items: baseline; gap: 0.7rem; }
  .hero__facts b { font-size: var(--step-1); flex: none; }
  .btn-row .btn { flex: 1 1 100%; }
  .glossary div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; padding: 0.7rem 0; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .notice .wrap { gap: 0.85rem; }
  .steps li { padding-left: 2.75rem; }
}

/* keep the two-up tiles on small screens rather than a single dead column */
@media (max-width: 700px) and (min-width: 421px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 1.15rem; }
  .tile h3 { font-size: var(--step-0); }
}
@media (max-width: 420px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .topbar, .nav, .nav-toggle, .nav-scrim, .footer__band, .btn-row { display: none; }
  body { background: #fff; font-size: 11pt; }
  .masthead { position: static; }
  .hero, .pagehead { background: #fff; }
}
