:root {
  --green-950: #04170F;
  --green-900: #082A1F;
  --green-800: #0D3A2C;
  --green-600: #1C6B4A;
  --mint: #A9D8BE;
  --wave: #0F5F3E;
  --on-wave-soft: #CFE5D9;
  --gold: #F5C542;
  --gold-strong: #E8B021;
  --gold-soft: #FFF6D8;

  --ink: #0D3A2C;
  --ink-soft: #2E5546;
  --paper: #FFFFFF;
  --paper-tint: #EDF4EF;
  --rule: rgba(13, 58, 44, 0.16);

  --on-dark: #F2F7F4;
  --on-dark-soft: #B9D3C5;
  --ring-dark: #9EE0BC;
  --ring-light: #1C6B4A;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(20px, 4vw, 48px);
  --frame: 1440px;
  --section-pad: clamp(72px, 9vw, 136px);
}

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

html {
  background: var(--green-900);
  scroll-behavior: smooth;
  scrollbar-color: var(--green-600) var(--paper-tint);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

img { display: block; max-width: 100%; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

::selection { background: var(--green-600); color: #fff; }
.hero ::selection,
.vote ::selection { background: var(--mint); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ring-light);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible,
.vote :focus-visible { outline-color: var(--ring-dark); }

.wrap {
  max-width: var(--frame);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--on-dark);
  color: var(--ink);
  font-weight: 700;
  border-radius: 3px;
  text-decoration: none;
  transition: top 160ms ease;
}
.skip:focus { top: 12px; }

[hidden] { display: none !important; }

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: 3px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 88%;
  letter-spacing: 0.005em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 220ms ease,
    transform 220ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--on-dark);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18), 0 10px 24px -14px rgba(0, 0, 0, 0.7);
}
.btn-solid:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.16), 0 16px 30px -14px rgba(0, 0, 0, 0.75);
}

.btn-ghost {
  background: rgba(242, 247, 244, 0.04);
  color: var(--on-dark);
  border-color: rgba(242, 247, 244, 0.5);
}
.btn-ghost:hover {
  background: rgba(242, 247, 244, 0.1);
  border-color: var(--on-dark);
}

.btn-sm {
  min-height: 40px;
  padding: 0 14px;
  gap: 8px;
  font-size: 0.9375rem;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-sm .icon { width: 16px; height: 16px; }

/* Curtain canvas, shared by the hero and the closing section */

.curtain {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}
.curtain.is-on { opacity: 1; }

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: max(620px, 100svh);
  display: flex;
  flex-direction: column;
  color: var(--on-dark);
  background:
    radial-gradient(ellipse 42% 60% at 70% 45%, #17583F 0%, rgba(23, 88, 63, 0) 100%),
    linear-gradient(180deg, #0B3326 0%, #072419 100%);
}

.nav {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-name {
  font-size: 1.0625rem;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--on-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--on-dark-soft);
  text-decoration: none;
  transition: color 160ms ease;
}
.nav-links a:hover {
  color: var(--on-dark);
  text-decoration: underline;
}

.hero-inner {
  flex: 1;
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: min(34rem, 40vw);
  padding: 24px 0 clamp(72px, 12svh, 140px);
}

.hero-title { font-weight: 900; }

.hero-name {
  display: block;
  font-size: clamp(4.5rem, min(10.2vw, 17svh), 9.5rem);
  font-weight: 900;
  font-stretch: 64%;
  line-height: 0.86;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.hero-office {
  display: block;
  margin-top: 0.38em;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 600;
  font-stretch: 82%;
  line-height: 1.1;
  color: var(--mint);
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-figure {
  position: absolute;
  z-index: 1;
  right: max(0px, calc((100% - var(--frame)) / 2));
  bottom: 0;
  margin: 0;
  aspect-ratio: 1428 / 1244;
  height: min(84svh, 880px, calc(min(100vw, var(--frame)) * 0.57 / 1.148));
}
.flip-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
}

/* Albert flips around into a player card */

.card-link {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  cursor: pointer;
}
.card-link:hover { color: #fff; }
.card-link .icon { width: 17px; height: 17px; }

.flip {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 1800px;
  -webkit-tap-highlight-color: transparent;
}
.flip:focus-visible { outline-offset: -6px; }
.flip-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 950ms cubic-bezier(0.2, 0.75, 0.2, 1);
}
.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flip-front img { transition: filter 220ms ease; }
.flip:hover .flip-front img { filter: brightness(1.06); }
.flip-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2.5%;
}

.pcard-shadow {
  height: 94%;
  aspect-ratio: 0.7;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.55));
}
.pcard {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  container-type: size;
  clip-path: polygon(14% 0, 86% 0, 100% 6%, 100% 89%, 50% 100%, 0 89%, 0 6%);
  background: linear-gradient(140deg, #F3F8F5 0%, #9CC3AF 22%, #E8F2EC 42%, #5E8F78 62%, #D7E8DF 80%, #8DB4A0 100%);
}
.pcard-in {
  position: absolute;
  inset: 1.6% 2.3%;
  clip-path: polygon(14% 0, 86% 0, 100% 6%, 100% 89%, 50% 100%, 0 89%, 0 6%);
  background:
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 14px),
    radial-gradient(120% 80% at 30% 12%, #2A8A5E 0%, #12583B 38%, #0A3A27 70%, #062518 100%);
  color: #fff;
  text-align: left;
}
.pcard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.38) 50%, transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}
.is-flipped .pcard::after { animation: card-shine 1100ms 520ms ease-out both; }
@keyframes card-shine { to { transform: translateX(130%); } }

.pcard-art {
  position: absolute;
  top: 3%;
  right: 0;
  width: 76%;
  height: 50%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.pcard-art img {
  position: absolute;
  top: 4%;
  left: -42%;
  width: 178%;
  max-width: none;
  height: auto;
}

.pcard-rating {
  position: absolute;
  top: 9%;
  left: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2cqh;
}
.pcard-ovr {
  font-size: 14cqh;
  font-weight: 900;
  font-stretch: 64%;
  line-height: 0.8;
}
.pcard-pos {
  font-size: 4.6cqh;
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: 0.04em;
  color: var(--mint);
}
.pcard-flag {
  display: block;
  width: 17cqw;
  height: auto;
  margin-top: 1cqh;
  border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
}
.pcard-yr {
  font-size: 4cqh;
  font-weight: 800;
  font-stretch: 80%;
}

.pcard-name {
  position: absolute;
  top: 53%;
  left: 10%;
  right: 10%;
  padding-bottom: 1.4cqh;
  border-bottom: 1px solid rgba(169, 216, 190, 0.45);
  font-size: 9.5cqh;
  font-weight: 900;
  font-stretch: 66%;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.pcard-stats {
  position: absolute;
  top: 66.5%;
  left: 15%;
  right: 13%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1cqh 10cqw;
  font-size: 3.7cqh;
  line-height: 1.25;
  font-weight: 600;
  font-stretch: 85%;
  color: var(--mint);
}
.pcard-stats b {
  display: inline-block;
  min-width: 2.2ch;
  margin-right: 0.35em;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.pcard-foot {
  position: absolute;
  bottom: 10%;
  left: 0;
  right: 0;
  font-size: 2.6cqh;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(242, 247, 244, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: none; }
  .is-flipped .pcard::after { animation: none; }
}

/* Plan */

.plan {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
  padding: var(--section-pad) 0 calc(var(--section-pad) + 120px);
}

.plan-grid,
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 112px);
  align-items: start;
}

.plan h2,
.why h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 850;
  font-stretch: 70%;
  line-height: 0.94;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.plan-head {
  position: sticky;
  top: 48px;
}
.plan-head p {
  margin: 24px 0 0;
  max-width: 30ch;
  color: var(--ink-soft);
}

.plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--rule);
}

.plan-list li {
  padding: 36px 0 40px;
  border-top: 1px solid var(--rule);
}

.plan-list h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  font-stretch: 76%;
  line-height: 1.02;
  letter-spacing: -0.006em;
  color: var(--ink);
}

.plan-list p {
  margin: 14px 0 0;
  max-width: 58ch;
  color: var(--ink-soft);
}

/* The Green Wave: the section starts white, a wave rolls up through it,
   and it stays green with white type. No JavaScript means it's simply green. */

.plan:not(.is-dry) { background: var(--wave); }
.plan:not(.is-dry) h2,
.plan:not(.is-dry) h3,
.wave-wet h2,
.wave-wet h3 { color: var(--on-dark); }
.plan:not(.is-dry) p,
.wave-wet p { color: var(--on-wave-soft); }
.plan:not(.is-dry) .plan-list,
.plan:not(.is-dry) .plan-list li,
.wave-wet .plan-list,
.wave-wet .plan-list li { border-color: rgba(242, 247, 244, 0.2); }
.plan:not(.is-dry) ::selection { background: var(--mint); color: var(--ink); }
.plan:not(.is-dry) :focus-visible { outline-color: var(--ring-dark); }

.plan > .plan-grid { position: relative; z-index: 0; }

.wave-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wave-canvas.is-rolling {
  top: auto;
  bottom: 0;
  height: 200px;
  z-index: -1;
  opacity: 0;
  transition: opacity 900ms ease;
}
.wave-canvas.is-rolling.is-shown { opacity: 1; }

.plan > .wave-wet {
  position: absolute;
  top: var(--section-pad);
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* Why: the Delbarton flag waves behind the whole section, dimmed so white type reads clearly. */

.why {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--section-pad) 0;
  color: var(--on-dark);
  background:
    radial-gradient(ellipse 60% 70% at 50% 45%, #145236 0%, rgba(20, 82, 54, 0) 100%),
    #0B3A27;
}

.flag-bg,
.flag-still {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
}
.flag-bg {
  opacity: 0;
  transition: opacity 800ms var(--ease-out);
}
.flag-bg.is-on { opacity: 1; }
.flag-still {
  object-fit: cover;
  filter: brightness(0.42) saturate(0.9);
}

.why h2 { color: var(--on-dark); }

.why h2,
.why-body p { text-shadow: 0 1px 14px rgba(2, 20, 12, 0.45); }

.why ::selection { background: var(--mint); color: var(--ink); }
.why :focus-visible { outline-color: var(--ring-dark); }

.why-body p {
  margin: 0 0 1.15em;
  max-width: 60ch;
  font-size: 1.1875rem;
  line-height: 1.65;
  color: #E2EEE7;
}

.why-body .why-lead {
  margin-bottom: 1em;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  font-stretch: 90%;
  line-height: 1.28;
  color: #fff;
}

/* Pull quote. The opening quote mark hangs into the margin so the words line up. */
.why-quote {
  margin: 44px 0 40px;
  margin-inline: 0;
  padding-top: 32px;
  border-top: 1px solid rgba(242, 247, 244, 0.28);
}
.why-body .why-quote p {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 850;
  font-stretch: 70%;
  line-height: 1;
  letter-spacing: -0.008em;
  text-indent: -0.38em;
  color: #fff;
}
.why-body .why-sign {
  margin: 36px 0 0;
  font-size: 1.125rem;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

/* Idea form (lives in the drawer) */

.ask-form { max-width: none; }

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

.field + .field { margin-top: 22px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 88%;
  color: var(--ink);
}
.field-note {
  font-weight: 500;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid rgba(13, 58, 44, 0.26);
  border-radius: 3px;
  caret-color: var(--green-600);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:hover,
.field textarea:hover { border-color: rgba(13, 58, 44, 0.45); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px rgba(28, 107, 74, 0.2);
}

.ask-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.btn-ink {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), 0 10px 22px -14px rgba(8, 42, 31, 0.8);
}
.btn-ink:hover {
  background: var(--green-800);
  transform: translateY(-1px);
}
.btn-ink[disabled] {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.ask-status {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-600);
}
.ask-status.is-error { color: #A3322A; }

/* Vote */

.vote {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(112px, 14vw, 200px);
  color: var(--on-dark);
  text-align: center;
  background:
    radial-gradient(ellipse 55% 60% at 50% 38%, #17583F 0%, rgba(23, 88, 63, 0) 100%),
    linear-gradient(180deg, #0B3326 0%, #061D15 100%);
}

.vote h2 {
  margin: 0 auto;
  font-size: clamp(3.25rem, 8.4vw, 7.5rem);
  font-weight: 900;
  font-stretch: 64%;
  line-height: 0.88;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.vote-inner .vote-office {
  margin: 18px auto 0;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 600;
  font-stretch: 82%;
  line-height: 1.1;
  color: var(--mint);
}

.vote-actions {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.footer {
  margin-top: clamp(96px, 12vw, 168px);
  padding: 22px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(242, 247, 244, 0.16);
  display: flex;
  justify-content: center;
}
.footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--on-dark);
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }
.footer .icon { width: 16px; height: 16px; }

/* Calendar */

.cal {
  background: var(--paper);
  padding: var(--section-pad) 0;
}
.cal .wrap { max-width: 1080px; }

.cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
}
.cal h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 850;
  font-stretch: 70%;
  line-height: 0.94;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cal-intro p {
  margin: 20px 0 0;
  max-width: 46ch;
  color: var(--ink-soft);
}
.cal-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.seg {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
}
.seg-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  font-stretch: 88%;
  color: var(--ink);
  cursor: pointer;
}
.seg-btn + .seg-btn { border-left: 1.5px solid var(--ink); }
.seg-btn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg-btn:not([aria-pressed="true"]):hover { background: var(--paper-tint); }

.cal-bar {
  margin-top: clamp(24px, 3vw, 36px);
  padding-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-month {
  min-width: 9.5em;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 800;
  font-stretch: 76%;
  text-align: center;
  color: var(--ink);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(13, 58, 44, 0.3);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.icon-btn:hover { border-color: var(--ink); background: var(--paper-tint); }
.text-btn {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--green-600);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}
.cal-key {
  margin: 0 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.key {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.key-ours { margin-left: 10px; }
.key-school { background: #8FB5A2; }
.key-ours { background: var(--gold); box-shadow: inset 0 0 0 1px rgba(13, 58, 44, 0.25); }

.cal-msg {
  margin: 0;
  padding: 48px 0;
  color: var(--ink-soft);
}

/* Month grid */
.month {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.month th {
  padding: 0 8px 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  font-stretch: 88%;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.month td {
  position: relative;
  overflow: hidden;
  height: 94px;
  padding: 28px 5px 6px;
  vertical-align: top;
  border: 1px solid var(--rule);
}
.month td.is-out { background: #F6F9F7; }
.month td.is-selected { box-shadow: inset 0 0 0 2px var(--green-600); }

.day-num {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  border: 0;
  border-radius: 3px;
  background: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  cursor: pointer;
}
.day-num:hover { background: var(--paper-tint); }
.is-out .day-num { color: rgba(13, 58, 44, 0.45); }
.is-today .day-num { background: var(--green-600); color: #fff; }

.day-letter {
  position: absolute;
  top: 10px;
  left: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  font-stretch: 88%;
  color: var(--green-600);
}
.is-out .day-letter { opacity: 0.5; }

.day-events {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}
.day-events li { min-width: 0; }
.chip {
  width: 100%;
  padding: 3px 6px;
  border: 0;
  border-radius: 2px;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chip:hover { background: var(--paper-tint); }
.chip-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--green-600);
}
.chip.is-allday { background: #EAF2ED; }
.chip.is-allday:hover { background: #DDEBE3; }
.chip.is-ours {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(13, 58, 44, 0.15);
}
.chip.is-ours .chip-time { color: var(--ink); }
.chip.is-ours:hover { background: var(--gold-strong); }
.chip.is-ours::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 4px;
  vertical-align: -1px;
  background: currentColor;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.month td.has-ours { background: var(--gold-soft); }
.is-out .chip { opacity: 0.6; }

.day-more {
  margin-top: 2px;
  padding: 2px 6px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green-600);
  cursor: pointer;
}
.day-more:hover { text-decoration: underline; }

.day-dots { display: none; }

/* Agenda: the picked day under the grid, and the List view */
.cal-agenda {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.agenda-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: 0 0 6px;
}
.agenda-head h4 {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 80%;
  color: var(--ink);
}
.tag {
  font-size: 0.8125rem;
  font-weight: 700;
  font-stretch: 88%;
  color: var(--green-600);
}
.agenda {
  margin: 0;
  padding: 0;
  list-style: none;
}
.agenda-item {
  width: 100%;
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 4px 18px;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: none;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.agenda-item:hover { background: #F6F9F7; }
.agenda-time {
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.agenda-title {
  display: block;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}
.agenda-where {
  display: block;
  margin-top: 2px;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.ours-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 2px;
  background: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink);
  vertical-align: 2px;
}
.agenda-item.is-ours { background: var(--gold-soft); }
.agenda-item.is-ours:hover { background: #FFEDB3; }
.agenda-empty {
  margin: 10px 0 0;
  color: var(--ink-soft);
}
.list-day + .list-day { margin-top: 30px; }

/* Pop-up sheets: event details, editor, sign-in */
.sheet {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(4, 23, 15, 0.6);
}
.sheet-sm { width: min(400px, calc(100vw - 32px)); }
.sheet-wide { width: min(660px, calc(100vw - 32px)); }
.sheet { overflow: auto; overscroll-behavior: contain; }

/* Ideas inbox (admins) */
.ideas-count {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--gold);
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--ink);
}
.ideas-count:empty { display: none; }
.new-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ink);
  vertical-align: 2px;
}
.ideas-status {
  margin: 0 0 8px;
  color: var(--ink-soft);
}
.ideas-status:empty { display: none; }
.ideas {
  margin: 0;
  padding: 0;
  list-style: none;
}
.idea {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}
.idea-msg {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.idea-meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.idea .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.sheet::backdrop,
.drawer::backdrop { background: rgba(4, 23, 15, 0.55); }
.sheet-body {
  position: relative;
  padding: 28px 28px 26px;
}
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.sheet-close:hover { background: var(--paper-tint); }
.sheet-title {
  margin: 0 48px 16px 0;
  font-size: 1.75rem;
  font-weight: 800;
  font-stretch: 76%;
  line-height: 1.05;
}
.ev-when,
.ev-where { margin: 0 0 6px; font-weight: 600; }
.ev-where { color: var(--ink-soft); font-weight: 500; }
.ev-notes {
  margin: 14px 0 0;
  white-space: pre-line;
  color: var(--ink-soft);
}
.ev-source {
  margin: 18px 0 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.ev-notes:empty,
.ev-where:empty { display: none; }
.sheet-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.btn-line {
  background: #fff;
  color: var(--ink);
  border-color: rgba(13, 58, 44, 0.35);
}
.btn-line:hover { border-color: var(--ink); }
.form-status {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #A3322A;
}
.form-status.is-ok { color: var(--green-600); }
.field-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
}
.field-row .field + .field { margin-top: 0; }
.sheet .field + .field,
.sheet .field-row + .field { margin-top: 18px; }
.sheet .field-row[hidden] { display: none; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  font-weight: 700;
  font-stretch: 88%;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--green-600);
}

/* Idea drawer: slides in from the right */
.idea-tab {
  position: fixed;
  right: clamp(12px, 2vw, 24px);
  bottom: calc(clamp(12px, 2vw, 24px) + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--green-600);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 88%;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1), 0 14px 30px -12px rgba(4, 23, 15, 0.75);
  cursor: pointer;
  transition: background-color 160ms ease, transform 220ms var(--ease-out), box-shadow 220ms ease;
}
.idea-tab:hover {
  background: var(--green-800);
  transform: translateY(-2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1), 0 18px 36px -12px rgba(4, 23, 15, 0.8);
}
.idea-tab .icon { width: 20px; height: 20px; }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(460px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  border-radius: 16px 0 0 16px;
  box-shadow: -30px 0 80px -30px rgba(4, 23, 15, 0.6);
  transform: translateX(100%);
  transition: transform 420ms var(--ease-out);
}
.drawer.is-open { transform: none; }
.drawer::backdrop { opacity: 0; transition: opacity 300ms ease; }
.drawer.is-open::backdrop { opacity: 1; }
.drawer-body {
  position: relative;
  min-height: 100%;
  padding: 72px 28px 32px;
}
.drawer h2 {
  margin: 0 0 28px;
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 850;
  font-stretch: 70%;
  line-height: 0.96;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.drawer .sheet-close { top: 16px; right: 16px; }

/* Admin bar, only after signing in */
.admin-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 44px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--green-950);
  color: var(--on-dark-soft);
  font-size: 0.9375rem;
  border-bottom: 1px solid rgba(242, 247, 244, 0.12);
}
.admin-bar[hidden] { display: none; }
.admin-bar p { margin: 0; }
.admin-bar strong { color: #fff; }
.admin-actions { display: flex; gap: 18px; }
.admin-link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--mint);
  cursor: pointer;
}
.admin-link:hover { color: #fff; text-decoration: underline; }
.admin-link { white-space: nowrap; }
@media (max-width: 520px) {
  .admin-bar p { display: none; }
  .admin-bar { justify-content: flex-end; }
  .admin-actions { gap: 16px; }
}
body.is-admin { padding-top: 44px; }

@media (max-width: 899px) {
  .nav-links a { display: none; }
}

@media (max-width: 720px) {
  .cal-key { margin-left: 0; width: 100%; }
  .month th { padding: 0 0 8px; text-align: center; font-size: 0.75rem; letter-spacing: 0.02em; }
  .month td { height: 48px; padding: 0; }
  .day-letter,
  .day-events,
  .day-more { display: none; }
  .day-num {
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 7px 0 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .is-today .day-num { background: none; color: var(--ink); }
  .is-today .day-num .num {
    min-width: 26px;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--green-600);
    color: #fff;
  }
  .day-dots {
    display: flex;
    gap: 3px;
  }
  .day-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8FB5A2;
  }
  .day-dots i.is-ours { width: 8px; height: 8px; background: #D99A00; }
  .agenda-item { grid-template-columns: 5.75rem minmax(0, 1fr); gap: 4px 12px; }
  .field-row { grid-template-columns: 1fr; }
  .sheet-body { padding: 24px 20px 22px; }
  .drawer-body { padding: 68px 20px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .drawer::backdrop { transition: none; }
}

/* Notification banner (admins): slides down from the top */
.notice {
  position: fixed;
  top: 56px;
  left: 50%;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 24px);
  padding: 8px 8px 8px 16px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(13, 58, 44, 0.12), 0 18px 40px -14px rgba(4, 23, 15, 0.65);
  opacity: 0;
  transform: translate(-50%, -18px);
  transition: transform 380ms var(--ease-out), opacity 220ms ease;
}
.notice.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.notice .icon { width: 19px; height: 19px; flex: none; }
.notice p {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
}
.notice-open {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.notice-open:hover { background: var(--green-950); }
.notice-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.notice-close:hover { background: rgba(13, 58, 44, 0.1); }
.notice-close .icon { width: 16px; height: 16px; }

/* Color switch button (top bar) */
.icon-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(242, 247, 244, 0.5);
  border-radius: 3px;
  background: rgba(242, 247, 244, 0.04);
  color: var(--on-dark);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.icon-toggle:hover { border-color: var(--on-dark); background: rgba(242, 247, 244, 0.1); }
.icon-toggle .icon { width: 18px; height: 18px; }
.nav-links { gap: 12px 28px; }

/* Switched colors: the page flips; photos, the flag section and the card keep their real colors. */
html.is-inverted { background: #DDF3E8; }
html.is-inverted .page,
html.is-inverted .admin-bar,
html.is-inverted .notice,
html.is-inverted .toast,
html.is-inverted .idea-tab { filter: invert(1) hue-rotate(180deg); }
html.is-inverted img,
html.is-inverted .why { filter: invert(1) hue-rotate(180deg); }
html.is-inverted .flip:hover .flip-front img { filter: invert(1) hue-rotate(180deg) brightness(1.06); }
html.is-inverted .pcard-shadow { filter: invert(1) hue-rotate(180deg) drop-shadow(0 26px 40px rgba(0, 0, 0, 0.55)); }
html.is-inverted .pcard-shadow img { filter: none; }

/* The wave sweep replaces the browser's default cross-fade. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* Share confirmation */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 50;
  margin: 0;
  padding: 12px 16px;
  max-width: calc(100vw - 32px);
  background: var(--green-950);
  color: var(--on-dark);
  border: 1px solid rgba(242, 247, 244, 0.14);
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 320ms var(--ease-out);
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Load-in. The curtain's light comes up in main.js; the Green Wave and the flag live there too. */

@media (prefers-reduced-motion: no-preference) {
  .hero-name,
  .hero-office,
  .hero-actions {
    animation: rise 900ms var(--ease-out) both;
  }
  .hero-office { animation-delay: 70ms; }
  .hero-actions { animation-delay: 160ms; }
  .hero-figure { animation: rise-figure 1300ms var(--ease-out) 100ms both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}
@keyframes rise-figure {
  from { opacity: 0; transform: translateY(28px); }
}

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

/* Stacked layout: phones, and tablets held upright */

@media (max-width: 859px), (orientation: portrait) and (max-width: 1100px) {
  .hero { min-height: 0; }

  .hero-inner {
    display: block;
    flex: none;
  }

  .hero-copy {
    max-width: 40rem;
    padding: 8px 0 0;
  }

  .hero-name { font-size: clamp(5rem, 26vw, 10rem); }
  .hero-office { font-size: clamp(1.5rem, 6.4vw, 2.5rem); }

  .hero-figure {
    position: relative;
    right: auto;
    bottom: auto;
    height: auto;
    width: min(132%, 760px);
    margin: 28px 0 0 calc((100% - min(132%, 760px)) / 2);
  }
  .flip-front img { object-position: bottom center; }

  .plan-grid,
  .why-grid { grid-template-columns: minmax(0, 1fr); }

  .plan-head { position: static; }

}

@media (max-width: 640px) {
  .nav { padding-top: 16px; padding-bottom: 16px; }
  .nav-links a { display: none; }

  .hero-actions .btn { flex: 1 1 auto; }

  .plan-list li { padding: 28px 0 32px; }

  .why-body .why-quote p { text-indent: 0; }
}
