/* ArtNovation project page: working copies of four pieces of artnovation.eu, ported 1:1 from the site's source
   (index.css, tailwind.config.ts and the components). Every band carries the site's own paper or sky and ink, so it
   reads the same in the portfolio's light and dark themes. Lengths are px as on the site at 1440 px (root 16 px).
   Motion runs only under [data-motion], which artnovation-common.js sets when reduced motion is off, as on the site. */

.an {
  --an-paper: #F3F2EE;
  --an-sky: #CCE9FE;
  --an-ink: #111111;
  --an-ink-2: #6B6860;
  --an-ink-2-sky: #625F58;
  --an-action: #E9A57E;
  --ease-calm: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-glide: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---- Brand-guide frame: a small uppercase title, two or three short columns, then the piece full width. */
.an-sec { margin-top: 112px; }
.an-intro {
  display: grid;
  gap: 16px 48px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--text-primary) 16%, transparent);
}
@media (min-width: 900px) { .an-intro { grid-template-columns: 220px minmax(0, 1fr); } }
.an .an-label {
  margin: 0;
  font-family: "Geist Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: none;
  padding: 0;
}
.an-cols { display: grid; gap: 12px 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.an .an-cols p {
  margin: 0;
  font-family: Geist, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.an-cols b { color: var(--text-primary); font-weight: 500; }
.an-band { margin-top: 40px; }
.an-end { margin-top: 112px; }
.an-guide { display: block; width: 100%; height: auto; margin-top: 40px; }
.an-end-links { margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Inside a band: the site's own type and ink, the portfolio's base rules undone. */
.an-band {
  position: relative;
  color: var(--an-ink);
  font-family: Geist, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
:where(.an-band) :is(button, input) { font: inherit; color: inherit; letter-spacing: inherit; margin: 0; }
:where(.an-band) button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
:where(.an-band) a, :where(.an-band) a:hover { color: inherit; text-decoration: none; }
:where(.an-band) p { margin: 0; }
:where(.an-band) img { max-width: none; }
.an-band :focus-visible { outline: 2px solid var(--an-ink); outline-offset: 3px; }
.an-sky { background: var(--an-sky); }
.an-paper { background: var(--an-paper) url("../../images/an-paper.webp") repeat; background-size: 640px; }
.an-col { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 701px) { .an-col { padding: 0 24px; } }
.an-mono { font-family: "Geist Mono", ui-monospace, Menlo, monospace; }
.an-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==== 1 · The entry sentence (HomeAbout + AnswerSentence) ==== */
.an-entry { padding: clamp(72px, 14vh, 152px) 20px; }
@media (min-width: 701px) { .an-entry { padding-inline: 24px; } }
.an-frame { position: relative; }
.an-sentence {
  margin: 0 auto;
  max-width: 1180px;
  text-align: center;
  text-wrap: balance;
  font-size: clamp(36px, min(5vw, 8vh), 80px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.05em;
}
@media (max-width: 360px) { .an-sentence { font-size: 32px; } }
.an-nowrap { white-space: nowrap; }
.an-pillbox { position: relative; display: inline-flex; }
.answer-pill {
  display: inline-block;
  vertical-align: baseline;
  white-space: normal;
  padding: 0 0.64em 0.02em 0.34em;
  line-height: 1.04;
  color: var(--an-ink);
  border-radius: 9999px;
  cursor: pointer;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5 10 4.5' fill='none' stroke='%23111' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      no-repeat right 0.22em center / 0.32em 0.32em,
    var(--tint);
}
.answer-pill[data-lines] { border-radius: 0.42em; }
.answer-pill:focus-visible { outline: 3px solid var(--an-ink); outline-offset: 4px; }
.an-reel { position: relative; display: inline-block; text-align: center; contain: paint; padding-block: 0.06em; }
.an-reel-size { visibility: hidden; display: block; white-space: pre; padding-inline: 0.05em; }
.an-reel-strip { position: absolute; inset-inline: 0; top: 0.06em; display: block; overflow: hidden; }
.an-reel-item { display: flex; flex-direction: column; justify-content: center; white-space: pre; }
.an-count-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; white-space: pre; }
[data-motion] .answer-pill {
  transition: transform 300ms ease-out, opacity 350ms var(--ease-calm);
}
/* The pills wait, hidden, until the band comes into view; then they pop in all together (as on the site's first load). */
[data-motion] .an-frame:not([data-go]) .answer-pill { opacity: 0; }
[data-motion] .an-frame[data-go] .answer-pill {
  animation: answer-pop 680ms cubic-bezier(0.34, 1.35, 0.64, 1) backwards;
  animation-delay: 200ms;
}
@media (hover: hover) {
  [data-motion] .answer-pill:not([data-active]):hover { transform: rotate(-4deg) scale(1.06); }
}
.an-frame .an-sentence,
.an-frame .answer-pill,
.an-frame .an-cta {
  transition: color 350ms var(--ease-glide), opacity 350ms var(--ease-glide), transform 300ms ease-out;
}
.an-frame[data-open] .an-sentence { color: rgb(17 17 17 / 0.16); }
.an-frame[data-open] .answer-pill:not([data-active]),
.an-frame[data-open] .an-cta { opacity: 0.2; }
@keyframes answer-pop { from { opacity: 0; transform: scale(0.6) rotate(-8deg); } }

/* A pill's answers, in place over it (AnswerList), and the calculator's choices (ChoicePill): one motion. */
@property --open { syntax: "<number>"; inherits: false; initial-value: 1; }
.cost-choices {
  --open: 1;
  position: absolute;
  display: grid;
  grid-auto-rows: 100%;
  transform: translateY(-100%);
  clip-path: inset(calc(100% * (1 - var(--open))) 0 calc(-100% + (200% - 100% * var(--rows)) * var(--open)) round 0.62em);
}
.cost-choices[data-open="false"] { visibility: hidden; }
[data-motion] .cost-choices { transition: --open 320ms var(--ease-calm); }
[data-motion] .cost-choices[data-open="false"] {
  --open: 0;
  opacity: 0;
  transition: --open 300ms var(--ease-glide), opacity 300ms var(--ease-glide), visibility 0s 300ms;
}
[data-motion] .cost-choice { transition: opacity 240ms var(--ease-calm) 60ms, transform 320ms var(--ease-calm); }
[data-motion] .cost-choices[data-open="false"] .cost-choice {
  opacity: 0;
  transform: translateY(var(--from));
  transition-delay: 0ms;
  transition-timing-function: var(--ease-glide);
}
.cost-choices > span { display: grid; background: var(--tint); }
.cost-choices button { color: var(--an-ink); outline: none; border-radius: 9999px; }
.cost-choices button:hover { background: rgb(17 17 17 / 0.05); }
.an-answers { inset: 0; z-index: 30; line-height: 1.04; }
.an-answers button {
  display: flex; align-items: center; justify-content: center; text-align: center; white-space: normal;
  padding: 0 0.64em 0.02em 0.34em;
}
.an-answers button:focus-visible { box-shadow: inset 0 0 0 3px #111; }

.an-cta { margin-top: clamp(24px, 4.5vh, 48px); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.an-cta-go {
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 26px;
  background: var(--an-ink); color: #fff !important; font-size: clamp(17px, 1.4vw, 20px); font-weight: 500;
}
.an-cta-go span { transition: transform 500ms var(--ease-calm); }
.an-cta-go:hover span { transform: translateX(4px); }
.an-next { display: inline-grid; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 14px; color: var(--an-ink-2-sky); }
.an-next > span { grid-area: 1 / 1; }
.an-next > .an-ghost { visibility: hidden; }
.an-scroll { display: flex; width: fit-content; align-items: center; gap: 12px; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 13px; }
.an-scroll svg { height: 36px; width: 2px; overflow: visible; }
.an-scroll path { stroke-dasharray: 1; }
[data-motion] .an-frame[data-go] ~ .an-scroll path,
[data-motion] .an-entry[data-go] .an-scroll path { animation: line-draw 900ms var(--ease-glide) 1700ms both; }
@keyframes line-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Rolling values (RollingNumber): a changed word lifts out while the new one rises in; digits turn like a counter. */
.word-in { animation: word-in 380ms var(--ease-calm) both; }
.word-out { animation: word-out 300ms var(--ease-calm) both; }
@keyframes word-in { from { opacity: 0; translate: 0 0.9em; } }
@keyframes word-out { to { opacity: 0; translate: 0 -0.9em; } }
.an-roll { display: inline-flex; align-items: baseline; font-variant-numeric: tabular-nums; user-select: none; }
.an-word { position: relative; display: inline-block; height: 1.15em; line-height: 1.15em; white-space: pre; clip-path: inset(0 -100vw 0 -100vw); }
.an-word > .word-out { position: absolute; left: 0; top: 0; }
.an-word > span:last-child { display: block; }
.an-num { display: inline-block; padding-block: 0.175em; }
.cost-ends .an-num { padding-block: 0; }
.cost-total-v .an-num { padding-block: 0.21em; }
.an-digit { position: relative; display: inline-block; clip-path: inset(0 -0.2em); }
.an-digit > i { font-style: normal; visibility: hidden; }
.an-digit > b {
  position: absolute; left: 0; top: 0; font-weight: inherit; white-space: pre; text-align: center; width: 100%;
  transform: translateY(calc(var(--n) * -1lh));
}
[data-motion] .an-digit > b { transition: transform 900ms var(--ease-calm); }
[data-motion] .an-count-num .an-digit > b { transition-duration: 1400ms; }

/* ==== 2 · The cost calculator (TaskCostCalculator, Time mode) ==== */
.an-calc { padding: 56px 0 64px; }
@media (min-width: 701px) { .an-calc { padding: 72px 0 88px; } }
.an-calc-body { position: relative; display: grid; gap: 28px; }
.an-calc-sentence { font-size: clamp(26px, 3.1vw, 40px); font-weight: 500; line-height: 1.5; letter-spacing: -0.025em; }
.cost-pill {
  margin: 0.06em 0.04em; display: inline-flex; align-items: center; gap: 0.2em; vertical-align: middle;
  padding: 0.04em 0.24em 0.04em 0.34em; border-radius: 9999px; background: var(--tint);
  font-weight: 600; line-height: 1.15; color: var(--an-ink);
  transition: transform 200ms var(--ease-calm), box-shadow 200ms var(--ease-calm), filter 200ms var(--ease-calm);
}
.cost-pill:hover { filter: brightness(0.97); }
.cost-pill:active { transform: scale(0.97); }
.cost-pill[aria-expanded="true"] { box-shadow: inset 0 0 0 2px #111; }
.an-chev { width: 0.4em; height: 0.4em; flex-shrink: 0; transition: transform 500ms var(--ease-calm); }
.cost-pill[aria-expanded="true"] .an-chev,
.an-choices[data-open="true"] .an-chev { transform: rotate(180deg); }
.an-sizes { display: grid; justify-items: start; }
.an-sizes > span { grid-area: 1 / 1; }
.an-sizes > .an-ghost { visibility: hidden; font-variant-numeric: tabular-nums; }
.an-choicebox { position: relative; display: inline-flex; vertical-align: middle; }
.an-choices { inset: 0.06em 0.04em; z-index: 20; }
.an-choices[data-open="true"] { z-index: 31; }
.an-choices button {
  display: flex; align-items: center; justify-content: space-between; gap: 0.2em;
  padding: 0.04em 0.24em 0.04em 0.34em; font-weight: 600; line-height: 1.15;
}
.an-choices button:focus-visible { box-shadow: inset 0 0 0 2px #111; }

.cost-popover {
  position: absolute; z-index: 30; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 100%;
  transform-origin: top; border-radius: 24px; background: #FBFAF7; padding: 12px;
  font-size: 16px; line-height: 24px; font-weight: 400; letter-spacing: normal;
  box-shadow: 0 1px 2px rgb(17 17 17 / 0.08), 0 16px 40px -12px rgb(17 17 17 / 0.25);
}
[data-motion] .cost-popover { transition: opacity 300ms var(--ease-calm), transform 300ms var(--ease-calm), visibility 300ms var(--ease-calm); }
[data-motion] .cost-popover[data-open="true"] {
  transition: opacity 300ms var(--ease-calm), transform 300ms var(--ease-calm), visibility 300ms var(--ease-calm), top 300ms var(--ease-calm), left 300ms var(--ease-calm);
}
.cost-popover[data-open="false"] { visibility: hidden; opacity: 0; transform: translateY(-6px) scale(0.97); }
.cost-popover-q { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 8px 0; font-size: 15px; line-height: 1.375; color: var(--an-ink-2); }
.cost-popover-q span + span { display: none; flex-shrink: 0; font-size: 13px; }
@media (min-width: 400px) { .cost-popover-q span + span { display: inline; } }
.cost-field { display: flex; align-items: baseline; gap: 8px; border-radius: 16px; background: rgb(17 17 17 / 0.05); padding: 12px 16px; }
.cost-field input {
  min-width: 1.25ch; max-width: 9ch; flex-shrink: 0; background: transparent; border: 0; padding: 0; outline: none;
  font-variant-numeric: tabular-nums; font-size: 30px; line-height: normal; font-weight: 600; letter-spacing: -0.02em; color: var(--an-ink);
  appearance: textfield; -moz-appearance: textfield;
}
.cost-field input::-webkit-inner-spin-button, .cost-field input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.cost-field span { font-size: 18px; line-height: 28px; font-weight: 600; color: var(--an-ink-2); }
.cost-range {
  --thumb: 36px;
  appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 44px; margin: 0; border-radius: 999px;
  background:
    linear-gradient(var(--tint), var(--tint)) 0 0 / calc(var(--thumb) / 2 + 4px + (100% - var(--thumb) - 8px) * var(--fill)) 100% no-repeat,
    rgb(17 17 17 / 0.06);
  cursor: grab;
}
.cost-range:active { cursor: grabbing; }
.cost-range::-webkit-slider-runnable-track { height: 44px; padding: 0 4px; }
.cost-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: var(--thumb); height: var(--thumb); margin-top: 4px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4.5 3 8l3 3.5M10 4.5 13 8l-3 3.5' fill='none' stroke='%236B6860' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: 0 1px 2px rgb(17 17 17 / 0.2), 0 4px 10px -2px rgb(17 17 17 / 0.18);
  transition: transform 200ms var(--ease-calm);
}
.cost-range:active::-webkit-slider-thumb { transform: scale(1.08); }
.cost-range::-moz-range-track { background: transparent; }
.cost-range::-moz-range-thumb {
  width: var(--thumb); height: var(--thumb); border: 0; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4.5 3 8l3 3.5M10 4.5 13 8l-3 3.5' fill='none' stroke='%236B6860' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: 0 1px 2px rgb(17 17 17 / 0.2);
}
.cost-range:focus-visible { outline: 2px solid var(--an-ink); outline-offset: 3px; }
.cost-ends { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 12px; line-height: 24px; color: var(--an-ink-2); }
.cost-ends > span { white-space: nowrap; }
.cost-ends > span:nth-child(2) { color: var(--an-ink); }

.cost-result { display: grid; gap: 24px; }
.cost-total { display: grid; gap: 4px; border-radius: 32px; background: #FBFAF7; padding: 24px 32px; box-shadow: 0 1px 2px rgb(17 17 17 / 0.06); }
.cost-total-k { font-size: 18px; line-height: 28px; color: var(--an-ink-2); }
.cost-total-v { font-size: clamp(48px, 6vw, 84px); font-weight: 600; line-height: 1.1; letter-spacing: -0.035em; }
.cost-jobs { display: flex; min-width: 0; flex-wrap: wrap; align-items: flex-end; gap: 24px; }
.cost-bars { display: flex; height: 96px; flex-shrink: 0; align-items: flex-end; gap: 8px; }
.cost-bar { position: relative; display: block; height: 100%; width: 24px; overflow: hidden; border-radius: 8px; background: rgb(17 17 17 / 0.07); }
.fte-fill { position: absolute; inset: 0; transform-origin: bottom; border-radius: 8px; background: #EDB08C; transform: scaleY(var(--fill)); }
[data-motion] .fte-fill { transition: transform 500ms var(--ease-calm); }
@starting-style { [data-motion] .fte-fill { transform: scaleY(0); } }
.cost-plus { padding-bottom: 4px; font-size: 18px; font-weight: 600; line-height: 1; }
.cost-jobs-text { display: grid; gap: 4px; font-size: 18px; line-height: 1.375; color: var(--an-ink-2); }
.cost-jobs-text > span:first-child { font-size: clamp(30px, 3vw, 44px); font-weight: 600; line-height: 1.25; letter-spacing: -0.025em; color: var(--an-ink); }
.cost-jobs-text > span:last-child { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 13px; }
@media (min-width: 701px) {
  .cost-result { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 36px; }
  .cost-total { padding: 32px 40px; }
  .cost-total-k, .cost-jobs-text { font-size: 20px; }
  .cost-bars { height: 128px; }
  .cost-bar { width: 32px; }
}
.cost-after { display: grid; max-width: 60ch; justify-items: start; gap: 20px; }
.cost-after p { font-size: 17px; line-height: 1.5; color: var(--an-ink-2); }
.an-button {
  display: inline-flex; min-height: 44px; align-items: center; white-space: nowrap; padding: 13px 20px;
  background: var(--an-ink); color: #fff !important; font-size: 16px; font-weight: 500; line-height: 1.2;
  transition: background-color 200ms ease-out, transform 200ms ease-out;
}
.an-button:hover { background: rgb(17 17 17 / 0.8); }
.an-button:active { transform: translateY(1px); }

/* ==== 3 · The top menu and its fans (EntryNav, EntryFan, RollingWord) ==== */
.an-menu-band { padding: 22px 0 0; }
@media (min-width: 701px) { .an-menu-band { padding-top: 24px; } }
.an-bar { position: relative; z-index: 30; display: flex; justify-content: center; }
.an-nav { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; }
@media (min-width: 701px) { .an-nav { column-gap: 36px; } }
.an-nav-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--an-action); }
@media (min-width: 701px) { .an-nav-dot { width: 14px; height: 14px; } }
.an-navitem { position: relative; }
.an-navword {
  display: block; padding: 8px 0; font-size: clamp(19px, 1.8vw, 27px); line-height: 28px; letter-spacing: -0.01em;
  color: var(--an-ink-2-sky); transition: color 200ms;
}
.an-navword[aria-current="page"], .an-navword[data-lit] { color: var(--an-ink); }
.an-rollword { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; }
.an-rollword > .an-row { display: block; }
.an-rollword > .an-row + .an-row { position: absolute; inset-inline: 0; top: 100%; color: var(--an-ink); }
.an-rollword i { display: inline-block; font-style: normal; }
[data-motion] .an-rollword i { transition: transform 500ms var(--ease-calm); }
[data-motion] .an-navword[data-lit] .an-rollword i { transform: translateY(-100%); }

.entry-fan { position: absolute; left: 50%; top: 100%; z-index: 20; display: block; height: 120px; padding-top: 12px; transform: translateX(-50%); pointer-events: none; }
.entry-fan[data-lit] { pointer-events: auto; }
.entry-fan-card {
  position: absolute; top: 12px; left: 50%; opacity: 0; pointer-events: none; overflow: hidden; border-radius: 8px;
  transform-origin: 50% calc(100% + 60px); transform: translateX(-50%) scale(0.6);
}
.entry-fan-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.entry-fan-card.is-print { width: 70px; height: 64px; }
.entry-fan-card.is-portrait { width: 52px; height: 78px; }
.entry-fan-card.is-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.entry-fan-card svg { width: 20px; height: 20px; transition: stroke-width 250ms var(--ease-calm); }
.entry-fan-card:hover svg { stroke-width: 2.6; }
.entry-fan[data-lit] .entry-fan-card { opacity: 1; pointer-events: auto; transform: translateX(calc(-50% + var(--x))) translateY(var(--y)) rotate(var(--r)); }
[data-motion] .entry-fan-card {
  transition: opacity 260ms var(--ease-calm), transform 560ms cubic-bezier(0.34, 1.3, 0.64, 1);
  transition-delay: calc(var(--i) * 35ms);
}
.entry-fan[data-lit] .entry-fan-card:hover { translate: 0 -6px; scale: 1.05; }
[data-motion] .entry-fan[data-lit] .entry-fan-card {
  transition: opacity 260ms var(--ease-calm), transform 560ms cubic-bezier(0.34, 1.3, 0.64, 1), translate 250ms var(--ease-calm), scale 250ms var(--ease-calm);
  transition-delay: calc(var(--i) * 35ms), calc(var(--i) * 35ms), 0ms, 0ms;
}
/* A phone shows no fan: the page changes with a plain rise (index.css, phone-page-in). */
@media (max-width: 700.98px), (hover: none) { .entry-fan { display: none; } }

.an-swap { position: relative; overflow: clip; }
.an-swap-old { position: absolute; inset: 0 0 auto; pointer-events: none; }
.an-menu-start { display: grid; place-items: center; min-height: 300px; padding: 140px 20px 56px; text-align: center; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 14px; color: var(--an-ink-2-sky); }

/* A page's head (PageHead, HeadPill, PageChips, ContactPills). */
.page-head { display: grid; justify-items: center; gap: 18px; padding: clamp(16px, 5vh, 56px) 0 clamp(48px, 9vh, 104px); text-align: center; }
.page-head-h { margin: 0; font-size: clamp(36px, min(5vw, 8vh), 72px); font-weight: 500; line-height: 1.2; letter-spacing: -0.05em; }
@media (max-width: 360px) { .page-head-h { font-size: 32px; } }
.head-pill { border-radius: 9999px; padding: 0 0.3em 0.03em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.page-head-line { max-width: 44ch; font-size: 21px; line-height: 1.45; color: var(--an-ink-2-sky); }
.page-head-visit { font-size: 16px; line-height: 24px; color: var(--an-ink-2); }
.page-head-visit a { color: var(--an-ink); }
.page-head-result { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 14px; }
.page-head-result b { font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
@media (min-width: 701px) { .page-head-result b { font-size: 56px; } }
.page-chips { width: 100%; max-width: 1120px; }
.page-chips ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.page-chip {
  display: flex; min-height: 44px; align-items: center; gap: 10px; border-radius: 9999px; background: rgb(255 255 255 / 0.55);
  padding: 6px 16px 6px 6px; font-size: 16px; font-weight: 500; line-height: 1.25; color: var(--an-ink); transition: background-color 200ms;
}
.page-chip:hover { background: #fff; }
.page-chip img { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.page-chip img.is-portrait { object-position: center 20%; }
.contact-pills { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (min-width: 701px) { .contact-pills { gap: 16px; } }
.contact-pill {
  position: relative; display: inline-flex; min-height: 56px; align-items: center; gap: 12px; border-radius: 9999px;
  padding: 6px 24px 6px 6px; font-size: clamp(18px, 1.7vw, 26px); font-weight: 500; letter-spacing: -0.02em; color: var(--an-ink);
  transition: transform 200ms ease-out;
}
.contact-pill:hover { transform: translateY(-2px); }
.contact-pill::before { content: ""; position: absolute; inset: 0; border-radius: 9999px; background: var(--tint); }
.contact-pill-icon { position: relative; display: grid; width: 44px; height: 44px; flex-shrink: 0; place-items: center; border-radius: 50%; background: var(--tint); }
.contact-pill-icon svg { width: 20px; height: 20px; transition: stroke-width 250ms var(--ease-calm); }
.contact-pill:hover svg { stroke-width: 2.6; }
.contact-pill-text { position: relative; }
[data-motion] .contact-pill::before { animation: contact-pill-grow 600ms var(--ease-calm) backwards; animation-delay: calc(820ms + var(--i) * 90ms); }
[data-motion] .contact-pill-text { animation: contact-pill-text 450ms var(--ease-calm) backwards; animation-delay: calc(960ms + var(--i) * 90ms); }
@keyframes contact-pill-grow {
  from { opacity: 0; clip-path: inset(6px calc(100% - 50px) 6px 6px round 9999px); }
  10% { opacity: 1; }
  to { clip-path: inset(0 0 0 0 round 9999px); }
}
@keyframes contact-pill-text { from { opacity: 0; translate: -12px 0; } }

/* Page changes (PageTransition): the old page lifts away while the new one rises in. */
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-lift { to { translate: 0 -12px; } }
@keyframes page-rise { from { translate: 0 16px; } to { translate: 0 0; } }
@keyframes phone-page-in { from { opacity: 0.35; translate: 0 24px; } }

/* ==== 4 · Projects (HomeProjects) and a project's head (system page) ==== */
.an-pgrid-wrap { padding-block: 56px 64px; }
@media (min-width: 701px) { .an-pgrid-wrap { padding-block: 72px 96px; } }
.an-pgrid { margin: 0; padding: 0; list-style: none; display: grid; gap: 48px 28px; }
@media (min-width: 701px) { .an-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 56px; } }
@media (min-width: 1081px) { .an-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.an-ptile { display: grid; align-content: start; gap: 16px; width: 100%; }
.an-ptile-print { display: block; transition: transform 500ms var(--ease-calm); }
.an-ptile:hover .an-ptile-print { transform: translateY(-2px); }
.an-ptile img { display: block; width: 100%; height: auto; aspect-ratio: 1344 / 1216; }
.an-ptile-name { display: block; font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; }
.an-ptile-line { display: block; margin-top: 6px; font-size: 17px; line-height: 1.375; color: var(--an-ink-2); }
@media (min-width: 701px) { .an-ptile-line { font-size: 19px; } }
.an-pview { background: var(--an-sky); padding-top: 24px; }
.an-back {
  display: inline-flex; min-height: 44px; align-items: center; gap: 12px; margin-left: 20px;
  font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 13px;
}
@media (min-width: 701px) { .an-back { margin-left: 24px; } }
.an-pprint { display: block; width: 100%; max-width: 1120px; overflow: hidden; aspect-ratio: 4 / 3; }
@media (min-width: 701px) { .an-pprint { aspect-ratio: 2 / 1; } }
@media (min-width: 1081px) { .an-pprint { aspect-ratio: 21 / 9; } }
.an-pprint img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ==== 5-8 · Smaller pieces ==== */
.an-small { padding: 56px 0 64px; }
@media (min-width: 701px) { .an-small { padding: 72px 0 88px; } }

/* The line diagram (LineDiagram.module.css): every moving part goes from hidden to its drawing once revealed. */
.ld { --line: #BFD0A9; --ink: #111111; --paper: #F3F2EE; margin: 0; }
.ld .ld-pop, .ld .ld-fade, .ld .ld-draw, .ld-mdot { transform-box: fill-box; transform-origin: center; }
.ld .ld-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
[data-motion] .ld:not([data-revealed]) :is(.ld-pop, .ld-mdot) { opacity: 0; transform: scale(0.4); }
[data-motion] .ld:not([data-revealed]) .ld-fade { opacity: 0; }
[data-motion] .ld:not([data-revealed]) .ld-draw { stroke-dashoffset: 1; }
[data-motion] .ld:not([data-revealed]) .ld-track { stroke-dashoffset: 1; }
[data-motion] .ld[data-revealed] :is(.ld-pop, .ld-mdot) { transition: opacity 200ms ease var(--d, 0ms), transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0ms); }
[data-motion] .ld[data-revealed] .ld-fade { transition: opacity var(--t, 450ms) ease var(--d, 0ms); }
[data-motion] .ld[data-revealed] .ld-draw { transition: stroke-dashoffset var(--t, 600ms) cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0ms); }
[data-motion] .ld[data-revealed] .ld-track { transition: stroke-dashoffset 2000ms linear; }
.ld-track, .ld-track-base { fill: none; stroke: var(--line); stroke-width: 7; stroke-linecap: round; }
.ld-track { stroke-dasharray: 1; stroke-dashoffset: 0; }
.ld-track-base { stroke-opacity: 0.35; }
.ld-station { fill: var(--paper); stroke: var(--ink); stroke-width: 3; }
.ld-stroke { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ld-muted { fill: none; stroke: #6b6860; stroke-width: 1.5; stroke-linecap: round; }
.ld-paper { fill: var(--paper); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.ld-ink { fill: var(--ink); }
.ld-tint { fill: var(--line); }
.ld-tint-soft { fill: var(--line); fill-opacity: 0.55; }
.ld-mono { font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 12px; fill: var(--ink); }
@media (max-width: 1080px) { .ld-mono { font-size: 16px; } }
.ld-wide { display: none; width: 100%; height: auto; }
.ld-rows { margin: 0; padding: 0; list-style: none; display: grid; }
.ld-rows b { display: block; font-size: 19px; font-weight: 500; line-height: 1.375; }
.ld-rows b::first-letter { text-transform: uppercase; }
.ld-panel { display: block; width: 100%; max-width: 300px; height: auto; margin-top: 16px; }
.ld-mdot { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border: 3px solid var(--ink); border-radius: 50%; background: var(--paper); z-index: 1; }
.ld figcaption { margin-top: 16px; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: 0.04em; color: var(--an-ink-2); }
@media (max-width: 700.98px) {
  .ld-row { position: relative; padding: 0 0 36px 52px; }
  .ld-row:last-child { padding-bottom: 0; }
  .ld-row::before { content: ""; position: absolute; left: 10.5px; top: 14px; bottom: -14px; width: 7px; border-radius: 4px; background: var(--line); transform-origin: top; }
  .ld-row:last-child::before { display: none; }
  [data-motion] .ld:not([data-revealed]) .ld-row::before { transform: scaleY(0); }
  [data-motion] .ld[data-revealed] .ld-row::before { transition: transform 500ms ease calc(var(--k) * 700ms + 800ms); }
  [data-motion] .ld .ld-panel :is(.ld-pop, .ld-fade, .ld-draw) { transition: none !important; opacity: 1 !important; transform: none !important; stroke-dashoffset: 0 !important; }
  [data-motion] .ld:not([data-revealed]) .ld-panel { opacity: 0; transform: translateY(16px); }
  [data-motion] .ld[data-revealed] .ld-panel { transition: opacity 500ms ease calc(var(--k) * 700ms + 200ms), transform 700ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--k) * 700ms + 200ms); }
}
@media (min-width: 701px) {
  .ld-wide { display: block; }
  .ld-rows { margin-top: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; }
  .ld-mdot, .ld-panel { display: none; }
  .ld figcaption { text-align: center; }
}

/* Big numbers in layered inks (LayeredInk): the riso copies sit off register under the black and come in from six
   times that offset, one ink after another. */
.an-inks-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; font-size: 18px; line-height: 28px; }
.an-inks-line b { font-size: clamp(56px, 9vw, 120px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.an-ink { position: relative; display: inline-block; }
.an-ink-black { position: relative; }
.ink-layer { position: absolute; inset: 0; white-space: pre; font-variant-numeric: tabular-nums; mix-blend-mode: multiply; transform: translate(var(--fx), var(--fy)); }
.ink-layer::before { content: attr(data-text); }
[data-motion] [data-reveal="ink"] .ink-layer { animation: ink-in 1400ms var(--ease-glide) calc(var(--i) * 110ms) both paused; }
[data-motion] [data-reveal="ink"][data-revealed] .ink-layer { animation-play-state: running; }
@keyframes ink-in { from { transform: translate(calc(var(--fx) * 6), calc(var(--fy) * 6)); opacity: 0; } 35% { opacity: 1; } }
.an-again { margin-top: 24px; min-height: 44px; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 13px; color: var(--an-ink-2); }
.an-again:hover { color: var(--an-ink); }

/* The drawing-sheet title block (TitleBlock): the frame is drawn in one stroke, then the cells appear. */
.tb { position: relative; max-width: 460px; }
.title-frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.title-frame rect { width: calc(100% - 1px); height: calc(100% - 1px); stroke-dasharray: 1; stroke-dashoffset: 0; }
[data-motion] .tb .title-frame rect { stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease-glide); }
[data-motion] .tb .title-cells { opacity: 0; transition: opacity 400ms var(--ease-calm) 650ms; }
[data-motion] .tb[data-revealed] .title-frame rect { stroke-dashoffset: 0; }
[data-motion] .tb[data-revealed] .title-cells { opacity: 1; }
.title-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 1px solid var(--an-ink); border-top: 1px solid var(--an-ink); font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.35; }
.tb-cell { min-width: 0; border-right: 1px solid var(--an-ink); border-bottom: 1px solid var(--an-ink); padding: 5px 7px 6px; overflow-wrap: anywhere; }
.tb-cell b { display: block; margin-bottom: 1px; font-size: 11px; font-weight: 400; color: var(--an-ink-2); }
.tb-span2 { grid-column: span 2; } .tb-span3 { grid-column: span 3; } .tb-span4 { grid-column: span 4; }
.tb-name { padding-block: 7px; font-size: 15px; font-weight: 500; }
.tb-inks { display: flex; gap: 3px; margin-top: 3px; }
.tb-inks i { width: 14px; height: 8px; outline: 1px solid var(--an-ink); outline-offset: -1px; }
.link-action { background: linear-gradient(var(--an-action), var(--an-action)) 0 100% / 0% 2px no-repeat; transition: background-size 400ms var(--ease-calm); }
.link-action:hover { background-size: 100% 2px; }

/* The stepper (Stepper): a rail of dots, the current one in ink with its line. Beside the page on a wide screen, in
   its own band below that. */
.an-stepper { max-width: 240px; }
.an-stepper ol { margin: 0; padding: 0; list-style: none; }
.an-stepper li { position: relative; padding: 0 0 15px 20px; }
.an-stepper li:last-child { padding-bottom: 0; }
.st-line { position: absolute; left: 3px; top: 0; bottom: 0; width: 1.5px; background: rgb(17 17 17 / 0.15); transition: background-color 200ms; }
.st-dot { position: absolute; left: 0; top: 8px; width: 7.5px; height: 7.5px; border-radius: 50%; background: rgb(17 17 17 / 0.2); transition: background-color 200ms; }
.an-stepper li[data-active] .st-line, .an-stepper li[data-active] .st-dot { background: var(--an-ink); }
.an-stepper li:hover :is(.st-line, .st-dot) { background: var(--an-action); }
.an-stepper a { display: block; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.6; text-transform: lowercase; color: rgb(17 17 17 / 0.6); transition: color 200ms; }
.an-stepper li[data-active] a { font-weight: 500; color: var(--an-ink); }
.an-stepper li:hover a, .an-stepper li:hover small { color: var(--an-action); }
.an-stepper small { display: block; overflow: hidden; max-height: 0; opacity: 0; font-family: "Geist Mono", ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.45; color: var(--an-ink); transition: all 300ms; }
.an-stepper li[data-active] small { margin-top: 3px; max-height: 112px; opacity: 1; }
@media (min-width: 1400px) {
  .an-stepper { position: fixed; right: 16px; top: 50%; z-index: 40; width: 150px; transform: translateY(-50%); padding: 12px; border-radius: 12px; background: var(--an-paper); color: var(--an-ink); font-family: Geist, system-ui, sans-serif; }
  .an-stepper-band { height: 0; padding: 0; margin: 0; overflow: visible; }
}

/* The flying pictures (the site's .morph group): above everything, never in the way of a click. */
.an-flyer { position: absolute; z-index: 60; pointer-events: none; margin: 0; display: block; max-width: none; }
.an-hold { visibility: hidden; }
.an-flyer-icon { display: grid; place-items: center; border-radius: 50%; color: #111; }
.an-flyer-icon svg { width: 20px; height: 20px; }

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

/* Touch: the site's sentence pills are 30-50 px tall; an invisible margin brings every tap target to 44 px. */
.cost-pill, .an-stepper a, .tb .link-action { position: relative; }
.tb .link-action::after { content: ""; position: absolute; inset: -14px -4px; }
.cost-pill::after { content: ""; position: absolute; inset: -7px -2px; }
.an-stepper a::after { content: ""; position: absolute; inset: -12px -4px; }
.answer-pill { position: relative; }
.answer-pill::after { content: ""; position: absolute; inset: -4px 0; }
.an-end-links .btn { display: inline-flex; align-items: center; min-height: 44px; }
