/**
 * Atlas event guide (DS-A3), haven-events/guide.php only; after atlas-tokens.css and events.css. Colours: --atlas-*
 * tokens only. events.css types h2, h3, h4, p and links in .haven-events-main at (0,2,2) and gives the guide
 * sections, stay cards, handoff and tables its own palette: these rules match that weight and load later, or beat
 * it. The cover, fact sheet and night band follow the hub's patterns (atlas-hub.css), scoped to .atlas-guide.
 * Mobile first: below 1200px a slim sticky bar under the site header; from 1200px the contents rail instead.
 */

/* Page and reset */
.atlas-guide,
body.haven-events .haven-events-main.atlas-guide { max-width: none; margin: 0; padding: 0; background: var(--atlas-paper); color: var(--atlas-ink-2); font: 400 var(--atlas-fs-body)/1.62 var(--atlas-serif); }
.atlas-guide *,
.atlas-guide *::before,
.atlas-guide *::after { box-sizing: border-box; }
body.haven-events .atlas-guide :is(h1, h2, h3, h4, p, dl, dd, figure) { margin: 0; font: inherit; color: inherit; }
body.haven-events .atlas-guide a { color: var(--atlas-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Links in running text and the sheet's Organizer read as links at every width. */
body.haven-events .atlas-guide :is(p, li, dd, td, figcaption) a,
body.haven-events .atlas-guide .atlas-factsheet dd a { color: var(--atlas-accent-ink); text-decoration: underline; }
.atlas-guide :focus-visible,
body.haven-events .atlas-guide :focus-visible { outline: 2px solid var(--atlas-accent-ink); outline-offset: 3px; }
/* Anchored headings and focus targets clear the site header and the slim bar. */
body.haven-events .atlas-guide :is(h2, section, a, summary, [tabindex]) { scroll-margin-top: calc(var(--atlas-top, 0px) + 88px); }
.atlas-guide .atlas-wrap { max-width: var(--atlas-maxw); margin-inline: auto; padding-inline: var(--atlas-pad); }

/* Type roles */
body.haven-events .atlas-guide .atlas-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 12px/1.4 var(--atlas-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--atlas-accent-ink); }
.atlas-guide .atlas-kicker::before { content: ""; flex: none; width: 28px; height: 1px; background: currentColor; }
body.haven-events .atlas-guide .atlas-label { font: 600 12px/1.3 var(--atlas-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--atlas-ink-3); }
body.haven-events .atlas-guide .atlas-band .atlas-h2 { margin-top: 14px; font: 400 clamp(34px, 1.2rem + 2.4vw, 56px)/1.04 var(--atlas-serif); letter-spacing: -0.025em; color: var(--atlas-ink); text-wrap: balance; }
body.haven-events .atlas-guide .atlas-btn { display: inline-flex; flex: none; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--atlas-ink); border-radius: 2px; background: var(--atlas-ink); color: var(--atlas-paper); font: 600 14px/1.2 var(--atlas-sans); text-decoration: none; }
body.haven-events .atlas-guide .atlas-btn:hover { text-decoration: underline; }

/* Cover: photo first on phones, split from 1000px (as the hub) */
.atlas-guide .atlas-cover { display: grid; grid-template-columns: minmax(0, 1fr); max-width: var(--atlas-maxw); margin-inline: auto; padding-inline: var(--atlas-pad); }
body.haven-events .atlas-guide .atlas-photo { grid-row: 1; position: relative; aspect-ratio: 4 / 3.4; margin: 0 calc(var(--atlas-pad) * -1); overflow: hidden; background: var(--atlas-paper-2); }
.atlas-guide .atlas-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
body.haven-events .atlas-guide .atlas-photo__caption { position: absolute; top: 0; right: 0; max-width: 80%; padding: 6px 10px; background: var(--atlas-paper); font: 400 11.5px/1.4 var(--atlas-mono); color: var(--atlas-ink-3); }
.atlas-guide .atlas-panel { grid-row: 2; position: relative; z-index: 1; margin: -64px -6px 0; padding: 22px 22px 4px; background: var(--atlas-paper); }
.atlas-guide .atlas-folio { grid-row: 3; padding-top: 22px; }
.atlas-guide .atlas-cover--bare .atlas-panel { grid-row: 1; margin: 0; padding: 32px 0 4px; }
.atlas-guide .atlas-cover--bare .atlas-folio { grid-row: 2; }
body.haven-events .atlas-guide .atlas-title { margin: 14px 0 22px; font: 400 clamp(40px, 1.5rem + 3.4vw, 88px)/0.99 var(--atlas-serif); font-variation-settings: "opsz" 72; letter-spacing: -0.03em; color: var(--atlas-ink); text-wrap: balance; overflow-wrap: break-word; }
body.haven-events .atlas-guide .atlas-dek { max-width: 36ch; font-size: clamp(19px, 1rem + .5vw, 24px); line-height: 1.45; color: var(--atlas-ink-2); }
body.haven-events .atlas-guide .atlas-byline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--atlas-rule); font: 400 14px/1.5 var(--atlas-sans); color: var(--atlas-ink-3); }

/* Breadcrumb: each separator follows its item inside one nowrap unit, so no line starts with it */
.atlas-guide .atlas-crumbs ol { display: flex; flex-wrap: wrap; gap: 0 10px; margin: 0 0 6px; padding: 0; list-style: none; font: 600 12px/1.3 var(--atlas-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--atlas-ink-3); }
.atlas-guide .atlas-crumbs li { display: inline-flex; align-items: center; margin: 0; white-space: nowrap; }
body.haven-events .atlas-guide .atlas-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--atlas-ink-3); text-decoration: none; }
body.haven-events .atlas-guide .atlas-crumbs a:hover { text-decoration: underline; }
.atlas-guide .atlas-crumbs__sep { padding-left: .5em; }

/* The one fact sheet */
body.haven-events .atlas-guide .atlas-facts { border-top: 2px solid var(--atlas-ink); }
.atlas-guide .atlas-facts div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--atlas-rule); }
body.haven-events .atlas-guide .atlas-facts dt { font: 400 11.5px/1.4 var(--atlas-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--atlas-ink-3); }
body.haven-events .atlas-guide .atlas-facts dd { font: 400 14.5px/1.45 var(--atlas-mono); color: var(--atlas-ink); text-align: right; overflow-wrap: anywhere; }
body.haven-events .atlas-guide .atlas-facts dd details { text-align: left; }
body.haven-events .atlas-guide .atlas-sheet-note { margin-top: 14px; padding-left: 12px; border-left: 2px solid var(--atlas-accent-ink); font: 400 14px/1.5 var(--atlas-sans); color: var(--atlas-ink-2); }
@media (min-width: 1000px) {
	.atlas-guide .atlas-cover { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--atlas-gap); padding-right: 0; }
	body.haven-events .atlas-guide .atlas-photo { grid-column: 5 / -1; grid-row: 1 / 3; aspect-ratio: auto; min-height: min(88vh, 820px); margin: 0; }
	body.haven-events .atlas-guide .atlas-photo__caption { top: auto; bottom: 0; }
	.atlas-guide .atlas-folio { grid-column: 1 / 5; grid-row: 1; align-self: start; padding: 44px 8px 0 0; }
	.atlas-guide .atlas-panel { grid-column: 1 / 8; grid-row: 2; align-self: end; margin: 0 0 -1px; padding: 40px 48px 8px 0; }
	.atlas-guide .atlas-cover--bare { padding-right: var(--atlas-pad); }
	.atlas-guide .atlas-cover--bare .atlas-panel { grid-column: 1 / 8; grid-row: 1; padding: 56px 48px 8px 0; }
	.atlas-guide .atlas-cover--bare .atlas-folio { grid-column: 9 / -1; grid-row: 1; }
}

/* Slim bar below 1200px: sticky at the top of the content, under the site header, never at the bottom */
.atlas-guide .atlas-guidebar { position: sticky; top: var(--atlas-top, 0px); z-index: 20; display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 28px; padding: 8px var(--atlas-pad); background: var(--atlas-paper); border-block: 1px solid var(--atlas-rule); }
body.haven-events .atlas-guide .atlas-guidebar__title { min-width: 0; overflow: hidden; font: 500 14px/1.25 var(--atlas-sans); color: var(--atlas-ink); text-overflow: ellipsis; white-space: nowrap; }
.atlas-guide .atlas-guidebar__title small { display: block; overflow: hidden; font: 400 11.5px/1.3 var(--atlas-mono); color: var(--atlas-ink-3); text-overflow: ellipsis; }

/* Reading layout: one column below 1200px; from 1200px a 12-column grid, rail 3, reading column 6 */
.atlas-guide .atlas-layout { max-width: var(--atlas-maxw); margin-inline: auto; padding: clamp(36px, 6vw, 96px) var(--atlas-pad) clamp(32px, 5vw, 72px); }
.atlas-guide .atlas-rail { display: none; }
@media (min-width: 1200px) {
	.atlas-guide .atlas-guidebar { display: none; }
	body.haven-events .atlas-guide :is(h2, section, a, summary, [tabindex]) { scroll-margin-top: calc(var(--atlas-top, 0px) + 24px); }
	.atlas-guide .atlas-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--atlas-gap); }
	.atlas-guide .atlas-read { display: contents; }
	.atlas-guide .atlas-read > * { grid-column: 4 / 10; }
	.atlas-guide .atlas-read > .atlas-stays { grid-column: 4 / -1; }
	.atlas-guide .atlas-rail { grid-column: 1 / 4; grid-row: 1 / span 60; position: sticky; top: calc(var(--atlas-top, 0px) + 24px); align-self: start; display: grid; gap: 28px; padding-right: 12px; }
}

/* Contents rail: in-page links, a progress line and the Check dates card */
.atlas-guide .atlas-contents ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--atlas-rule); }
body.haven-events .atlas-guide .atlas-contents a { display: flex; align-items: center; min-height: 44px; margin-left: -1px; padding: 6px 0 6px 16px; border-left: 2px solid transparent; font: 500 14px/1.35 var(--atlas-sans); color: var(--atlas-ink-3); text-decoration: none; }
body.haven-events .atlas-guide .atlas-contents a:hover { color: var(--atlas-ink); text-decoration: underline; }
body.haven-events .atlas-guide .atlas-contents a.atlas-on { color: var(--atlas-ink); border-left-color: var(--atlas-accent); }
.atlas-guide .atlas-progress { height: 2px; margin: 12px 0; overflow: hidden; background: var(--atlas-rule); }
.atlas-guide .atlas-progress__line { display: block; height: 100%; background: var(--atlas-accent-ink); transform: scaleX(var(--atlas-progress, 0)); transform-origin: left; }
.atlas-guide.atlas-motion .atlas-progress__line { transition: transform .2s linear; }
.atlas-guide .atlas-datecard { display: grid; gap: 12px; padding: 20px; background: var(--atlas-paper-3); border: 1px solid var(--atlas-rule); }
body.haven-events .atlas-guide .atlas-datecard__dates { font: 500 15px/1.4 var(--atlas-mono); color: var(--atlas-ink); }

/* Reading column */
.atlas-guide .atlas-read .haven-events-guide-section { margin: 0 0 clamp(48px, 5vw, 80px); padding-top: 18px; border-top: 1px solid var(--atlas-rule); }
body.haven-events .atlas-guide .atlas-read h2 { margin: 0 0 22px; font: 400 clamp(30px, 1.1rem + 1.9vw, 46px)/1.06 var(--atlas-serif); letter-spacing: -0.02em; color: var(--atlas-ink); text-wrap: balance; }
body.haven-events .atlas-guide .atlas-read h3 { margin: 28px 0 10px; font: 400 clamp(22px, 1rem + .6vw, 26px)/1.2 var(--atlas-serif); color: var(--atlas-ink); }
body.haven-events .atlas-guide .atlas-read h4 { margin: 20px 0 8px; font: 600 16px/1.4 var(--atlas-sans); color: var(--atlas-ink); }
body.haven-events .atlas-guide .atlas-read p { max-width: 64ch; margin: 0 0 1em; }
body.haven-events .atlas-guide .atlas-read :is(ul, ol) { max-width: 62ch; margin: 0 0 1.2em; padding-left: 1.2em; }
body.haven-events .atlas-guide .atlas-read li + li { margin-top: .4em; }
.atlas-guide .atlas-read details summary { cursor: pointer; }

/* Tables: the wrapper is the one scroller (focusable region); the table itself never scrolls */
body.haven-events .atlas-guide .haven-events-table-scroll { max-width: 100%; margin: 24px 0; overflow-x: auto; border-top: 2px solid var(--atlas-ink); }
body.haven-events .atlas-guide .haven-events-table-scroll table { display: table; width: 100%; overflow: visible; border-collapse: collapse; background: transparent; font: 400 15px/1.5 var(--atlas-sans); }
body.haven-events .atlas-guide .haven-events-table-scroll :is(th, td) { min-width: 9rem; padding: 12px 14px 12px 0; border: 0; border-bottom: 1px solid var(--atlas-rule); background: transparent; color: var(--atlas-ink); text-align: left; vertical-align: top; }
body.haven-events .atlas-guide .haven-events-table-scroll thead { background: transparent; }
body.haven-events .atlas-guide .haven-events-table-scroll thead th { font: 500 11.5px/1.4 var(--atlas-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--atlas-ink-3); }
body.haven-events .atlas-guide .haven-events-table-scroll tbody th { font-weight: 600; }

/* Places to stay: the plugin's cards, 4:5 photos, the city as a place tag, room around the grid */
body.haven-events .atlas-guide .haven-events-stays { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--atlas-gap); margin: 2rem 0; }
body.haven-events .atlas-guide .atlas-read p + .haven-events-stays { margin-top: 2rem; }
body.haven-events .atlas-guide .haven-events-stays + p { margin: 2rem 0 0; }
body.haven-events .atlas-guide .haven-events-stay { border: 0; background: transparent; }
body.haven-events .atlas-guide .haven-events-stay > a { position: relative; display: grid; gap: 12px; align-content: start; height: 100%; color: var(--atlas-ink); text-decoration: none; }
body.haven-events .atlas-guide .haven-events-stay img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--atlas-paper-2); }
body.haven-events .atlas-guide .haven-events-stay__body { display: flex; flex-direction: column; gap: 8px; padding: 0; }
body.haven-events .atlas-guide .atlas-read .haven-events-stay__body h3 { margin: 0; font: 400 24px/1.12 var(--atlas-serif); color: var(--atlas-ink); }
body.haven-events .atlas-guide .haven-events-stay > a:hover h3 { text-decoration: underline; text-underline-offset: 5px; }
body.haven-events .atlas-guide .atlas-read .haven-events-stay__body > p { order: -1; align-self: flex-start; margin: 0; padding: 7px 9px; border: 1px solid var(--atlas-rule); background: var(--atlas-paper); font: 500 11px/1 var(--atlas-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--atlas-ink-2); }
body.haven-events .atlas-guide .atlas-read .haven-events-stay img + .haven-events-stay__body > p { position: absolute; top: 12px; left: 12px; border-color: transparent; }
body.haven-events .atlas-guide .atlas-read .haven-events-stay__body ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; font: 400 13.5px/1.3 var(--atlas-mono); color: var(--atlas-ink-3); }
body.haven-events .atlas-guide .atlas-read .haven-events-stay__body li + li { margin-top: 0; }
/* Stay group headings (DS-A12): a full-width label, 24px above and 12px below net of the grid gap. */
body.haven-events .atlas-guide .atlas-read .haven-events-stays__group { grid-column: 1 / -1; margin: calc(24px - var(--atlas-gap)) 0 calc(12px - var(--atlas-gap)); font: 500 13px/1.3 var(--atlas-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--atlas-ink); }
body.haven-events .atlas-guide .atlas-read .haven-events-stays__group:first-child { margin-top: 0; }

/* Dated handoff */
body.haven-events .atlas-guide .haven-events-handoff { margin: 24px 0; padding: 20px; border: 1px solid var(--atlas-rule); background: var(--atlas-paper-3); }
body.haven-events .atlas-guide .haven-events-handoff ul { margin: 0 0 12px; padding: 0; list-style: none; }
body.haven-events .atlas-guide .haven-events-handoff li { font: 400 15px/1.5 var(--atlas-sans); color: var(--atlas-ink-2); }
body.haven-events .atlas-guide .haven-events-handoff a { display: inline-flex; align-items: center; min-height: 44px; margin: 4px 12px 4px 0; padding: 10px 18px; background: var(--atlas-ink); color: var(--atlas-paper); font: 600 15px/1.2 var(--atlas-sans); text-decoration: underline; }
body.haven-events .atlas-guide .haven-events-handoff p { margin: 0; font: 400 13.5px/1.4 var(--atlas-sans); color: var(--atlas-ink-3); }

/* Night band */
.atlas-guide .atlas-night { background: radial-gradient(120% 140% at 85% 0%, var(--atlas-night-2) 0%, var(--atlas-night) 70%); color: var(--atlas-on-night); }
.atlas-guide .atlas-night .atlas-wrap { display: grid; gap: clamp(28px, 4vw, 64px); padding-block: clamp(56px, 7vw, 104px); }
body.haven-events .atlas-guide .atlas-band.atlas-night .atlas-kicker { color: var(--atlas-accent-night); }
body.haven-events .atlas-guide .atlas-band.atlas-night .atlas-h2 { color: var(--atlas-on-night); }
body.haven-events .atlas-guide .atlas-night .atlas-night__dek { max-width: 52ch; margin-top: 18px; color: var(--atlas-on-night-2); }
.atlas-guide .atlas-night :focus-visible,
body.haven-events .atlas-guide .atlas-night :focus-visible { outline-color: var(--atlas-accent-night); }
@media (min-width: 1000px) {
	.atlas-guide .atlas-night .atlas-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
}

/* Closing: the disclosure and the research note */
body.haven-events .atlas-guide .haven-events-research { display: grid; gap: 22px; max-width: var(--atlas-maxw); margin: 0 auto; padding: 36px var(--atlas-pad) 56px; border-top: 0; font: 400 15px/1.55 var(--atlas-sans); color: var(--atlas-ink-3); }
body.haven-events .atlas-guide .haven-events-research h2 { margin: 0 0 8px; font: 600 15px/1.4 var(--atlas-sans); color: var(--atlas-ink); }
body.haven-events .atlas-guide .haven-events-research p { max-width: 72ch; margin: 0 0 .8em; }
body.haven-events .atlas-guide .haven-events-research .haven-events-guide-section { margin: 0; }
@media (min-width: 1000px) {
	body.haven-events .atlas-guide .haven-events-research { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--atlas-gap); }
}

/* Photo credits (DS-A8b): the plugin's credit region after the night band, small mono type, links underlined */
body.haven-events .atlas-guide .haven-events-credits { max-width: var(--atlas-maxw); margin: 0 auto; padding: 28px var(--atlas-pad) 40px; border-top: 1px solid var(--atlas-rule); font: 400 13px/1.6 var(--atlas-mono); color: var(--atlas-ink-3); }
body.haven-events .atlas-guide .haven-events-credits h2 { margin: 0 0 8px; font: 500 12px/1.6 var(--atlas-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--atlas-ink-3); }
body.haven-events .atlas-guide .haven-events-credits ul { margin: 0; padding: 0; list-style: none; }
body.haven-events .atlas-guide .haven-events-credits li { max-width: 90ch; margin: 0 0 4px; }
body.haven-events .atlas-guide .haven-events-credits a { color: var(--atlas-accent-ink); text-decoration: underline; text-underline-offset: 3px; }

/* Reduced motion: the progress line moves at once, nothing transitions */
@media (prefers-reduced-motion: reduce) {
	.atlas-guide *,
	.atlas-guide *::before,
	.atlas-guide *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
	.atlas-guide .atlas-progress__line { transition: none !important; }
}
