/* ============================================================
   PANTIES — an editorial index about underwear and the body
   Composition: warm paper + hand-drawn ink / scribble annotations
   / staggered line reveal / magazine folios / expandable index
   / full-bleed color blocks per section.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --paper:      #f8f2e2;
  --paper-2:    #f2e9d4;
  --ink:        #0a0a0a;
  --ink-soft:   #3a352c;
  --ink-faint:  #6b6355;

  --blush:      #f0c8c2;
  --rose:       #c9506a;
  --plum:       #3b1f33;
  --butter:     #f2d98a;
  --sage:       #b9c9a8;
  --sky:        #a9c3d9;

  --measure:    68ch;
  --gutter:     clamp(1.15rem, 4vw, 3.5rem);
  --maxw:       1180px;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --section-color: var(--paper);
  --section-ink:   var(--ink);

  /* per-section ink, theme-aware (light values) */
  --ink-on-blush:  #2a1013;
  --ink-on-plum:   #f6e9e0;
  --ink-on-butter: #241c05;
  --ink-on-sage:   #17200f;
  --ink-on-sky:    #0e1c26;
  --faint-on-blush:  #5c2a2f;
  --faint-on-plum:   #d9bfc9;
  --faint-on-butter: #5a460f;
  --faint-on-sage:   #3b4a2c;
  --faint-on-sky:    #2b4256;
}

/* dark mode — same paper stock, lights off */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #16130f;
    --paper-2:   #1e1a15;
    --ink:       #f4ecda;
    --ink-soft:  #d8cfba;
    --ink-faint: #a89e89;

    --blush:     #4a2b2c;
    --rose:      #e58a9c;
    --plum:      #2a1526;
    --butter:    #4a3d1c;
    --sage:      #2c3a28;
    --sky:       #22323f;

    --ink-on-blush:  #f7e6e4;
    --ink-on-plum:   #f6e9e0;
    --ink-on-butter: #f7ecd0;
    --ink-on-sage:   #e8f0dd;
    --ink-on-sky:    #e4eef6;
    --faint-on-blush:  #d9b6b6;
    --faint-on-plum:   #d9bfc9;
    --faint-on-butter: #d8c79a;
    --faint-on-sage:   #bccfa8;
    --faint-on-sky:    #b3c9d9;
  }
}

:root[data-theme="dark"] {
  --paper:     #16130f;
  --paper-2:   #1e1a15;
  --ink:       #f4ecda;
  --ink-soft:  #d8cfba;
  --ink-faint: #a89e89;

  --blush:     #4a2b2c;
  --rose:      #e58a9c;
  --plum:      #2a1526;
  --butter:    #4a3d1c;
  --sage:      #2c3a28;
  --sky:       #22323f;

  --ink-on-blush:  #f7e6e4;
  --ink-on-plum:   #f6e9e0;
  --ink-on-butter: #f7ecd0;
  --ink-on-sage:   #e8f0dd;
  --ink-on-sky:    #e4eef6;
  --faint-on-blush:  #d9b6b6;
  --faint-on-plum:   #d9bfc9;
  --faint-on-butter: #d8c79a;
  --faint-on-sage:   #bccfa8;
  --faint-on-sky:    #b3c9d9;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 20;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.12rem);
  line-height: 1.62;
  text-wrap: pretty;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.06; text-wrap: balance; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.15em; }
li { margin-bottom: 0.35em; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px dashed var(--rose);
  outline-offset: 3px;
}

/* ---------- paper grain ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 12% 22%, rgba(0,0,0,.035) 0 1px, transparent 1px),
    radial-gradient(circle at 68% 74%, rgba(0,0,0,.03) 0 1px, transparent 1px),
    radial-gradient(circle at 41% 51%, rgba(0,0,0,.025) 0 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px, 5px 5px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity: .28; }
}
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .28; }

/* ---------- layout shell ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead .folio,
.masthead .meta,
.masthead .eyebrow,
.masthead .wordmark small { color: var(--ink-faint); }
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1rem + 1.1vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 40;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}
.wordmark small {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
}
.masthead nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.4rem);
}
.masthead nav a {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid transparent;
}
.masthead nav a:hover { border-bottom-color: var(--rose); }
.nav-secondary { display: none; }
@media (min-width: 720px) { .nav-secondary { display: inline; } }

.theme-toggle {
  background: none;
  border: 1px solid var(--ink);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
.theme-toggle:hover { background: var(--paper-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- folio strip ---------- */
.folio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--section-faint, var(--ink-faint));
  border-bottom: 1px solid var(--section-ink);
  padding-block: 0.6rem;
}
.folio span:not(:last-child)::after {
  content: "/";
  margin-left: 1.1rem;
  color: var(--section-faint, var(--ink-faint));
  opacity: 0.6;
}
.folio .folio__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rose);
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: 1px;
}

/* ---------- sections: hard color blocks ---------- */
.section {
  background: var(--section-color);
  color: var(--section-ink);
  padding-block: clamp(3.5rem, 9vw, 7.5rem);
  border-bottom: 2px solid var(--section-ink);
  position: relative;
}
.section--paper  { --section-color: var(--paper);  --section-ink: var(--ink); }
.section--blush  { --section-color: var(--blush);  --section-ink: var(--ink-on-blush); }
.section--plum   { --section-color: var(--plum);   --section-ink: var(--ink-on-plum); }
.section--butter { --section-color: var(--butter); --section-ink: var(--ink-on-butter); }
.section--sage   { --section-color: var(--sage);   --section-ink: var(--ink-on-sage); }
.section--sky    { --section-color: var(--sky);    --section-ink: var(--ink-on-sky); }

/* muted text inside coloured blocks — must stay legible on its own block */
.section--blush  { --section-faint: var(--faint-on-blush); }
.section--plum   { --section-faint: var(--faint-on-plum); }
.section--butter { --section-faint: var(--faint-on-butter); }
.section--sage   { --section-faint: var(--faint-on-sage); }
.section--sky    { --section-faint: var(--faint-on-sky); }
.section--paper  { --section-faint: var(--ink-faint); }

.section--blush .folio,
.section--blush .meta,
.section--blush .eyebrow,
.section--blush .entry__num,
.section--blush .entry__tag,
.section--blush .margin-note,
.section--blush .spec caption,
.section--blush .spec th,
.section--blush .rules li::before,
.section--blush .field label,
.section--blush .hero__figure figcaption,
.section--plum .folio,
.section--plum .meta,
.section--plum .eyebrow,
.section--plum .entry__num,
.section--plum .entry__tag,
.section--plum .margin-note,
.section--plum .spec caption,
.section--plum .spec th,
.section--plum .rules li::before,
.section--plum .field label,
.section--butter .folio,
.section--butter .meta,
.section--butter .eyebrow,
.section--butter .entry__num,
.section--butter .entry__tag,
.section--butter .margin-note,
.section--butter .spec caption,
.section--butter .spec th,
.section--butter .rules li::before,
.section--butter .field label,
.section--sage .folio,
.section--sage .meta,
.section--sage .eyebrow,
.section--sage .entry__num,
.section--sage .entry__tag,
.section--sage .margin-note,
.section--sage .spec caption,
.section--sage .spec th,
.section--sage .rules li::before,
.section--sage .field label,
.section--sky .folio,
.section--sky .meta,
.section--sky .eyebrow,
.section--sky .entry__num,
.section--sky .entry__tag,
.section--sky .margin-note,
.section--sky .spec caption,
.section--sky .spec th,
.section--sky .rules li::before,
.section--sky .field label { color: var(--section-faint); }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--section-faint);
}
.display {
  font-size: clamp(2.6rem, 1.4rem + 8.4vw, 7.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 90;
  margin: 0 0 1.2rem;
}
.display em {
  font-style: italic;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 90;
}
.h2 {
  font-size: clamp(1.7rem, 1.1rem + 3.1vw, 3.1rem);
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
}
.h3 {
  font-size: clamp(1.15rem, 1rem + 0.9vw, 1.5rem);
  letter-spacing: -0.015em;
}
.lede {
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.45rem);
  line-height: 1.45;
  max-width: 46ch;
}
.meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--section-faint, var(--ink-faint));
}
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  border-top: 1px solid var(--section-ink);
  border-bottom: 1px solid var(--section-ink);
  padding-block: 0.7rem;
  margin-bottom: 2rem;
}

/* ---------- scribble annotations ---------- */
mark.scribble {
  background: none;
  color: inherit;
  position: relative;
  padding-bottom: 0.12em;
  white-space: nowrap;
}
mark.scribble::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.18em;
  height: 0.42em;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 30 3, 52 12, 78 6 S 128 2, 152 8 S 186 4, 198 7' fill='none' stroke='%23c9506a' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M6 12 C 40 8, 70 13, 104 9 S 160 6, 194 11' fill='none' stroke='%23c9506a' stroke-width='1.3' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E");
}
mark.scribble--circle::after {
  height: 1.5em;
  bottom: -0.42em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M14 30 C 14 10, 60 4, 104 5 S 192 9, 190 30 S 150 56, 100 55 S 12 50, 14 30' fill='none' stroke='%23c9506a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}
mark.scribble--ink::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 30 3, 52 12, 78 6 S 128 2, 152 8 S 186 4, 198 7' fill='none' stroke='%230a0a0a' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.section--plum mark.scribble--ink::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 30 3, 52 12, 78 6 S 128 2, 152 8 S 186 4, 198 7' fill='none' stroke='%23f6e9e0' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* rose scribble needs more punch on the darker blocks */
.section--plum mark.scribble::after,
.section--sage mark.scribble::after,
.section--sky mark.scribble::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 30 3, 52 12, 78 6 S 128 2, 152 8 S 186 4, 198 7' fill='none' stroke='%23f2a0b0' stroke-width='2.8' stroke-linecap='round'/%3E%3Cpath d='M6 12 C 40 8, 70 13, 104 9 S 160 6, 194 11' fill='none' stroke='%23f2a0b0' stroke-width='1.4' stroke-linecap='round' opacity='.6'/%3E%3C/svg%3E");
}
.section--plum mark.scribble--circle::after,
.section--sage mark.scribble--circle::after,
.section--sky mark.scribble--circle::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60' preserveAspectRatio='none'%3E%3Cpath d='M14 30 C 14 10, 60 4, 104 5 S 192 9, 190 30 S 150 56, 100 55 S 12 50, 14 30' fill='none' stroke='%23f2a0b0' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* hand-drawn arrow / margin note */
.margin-note {
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--section-faint, var(--ink-faint));
  border-left: 2px solid var(--rose);
  padding-left: 0.8rem;
  max-width: 24ch;
}

/* ---------- drop cap ---------- */
.dropcap::first-letter {
  float: left;
  font-size: 4.1em;
  line-height: 0.78;
  padding: 0.06em 0.1em 0 0;
  font-weight: 700;
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 90;
}

/* ---------- columns ---------- */
.cols {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols--sidebar { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
}
.prose { max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem); }
.hero__grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
}
.hero__figure { margin: 0; }
.hero__figure img {
  border: 2px solid var(--section-ink);
  filter: saturate(0.82) contrast(1.03);
}
.hero__figure figcaption {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--section-faint, var(--ink-faint));
  margin-top: 0.6rem;
  line-height: 1.6;
}

/* ---------- expandable index (signature) ---------- */
.index-list {
  border-top: 2px solid var(--section-ink);
  margin-top: 2.4rem;
}
.entry {
  border-bottom: 1px solid var(--section-ink);
  background: transparent;
}
.entry__summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 0.9rem 1.1rem;
  padding-block: clamp(1rem, 2.4vw, 1.5rem);
  cursor: pointer;
  list-style: none;
  transition: background-color .18s ease, padding-inline .18s ease;
}
.entry__summary::-webkit-details-marker { display: none; }
.entry__summary:hover { background: color-mix(in srgb, var(--section-ink) 6%, transparent); }
.entry__num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--section-faint, var(--ink-faint));
  padding-top: 0.35em;
}
.entry__title {
  font-size: clamp(1.25rem, 1rem + 1.9vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 60;
}
.entry__tag {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--section-faint, var(--ink-faint));
  white-space: nowrap;
  padding-top: 0.5em;
}
.entry__plus {
  width: 30px; height: 30px;
  border: 1px solid var(--section-ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  position: relative;
  grid-column: 3;
  align-self: center;
}
.entry__plus::before,
.entry__plus::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.entry__plus::before { width: 12px; height: 1.6px; }
.entry__plus::after  { width: 1.6px; height: 12px; transition: transform .2s ease; }
.entry[open] .entry__plus::after { transform: scaleY(0); }

.entry__body {
  padding-bottom: clamp(1.6rem, 4vw, 2.6rem);
  animation: riseIn .5s ease both;
}
.entry__body .cols { margin-top: 0.4rem; }
.entry__body figure { margin: 0 0 1.2rem; }
.entry__body figure img { border: 2px solid var(--section-ink); }
.entry__body figcaption {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--section-faint, var(--ink-faint));
  margin-top: 0.5rem;
  line-height: 1.6;
}
.pullquote {
  font-size: clamp(1.15rem, 1rem + 1.2vw, 1.7rem);
  font-style: italic;
  line-height: 1.3;
  border-top: 1px solid var(--section-ink);
  border-bottom: 1px solid var(--section-ink);
  padding-block: 1rem;
  margin: 0 0 1.2rem;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 60;
}

/* ---------- spec / fact table ---------- */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.spec caption {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--section-faint, var(--ink-faint));
  padding-bottom: 0.6rem;
}
.spec th, .spec td {
  text-align: left;
  padding: 0.55rem 0.6rem 0.55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--section-ink) 24%, transparent);
  vertical-align: top;
}
.spec th {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  width: 42%;
  color: var(--section-faint, var(--ink-faint));
}
.spec td { font-weight: 500; }

/* ---------- numbered list of rules ---------- */
.rules { list-style: none; padding: 0; counter-reset: r; }
.rules li {
  counter-increment: r;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.9rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid color-mix(in srgb, var(--section-ink) 22%, transparent);
}
.rules li::before {
  content: counter(r, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding-top: 0.35em;
  color: var(--section-faint, var(--ink-faint));
}
.rules strong { display: block; font-weight: 600; }

/* ---------- glossary ---------- */
.glossary { list-style: none; padding: 0; }
.glossary li {
  padding-block: 0.8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--section-ink) 22%, transparent);
}
.glossary dt {
  font-weight: 600;
  font-size: 1.02rem;
  display: inline;
}
.glossary dt::after { content: " — "; opacity: .5; }
.glossary dd { display: inline; margin: 0; }

/* ---------- contact ---------- */
.form { display: grid; gap: 1rem; max-width: 34rem; }
.field { display: grid; gap: 0.35rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--section-faint, var(--ink-faint));
}
.field input, .field textarea, .field select {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--section-ink);
  border-radius: 0;
  padding: 0.75rem 0.8rem;
  min-height: 44px;
  width: 100%;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 2px dashed var(--rose);
  outline-offset: 2px;
}
.btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--section-ink);
  color: var(--section-color);
  border: 2px solid var(--section-ink);
  padding: 0.9rem 1.6rem;
  min-height: 44px;
  cursor: pointer;
  justify-self: start;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); }
.form-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin: 0;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--plum);
  color: var(--ink-on-plum);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 5rem;
}
.site-footer .folio {
  border-bottom-color: color-mix(in srgb, var(--ink-on-plum) 35%, transparent);
  color: var(--faint-on-plum);
}
.site-footer .folio span:not(:last-child)::after { color: var(--faint-on-plum); }
.site-footer a { color: var(--ink-on-plum); }
.footer-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
  margin-top: 1.6rem;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-grid h3 {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--faint-on-plum);
  margin-bottom: 0.7rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink-on-plum) 40%, transparent);
}
.footer-grid a:hover { border-bottom-color: var(--ink-on-plum); }

/* ---------- attribution (free tier — must stay) ---------- */
.attribution {
  position: static;
  margin-top: 2.4rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--ink-on-plum) 30%, transparent);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 1;
  color: var(--faint-on-plum);
}
.attribution a {
  color: var(--ink-on-plum);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink-on-plum) 55%, transparent);
}

/* ---------- motion: staggered line reveal ---------- */
@keyframes riseIn {
  from { opacity: 0; translate: 0 20px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal > * {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 38%;
    }
    .reveal > *:nth-child(2) { animation-range: entry 4% cover 42%; }
    .reveal > *:nth-child(3) { animation-range: entry 8% cover 46%; }
    .reveal > *:nth-child(4) { animation-range: entry 12% cover 50%; }
    .reveal > *:nth-child(5) { animation-range: entry 16% cover 54%; }
  }
}

@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;
  }
}

/* ---------- view transitions ---------- */
@view-transition { navigation: auto; }

/* ---------- print ---------- */
@media print {
  body::before, .masthead, .theme-toggle { display: none; }
  .entry__body { display: block !important; }
}
