/* Hallmark · shape: Index-First · genre: editorial · theme: Solstice (deal 1/3, seed progetto-per-aiutare-canili-a0c9·afd934ce·2026-11-23·r0) · job: join · draw: 1f2d22
 * hero: Corridor · nav: floating pill · footer: letter close · imagery: none · signature: the needs list that fills a bag and writes the message for the shelter · solstice: long-light
 * axes: light/high-contrast-serif/warm · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · dismissed 58 · the window holds the nine-row needs table, short cells read as a list, not prose */
/* Hallmark · dismissed F4 · one filled primary recipe; the count badge inside it and the pressed filter chip are states, not second primaries */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: imagery, the library has no shelter dog; the page is type-led and the list does the showing */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- chrome ---------- */
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

.nav-wrap { position: sticky; top: 0; z-index: var(--z-sticky-nav); padding: var(--space-md) var(--gutter) 0; pointer-events: none; }
.nav { pointer-events: auto; display: flex; align-items: center; gap: var(--space-lg); max-width: 920px; margin-inline: auto; min-height: 60px; padding: 0 var(--space-xs) 0 var(--space-lg); background: var(--color-paper-2); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); box-shadow: 4px 4px 0 var(--color-paper-3); }
.wordmark { font: 400 var(--text-lg)/1 var(--font-display); color: var(--color-ink); text-decoration: none; white-space: nowrap; }
.nav__links { display: flex; gap: var(--space-lg); margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav__links a, .nav__action { font-size: var(--text-sm); color: var(--color-ink-2); text-decoration: none; white-space: nowrap; transition: color var(--dur-short) var(--ease-out); }
.nav__links a:hover { color: var(--color-accent); }
.nav__action { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); color: var(--color-ink); }
.nav__action:hover { background: var(--color-paper); }
.nav__count { display: inline-grid; place-items: center; min-width: 1.6em; padding: 0 var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-size: var(--text-xs); line-height: 1.6; }
.nav__count.is-full { background: var(--color-accent); color: var(--color-accent-ink); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-xl); border: 0; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-accent-ink); font: 600 var(--text-md)/1 var(--font-outlier); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: color-mix(in oklab, var(--color-accent) 85%, var(--color-ink)); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn .num { display: inline-grid; place-items: center; min-width: 1.7em; padding: 0 var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-accent-ink); color: var(--color-accent); font-size: var(--text-sm); line-height: 1.7; }
.btn--secondary { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-ink); font: 600 var(--text-md)/1 var(--font-outlier); text-decoration: none; border-bottom: var(--rule-bar) solid var(--color-ink); white-space: nowrap; transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out); }
.btn--secondary:hover { color: var(--color-accent); border-color: var(--color-accent); }
.btn--secondary:active { transform: translateY(1px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-xl); }

/* ---------- hero: Corridor ---------- */
.hero { min-height: calc(100dvh - 76px); display: grid; align-items: center; padding-block: var(--space-2xl) var(--space-xl); background: linear-gradient(180deg, var(--color-paper) 30%, var(--color-paper-3) 78%, var(--color-gold-2)); border-bottom: var(--rule-bar) solid var(--color-ink); }
.hero__inner { display: grid; justify-items: center; gap: var(--space-lg); text-align: center; }
.hero h1 { max-width: 10ch; font-size: clamp(3rem, 8vw + 0.5rem, 8rem); line-height: 0.96; }
.hero .lead { max-width: 44ch; color: var(--color-ink-2); }
.hero .actions { margin-top: var(--space-md); }

/* ---------- the index ---------- */
.index { padding-block: var(--section-gap) var(--section-gap-s); }
.index__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: var(--gap-columns); padding-bottom: var(--space-xl); border-bottom: var(--rule-bar) solid var(--color-ink); }
.index__head .lead { color: var(--color-ink-2); justify-self: end; max-width: 34ch; }

.filter { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding-block: var(--space-lg); }
.js .filter[hidden] { display: flex !important; }
.filter button { min-height: 44px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-size: var(--text-sm); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.filter button:hover { background: var(--color-paper-2); }
.filter button:active { transform: translateY(1px); }
.filter button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.filter button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.filter button:disabled { opacity: 0.55; cursor: not-allowed; }

.needs { width: 100%; border-collapse: collapse; }
.needs thead th { padding: var(--space-sm) var(--space-md) var(--space-sm) 0; font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--color-muted); text-align: left; white-space: nowrap; border-bottom: var(--rule-hair) solid var(--color-rule); }
.needs tbody tr { transition: background-color var(--dur-short) var(--ease-out); }
.needs tbody tr:hover { background: var(--color-paper-2); }
.needs tbody th, .needs td { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); vertical-align: middle; text-align: left; }
.needs tbody th { width: 34%; font: 400 var(--text-title)/1.15 var(--font-display); color: var(--color-ink); }
.needs td { color: var(--color-ink-2); }
.needs td:last-child { width: 1%; padding-right: 0; text-align: right; }
.needs__lead th { font-size: var(--text-2xl) !important; }
.needs__lead th, .needs__lead td { padding-block: var(--space-lg); }
.needs tr.is-off { display: none; }
.needs tr.is-chosen th { color: var(--color-accent); }

.verdict { font: 600 var(--text-sm)/1.2 var(--font-outlier); white-space: nowrap; }
.verdict--yes { color: var(--color-ink); }
.verdict--ask { color: var(--color-muted); }
.verdict--no { color: var(--color-muted); text-decoration: line-through; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; }

.stepper { display: inline-flex; align-items: center; border: var(--rule-hair) solid var(--color-ink); border-radius: var(--radius-pill); background: var(--color-paper-2); }
.stepper button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font: 500 var(--text-lg)/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
.stepper button:hover { background: var(--color-paper-3); }
.stepper button:active { transform: scale(0.94); }
.stepper button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }
.stepper button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.stepper output { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; font-weight: 500; }

.well { background: var(--color-paper-2); border: var(--rule-bar) solid var(--color-ink); outline: var(--rule-hair) solid var(--color-gold); outline-offset: -7px; box-shadow: var(--shadow-card); }
.borsa { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--space-xl); margin-top: var(--space-2xl); padding: var(--space-xl); }
.borsa__list { margin-top: var(--space-sm); color: var(--color-ink-2); font-size: var(--text-lead); line-height: 1.45; max-width: 52ch; }
.borsa__act { display: grid; justify-items: end; gap: var(--space-xs); }
.borsa__help { min-height: 1lh; font-size: var(--text-sm); color: var(--color-muted); text-align: right; }
.noscript { margin-top: var(--space-md); color: var(--color-muted); }

/* ---------- steps ---------- */
.steps { padding-block: var(--section-gap-s) var(--section-gap-l); }
.steps h2 { max-width: 14ch; }
.steps__list { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); margin: var(--space-2xl) 0 0; padding: 0; list-style: none; }
.steps__list li { counter-increment: step; display: grid; align-content: start; gap: var(--space-sm); padding-top: var(--space-lg); border-top: var(--rule-bar) solid var(--color-ink); }
.steps__list li::before { content: counter(step); font: 400 clamp(4rem, 6vw, 6rem)/0.9 var(--font-display); color: var(--color-ink); }
.steps__list p { color: var(--color-ink-2); max-width: 32ch; }

/* ---------- the year, on the ink band ---------- */
.band--ink { background: var(--color-ink); color: var(--color-paper); }
.year { padding-block: var(--section-gap-s); }
.year h2 { color: var(--color-paper); }
.year__line { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-columns); margin: var(--space-2xl) 0 0; padding: 0; list-style: none; }
.year__line::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; border-top: var(--rule-hair) solid var(--color-gold); }
.year__line li { position: relative; display: grid; align-content: start; gap: var(--space-xs); padding-top: var(--space-xl); }
.year__line li::before { content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--color-ink); border: var(--rule-bar) solid var(--color-gold); }
.year__line small { font: 600 var(--text-xs)/1.3 var(--font-outlier); color: var(--color-gold-2); }
.year__line h3 { font-size: var(--text-2xl); color: var(--color-paper); }
.year__line p { color: color-mix(in oklab, var(--color-paper) 82%, var(--color-ink)); max-width: 28ch; }
.year__line li.is-now::before { background: var(--color-accent); border-color: var(--color-gold-2); }
.year__line li.is-now small::after { content: ", adesso"; color: var(--color-paper); }

/* ---------- three ways ---------- */
.modes { padding-block: var(--section-gap-l) var(--section-gap); }
.modes__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap-columns); align-items: start; }
.modes__grid h2 { max-width: 9ch; }
.modes__rows { margin: 0; border-top: var(--rule-bar) solid var(--color-ink); }
.modes__row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap-columns); padding-block: var(--space-xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.modes__row dt { font: 400 var(--text-title)/1.15 var(--font-display); }
.modes__row dd { display: grid; gap: var(--space-sm); justify-items: start; margin: 0; color: var(--color-ink-2); }
.modes__row a { color: var(--color-ink); font: 600 var(--text-md)/1.3 var(--font-outlier); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.3em; transition: color var(--dur-short) var(--ease-out); }
.modes__row a:hover { color: var(--color-accent); }

/* ---------- footer: a letter close ---------- */
.footer { padding-block: var(--space-3xl) var(--space-2xl); background: var(--color-paper-2); border-top: var(--rule-bar) solid var(--color-ink); }
.footer__inner { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gap-columns); align-items: end; }
.footer__letter { font: 400 var(--text-xl)/1.4 var(--font-display); color: var(--color-ink); max-width: 38ch; }
.footer__sign { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.3; text-align: right; }
.footer__sign time { font: 600 var(--text-sm)/1.3 var(--font-outlier); color: var(--color-muted); }
.footer__legal { grid-column: 1 / -1; padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.fill { padding: 0 0.25em; border: 1px dashed color-mix(in oklch, var(--color-muted) 70%, transparent); border-radius: 3px; color: var(--color-muted); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- small screens ---------- */
@media (max-width: 60rem) {
  .nav__links { display: none; }
  .nav__action { margin-left: auto; }
  .index__head, .borsa, .modes__grid, .modes__row, .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .index__head .lead { justify-self: start; }
  .borsa__act { justify-items: start; }
  .borsa__help, .footer__sign { text-align: left; }
  .steps__list { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .year__line { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-xl); }
  .year__line::before { display: none; }
  .modes__grid h2 { max-width: none; }
}
@media (max-width: 40rem) {
  .wordmark { font-size: var(--text-md); }
  .nav { padding-left: var(--space-md); gap: var(--space-sm); }
  .needs thead { display: none; }
  .needs, .needs tbody { display: block; }
  .needs tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-md); padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule); }
  .needs tbody tr.is-off { display: none; }
  .needs tbody th, .needs td { padding: 0; border: 0; width: auto; }
  .needs tbody th { grid-column: 1; }
  .needs td:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .needs td:nth-of-type(2) { grid-column: 1; grid-row: 3; padding-top: var(--space-2xs); }
  .needs td:last-child { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .needs__lead th { font-size: var(--text-xl) !important; }
  .year__line { grid-template-columns: minmax(0, 1fr); }
  .borsa { padding: var(--space-lg); }
}
