/*
  Palette: deep midnight blue with lemon line art, and a gold accent for buttons,
  focus, and every crossed-out word. Values change together; the root view
  transition supplies the visual fade.
*/
:root {
  color-scheme: dark;
  --black: #0d1530;
  --white: #ffffff;
  --color-background: #060c1e;
  --color-surface: #0c1530;
  --color-surface-hover: #132042;
  --color-accent: #d9ac4b;
  --color-on-accent: #1a1204;
  --color-panel: #0a1228;
  --color-text: #eef1f8;
  --color-text-muted: #b3bbd2;
  --color-text-subtle: #98a2c0;
  --color-border: #646f93;
  --color-border-subtle: #1a2546;
  --color-focus: #d9ac4b;
  --color-focus-halo: rgb(217 172 75 / 0.28);
  --color-error: #ffaaaa;
  --container-width: 84rem;
  --radius: 0.5rem;
  --radius-large: 1.5rem;
  --section-space: clamp(5rem, 10vw, 10rem);
  --shadow-header: none;
  --transition: 180ms ease;
}

:root[data-theme="light"] {
  color-scheme: light;
  --color-background: #f6f4ee;
  --color-surface: #e9e7e0;
  --color-surface-hover: #e0ddd4;
  --color-accent: #855f12;
  --color-text: #101830;
  --color-text-muted: #59616f;
  --color-text-subtle: #59616f;
  --color-border: #8e96a2;
  --color-border-subtle: #d9d5ca;
  --color-focus: #855f12;
  --color-error: #b32929;
  --color-on-accent: #ffffff;
  --color-panel: #ffffff;
  --color-focus-halo: rgb(133 95 18 / 0.2);
}

/* One shared crossfade keeps text, surfaces, and the canvas on the same timeline. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: ease-in-out;
}

::view-transition {
  pointer-events: none;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--color-border) var(--color-background);
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  caret-color: var(--color-accent);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

::-webkit-scrollbar {
  width: 0.75rem;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  border: 0.1875rem solid var(--color-background);
  border-radius: var(--radius);
  background: var(--color-border);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-subtle);
}

body.has-open-navigation {
  overflow: hidden;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img,
picture,
video {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
input,
select,
textarea {
  margin: 0;
  max-width: 100%;
}

::placeholder {
  color: var(--color-text-subtle);
  opacity: 1;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

textarea:not([rows]) {
  min-height: 10rem;
}

:target {
  scroll-margin-block: 5.5rem;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.625rem 0.875rem;
  border-radius: 100px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border-subtle);
}

.site-nav {
  position: relative;
  display: flex;
  min-height: 5.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.site-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  position: relative;
  z-index: 2;
  min-width: 0;
  flex-shrink: 1;
  color: var(--color-text);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.2;
  text-decoration: none;
}

.site-nav__brand span { min-width: 0; overflow-wrap: anywhere; }

.brand-mark {
  flex: 0 0 auto;
  fill: none;
  stroke: #e6d47e;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand-mark__fine { stroke: #b9ae78; }
.brand-mark__leaf { stroke: #a9be98; }
:root[data-theme="light"] .brand-mark { stroke: #85701f; }
:root[data-theme="light"] .brand-mark__fine { stroke: #978748; }
:root[data-theme="light"] .brand-mark__leaf { stroke: #507249; }

.site-nav__brand:hover {
  color: var(--color-text-muted);
}

.site-nav__desktop {
  display: none;
}

.site-nav__link {
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav__link:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.site-nav__link.is-active {
  color: var(--color-text);
  font-weight: 500;
}

.site-nav__mobile {
  flex: 0 0 auto;
  margin-left: 1rem;
}

.site-nav__disclosure {
  display: block;
}

.site-nav__toggle {
  position: relative;
  z-index: 2;
  display: flex;
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--color-text-muted);
}

.site-nav__toggle::marker {
  content: "";
}

.site-nav__toggle::-webkit-details-marker {
  display: none;
}

.site-nav__toggle:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.site-nav__toggle-icon {
  position: relative;
  display: block;
  width: 1.375rem;
  height: 1rem;
}

.site-nav__toggle-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: var(--radius);
  background: currentColor;
  transition:
    opacity 180ms ease-out,
    transform 280ms cubic-bezier(0.32, 0.72, 0, 1),
    top 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

.site-nav__toggle-icon span:nth-child(1) {
  top: 0;
}

.site-nav__toggle-icon span:nth-child(2) {
  top: calc(50% - 1px);
}

.site-nav__toggle-icon span:nth-child(3) {
  top: calc(100% - 2px);
}

.site-nav__disclosure[open] .site-nav__toggle-icon span:nth-child(1) {
  top: calc(50% - 1px);
  transform: rotate(45deg);
}

.site-nav__disclosure[open] .site-nav__toggle-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-nav__disclosure[open] .site-nav__toggle-icon span:nth-child(3) {
  top: calc(50% - 1px);
  transform: rotate(-45deg);
}

.site-nav__mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(6.5rem + env(safe-area-inset-top))
    1.5rem
    max(2rem, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-background);
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
  visibility: hidden;
  transition:
    opacity 220ms ease-out,
    transform 360ms cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s linear 360ms;
}

.site-nav__disclosure[open] .site-nav__mobile-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.site-nav__mobile-link {
  display: flex;
  width: 100%;
  min-height: 3.5rem;
  align-items: center;
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: clamp(2rem, 10vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
  opacity: 0;
  padding: 0.75rem 1rem;
  text-decoration: none;
  transform: translateX(1.5rem);
  transition:
    opacity 180ms ease-out,
    transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
}

.site-nav__disclosure[open] .site-nav__mobile-menu .site-nav__mobile-link {
  opacity: 1;
  transform: translateX(0);
}

.site-nav__mobile-link:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.site-nav__mobile-link.is-active {
  background: var(--color-surface-hover);
  color: var(--color-text);
  font-weight: 500;
}

.page {
  min-height: 100%;
}

.page__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: min(48rem, calc(100dvh - 4.25rem));
  align-content: start;
  padding-block: clamp(4.5rem, 9vw, 8rem) var(--section-space);
}

.page__header,
.page__section {
  display: grid;
  max-width: 65ch;
  gap: 1.25rem;
}

/* Every interior heading shares the same compact identity and generous title. */
.page__header {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: none;
  gap: 2rem;
  align-items: end;
}

.page .page__header > p {
  max-width: 35ch;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.5;
}

.page .page__heading h1 {
  font-size: clamp(3rem, 6.8vw, 6rem);
  max-width: 13ch;
  letter-spacing: -0.055em;
  line-height: 1;
}

.page__sections {
  display: grid;
  width: 100%;
  max-width: 72rem;
  gap: clamp(3rem, 6vw, 5rem);
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.page__sections--editorial {
  gap: 0;
}

.page h1,
.home h1 {
  max-width: 20ch;
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.page h2,
.home h2 {
  max-width: 28ch;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.page p,
.home p {
  max-width: 65ch;
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.65;
}

.editorial-section,
.lemon-entry {
  display: grid;
  max-width: none;
  gap: 1.25rem;
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-top: 1px solid var(--color-border-subtle);
}

.editorial-section:last-child,
.lemon-entry:last-child {
  border-bottom: 1px solid var(--color-border-subtle);
}

.lemon-list {
  gap: 0;
}

.page__heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; min-width: 0; }

.home-hero { position: relative; }
.home-hero__inner {
  position: relative;
  display: grid;
  min-height: calc(100svh - 5.5rem);
  place-items: center;
  padding-block: clamp(1rem, 3vw, 2.5rem) clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--color-border-subtle);
}
.home-section__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  gap: 2rem;
}

@property --lemon-weight {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

/*
  The finished composition is the baseline. lemon.js animates toward these values and
  reads the camera and word transforms from here, so the phone layout lives only in CSS.
*/
.lemon-study {
  /* Line art only: the fruit is paper with ink outlines, never a coloured fill. */
  --lemon-ink: #e6d47e;
  --lemon-detail: #b9ae78;
  --lemon-leaf: #a9be98;
  --lemon-machine: #8e9cc4;
  --lemon-trace: #e6d47e;
  --lemon-stroke: 1.6;
  /* The copy overlaps the empty lower band of the stage, measured in stage widths. */
  --lemon-copy-overlap: 29%;
  position: relative;
  width: min(100%, 68rem, (100svh - 10rem) * 1.6667);
  min-width: 0;
}
:root[data-theme="light"] .lemon-study {
  --lemon-ink: #85701f;
  --lemon-detail: #978748;
  --lemon-leaf: #507249;
  --lemon-machine: #626e8e;
  --lemon-trace: #85701f;
}
.lemon-study__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 600;
  overflow: hidden;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--lemon-stroke);
}
.lemon-study [data-lemon-part],
.lemon-study [data-lemon-letter],
.lemon-study [data-lemon-word],
.lemon-study [data-lemon-spray],
.lemon-study [data-lemon-crown] {
  transform-box: view-box;
  transform-origin: 0 0;
}
.lemon-study [pathLength="1"] { stroke-dasharray: 1 1; }
.lemon-study__paper { fill: var(--color-background); }
.lemon-study__fine { stroke-width: calc(var(--lemon-stroke) * .6); }
.lemon-study__machine { stroke: var(--lemon-machine); }

/*
  Fruit line weight. --lemon-weight lets the falling half keep a constant drawn
  line while it shrinks, then match the heavier wheel in the title.
*/
.lemon-study__fruit { stroke: var(--lemon-ink); stroke-width: calc(var(--lemon-stroke) * var(--lemon-weight)); }
.lemon-study__skin,
.lemon-study__rind { fill: var(--color-background); }
.lemon-study__pore,
.lemon-study__shine { stroke: var(--lemon-detail); stroke-width: calc(var(--lemon-stroke) * .6 * var(--lemon-weight)); }
.lemon-study__pith,
.lemon-study__flesh,
.lemon-study__seed { fill: none; stroke: var(--lemon-detail); stroke-width: calc(var(--lemon-stroke) * .62 * var(--lemon-weight)); }
.lemon-study__leaf { fill: var(--color-background); stroke: var(--lemon-leaf); }
.lemon-study__stem,
.lemon-study__vein { stroke: var(--lemon-leaf); }
.lemon-study__vein { stroke-width: calc(var(--lemon-stroke) * .6 * var(--lemon-weight)); }
.lemon-study__juice { fill: var(--lemon-ink); stroke: none; }
.lemon-study__seam { stroke: var(--lemon-ink); stroke-width: calc(var(--lemon-stroke) * 1.3); visibility: hidden; }
.lemon-study__ink { stroke: var(--lemon-trace); stroke-width: calc(var(--lemon-stroke) * 1.25); visibility: hidden; }
.lemon-study__ripple { fill: none; stroke: var(--lemon-trace); visibility: hidden; }

/* Settled positions. Act one sits above the frame and stays hidden. */
.lemon-study__camera { transform: translate(2.4px, -505px); }
.lemon-study__rig,
.lemon-study__whole,
.lemon-study__right,
.lemon-study__drop,
.lemon-study__spray,
.lemon-study__crown { visibility: hidden; }
.lemon-study__whole { transform: translate(691px, 100px); }
.lemon-study__whole-leaf,
.lemon-study__right-leaf { transform: translate(110px, -14px) rotate(18deg); }
.lemon-study__left { visibility: hidden; transform: translate(553px, 202px) rotate(90deg) scale(.92); }
.lemon-study__left-face { visibility: hidden; }
.lemon-study__right { transform: translate(776px, 224px) rotate(-10deg) scale(.9); }
.lemon-study__right-face { transform: scaleX(.42); }
.lemon-study__lever { transform: translate(656px, 98px) rotate(42deg) translate(-656px, -98px); }
.lemon-study__lever [data-lemon-part="cup"] { transform: translate(553px, 103px) rotate(-42deg) translate(-553px, -103px); }

.lemon-study__wordmark {
  fill: var(--color-text);
  stroke: var(--lemon-trace);
  stroke-width: calc(var(--lemon-stroke) * 1.1);
  stroke-opacity: 0;
}
.lemon-study__slot { visibility: hidden; fill: none; }
.lemon-study__wheel { --lemon-weight: 2.6; stroke-opacity: 1; transform: translate(819px, 730px) scale(.524); }
.lemon-study__wheel-leaf { transform: translate(26.6px, -57.1px) rotate(48deg); }

.lemon-study__copy {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: calc(-1 * var(--lemon-copy-overlap));
  padding-inline: 1rem;
  text-align: center;
}
.lemon-study__tagline {
  max-width: 40ch;
  color: var(--color-text-muted);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  letter-spacing: -.015em;
  line-height: 1.45;
  text-wrap: balance;
}
.lemon-study__item { white-space: nowrap; }
.lemon-study__idea {
  position: relative;
  display: inline-block;
  color: var(--color-text-subtle);
  text-decoration: none;
  white-space: nowrap;
  opacity: .7;
}
.lemon-study__strike {
  position: absolute;
  left: -.12em;
  right: -.12em;
  top: 54%;
  height: .09em;
  min-height: 2px;
  border-radius: 1px;
  background: var(--color-accent);
  transform-origin: 0 50%;
}
.lemon-study__verdict {
  display: inline-block;
  color: var(--color-text);
  font-weight: 500;
}
.lemon-study__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}
.lemon-study__control {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 5.5rem;
  min-height: 44px;
  padding: .5rem .875rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: 100px;
  background: var(--color-background);
  color: var(--color-text-muted);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}
.lemon-study__control:hover { border-color: var(--color-border); color: var(--color-text); }
.lemon-study__control[hidden] { display: none; }

/* Phones stack the wordmark and use a taller stage. Keep in step with lemon.js. */
@media (max-width: 40rem) {
  .lemon-study {
    --lemon-stroke: 2.4;
    --lemon-copy-overlap: 74%;
    width: 100%;
  }
  .lemon-study__art { aspect-ratio: 1000 / 1300; }
  /* The stacked title centres on the press spout (x 553), where the drop lands. */
  .lemon-study__camera { transform: translate(-550.7px, -1516px) scale(1.9); }
  .lemon-study__word--1 { transform: translate(242.5px, 0); }
  .lemon-study__word--2 { transform: translate(-187.5px, 108px); }
  .lemon-study__actions { display: grid; width: min(100%, 20rem); }
  .lemon-study__actions .button { width: 100%; }
  .lemon-study__control { position: relative; top: auto; right: auto; display: flex; margin: 1.25rem auto 0; }
}

.home-section {
  background: var(--color-background);
}

/*
  Line sketches. The drawn state is the default, so they are complete without
  JavaScript or with reduced motion. sketch.js marks a sketch "ready" (undrawn)
  and then "drawn" once as it scrolls into view. Target paths by element, not
  [pathLength]: Chrome misses mixed-case SVG attribute selectors when an
  ancestor's state changes. Every path in a sketch needs pathLength="1".
*/
.sketch {
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--lemon-ink, #e6d47e);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:root[data-theme="light"] .sketch { stroke: #85701f; }
.sketch__fine { stroke: var(--color-text-subtle); stroke-width: 1.1; }
.sketch path { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.sketch[data-sketch="ready"] path { stroke-dashoffset: 1; }
.sketch[data-sketch="drawn"] path {
  animation: sketch-draw 900ms cubic-bezier(.45, 0, .2, 1) both;
}
.sketch[data-sketch="drawn"] .sketch__fine { animation-delay: 450ms; }
.sketch[data-sketch="drawn"] .sketch__late { animation-delay: 800ms; }
@keyframes sketch-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.lemon-entry__icon { width: 4.5rem; height: 4.5rem; margin-block: -.5rem; }
@media (min-width: 64rem) { .lemon-entry__icon { width: 5.5rem; height: 5.5rem; } }
.receipt { width: 4rem; height: auto; }

/* The proverb is corrected in pen: "make lemonade" is struck, the receipt line written in. */
.correction del,
.correction ins { text-decoration: none; }
.correction__old {
  position: relative;
  white-space: nowrap;
  color: var(--color-text-subtle);
}
.correction__strike {
  position: absolute;
  left: -.06em;
  right: -.06em;
  top: 52%;
  height: .07em;
  min-height: 2px;
  border-radius: 1px;
  background: var(--color-accent);
  transform: rotate(-2deg);
  transform-origin: 0 50%;
}
.correction[data-sketch="ready"] .correction__strike { transform: rotate(-2deg) scaleX(0); }
.correction[data-sketch="ready"] .correction__new { clip-path: inset(0 100% 0 0); }
.correction[data-sketch="drawn"] .correction__strike {
  animation: correction-strike 520ms cubic-bezier(.45, 0, .2, 1) 300ms both;
}
.correction[data-sketch="drawn"] .correction__new {
  animation: correction-write 760ms cubic-bezier(.45, 0, .2, 1) 950ms both;
}
@keyframes correction-strike {
  from { transform: rotate(-2deg) scaleX(0); }
  to { transform: rotate(-2deg) scaleX(1); }
}
@keyframes correction-write {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.correction__new { clip-path: inset(0 0 0 0); }

/* Homepage lemon list: name and one line, nothing else. */
.range {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border-subtle);
}
.range__item {
  display: grid;
  gap: .25rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}
.range__name {
  color: var(--color-text);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -.01em;
}
.range__note {
  color: var(--color-text-muted);
}

/* About is a short note: one narrow column, small illustration, no list. */
.note {
  display: grid;
  width: 100%;
  max-width: 38rem;
  gap: 1.25rem;
  margin-inline: auto;
}
.note__figure {
  width: min(100%, 22rem);
  margin: 0 0 1.5rem;
}
.note__figure img {
  width: 100%;
  border-radius: var(--radius-large);
}
.page .note h1 {
  margin-bottom: .75rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.05;
}
.page .note p {
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.6;
}

.home-section--surface {
  background: var(--color-surface);
}

.home-section__inner {
  padding-block: var(--section-space);
}

.home .home-section__title {
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.home-section__body {
  display: grid;
  max-width: 42rem;
  gap: 1.5rem;
}

.page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.card-grid {
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.5rem;
}

.content-card {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.content-card h3 {
  font-size: clamp(1.25rem, 4vw, 1.625rem);
  line-height: 1.25;
}

.content-card a,
.text-link {
  text-decoration-color: var(--color-accent);
}

.content-card a:hover,
.text-link:hover {
  color: var(--color-accent);
}

.text-link {
  position: relative;
  width: fit-content;
  font-weight: 500;
  text-decoration: none;
}

.text-link::after {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 0.2rem;
  background: var(--color-accent);
  content: "";
  transform: scaleY(1);
  transform-origin: center top;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleY(1.5);
}

.text-link:active::after {
  transform: scaleY(0.75);
}

.contact-form {
  display: grid;
  width: 100%;
  max-width: 42rem;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.page--contact .contact-form {
  max-width: none;
  margin-top: 0;
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--color-border-subtle);
}

.contact-form__notice {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.contact-form__notice a {
  margin-inline-start: 0.25em;
  text-decoration-color: var(--color-accent);
}

.form-field {
  display: grid;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-panel);
  padding: 0.875rem 1rem;
}

.form-field textarea {
  min-height: 10rem;
  resize: vertical;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: var(--color-text-muted);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px var(--color-focus-halo);
  outline: none;
}

.form-field input:user-invalid,
.form-field textarea:user-invalid {
  border-color: var(--color-error);
}

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

.page__inner--status {
  min-height: calc(100dvh - 4.25rem);
}

.status-panel {
  display: grid;
  width: 100%;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 7vw, 4rem);
}

.status-panel .page__actions {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-subtle);
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  width: fit-content;
  cursor: pointer;
  border: 1px solid var(--color-accent);
  border-radius: 100px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
  line-height: 1.25;
  padding: 0.875rem 1.5rem;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  transition: transform var(--transition);
}

.button:hover {
  border-color: var(--color-accent);
  background: var(--color-accent);
  transform: translateY(-1px);
}

.button--secondary {
  border-color: var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.button--secondary:hover {
  border-color: var(--color-text-muted);
  background: var(--color-surface);
}

.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-background);
  color: var(--color-text-muted);
}

.site-footer__inner {
  padding-block: clamp(3.5rem, 8vw, 6rem) 2rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: clamp(2.5rem, 7vw, 5rem);
}

.site-footer__group {
  min-width: 0;
}

.site-footer__group--brand {
  max-width: 34rem;
}

.site-footer__heading {
  margin-bottom: 1.25rem;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.site-footer__heading--brand {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.site-footer__text,
.site-footer__links {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.site-footer__text {
  max-width: 48ch;
  line-height: 1.7;
}

.site-footer__links {
  display: grid;
  gap: 0.125rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links a[aria-current="page"] {
  color: var(--color-text);
}

.site-footer__bottom {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-surface-hover);
  color: var(--color-text-subtle);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: left;
}

.site-footer__bottom p {
  margin-bottom: 0;
}

@media (min-width: 48rem) {
  .container {
    padding-inline: 3rem;
  }

  .site-nav__desktop {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    align-items: center;
    gap: clamp(0.25rem, 2vw, 2rem);
  }

  .site-nav__mobile {
    display: none;
  }

  .home-section__content--split {
    grid-template-columns: minmax(12rem, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
    gap: clamp(3rem, 8vw, 8rem);
  }

  .editorial-section,
  .lemon-entry {
    grid-template-columns: minmax(12rem, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
    gap: clamp(3rem, 8vw, 8rem);
  }
  .lemon-entry {
    grid-template-columns: 5.5rem minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
  }

  .page__header {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: clamp(3rem, 6vw, 6rem);
  }

  .contact-layout {
    gap: clamp(3.5rem, 7vw, 6rem);
  }

  .page--contact .contact-form {
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 2rem;
  }

  .contact-form .form-field:has(textarea),
  .contact-form .contact-form__notice,
  .contact-form > .button {
    grid-column: 1 / -1;
  }
}

.home-section--statement .home-section__content {
  max-width: 58rem;
  margin-inline: auto;
  text-align: center;
  justify-items: center;
  gap: 2.5rem;
}

.home-section--statement .home-section__title {
  max-width: 18ch;
}

.home-section--statement p { max-width: 44ch; }
.home-section--statement .home-section__body { justify-items: center; }

.home-section--contact {
  background: var(--color-background);
}

.home-section--contact .home-section__content { align-items: center; }

.site-nav__link:last-of-type {
  padding-inline: 1.25rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: 100px;
  color: var(--color-text);
}

@media (max-width: 47.999rem) {
  .site-nav {
    min-height: 4.5rem;
  }

  .home-hero__inner {
    min-height: calc(100svh - 4.5rem);
    padding-block: 1.5rem 2.5rem;
  }
  .page__heading { gap: 1rem; }
  .site-nav__brand { font-size: 1.25rem; }
  .button {
    font-size: 0.9375rem;
    padding: 0.625rem 1.125rem;
  }
  .home-section__content--split { gap: 2rem; }

  .contact-layout { gap: 3rem; }
  .page__inner { min-height: auto; }
  .page__inner--status { min-height: calc(100svh - 5rem); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }

  .site-nav__mobile-menu,
  .site-nav__mobile-link {
    transform: none !important;
  }

  .lemon-study__control { display: none; }
}

/* Shared state and hit target for desktop and modal navigation. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--color-surface-hover); }
.theme-toggle__track {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: 2.5rem;
  height: 1.5rem;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  background: var(--color-surface);
}
.theme-toggle__disc {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--color-panel);
  color: var(--color-text);
  transition: transform var(--transition);
}
.theme-toggle[aria-checked="true"] .theme-toggle__track {
  border-color: var(--color-accent);
  background: var(--color-accent);
}
.theme-toggle[aria-checked="true"] .theme-toggle__disc {
  background: var(--color-on-accent);
  color: var(--color-accent);
  transform: translateX(1rem);
}
@media (forced-colors: active) {
  .theme-toggle__track span {
    /* Keep the state indicator visible when backgrounds are overridden. */
    border: 2px solid ButtonText;
  }
}
.site-nav__mobile-menu .theme-toggle {
  margin: 2rem 0 0;
  padding-inline: 1rem;
  width: 100%;
  gap: 2rem;
  font-size: 1rem;
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle__track,
  .theme-toggle__disc {
    transition: none;
  }
}

@media (forced-colors: active) {
  .brand-mark,
  .brand-mark * { stroke: CanvasText; }
}

