/*
Theme Name: Evenue Index
Description: The directory is the homepage — a typographic catalogue with a pointer-following picture and detail in an overlay pane. There is no hero; the first thing on the page is the list, because the list IS the product. Port of the legacy evenue-index design exploration onto the v2 starter structure.
Version: 0.5.1
Requires PHP: 8.1
Author: Evenue
Text Domain: evenue-index
Contract: 2.12.0
*/

/* Colors and fonts ride the --evenue-* tokens: brand = the oxblood accent
   (used once per screen, never decoratively), page-bg = paper,
   surface-bg = the raised pane, heading/body/muted text = ink strengths.
   The mono apparatus voice and the square geometry are the design's own.
   A printed catalogue, not a stage. Paper does not bounce; it settles. */

:root {
    --paper: var(--evenue-page-bg);
    --paper-raised: var(--evenue-surface-bg);
    --paper-deep: color-mix(in srgb, var(--evenue-page-bg) 94%, var(--evenue-heading-text));
    --ink: var(--evenue-heading-text);
    --ink-soft: var(--evenue-body-text);
    --ink-faint: var(--evenue-muted-text);
    --accent: var(--evenue-brand);
    --accent-deep: var(--evenue-secondary);
    --rule: color-mix(in srgb, var(--evenue-heading-text) 16%, transparent);
    --rule-strong: color-mix(in srgb, var(--evenue-heading-text) 42%, transparent);

    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; /* no --evenue-* token for a mono face exists; the apparatus voice stays hardcoded */
    --t-mark: 0.6875rem;
    --t-meta: 0.8125rem;
    --t-body: clamp(0.9375rem, 0.88rem + 0.2vw, 1.0625rem);
    --t-lead: clamp(1.0625rem, 0.95rem + 0.5vw, 1.375rem);
    --t-entry: clamp(1.5rem, 0.9rem + 2.4vw, 3.25rem);
    --t-title: clamp(2.25rem, 1.3rem + 3.8vw, 5rem);
    --track-mark: 0.18em;

    --gutter: clamp(1.25rem, 4vw, 4rem);
    --col: clamp(1rem, 2.5vw, 2.5rem);
    --header-h: 4.5rem;
    /* The trail's row; from 1025px up it sticks under the masthead, so the
       sticky stack is masthead + trail there, the masthead alone below. */
    --crumb-h: 38px;
    --stack-h: var(--header-h);

    --shadow-reveal: 0 24px 60px color-mix(in srgb, var(--evenue-heading-text) 18%, transparent);
    --shadow-pane: 0 40px 90px color-mix(in srgb, var(--evenue-heading-text) 26%, transparent);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 200ms;
    --t-base: 380ms;
    --t-slow: 640ms;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink-soft);
    font-family: var(--evenue-body-font);
    letter-spacing: var(--evenue-body-letter-spacing);
    line-height: 1.6;
    font-size: var(--t-body);
}
body.pane-open { overflow: hidden; }

h1, h2, h3 {
    font-family: var(--evenue-heading-font);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 0.4em;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--paper); }

img { max-width: 100%; height: auto; display: block; border-radius: 0; }

/* The apparatus: every mono run is uppercase at 0.18em. */
.mark, .entry__no, .entry__place, .entry__kind, .colophon__stats, .index__section,
.masthead__nav a, .filters__item, .detail__facts dt, .detail__kind, .pane__bar span,
.lang-switcher .lang, .ai-label, .legal {
    font-family: var(--font-mono);
    font-size: var(--t-mark);
    letter-spacing: var(--track-mark);
    text-transform: uppercase;
    color: var(--ink-faint);
    font-variant-numeric: tabular-nums;
}
/* The badge shows only the short mark; its full label stays readable for
   screen readers. */
.ai-label__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* The line under an image the plugin flags as AI-generated is a mark too,
   in body ink: the faint ink of the other marks is the palette's muted
   text, and not every palette holds that at 4.5:1 on paper. */
.ai-label { display: block; color: var(--ink-soft); }

.skip-link {
    position: fixed;
    top: 0;
    left: var(--gutter);
    z-index: 999;
    transform: translateY(-160%);
    transition: transform var(--t-fast) var(--ease);
    background: var(--ink);
    color: var(--paper);
    padding: 0.6rem 1rem;
    font-size: var(--t-meta);
}
.skip-link:focus { transform: none; }

/* ---------- masthead ---------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 60;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--col);
    padding-inline: var(--gutter);
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}
.masthead__mark {
    font-family: var(--evenue-heading-font);
    font-size: 1.375rem;
    line-height: 1;
    color: var(--ink);
}
.masthead__mark img { height: 32px; width: auto; }
.masthead__nav { display: flex; gap: clamp(0.85rem, 2vw, 1.75rem); align-items: baseline; flex-wrap: wrap; }
@media (max-width: 760px) {
    /* No burger in this design: the masthead grows and the nav wraps instead
       of hiding the archives. Grown, it no longer sticks — measured at 375px
       it was 133px, a fifth of the viewport — so it flows and anchor
       targets need no clearance. */
    :root { --stack-h: 0px; }
    .masthead { position: static; height: auto; min-height: var(--header-h); flex-wrap: wrap; row-gap: 0.5rem; padding-block: 0.75rem; }
    .masthead__nav { row-gap: 0.25rem; }
    .masthead__nav a { padding-block: 0.5rem; }
}
.lang-switcher { display: inline-flex; gap: 0.6rem; border: 0; padding: 0; }
.lang-switcher .lang.current { color: var(--accent); }

/* From four languages up the codes fold into a disclosure. */
.lang-switcher--menu { position: relative; }
.lang-switcher--menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4em; }
.lang-switcher--menu > summary::-webkit-details-marker { display: none; }
.lang-switcher--menu > summary::after { content: "\203a"; transform: rotate(90deg); transition: transform var(--t-base) var(--ease); }
.lang-switcher--menu[open] > summary::after { transform: rotate(-90deg); }
.lang-menu { position: absolute; top: 100%; right: 0; z-index: 61; display: grid; gap: 0.5rem; margin-top: 0.5rem; padding: 0.75rem 1rem; background: var(--paper-raised); border: 1px solid var(--rule); box-shadow: var(--shadow-reveal); }
.lang-menu .lang { color: var(--ink); }

/* In-page jumps glide instead of cutting: #stay, #units, the listings' #index. Motion is a preference. */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* ---------- breadcrumbs: the running head ---------- */

.breadcrumbs { padding: 0.6rem var(--gutter); border-bottom: 1px solid var(--rule); font-family: var(--font-mono); font-size: var(--t-mark); letter-spacing: var(--track-mark); text-transform: uppercase; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.breadcrumbs ol { display: flex; gap: 0.75rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.breadcrumbs ol::-webkit-scrollbar { display: none; }
.breadcrumbs li { display: flex; gap: 0.75rem; align-items: center; }
.breadcrumbs li + li::before { content: "\203a"; color: var(--accent); }
.breadcrumbs a { color: var(--ink-faint); }
.breadcrumbs a:hover, .breadcrumbs a:focus-visible { color: var(--ink); }
.breadcrumbs [aria-current] { color: var(--ink); }
@media (min-width: 1025px) {
    :root { --stack-h: calc(var(--header-h) + var(--crumb-h)); }
    /* The front page has no trail, so its stack is the masthead alone —
       counted with the trail, a section head stuck 38px too low and the rows
       above it showed through the gap. */
    body:not(:has(.breadcrumbs)) { --stack-h: var(--header-h); }
    .breadcrumbs {
        position: sticky;
        top: var(--header-h);
        z-index: 50;
        background: color-mix(in srgb, var(--paper) 86%, transparent);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}
/* Anchor targets (#index, #stay, #units, #events, #amenities) clear whatever is stuck above them. */
[id] { scroll-margin-top: calc(var(--stack-h) + 0.75rem); }

/* Underline-wipe link idiom (nav + pagination). */
.filters__item, .masthead__nav a {
    position: relative;
    padding-bottom: 0.15rem;
}
.filters__item::after, .masthead__nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform var(--t-base) var(--ease);
}
.filters__item:hover, .masthead__nav a:hover { color: var(--ink); }
.filters__item:hover::after, .masthead__nav a:hover::after,
.filters__item:focus-visible::after, .masthead__nav a:focus-visible::after,
.masthead__nav a[aria-current]::after { transform: scaleX(1); transform-origin: left center; }
.masthead__nav a[aria-current] { color: var(--ink); }
.masthead__nav .masthead__book { color: var(--accent); }

/* ---------- buttons: pill against a square world ---------- */

.btn, .button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: var(--evenue-button-padding-y) var(--evenue-button-padding-x);
    border: var(--evenue-button-border-width) solid var(--evenue-button-border-color);
    border-radius: var(--evenue-button-radius);
    background: var(--evenue-button-bg);
    color: var(--evenue-button-text);
    font-family: var(--font-mono);
    font-size: var(--evenue-button-font-size);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
}
.btn::before, .button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--evenue-button-bg-hover);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--t-base) var(--ease);
}
.btn:hover::before, .btn:focus-visible::before,
.button:hover::before, .button:focus-visible::before { transform: scaleX(1); }
.btn:hover, .button:hover { color: var(--evenue-button-text-hover); }
.btn:hover .btn__mark { transform: translateX(0.3rem); }
.btn:active, .button:active { background: var(--evenue-button-bg-active); }
.btn__mark { display: inline-block; transition: transform var(--t-base) var(--ease); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* ---------- the colophon ---------- */

.colophon {
    display: grid;
    gap: clamp(0.75rem, 2vh, 1.25rem);
    padding: clamp(3rem, 9vh, 6.5rem) var(--gutter) clamp(1.75rem, 5vh, 3rem);
    border-bottom: 1px solid var(--rule);
}
.colophon__title { font-size: var(--t-title); line-height: 0.94; max-width: 18ch; margin: 0; }
.colophon__note { font-size: var(--t-lead); font-weight: 300; max-width: 46ch; color: var(--ink-soft); margin: 0; }
.colophon__stats { display: flex; gap: clamp(0.85rem, 2.5vw, 2rem); flex-wrap: wrap; }
.colophon__stats a { color: var(--ink-soft); border-bottom: 1px solid var(--rule-strong); padding-bottom: 1px; }
.colophon__stats a:hover { color: var(--accent); border-color: var(--accent); }

.legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem var(--col);
    margin: 0;
    padding: 1rem var(--gutter) 1.75rem;
    border-top: 1px solid var(--rule);
}
.legal a:hover { color: var(--accent); }
.legal-note { margin: 0; padding: 1rem var(--gutter); border-top: 1px solid var(--rule); font-size: var(--t-meta); color: var(--ink-faint); }
.legal-note + .legal { border-top: 0; padding-top: 0; }

/* ---------- the index: ruled rows ---------- */

.index { padding-bottom: clamp(4rem, 12vh, 9rem); }

.index__section {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--col);
    margin: 0;
    padding: clamp(2rem, 5vh, 3.25rem) var(--gutter) 0.75rem;
    border-bottom: 1px solid var(--rule);
    font-weight: 400;
}
/* The section's name is a heading, not a caption: at the mark's size the
   three heads vanished and the index read as one list of a hundred rows.
   The count beside it stays a mark. */
.index__section > span:first-child {
    font-family: var(--evenue-heading-font);
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--ink);
}
/* On the index itself a section head stays under the masthead while its
   rows scroll past, so a long list always says which part of it you are in.
   Inside an entry (the pane, a full page) the heads scroll with the text. */
.index__list > .index__section {
    position: sticky;
    top: var(--stack-h);
    z-index: 5;
    background: color-mix(in srgb, var(--paper) 97%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding-top: clamp(1rem, 2.5vh, 1.5rem);
    margin-top: clamp(1rem, 2.5vh, 1.75rem);
}

.entry {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr) 12rem 8rem 2rem;
    gap: var(--col);
    align-items: baseline;
    padding: clamp(0.85rem, 2vh, 1.4rem) var(--gutter);
    border-bottom: 1px solid var(--rule);
    position: relative;
}
.entry::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: var(--evenue-divider-text-weight, 2px);
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--t-base) var(--ease);
}
.entry__name {
    font-family: var(--evenue-heading-font);
    font-size: var(--t-entry);
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--ink);
    transition: color var(--t-fast), transform var(--t-base) var(--ease);
}
.entry__no, .entry__place, .entry__kind { transition: color var(--t-fast), transform var(--t-base) var(--ease); }
.entry__mark { justify-self: end; opacity: 0.5; color: var(--ink-faint); transition: opacity var(--t-fast), transform var(--t-base) var(--ease); }

/* The hover shear — the contrast, not the highlight. */
@media (hover: hover) and (pointer: fine) {
    .index__list:hover .entry__name { color: var(--ink-faint); }
    .index__list:hover .entry:hover .entry__name { color: var(--ink); }
    .entry:hover::after { transform: scaleX(1); }
    .entry:hover .entry__name { transform: translateX(clamp(0.5rem, 1.2vw, 1.25rem)); }
    .entry:hover .entry__no { transform: translateX(0.35rem); color: var(--accent); }
    .entry:hover .entry__place, .entry:hover .entry__kind { transform: translateX(0.2rem); color: var(--ink-soft); }
    .entry:hover .entry__mark { transform: translateX(0.4rem); opacity: 1; }
}
.entry:focus-visible::after { transform: scaleX(1); }
.entry:focus-visible .entry__no { color: var(--accent); }

@media (max-width: 1100px) {
    .entry { grid-template-columns: 3rem minmax(0, 1fr) 9rem 1.5rem; row-gap: 0.2rem; }
    .entry__kind { grid-column: 2; grid-row: 2; } /* the date of an event row, under its name instead of gone */
}
@media (max-width: 760px) {
    .entry { grid-template-columns: 2.5rem minmax(0, 1fr) 1.25rem; align-items: center; }
    .entry__place { display: none; }
}

/* Pagination / meta rows reuse the filter idiom. One line, never a stack:
   the row scrolls sideways (drag on a pointer, swipe on a phone) and hides
   its scrollbar like the trail. The filter row itself stays under the trail
   while the listing scrolls, so a house can be chosen from anywhere in the
   programme; the pager under the list does not. */
.filters:not(.pager) {
    position: sticky;
    top: var(--stack-h);
    z-index: 6;
    background: color-mix(in srgb, var(--paper) 97%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem 1.25rem;
    padding: clamp(1rem, 3vh, 1.75rem) var(--gutter);
    border-bottom: 1px solid var(--rule);
    overflow-x: auto;
    scrollbar-width: none;
    cursor: grab;
}
.filters::-webkit-scrollbar { display: none; }
.filters > * { flex-shrink: 0; white-space: nowrap; }
.filters.dragging { cursor: grabbing; scroll-behavior: auto; }
.filters.dragging a { pointer-events: none; }
.filters__item.is-off { opacity: 0.35; }
.filters__label { align-self: baseline; opacity: 0.7; } /* the row needs a name next to the pager's idiom */
.filters__item.active { color: var(--ink); }
.filters__item.active::after { transform: scaleX(1); transform-origin: left center; }
.pager { justify-content: space-between; align-items: baseline; border-bottom: 0; }
.pager__position { color: var(--ink-faint); }

/* The way into the rest of a capped section: a row that is a link to the listing. */
.entry--more .entry__name { font-family: var(--font-mono); font-size: var(--t-meta); letter-spacing: var(--track-mark); text-transform: uppercase; color: var(--ink-faint); }
.entry--more:hover .entry__name { color: var(--ink); }

/* ---------- the concertina: the row's own preview ---------- */

/* Pure CSS, 0fr → 1fr: hovering or focusing a row opens a strip under it —
   picture beside meta and excerpt — and pushes the rows below down. The
   picture belongs to its row now; it no longer swims around the page. */
.index__preview {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--t-base) var(--ease);
}
.index__preview-inner {
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
    gap: clamp(0.85rem, 2vw, 1.5rem);
    align-items: center;
    min-height: 0;
    padding-inline: calc(var(--gutter) + 4.5rem + var(--col)) var(--gutter);
    padding-block: 0;
    transition: padding-block var(--t-base) var(--ease);
}
.index__preview-img {
    width: 100%;
    height: clamp(96px, 15vh, 150px);
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--t-base) var(--ease);
}
.index__preview-text {
    display: grid;
    gap: 0.4rem;
    max-width: 56ch;
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.index__preview-meta {
    font-family: var(--font-mono);
    font-size: var(--t-mark);
    letter-spacing: var(--track-mark);
    text-transform: uppercase;
    color: var(--accent);
}
.index__preview-excerpt { font-size: var(--t-meta); line-height: 1.55; color: var(--ink-soft); }
.index__item:hover .index__preview,
.index__item:focus-within .index__preview { grid-template-rows: 1fr; }
.index__item:hover .index__preview-inner,
.index__item:focus-within .index__preview-inner { padding-block: clamp(0.75rem, 1.8vh, 1.25rem); border-bottom: 1px solid var(--rule); }
.index__item:hover .index__preview-img,
.index__item:focus-within .index__preview-img { opacity: 1; }
.index__item:hover .index__preview-text,
.index__item:focus-within .index__preview-text { opacity: 1; transform: translateY(0); }
/* A pointer sweeping down the list must not open every row it crosses: the
   strip opens only once the pointer has rested on a row for a moment. The
   delay sits on the way in alone — leaving is immediate, and a hover that
   ends inside the delay never starts the transition, so nothing flickers.
   Keyboard focus is deliberate and opens at once. */
.index__item:hover .index__preview,
.index__item:hover .index__preview-inner,
.index__item:hover .index__preview-img,
.index__item:hover .index__preview-text { transition-delay: 220ms; }
.index__item:focus-within .index__preview,
.index__item:focus-within .index__preview-inner,
.index__item:focus-within .index__preview-img,
.index__item:focus-within .index__preview-text { transition-delay: 0s; }
/* And it opens slowly. The rows below are being pushed down, and at the
   theme's usual 380ms that shove read as a jolt; opening takes almost twice
   as long on an ease that starts gently. Closing keeps the usual pace, so
   nothing drags behind a pointer that has moved on. */
.index__item:hover .index__preview,
.index__item:focus-within .index__preview,
.index__item:hover .index__preview-inner,
.index__item:focus-within .index__preview-inner { transition-duration: 720ms; transition-timing-function: cubic-bezier(0.33, 0, 0.18, 1); }
.index__item:hover .index__preview-img,
.index__item:focus-within .index__preview-img,
.index__item:hover .index__preview-text,
.index__item:focus-within .index__preview-text { transition-duration: 620ms; transition-timing-function: cubic-bezier(0.33, 0, 0.18, 1); }
/* Inside an entry's column (the pane, a full page) the strip starts at the column's edge. */
.page-detail .index__preview-inner { padding-inline: 0; }
@media (max-width: 1100px) { .index__preview-inner { padding-inline: calc(var(--gutter) + 3rem + var(--col)) var(--gutter); } }
@media (max-width: 760px) { .index__preview-inner { grid-template-columns: 1fr; padding-inline: var(--gutter); } .index__preview-img { height: 160px; } }
/* Touch: no hover, so the strip stays open. */
@media (hover: none) {
    .index__preview { grid-template-rows: 1fr; }
    .index__preview-inner { padding-block: clamp(0.75rem, 1.8vh, 1.25rem); border-bottom: 1px solid var(--rule); }
    .index__preview-img { opacity: 1; }
    .index__preview-text { opacity: 1; transform: none; }
}

/* ---------- the pane: detail in an overlay ---------- */

.pane-scrim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: color-mix(in srgb, var(--evenue-heading-text) 42%, transparent);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-base) var(--ease), visibility 0s linear var(--t-base);
}
.pane {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 91;
    width: min(680px, 100%);
    display: flex;
    flex-direction: column;
    background: var(--paper-raised);
    box-shadow: var(--shadow-pane);
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow);
}
body.pane-open .pane-scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
body.pane-open .pane { transform: none; visibility: visible; transition-delay: 0s; }
.pane__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--col);
    padding: 1rem var(--col);
    border-bottom: 1px solid var(--rule);
}
.pane__title { min-width: 0; flex: 1; }
.pane__bar .breadcrumbs { position: static; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.pane__close {
    background: none;
    border: 0;
    color: var(--ink);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
}
.pane__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.pane__state { padding: var(--col); }

/* ---------- the detail (pane + full page share this) ---------- */

.page-detail { width: min(72ch, calc(100% - 2 * var(--gutter))); margin-inline: auto; padding-block: clamp(2rem, 6vh, 4rem); }
.page-detail .detail__inner { padding-inline: 0; }
.page-detail .index__section { padding-inline: 0; }
.page-detail .index__section + .detail__facts { margin-top: 0; border-top: 0; }
/* The rooms, the programme and a place's sub-index are part of the entry
   now — on the page and in the pane — so they take the entry's column. */
.page-detail .index { padding-bottom: 0; }
.page-detail .entry { padding-inline: 0; grid-template-columns: 3rem minmax(0, 1fr) 9rem 1.5rem; row-gap: 0.2rem; }
.page-detail .entry__kind { grid-column: 2; grid-row: 2; }
.page-detail .entry__place { display: none; }
.page-detail .entry__name { font-size: clamp(1.25rem, 0.9rem + 1.2vw, 1.75rem); }

/* The pane shows the same entry at its own width: no outer column, and no
   "back to the index" — the pane has its close. */
.pane__entry { width: auto; padding-block: 0 clamp(1.5rem, 4vh, 2.5rem); }
.pane__entry .detail__inner, .pane__entry .index__section, .pane__entry .entry, .pane__entry > .detail__facts, .pane__entry .detail__foot { padding-inline: var(--col); }
.pane__entry > .detail__facts { margin-inline: 0; }
.pane__entry .detail__foot .btn--ghost { display: none; }

/* The 4:3 frame sits on the picture, not on the figure: a flagged image's
   AI caption line then follows it inside the figure instead of spilling out. */
.detail__figure { margin: 0; }
.detail__figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-deep); }
.detail__figure > .ai-label { padding-top: 0.6rem; }
.pane__entry .detail__figure > .ai-label { padding-inline: var(--col); }
.detail__inner { padding: clamp(1.5rem, 4vh, 2.75rem) var(--col); }
.detail__kind { color: var(--accent); }
.detail__title { font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem); line-height: 1.02; margin: 0.6rem 0 0; }
.detail__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem clamp(1rem, 3vw, 2rem);
    margin: clamp(1.25rem, 3vh, 2rem) 0 0;
    padding-top: clamp(1rem, 2.5vh, 1.5rem);
    border-top: 1px solid var(--rule);
}
.detail__facts dt { margin: 0; }
.detail__facts dd { margin: 0.2rem 0 0; font-family: var(--evenue-heading-font); font-size: 1.125rem; color: var(--ink); }
.detail__facts dd { overflow-wrap: anywhere; } /* an e-mail address has no break opportunity; in the second column it ran off a phone */
.detail__body { margin-top: clamp(1.5rem, 4vh, 2.5rem); font-size: var(--t-lead); font-weight: 300; line-height: 1.63; }
.detail__body > * + * { margin-top: 1em; }
.detail__body a, .detail__facts dd a { color: var(--evenue-link); text-decoration: underline; text-underline-offset: 0.2em; }
.detail__body h2 { font-size: 1.5rem; line-height: 1.15; margin-top: 1.6em; }
.detail__body h3 { font-size: 1.2rem; line-height: 1.15; margin-top: 1.6em; }
.detail__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 0.75rem;
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
}
.detail__gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.detail__foot {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: clamp(1.5rem, 4vh, 2.5rem);
    padding-top: clamp(1rem, 2.5vh, 1.5rem);
    border-top: 1px solid var(--rule);
}

/* ---------- lightbox ---------- */

.starter-lightbox { display: none; position: fixed; inset: 0; background: color-mix(in srgb, var(--ink) 90%, transparent); z-index: 2000; align-items: center; justify-content: center; }
.starter-lightbox.open { display: flex; }
.starter-lightbox img { max-width: 88vw; max-height: 86vh; object-fit: contain; }
.starter-lightbox button { position: absolute; background: none; border: none; color: var(--paper); font-size: 2.4rem; cursor: pointer; padding: 12px 20px; line-height: 1; }
.lb-close { top: 12px; right: 16px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
/* The AI label of a gallery image, repeated under it; ink and paper like the box itself. */
.starter-lightbox .lb-ai { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); text-align: center; margin: 0; padding: 4px 12px; background: var(--ink); color: var(--paper); font-size: 0.75rem; letter-spacing: 0.06em; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
    .entry:hover .entry__name, .entry:hover .entry__no, .entry:hover .entry__place,
    .entry:hover .entry__kind, .entry:hover .entry__mark { transform: none; }
}

/* Booking embed: 290px holds the booking widget's stacked form, a second
   status line included. A shorter frame gets a denser form, never a cut one. */
.booking-embed { display: block; width: 100%; height: 290px; border: 0; }

/* Gallery tiles: the picture sits in a tile, so an image the plugin flags as
   AI-generated carries its label on the tile itself, not only in the lightbox.
   The label lets clicks through to the picture, which opens the lightbox. */
.gallery-tile { position: relative; display: block; }
.gallery-tile > img { display: block; }
.gallery-tile > .ai-label { position: absolute; left: 0.5rem; bottom: 0.5rem; max-width: calc(100% - 1rem); margin: 0; padding: 0.25rem 0.5rem; background: var(--ink); color: var(--paper); pointer-events: none; }
