/* Wuse II shortlist
   One family (Archivo) doing display and body work through its width axis:
   expanded cuts for headings and prices, normal width for reading. */

:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.972 0.007 145);
  --ink: oklch(0.22 0.02 150);
  --ink-2: oklch(0.43 0.02 150);
  --line: oklch(0.9 0.012 145);
  --line-strong: oklch(0.8 0.016 145);

  --moss-950: oklch(0.22 0.04 150);
  --moss-900: oklch(0.29 0.055 147);
  --moss-800: oklch(0.35 0.065 145);
  --moss-700: oklch(0.43 0.08 143);
  --moss-seed: oklch(0.75 0.09 140);
  --moss-100: oklch(0.945 0.03 140);
  --on-moss: oklch(0.97 0.012 140);
  --on-moss-2: oklch(0.86 0.04 140);

  --flag: oklch(0.49 0.14 42);
  --flag-bg: oklch(0.967 0.026 60);
  --flag-line: oklch(0.87 0.06 55);

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wide: 116%;
  --wider: 125%;

  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --page: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --r-sm: 4px;
  --r: 8px;

  --z-sticky: 10;
  --z-picks: 20;
  --z-skip: 50;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body:has(dialog[open]) { overflow: hidden; }

img, video { display: block; max-width: 100%; }
button, select { font: inherit; color: inherit; }
a { color: var(--moss-700); text-underline-offset: 0.18em; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--moss-700); outline-offset: 3px; }
.hero :focus-visible,
.picks :focus-visible,
.viewer :focus-visible { outline-color: var(--moss-seed); }

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

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

.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  translate: 0 -200%;
  transition: translate 200ms var(--ease-out);
}
.skip:focus { translate: 0 0; }

/* ---------- Hero ---------- */

.hero {
  background: var(--moss-900);
  color: var(--on-moss);
  overflow: clip;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: end;
  padding-block: clamp(48px, 8vw, 112px) clamp(40px, 6vw, 80px);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: clamp(20px, 3vw, 32px);
  color: var(--on-moss-2);
  font-size: 0.9375rem;
}
.hero__meta .sep { color: var(--moss-seed); }

.hero h1 {
  margin: 0;
  font-stretch: var(--wider);
  font-weight: 800;
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero h1 span { display: block; color: var(--moss-seed); }

.hero__lede {
  max-width: 46ch;
  margin-top: clamp(24px, 3vw, 36px);
  color: var(--on-moss-2);
  font-size: clamp(1.0625rem, 1.35vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.hero__lede strong { color: var(--on-moss); font-weight: 600; }

.index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Three properties read better as one row of portrait tiles than a 2x2 grid with a gap. */
.index[data-tiles="1"] { grid-template-columns: minmax(0, 1fr); }
.index[data-tiles="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.index[data-tiles="3"] .tile { aspect-ratio: 3 / 4; }

.tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--moss-950);
  color: var(--on-moss);
  text-decoration: none;
  isolation: isolate;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-expo);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, oklch(0.17 0.03 150 / 0.9) 0%, oklch(0.17 0.03 150 / 0.25) 55%, oklch(0.17 0.03 150 / 0) 80%);
}
.tile .ref { position: absolute; top: 10px; left: 10px; z-index: 2; }
.tile__txt {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 8px;
}
.tile__name { font-size: 0.875rem; font-weight: 500; line-height: 1.3; }
.tile__price {
  font-stretch: var(--wide);
  font-weight: 700;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Words, not a figure: let "Asking price" wrap inside narrow tiles. */
.tile__price--tbc { font-size: 0.875rem; white-space: normal; }
@media (hover: hover) {
  .tile:hover img { transform: scale(1.05); }
}

.ref {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--moss-seed);
  color: var(--moss-950);
  font-stretch: var(--wide);
  font-weight: 750;
  font-size: 0.8125rem;
  line-height: 1;
}

/* ---------- Toolbar ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: oklch(1 0 0 / 0.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  .toolbar { background: oklch(1 0 0 / 0.85); backdrop-filter: blur(14px) saturate(1.3); }
}

.toolbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-block: 10px;
}

.seg {
  display: flex;
  gap: 2px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  scrollbar-width: none;
}
.seg button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 550;
  font-size: 0.9375rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--moss-900); color: var(--on-moss); }
.seg .count { margin-left: 6px; font-variant-numeric: tabular-nums; opacity: 0.72; }

.sort {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.sort select {
  appearance: none;
  min-height: 40px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23384a3f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center / 12px;
  color: var(--ink);
  font-size: 0.9375rem;
  cursor: pointer;
}
.sort select:hover { border-color: var(--ink-2); }

/* ---------- Side-by-side table ---------- */

.glance { padding-block: clamp(40px, 6vw, 72px) clamp(8px, 2vw, 16px); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 24px;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 0;
  font-stretch: var(--wide);
  font-weight: 750;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.015em;
}
.section-head p { color: var(--ink-2); font-size: 0.9375rem; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.table-wrap:focus-visible { outline-offset: 2px; }

table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
thead th {
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 160ms var(--ease-out); }
tbody tr:hover { background: var(--surface); }
.num { text-align: right; }

.t-prop { display: flex; align-items: flex-start; gap: 12px; }
.t-prop a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.t-prop a:hover { color: var(--moss-700); text-decoration: underline; }
.t-strong { font-weight: 650; }
.t-sub { display: block; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.4; }
.t-flag { display: block; color: var(--flag); font-size: 0.8125rem; font-weight: 550; }
td.empty { padding: 28px 16px; color: var(--ink-2); text-align: center; }

/* ---------- Property sheets ---------- */

.listings { padding-bottom: clamp(16px, 3vw, 40px); }
.listings:focus { outline: none; }

.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 4.5vw, 64px);
  align-items: start;
  padding-block: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 72px;
}
.sheet:first-child { border-top: 0; }
.sheet:nth-child(even) .sheet__media { order: 2; }

.sheet__media { position: sticky; top: 84px; min-width: 0; }

.lead {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--moss-950);
  cursor: zoom-in;
  isolation: isolate;
}
.lead__bg {
  position: absolute;
  top: -24px;
  left: -24px;
  width: calc(100% + 48px);
  max-width: none;
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(22px) saturate(1.1) brightness(0.7);
}
.lead__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease-expo);
}
.lead__img.is-contain { object-fit: contain; }
@media (hover: hover) {
  .lead:hover .lead__img { transform: scale(1.025); }
}
.lead__badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: oklch(0.17 0.02 150 / 0.74);
  color: oklch(0.98 0 0);
  font-size: 0.8125rem;
  font-weight: 550;
}

.thumbs {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}
.thumb {
  position: relative;
  display: block;
  flex: none;
  width: 88px;
  height: 66px;
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 200ms var(--ease-out); }
.thumb:hover img { opacity: 0.82; }
.thumb__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: oklch(0.15 0.02 150 / 0.38);
  color: oklch(0.99 0 0);
}
.thumb__dur {
  position: absolute;
  right: 4px;
  bottom: 3px;
  padding: 0 4px;
  border-radius: 3px;
  background: oklch(0.15 0.02 150 / 0.7);
  color: oklch(0.99 0 0);
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.media-note { margin-top: 10px; color: var(--ink-2); font-size: 0.8125rem; }

.sheet__body { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 550;
}
.tag--sale { background: var(--moss-100); border-color: var(--moss-100); color: var(--moss-800); }
.tag--lease { border-color: var(--ink); color: var(--ink); }

.sheet h2 {
  margin: 0;
  font-stretch: var(--wide);
  font-weight: 750;
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.addr { margin-top: 10px; color: var(--ink-2); }
.addr strong { color: var(--ink); font-weight: 550; }

.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding-block: 18px;
  border-block: 1px solid var(--line);
}
.price__fig {
  font-stretch: var(--wider);
  font-weight: 800;
  font-size: clamp(2.25rem, 3.6vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.price__fig--tbc { font-size: clamp(1.75rem, 2.8vw, 2.25rem); color: var(--ink-2); }
.price__unit { font-weight: 650; font-size: 1.0625rem; }
.price__q { flex-basis: 100%; color: var(--ink-2); font-size: 0.9375rem; }

.flag {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--flag-line);
  border-radius: var(--r);
  background: var(--flag-bg);
  color: var(--flag);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.flag svg { flex: none; margin-top: 2px; }
.flag strong { font-weight: 650; }

.summary { max-width: 60ch; font-size: 1.0625rem; text-wrap: pretty; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
}
.facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facts dt { color: var(--ink-2); font-size: 0.8125rem; }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts dd small { display: block; color: var(--ink-2); font-size: 0.8125rem; font-weight: 400; }

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 28px;
}
.notes h3 { margin: 0 0 10px; font-size: 0.9375rem; font-weight: 650; }
.notes ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.notes li { position: relative; padding-left: 22px; }
.pros li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 14px;
  height: 14px;
  background: var(--moss-700);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.4em;
  width: 10px;
  height: 10px;
  border: 2px solid var(--flag);
  border-radius: 50%;
}

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:hover { border-color: var(--ink-2); background: var(--surface); }
.btn:active { transform: scale(0.98); }
.btn svg { flex: none; }
.btn--pick[aria-pressed="true"] { background: var(--moss-900); border-color: var(--moss-900); color: var(--on-moss); }
.btn--pick[aria-pressed="true"]:hover { background: var(--moss-800); border-color: var(--moss-800); }

.map {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
}
.map iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; }

.empty-state {
  padding: clamp(40px, 7vw, 80px) 0;
  color: var(--ink-2);
  font-size: 1.0625rem;
  text-align: center;
}
.empty-state strong { color: var(--ink); }

/* ---------- Footer ---------- */

.foot {
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.875rem;
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 40px;
}
.foot p { max-width: 70ch; }
.foot__side { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--moss-700);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.noscript { padding-block: 40px; }

/* ---------- Picks bar ---------- */

.picks {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-picks);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  width: min(760px, calc(100% - 24px));
  padding: 10px 10px 10px 18px;
  border-radius: 12px;
  background: var(--moss-950);
  color: var(--on-moss);
  box-shadow: 0 18px 40px -12px oklch(0.2 0.04 150 / 0.5), 0 2px 6px oklch(0.2 0.04 150 / 0.2);
  translate: -50% 0;
}
.picks p { font-size: 0.9375rem; }
.picks__list { color: var(--on-moss-2); }
.picks__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn--wa { background: var(--moss-seed); border-color: var(--moss-seed); color: var(--moss-950); }
.btn--wa:hover { background: oklch(0.81 0.09 140); border-color: oklch(0.81 0.09 140); }
.btn--on-dark { background: transparent; border-color: oklch(1 0 0 / 0.26); color: var(--on-moss); }
.btn--on-dark:hover { background: oklch(1 0 0 / 0.08); border-color: oklch(1 0 0 / 0.5); }
.btn--text { background: transparent; border-color: transparent; color: var(--on-moss-2); }
.btn--text:hover { background: oklch(1 0 0 / 0.08); border-color: transparent; color: var(--on-moss); }
body.has-picks { padding-bottom: 96px; }

/* ---------- Viewer ---------- */

.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: oklch(0.14 0.012 150);
  color: var(--on-moss);
}
.viewer::backdrop { background: oklch(0.1 0 0 / 0.6); }
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }

.viewer__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px 20px;
}
.viewer__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewer__count { color: var(--on-moss-2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.1);
  color: inherit;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out);
}
.icon-btn:hover { background: oklch(1 0 0 / 0.2); }

.viewer__stage {
  position: relative;
  min-height: 0;
}
/* Absolutely filled so the media's percentage max-height has a definite box to resolve against. */
.viewer__media {
  position: absolute;
  inset: 0 clamp(8px, 7vw, 88px);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.viewer__media img,
.viewer__media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-sm);
}
.viewer__nav { position: absolute; top: 50%; translate: 0 -50%; }
.viewer__nav--prev { left: 12px; }
.viewer__nav--next { right: 12px; }
.viewer__cap {
  padding: 12px 20px max(18px, env(safe-area-inset-bottom));
  color: var(--on-moss-2);
  font-size: 0.9375rem;
  text-align: center;
  text-wrap: balance;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { animation: rise 1000ms var(--ease-expo) both; }
  .hero__text > :nth-child(2) { animation-delay: 70ms; }
  .hero__text > :nth-child(3) { animation-delay: 140ms; }
  .index li { animation: rise 1000ms var(--ease-expo) both; animation-delay: calc(180ms + var(--i, 0) * 70ms); }

  .picks:not([hidden]) { animation: picks-in 480ms var(--ease-expo); }
  .viewer[open] { animation: fade-in 280ms var(--ease-out); }
  .viewer__media > * { animation: media-in 420ms var(--ease-expo); }

  ::view-transition-group(*) { animation-duration: 440ms; animation-timing-function: var(--ease-expo); }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .lead__img {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
  }
}

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

@keyframes rise { from { opacity: 0; translate: 0 18px; filter: blur(4px); } }
@keyframes settle { from { scale: 1.1; } to { scale: 1; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes media-in { from { opacity: 0; scale: 0.985; } }
@keyframes picks-in { from { opacity: 0; translate: -50% 24px; } }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .sheet { grid-template-columns: minmax(0, 1fr); }
  .sheet:nth-child(even) .sheet__media { order: 0; }
  .sheet__media { position: static; }
}

@media (max-width: 600px) {
  .toolbar__inner { gap: 8px; }
  .seg { width: 100%; }
  .seg button { flex: 1 0 auto; padding: 0 10px; }
  .sort { width: 100%; justify-content: space-between; }
  .sort select { flex: 1; }
  .tile__name { font-size: 0.8125rem; }
  .tile__price { font-size: 0.9375rem; }
  .actions .btn { flex: 1 1 auto; }
  .picks { padding: 12px; }
  .picks__actions { width: 100%; }
  .picks__actions .btn { flex: 1 1 auto; padding: 0 12px; }
  body.has-picks { padding-bottom: 150px; }
  .viewer__nav { top: auto; bottom: 8px; translate: none; }
  .viewer__media { inset: 0 8px 64px; }
  .toolbar { position: static; }
  .sheet { scroll-margin-top: 16px; }
}

/* ---------- Print ---------- */

@media print {
  .toolbar, .picks, .actions, .thumbs, .skip, .viewer, .map, .foot__side, .hero__index { display: none !important; }
  body { padding: 0 !important; }
  .hero { background: none; color: var(--ink); }
  .hero h1 span, .hero__lede, .hero__lede strong, .hero__meta { color: var(--ink); }
  .hero__inner { padding-block: 0 16px; grid-template-columns: 1fr; }
  .sheet { break-inside: avoid; grid-template-columns: 1fr 1fr; padding-block: 24px; }
  .sheet__media { position: static; order: 0 !important; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
}
