/* Trevi design system, layer 2b: components shared by the catalogue pages, the Italy hub
 * and any later page built on the same system. Same .ts- prefix and .ts.ts scope as
 * trevi-components.css; loads after it and before the page's own layer
 * (trevi-catalogue.css, italy-hub.css). A page layer places these components and may set
 * their custom properties (--ts-gutter, --ts-rail-w, --ts-rail-gap, --ts-rail-track,
 * --ts-rail-fill, --ts-sheet-top: the height of the page's fixed header, which the
 * light sheet stays below and the enquiry form's jump clears, and --ts-tile-ratio and
 * --ts-tile-shade for the photo tile). A layout that only one page has (the catalogue's wide lead card and list rows) stays in that page's layer,
 * which may re-size the parts for it; colours, borders, faces and motion stay as here, so
 * every page shows the same card, sheet, rail and enquiry band.
 * Phones are max-width: 700px, larger screens min-width: 701px. Most visitors come from a
 * phone: each component is drawn for a thumb first.
 * Production: houzez-child/assets/css/trevi-shared.css, one enqueue on both page
 * families, after trevi-components.css. Version 1.3, 4 November 2026: the photo tile and its place variant. */

/* ------------------------------------------------ the page gutter */
/* On a phone the side margin is 16px (the system's .ts-wrap keeps 32px, 24px under 900px);
 * rails that run to the screen edge bleed by it. */
@media (max-width: 700px) {
  .ts.ts { --ts-gutter: var(--space-4); }
  .ts.ts .ts-wrap { padding-left: var(--ts-gutter); padding-right: var(--ts-gutter); }
}

/* ------------------------------------------------ links, focus, hidden text */
/* Components that draw their own underline, or are whole blocks, opt out of the tokens' gold border. */
.ts.ts :where(.ts-crumbs a, .ts-card a) { border-bottom: 0; }

/* Visually hidden, still read aloud. The shell has .trevi-sr-only for its own
 * markup; page content inside .ts gets the same rule under the design system. */
.ts.ts .ts-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* One focus ring for every control inside new-style pages: navy on light grounds,
 * light gold on dark ones (gold on ivory is only 2.1:1). */
.ts.ts :where(a, button, select, input, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--navy-800); outline-offset: 3px; }
.ts.ts :where([data-surface="dark"]) :where(a, button, select, input, textarea, summary, [tabindex]):focus-visible { outline-color: var(--gold-light); }

/* ------------------------------------------------ breadcrumbs */
/* On a dark masthead: small capitals, a gold hairline between steps, the current page in
 * light gold. <nav class="ts-crumbs" aria-label><ol><li><a>…</a></li>…<li><span aria-current="page">
 * On a phone the first step drops when there are three or more: the site header's logo
 * already leads there. */
.ts.ts .ts-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ts.ts .ts-crumbs li { display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--champagne-400); }
.ts.ts .ts-crumbs li + li::before { content: ""; width: 18px; height: 1px; background: var(--gold); opacity: .7; }
.ts.ts .ts-crumbs a { padding-block: 3px; color: var(--champagne-300); transition: color var(--dur-1) var(--ease-out); }
.ts.ts .ts-crumbs a:hover { color: var(--gold-light); }
.ts.ts .ts-crumbs [aria-current] { color: var(--gold-light); }
@media (max-width: 700px) {
  .ts.ts .ts-crumbs li:first-child:nth-last-child(n+3) { display: none; }
  .ts.ts .ts-crumbs li:first-child:nth-last-child(n+3) + li::before { display: none; }
  .ts.ts .ts-crumbs li { letter-spacing: .14em; }
}

/* ------------------------------------------------ rails: rows to swipe */
/* Groups that are browsed rather than read become one row to swipe on a phone. It bleeds
 * to the screen edge, so the next item peeks in and shows there is more. Above 700px the
 * element keeps the page's own layout, which the page layer sets under min-width: 701px
 * only. The bleed equals --ts-gutter: put a rail straight inside a .ts-wrap, or set
 * --ts-gutter on its parent to that parent's side padding.
 * Per rail: --ts-rail-w, an item's width (default 78%; auto sizes it to its content, for
 * chips and tickets, not cards, whose body is a container with no width of its own),
 * and --ts-rail-gap (default 12px); the hairline's --ts-rail-track and --ts-rail-fill (the
 * border colour and gold; light gold on a dark ground). The items are the rail's <li> children. */
@media (max-width: 700px) {
  .ts.ts .ts-rail--phone {
    display: flex; gap: var(--ts-rail-gap, var(--space-3)); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--ts-gutter)); padding: var(--space-2) var(--ts-gutter) var(--space-3); scroll-padding-inline: var(--ts-gutter);
    scrollbar-width: none;
  }
  .ts.ts .ts-rail--phone::-webkit-scrollbar { display: none; }
  .ts.ts .ts-rail--phone > li { flex: 0 0 var(--ts-rail-w, 78%); scroll-snap-align: start; }
}
/* How far a rail has been swiped: a gold hairline over a faint track, under the row.
 * Opt in by wrapping the rail: <div class="ts-rail-wrap"><ul class="ts-rail--phone">. Scroll-linked
 * and CSS only; where scroll-driven animations are missing the rail has no hairline, and a
 * row that does not overflow shows the track alone. On a dark ground, set data-surface="dark" on
 * an ancestor. */
@keyframes ts-rail-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 700px) { @supports (timeline-scope: none) {
  .ts.ts .ts-rail-wrap { position: relative; timeline-scope: --ts-rail; }
  .ts.ts .ts-rail-wrap > .ts-rail--phone { scroll-timeline: --ts-rail x; }
  .ts.ts .ts-rail-wrap::before, .ts.ts .ts-rail-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; pointer-events: none; }
  .ts.ts .ts-rail-wrap::before { background: var(--ts-rail-track, var(--border)); }
  .ts.ts .ts-rail-wrap::after { background: var(--ts-rail-fill, var(--gold)); transform: scaleX(0); transform-origin: left; animation: ts-rail-progress linear both; animation-timeline: --ts-rail; }
  .ts.ts :where([data-surface="dark"]) .ts-rail-wrap { --ts-rail-track: var(--border-on-dark); --ts-rail-fill: var(--gold-light); }
} }

/* ------------------------------------------------ property card */
/* One property: photo, place, title, facts, price and two quiet actions. The page lays the
 * cards out (a grid, a lead card, a list, a rail); the card draws itself the same everywhere.
 * <article class="ts-card" aria-labelledby>
 *   <a class="ts-card__link" href>
 *     <div class="ts-card__photo"><picture>…</picture><ul class="ts-card__tags"><li>…</ul></div>
 *       (no photo: <div class="ts-card__photo ts-card__photo--none"><svg>…</svg></div>)
 *     <div class="ts-card__body"><p class="ts-card__place">…</p><h3 class="ts-card__title" id>…</h3>
 *       <ul class="ts-facts"><li data-fact="beds|rooms|stars|sqm|use"><svg/><span><b>6</b> bedrooms</span></li>…</ul></div></a>
 *   <div class="ts-card__foot"><p class="ts-price">…</p> (on request: class="ts-price ts-price--ask")
 *     <div class="ts-card__acts"><a class="ts-icon" aria-label>WhatsApp svg</a><button class="ts-icon" type="button" aria-label>mail svg</button></div></div>
 * </article> */
.ts.ts .ts-card { position: relative; display: flex; flex-direction: column; height: 100%; }
.ts.ts .ts-card__link { display: block; color: inherit; text-decoration: none; }
.ts.ts .ts-card__link:focus-visible { outline-offset: 6px; }
.ts.ts .ts-card__photo {
  position: relative; overflow: hidden; overflow: clip; aspect-ratio: 4 / 3; margin: 0 0 var(--space-4);
  background: var(--navy-800); box-shadow: var(--shadow-1); transition: box-shadow var(--dur-2) var(--ease-out), filter 160ms var(--ease-out);
}
/* Photos move: a slow drift as the card crosses the screen (scroll-linked, so phones get
 * it too), and a deeper push on hover. The drift needs the 10% of headroom the resting
 * scale gives it. Compositor-only properties; off on reduced motion. The box clips with
 * overflow: clip, not hidden: hidden makes it a scroll container, and the photo's view()
 * timeline would then measure against the box itself and never move. */
.ts.ts .ts-card__photo img { width: 100%; height: 100%; object-fit: cover; scale: 1.1; transition: scale 1400ms var(--ease-out), filter 600ms var(--ease-out); }
@keyframes ts-parallax { from { translate: 0 -4%; } to { translate: 0 4%; } }
@supports (animation-timeline: view()) {
  .ts.ts .ts-card__photo img { animation: ts-parallax linear both; animation-timeline: view(); animation-range: cover; }
}
.ts.ts .ts-card__photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-3) var(--ease-out);
}
.ts.ts .ts-card__link:hover .ts-card__photo { box-shadow: var(--shadow-3); }
.ts.ts .ts-card__link:hover .ts-card__photo img { scale: 1.18; filter: saturate(1.08) brightness(1.03); }
.ts.ts .ts-card__link:hover .ts-card__photo::after { transform: scaleX(1); }
/* No photograph: the place on a small halftone Italy instead of a grey box. */
.ts.ts .ts-card__photo--none { display: grid; place-items: center; background: radial-gradient(90% 90% at 70% 20%, var(--navy-700), var(--navy-900)); }
.ts.ts .ts-card__photo--none svg { width: 34%; height: auto; }
.ts.ts .ts-card__tags { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ts.ts .ts-card__tags li {
  padding: 6px 10px; background: rgba(251, 248, 241, .94); color: var(--navy-900);
  font-family: var(--font-sans); font-weight: 500; font-size: 12px; line-height: 1.1; letter-spacing: .01em;
}
.ts.ts .ts-card__place {
  font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-eyebrow); letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--champagne-600);
}
.ts.ts .ts-card__title {
  margin: var(--space-3) 0 0; font-family: var(--font-serif); font-weight: 500; font-size: 23px; line-height: 1.2;
  color: var(--navy-800); text-transform: none; letter-spacing: 0; text-wrap: balance; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--dur-2) var(--ease-out);
}
.ts.ts .ts-card__link:hover .ts-card__title { color: var(--gold-deep); }
/* Facts: one quiet line, a thin gold icon, the number, its unit. No dividers, no stacked labels.
 * The body is a container, so in a narrow card the facts tighten first; they wrap only when
 * even the tightest setting cannot hold them (a rail card on a 320px phone with three long facts). */
.ts.ts .ts-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: var(--space-4) 0 0; }
.ts.ts .ts-facts li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-family: var(--font-sans); font-size: 13px; line-height: 1.2; color: var(--fg-3); }
.ts.ts .ts-facts svg { flex: none; width: 17px; height: 17px; color: var(--gold-deep); }
.ts.ts .ts-facts b { margin-right: 1px; font-family: var(--font-serif); font-weight: 600; font-size: 19px; color: var(--navy-800); font-variant-numeric: lining-nums; }
.ts.ts .ts-facts [data-fact="use"] { min-width: 0; }
.ts.ts .ts-facts [data-fact="use"] span { overflow: hidden; text-overflow: ellipsis; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 18px; color: var(--navy-800); }
.ts.ts .ts-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
  margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--border);
}
.ts.ts .ts-card__body { container-type: inline-size; padding-bottom: var(--space-5); }
.ts.ts .ts-price { margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 25px; line-height: 1; color: var(--navy-900); font-variant-numeric: lining-nums; letter-spacing: .005em; }
.ts.ts .ts-price--ask { font-weight: 500; font-style: italic; font-size: 19px; color: var(--gold-ink); }
.ts.ts .ts-card__acts { display: flex; gap: var(--space-2); }
.ts.ts .ts-icon {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; cursor: pointer;
  border: 1px solid var(--border-strong); background: transparent; color: var(--accent-deep);
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), transform 160ms var(--ease-out);
}
.ts.ts .ts-icon svg { width: 17px; height: 17px; }
.ts.ts .ts-icon:hover, .ts.ts .ts-icon:focus-visible { background: var(--navy-800); border-color: var(--navy-800); color: var(--champagne-100); }
/* a fingertip needs 44px: on touch screens the buttons grow and keep their 8px gap */
@media (pointer: coarse) {
  .ts.ts .ts-icon { width: 44px; height: 44px; }
  .ts.ts .ts-icon svg { width: 19px; height: 19px; }
}
/* Facts keep one line in a narrow card: the type and spacing tighten with the card's width, the words stay. */
@container (max-width: 400px) {
  .ts.ts .ts-facts { gap: 6px 16px; }
  .ts.ts .ts-facts li { gap: 6px; }
  .ts.ts .ts-facts b { font-size: 18px; }
  .ts.ts .ts-facts [data-fact="use"] span { font-size: 17px; }
}
@container (max-width: 350px) {
  .ts.ts .ts-facts { gap: 6px 12px; }
  .ts.ts .ts-facts li { gap: 5px; font-size: 12px; }
  .ts.ts .ts-facts svg { width: 15px; height: 15px; }
  .ts.ts .ts-facts b { font-size: 17px; }
}
@container (max-width: 310px) {
  .ts.ts .ts-facts { gap: 6px 10px; }
  .ts.ts .ts-facts li { gap: 4px; font-size: 11.5px; }
  .ts.ts .ts-facts svg { width: 14px; height: 14px; }
  .ts.ts .ts-facts b { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ts.ts .ts-card__photo img { animation: none; scale: 1; }
  .ts.ts .ts-card__photo img, .ts.ts .ts-card__photo::after { transition: none; }
  .ts.ts .ts-card__link:hover .ts-card__photo img { scale: 1; filter: none; }
}

/* ------------------------------------------------ photo tile */
/* A choice card led by its photograph: places, districts, collections and "where to begin",
 * never a listing (that is .ts-card). The photograph fills the tile and the text sits on a
 * navy gradient at its foot, deepest under the text and never fully opaque (Gabriele's
 * phone review, 4 November). The title's link covers the tile; links in the body sit above it.
 * <article class="ts-tile"> (or <a class="ts-tile"> when the whole tile is one link, with no
 *   .ts-tile__link inside) <span class="ts-tile__photo"><picture>…</picture></span>
 *   (.ts-tile__photo--none: no photograph yet) <div class="ts-tile__body">
 *   <p class="ts-tile__kicker">? <h3 class="ts-tile__title"><a class="ts-tile__link">…</a></h3>
 *   <p class="ts-tile__line">? <ul class="ts-tile__links"><li><a>…</a></li>…</ul>?
 *   <p class="ts-tile__foot"><a class="ts-tile__cta">…</a></p>? </div></article>
 * A page may set --ts-tile-ratio (default 4 / 5) and --ts-tile-shade (the gradient). Contrast
 * is measured, not judged: the hub's scripts/tile-contrast.mjs reads each tile's real photograph
 * and gradient and wants 4.5:1. Proposed by the Italy hub, in this layer from v1.2. */
.ts.ts { --ts-tile-shade: linear-gradient(0deg, rgba(14, 17, 48, .9) 0%, rgba(14, 17, 48, .82) 28%, rgba(14, 17, 48, .52) 52%, rgba(14, 17, 48, .12) 76%, rgba(14, 17, 48, 0) 92%); }
.ts.ts .ts-tile {
  position: relative; isolation: isolate; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  box-sizing: border-box; aspect-ratio: var(--ts-tile-ratio, 4 / 5); height: 100%; overflow: hidden;
  background: var(--navy-800); color: var(--champagne-100); text-decoration: none;
}
.ts.ts .ts-tile > * { grid-area: 1 / 1; min-width: 0; }
.ts.ts .ts-tile__photo { position: relative; z-index: -1; display: block; overflow: hidden; }
.ts.ts .ts-tile__photo picture, .ts.ts .ts-tile__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ts.ts .ts-tile__photo img { transition: transform 1200ms var(--ease-out); }
.ts.ts .ts-tile:hover .ts-tile__photo img { transform: scale(1.04); }
.ts.ts .ts-tile__photo::after { content: ""; position: absolute; inset: 0; background: var(--ts-tile-shade); }
/* no photograph yet: navy with a soft light, and a hairline so the tile reads on a navy ground */
.ts.ts .ts-tile__photo--none { background: radial-gradient(120% 90% at 80% 0%, var(--navy-700), var(--navy-900)); box-shadow: inset 0 0 0 1px var(--border-on-dark); }
.ts.ts .ts-tile__photo--none::after { content: none; }
.ts.ts .ts-tile__body { align-self: end; display: grid; justify-items: start; gap: 6px; padding: 22px 22px 20px; text-shadow: 0 1px 14px rgba(8, 10, 30, .45); }
.ts.ts .ts-tile__kicker { margin: 0; font: 500 12px/1.4 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); }
.ts.ts .ts-tile__title { margin: 0; font: 500 20px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--champagne-100); }
.ts.ts .ts-tile__link { color: inherit; border: 0; text-decoration: none; }
.ts.ts .ts-tile__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ts.ts .ts-tile:has(.ts-tile__link:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.ts.ts .ts-tile__line { margin: 0; font: 400 17px/1.4 var(--font-serif); color: var(--champagne-200); }
.ts.ts .ts-tile__links { position: relative; z-index: 2; display: flex; flex-wrap: wrap; margin: 2px 0 0; padding: 0; list-style: none; font: 400 14px/1.4 var(--font-sans); }
.ts.ts .ts-tile__links li:not(:last-child)::after { content: "\00b7"; margin: 0 8px; color: var(--gold); }
/* 24px targets at least: the padding grows the tap area, not the type */
.ts.ts .ts-tile__links a, .ts.ts .ts-tile__foot a { display: inline-block; padding-block: 6px; color: var(--champagne-100); border-bottom: 1px solid var(--link-on-dark-rule); text-decoration: none; }
.ts.ts .ts-tile__links a:hover, .ts.ts .ts-tile__links a:focus-visible, .ts.ts .ts-tile__foot a:hover, .ts.ts .ts-tile__foot a:focus-visible { color: var(--gold-light); border-bottom-color: var(--gold-light); }
.ts.ts .ts-tile__foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; margin: 4px 0 0; }
.ts.ts .ts-tile__cta { font: 500 12px/1.3 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); }
/* .ts-tile--place: a place or district, named rather than headed: the title in the serif and in
 * sentence case, its line in italic, its links in small capitals. The Italy hub's Rome districts
 * (Gabriele has seen them, 4 November); a page may still re-size the title. In this layer from v1.3. */
.ts.ts .ts-tile--place .ts-tile__title { font: 500 24px/1.15 var(--font-serif); letter-spacing: 0; text-transform: none; }
.ts.ts .ts-tile--place .ts-tile__line { font-style: italic; font-size: 16px; }
.ts.ts .ts-tile--place .ts-tile__links { font: 500 11.5px/1.4 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; }
@media (prefers-reduced-motion: reduce) { .ts.ts .ts-tile:hover .ts-tile__photo img { transform: none; transition: none; } }

/* ------------------------------------------------ bottom sheet */
/* A dialog that rises from the bottom of the screen (opened with showModal()). Navy by
 * default, the ground of the filter sheet. .ts-sheet--light is white, for a card of
 * content such as a district; it keeps --ts-sheet-top (the page's fixed header height)
 * clear above it and stands 560px wide, centred, on larger screens. The dialog sits inside
 * the page's .ts wrapper (showModal() keeps it there).
 * <dialog class="ts-sheet" aria-labelledby><div class="ts-sheet__head"><h2 id>…</h2>
 * <button class="ts-sheet__close" aria-label>×</button></div><div class="ts-sheet__body">…</div>
 * <div class="ts-sheet__foot">…<button class="ts-sheet__apply">…</button></div></dialog> */
/* the page behind an open sheet does not scroll */
html:has(.ts.ts .ts-sheet[open]) { overflow: hidden; }
.ts.ts .ts-sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 86vh; max-height: 86dvh; margin: 0; padding: 0; border: 0; flex-direction: column; overscroll-behavior: contain;
  background: radial-gradient(130% 70% at 85% 0%, var(--navy-700), var(--navy-900)); color: var(--champagne-100);
  box-shadow: inset 0 1px 0 var(--gold), 0 -20px 60px rgba(14, 17, 48, .25);
  transition: transform 320ms var(--ease-out), overlay 320ms allow-discrete, display 320ms allow-discrete;
}
.ts.ts .ts-sheet::backdrop { background: rgba(14, 17, 48, .55); }
/* the column direction stays while it closes: the display transition keeps it visible 320ms */
.ts.ts .ts-sheet[open] { display: flex; }
/* closing, it slides back down before it leaves the top layer */
.ts.ts .ts-sheet:not([open]) { transform: translateY(100%); }
/* navy ground: the light gold ring, whatever the markup around it says */
.ts.ts .ts-sheet:not(.ts-sheet--light) :focus-visible { outline-color: var(--gold-light); }
@starting-style { .ts.ts .ts-sheet[open] { transform: translateY(100%); } }
.ts.ts .ts-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-on-dark); }
.ts.ts .ts-sheet__head h2 { margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 28px; color: var(--champagne-100); }
.ts.ts .ts-sheet__close { width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--champagne-200); cursor: pointer; }
.ts.ts .ts-sheet__body { overflow: auto; overscroll-behavior: contain; padding: 4px 20px 20px; }
.ts.ts .ts-sheet__foot { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border-on-dark); background: var(--navy-900); }
.ts.ts .ts-sheet__apply { flex: 1; height: 50px; border: 0; background: var(--gold); color: var(--navy-900); cursor: pointer; font-family: var(--font-sans); font-weight: 500; font-size: 15px; letter-spacing: .01em; }
/* light: a 2px gold rule on white, a quick rise on opening and none on closing */
.ts.ts .ts-sheet--light {
  max-height: calc(100dvh - var(--ts-sheet-top, 0px) - 16px); padding-bottom: env(safe-area-inset-bottom);
  background: var(--white); color: var(--navy-800);
  box-shadow: inset 0 2px 0 var(--gold), 0 -20px 60px rgba(14, 17, 48, .18);
  transition: transform 180ms var(--ease-out), opacity 180ms var(--ease-out);
}
.ts.ts .ts-sheet--light:has(.ts-sheet__foot) { padding-bottom: 0; }
.ts.ts .ts-sheet--light::backdrop { background: rgba(14, 17, 48, .32); }
@starting-style { .ts.ts .ts-sheet--light[open] { transform: translateY(12px); opacity: .85; } }
@media (min-width: 701px) { .ts.ts .ts-sheet--light { width: min(560px, 100%); margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) { .ts.ts .ts-sheet { transition: none; } }
.ts.ts .ts-sheet--light .ts-sheet__head { border-bottom-color: var(--border); }
.ts.ts .ts-sheet--light .ts-sheet__head h2 { color: var(--navy-800); }
.ts.ts .ts-sheet--light .ts-sheet__close { color: var(--navy-800); }
.ts.ts .ts-sheet--light .ts-sheet__foot { border-top-color: var(--border); background: var(--paper); }

/* ------------------------------------------------ enquiry band */
/* navy-800, the site footer's own ground, so the band and the footer meet without a seam.
 * <section class="ts-enquiry" id data-surface="dark"><div class="ts-wrap ts-enquiry__grid">
 * <div>eyebrow, h2.ts-h2, p.ts-enquiry__lede, ul.ts-enquiry__channels</div><form class="ts-form">…</form></div></section>
 * A channel: <li><a href><span>WhatsApp</span><span>+39 …</span></a></li>. Form fields: <div><label>Name<input></label></div>,
 * a full-width one <div class="ts-f--wide">, the budget <fieldset class="ts-budget"><legend><div><label><input type="radio">…,
 * consent <label class="ts-check"><input type="checkbox"><span>…</span></label>, then <div class="ts-form__foot"><p>…<button class="ts-submit">.
 * The form's fields and where it posts are each page's contract (a listing enquiry posts
 * the Houzez listing form); the look is this one. The band is positioned and clipped so a
 * page can lay a decorative mark on it (the catalogue's ::before). */
.ts.ts .ts-enquiry { position: relative; isolation: isolate; overflow: clip; padding: var(--space-10) 0 var(--space-9); background: var(--navy-800); color: var(--fg-on-dark); border-bottom: 1px solid var(--border-on-dark); }
.ts.ts .ts-enquiry__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-9); align-items: start; }
.ts.ts .ts-enquiry .ts-h2 { color: var(--champagne-100); margin-top: var(--space-4); font-size: clamp(32px, 3.2vw, 48px); max-width: 16ch; }
.ts.ts .ts-enquiry__lede { margin-top: var(--space-5); color: var(--champagne-300); font-size: var(--fs-body-lg); line-height: 1.6; max-width: 44ch; }
.ts.ts .ts-enquiry__channels { display: grid; gap: 0; margin-top: var(--space-7); border-top: 1px solid var(--border-on-dark); max-width: 420px; }
.ts.ts .ts-enquiry__channels a { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: 14px 0; border-bottom: 1px solid var(--border-on-dark); color: var(--champagne-100); font-family: var(--font-serif); font-size: 21px; transition: color var(--dur-1) var(--ease-out), padding var(--dur-2) var(--ease-out); }
.ts.ts .ts-enquiry__channels a span:first-child { font-family: var(--font-sans); font-size: 13px; letter-spacing: .01em; color: var(--champagne-400); }
.ts.ts .ts-enquiry__channels a:hover { color: var(--gold-light); padding-left: 6px; }
/* the eyebrow in sentence case, light gold on navy */
.ts.ts .ts-enquiry .ts-eyebrow { font-size: 14px; letter-spacing: .01em; text-transform: none; color: var(--gold-light); }
/* the panel sits a shade darker than the band (navy-900 over navy-800); scroll-margin keeps the
   envelope's jump clear of the site header */
.ts.ts .ts-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-6); padding: var(--space-7); border: 1px solid var(--border-on-dark); background: rgba(14, 17, 48, .55); scroll-margin-top: calc(var(--ts-sheet-top, 72px) + 16px); color-scheme: dark; }
.ts.ts .ts-form .ts-f--wide { grid-column: 1 / -1; }
.ts.ts .ts-form label { display: block; font-family: var(--font-sans); font-weight: 500; font-size: 13px; letter-spacing: .01em; color: var(--champagne-300); }
.ts.ts .ts-form input, .ts.ts .ts-form textarea, .ts.ts .ts-form select {
  display: block; width: 100%; margin-top: 8px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--border-gold); border-radius: 0;
  background: transparent; color: var(--champagne-100); font-family: var(--font-serif); font-size: 19px;
}
/* Budget: the bands written out as choices, no dropdown. The chosen one is underlined in gold. */
.ts.ts .ts-budget { min-width: 0; margin: 0; padding: 0; border: 0; }
.ts.ts .ts-budget legend { padding: 0; font-family: var(--font-sans); font-weight: 500; font-size: 13px; letter-spacing: .01em; color: var(--champagne-300); }
.ts.ts .ts-budget > div { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; }
.ts.ts .ts-form .ts-budget label {
  position: relative; display: inline-block; padding: 4px 0 5px; cursor: pointer;
  font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 18px; letter-spacing: 0; color: var(--champagne-300);
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat; transition: background-size var(--dur-3) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.ts.ts .ts-form .ts-budget input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.ts.ts .ts-form .ts-budget label:hover { color: var(--gold-light); }
.ts.ts .ts-form .ts-budget label:has(input:checked) { color: var(--champagne-100); background-size: 100% 1px; }
.ts.ts .ts-form .ts-budget label:has(input:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.ts.ts .ts-form textarea { min-height: 96px; resize: vertical; }
/* the browser's autofill keeps the navy panel and the light text; a native list opens navy */
.ts.ts .ts-form :is(input, textarea):is(:-webkit-autofill, :autofill) { -webkit-text-fill-color: var(--champagne-100); caret-color: var(--champagne-100); box-shadow: inset 0 0 0 100vmax var(--navy-900); filter: none; }
.ts.ts .ts-form select option { background: var(--navy-900); color: var(--champagne-100); }
.ts.ts .ts-form input:not([type="checkbox"], [type="radio"]):focus, .ts.ts .ts-form textarea:focus, .ts.ts .ts-form select:focus { outline: none; border-bottom-color: var(--gold-light); box-shadow: 0 1px 0 var(--gold-light); }
.ts.ts .ts-form :is(input, textarea):is(:-webkit-autofill, :autofill):focus { box-shadow: inset 0 0 0 100vmax var(--navy-900), 0 1px 0 var(--gold-light); }
.ts.ts .ts-form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.ts.ts .ts-form__foot p { font-family: var(--font-sans); font-size: 12px; line-height: 1.5; color: var(--champagne-500); max-width: 40ch; }
.ts.ts .ts-form .ts-check { display: flex; gap: 10px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 13px; color: var(--champagne-300); }
.ts.ts .ts-form .ts-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gold); }
.ts.ts .ts-form .ts-check a { color: var(--gold-light); border-bottom: 1px solid var(--link-on-dark-rule); }
.ts.ts .ts-submit {
  display: inline-flex; align-items: center; padding: 15px 28px; border: 0; cursor: pointer; background: var(--gold); color: var(--navy-900);
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; letter-spacing: .01em;
  transition: background var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.ts.ts .ts-submit:hover, .ts.ts .ts-submit:focus-visible { background: var(--gold-light); box-shadow: var(--shadow-gold); }
@media (max-width: 900px) {
  .ts.ts .ts-enquiry__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
  .ts.ts .ts-enquiry { padding: var(--space-9) 0; }
}
@media (max-width: 700px) {
  .ts.ts .ts-form { grid-template-columns: minmax(0, 1fr); padding: var(--space-5); }
}
@media (prefers-reduced-motion: reduce) {
  .ts.ts .ts-enquiry__channels a { transition: color var(--dur-1) var(--ease-out); }
}

/* ------------------------------------------------ motion for a thumb */
/* A photo settles as it rises into view, the way a camera eases in, and drifts on while it
 * crosses the screen. Scroll-linked, on the compositor, no script; the frame never shows a
 * gap because the photo stays at 110% or more. In a rail it settles as it slides in.
 * Pages reuse ts-settle for their own photographs. The animation holds the photo's scale, so a
 * mouse on a window 700px or narrower gets no hover push; touch screens have no hover. */
@keyframes ts-settle { 0% { scale: 1.22; translate: 0 -3%; } 45% { scale: 1.1; } 100% { scale: 1.1; translate: 0 4%; } }
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .ts.ts .ts-card__photo img { animation: ts-settle linear both; animation-timeline: view(); animation-range: cover; }
    .ts.ts .ts-rail--phone .ts-card__photo img { animation-timeline: view(inline); }
  }
}
/* A thumb gets an answer the moment it lands: the photo dims, a button gives a little. */
@media (hover: none) {
  .ts.ts .ts-card__link:active .ts-card__photo { filter: brightness(.9); }
  .ts.ts .ts-icon:active { transform: scale(.97); }
}
