/* Public gallery styles — built on brand.css tokens. */
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { left: 8px; }
main { min-height: calc(100vh - var(--chrome-h, 60px)); outline: none; }
/* <main> is focused programmatically on navigation (screen readers). Under the default solid header its ring is hidden;
   church styles that move the header or inset the hero would show it as a line across the page. */
html:not([data-ml-header="solid"]) main:focus-visible, html[data-ml-hero="photo"][data-ml-align="left"] main:focus-visible { outline: none; }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20vh 16px; color: var(--brand-muted); font-size: 1.1rem; }
.spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--brand-primary-tint); border-top-color: var(--brand-primary); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { max-width: 640px; margin: 12vh auto; text-align: center; padding: 32px var(--gutter); }

/* ---------- Lobby ---------- */
.hero {
  position: relative; color: #fff; background: var(--brand-hero); overflow: hidden;
  padding: clamp(64px, 12vw, 132px) var(--gutter) clamp(56px, 9vw, 104px);
}
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-img) center/cover no-repeat; opacity: .42; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--brand-primary) 85%, transparent) 0%, rgba(10,10,10,.15) 45%, rgba(10,10,10,.75) 100%); }
.hero .inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; text-align: center; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 6vw, 3.6rem); margin-bottom: .35em; }
.hero p.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 720px; margin: 0 auto 1.6em; color: rgba(255,255,255,.92); }
.hero .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero .count { display: inline-block; margin-bottom: 18px; font: 500 .9rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-accent-on-dark); }

.choices { max-width: var(--maxw); margin: -48px auto 0; padding: 0 var(--gutter); position: relative; z-index: 2; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.choice { display: flex; flex-direction: column; gap: 8px; padding: 24px; text-decoration: none; color: var(--brand-text); transition: transform .2s var(--ease), box-shadow .2s var(--ease); min-height: 190px; }
.choice:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: var(--brand-text); }
.choice .ico { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-primary-tint); color: var(--brand-primary-deep); }
.choice h2 { font-size: 1.3rem; margin: 6px 0 0; }
.choice p { margin: 0; font-size: .95rem; }
.choice .go { margin-top: auto; color: var(--brand-primary-deep); font-weight: 600; }
.section { padding: clamp(48px, 7vw, 80px) 0; }
.section h2.section-title { margin-bottom: 8px; }
.section .sub { text-align: center; color: var(--brand-muted); margin: 0 auto 28px; max-width: 640px; }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mcard { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--brand-text); border-top: 6px solid var(--k-primary, var(--brand-primary)); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.mcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: var(--brand-text); }
.mcard .ph { aspect-ratio: 4/3; background: var(--k-primary, var(--brand-primary)) var(--k-motif, none); background-size: auto; position: relative; overflow: hidden; }
.mcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.mcard .greet { position: absolute; left: 12px; bottom: 12px; background: var(--k-accent, #fff); color: var(--k-accent-on, #222); font: 700 .85rem/1 var(--font-display); padding: 7px 10px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.mcard .body { padding: 16px 18px 18px; display: grid; gap: 4px; }
.mcard h3 { margin: 0; font-size: 1.15rem; }
.mcard .place { font-size: .92rem; color: var(--brand-muted); display: flex; gap: 6px; align-items: flex-start; }
.mcard .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 24px 0 20px; }
.toolbar input[type=search] { flex: 1 1 260px; max-width: 460px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--brand-line); background: #fff; color: var(--brand-ink); font: 500 .95rem/1 var(--font-body); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-on-primary); }
.page-head { padding-top: 36px; }   /* keeps .wrap's side gutter (16px on phones) */
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--brand-primary); }

/* ---------- Map ---------- */
.map-wrap { display: grid; grid-template-columns: 1fr 340px; height: calc(100vh - var(--chrome-h, 60px)); }
#map { height: 100%; min-height: 360px; background: #dfeef2; }
.map-list { overflow: auto; border-left: 1px solid var(--brand-line); background: #fff; }
.map-list h1 { font-size: 1.4rem; color: var(--brand-primary); padding: 18px 18px 0; }
.map-list button { display: flex; gap: 12px; width: 100%; text-align: left; align-items: center; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--brand-line); background: #fff; cursor: pointer; font: inherit; color: var(--brand-ink); min-height: 64px; }
.map-list button:hover { background: var(--brand-surface-2); }
.map-list img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--k-primary); }
.map-list small { display: block; color: var(--brand-muted); }
.leaflet-popup-content { font-family: var(--font-body); font-size: 15px; }
.leaflet-popup-content .btn { min-height: 40px; margin-top: 8px; }

/* ---------- Walk host ---------- */
.walk-host { position: relative; height: calc(100vh - var(--chrome-h, 60px)); height: calc(100dvh - var(--chrome-h, 60px)); background: #eef3f4; } /* --chrome-h = header + ticker, set by app.js */
body.walking .site-footer { display: none; }

/* ---------- Kiosk page ---------- */
.kiosk { --k-primary: var(--brand-primary); --k-secondary: var(--brand-primary-deep); --k-accent: #F6A623; --k-ink: #333; --k-paper: #F4FAFC; background: var(--k-paper); color: var(--k-ink); }
.k-hero { position: relative; color: var(--k-on-primary, #fff); background: var(--k-primary); overflow: hidden; }
.k-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--k-motif); opacity: 1; }
.k-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,0) 60%); }
.k-hero .inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter); display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.k-portrait { aspect-ratio: 1; border-radius: 24px; overflow: hidden; border: 6px solid var(--k-accent); box-shadow: 0 16px 40px rgba(0,0,0,.3); background: #fff; }
.k-portrait img { width: 100%; height: 100%; object-fit: cover; }
/* No portrait (e.g. a limited / masked kiosk): no empty frame; the words take the full width. */
.k-portrait:empty { display: none; }
.k-hero .inner:has(> .k-portrait:empty) { grid-template-columns: minmax(0, 1fr); }
.k-greet { display: inline-flex; align-items: baseline; gap: 10px; font: 700 clamp(2rem, 5vw, 3.2rem)/1.05 var(--font-display); color: var(--k-accent); text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.k-greet small { font: 500 .85rem/1 var(--font-body); color: currentColor; opacity: .9; letter-spacing: .08em; text-transform: uppercase; }
.k-hero h1 { color: inherit; margin: 10px 0 6px; font-size: clamp(1.9rem, 4.6vw, 3rem); }
.k-members { font-size: 1.05rem; opacity: .95; margin: 0 0 10px; }
.k-place { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-bottom: 12px; }
.k-headline { font: 300 clamp(1.1rem, 2.4vw, 1.45rem)/1.35 var(--font-display); margin: 8px 0 18px; max-width: 46ch; }
.k-headline strong { font-weight: 700; }
.k-status { background: rgba(255,255,255,.18); color: inherit; }
.k-listen { display: flex; flex-wrap: wrap; gap: 10px; }
.k-listen .btn-accent { --b-bg: var(--k-accent); --b-fg: var(--k-on-accent, #1b1b1b); font-weight: 700; }
.k-listen .btn-hero { --b-fg: var(--k-on-primary, #fff); }
.k-note { margin-top: 14px; padding: 12px 16px; border-radius: 10px; background: rgba(255,255,255,.16); max-width: 60ch; }

.k-body { max-width: var(--maxw); margin: 0 auto; padding: 32px var(--gutter) 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.k-section { scroll-margin-top: 130px; background: #fff; border-radius: var(--radius-xl); box-shadow: var(--shadow-1); padding: clamp(18px, 3vw, 32px); border: 1px solid rgba(0,0,0,.05); }
.k-section > h2 { display: flex; align-items: center; gap: 10px; color: var(--k-primary); font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.k-section > h2 .num { display: none; }
.k-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.k-jump { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; top: 60px; z-index: 5; background: var(--k-paper); padding: 10px var(--gutter); border-bottom: 1px solid rgba(0,0,0,.06); justify-content: center; }
.k-jump a { text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--k-ink); font-weight: 600; font-size: .92rem; min-height: 40px; display: inline-flex; align-items: center; }
.k-jump a:hover { background: rgba(0,0,0,.06); }
.k-jump a.k-return { display: none; }
@media (max-width: 900px) {
  .k-jump a.k-return { display: inline-flex; position: sticky; left: 0; z-index: 1; flex: none; background: var(--k-primary); color: var(--k-on-primary, #fff); box-shadow: 0 0 0 6px var(--k-paper); }
}

/* Slideshow */
.slides { position: relative; border-radius: 16px; overflow: hidden; background: #111; aspect-ratio: 16/9; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); display: grid; place-items: center; }
.slide.on { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: contain; }
.slide .bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(22px) brightness(.55); }
.slide img, .slide iframe, .slide video { position: relative; }
.slide iframe, .slide video { width: 100%; height: 100%; border: 0; }
.slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 20px 16px; color: #fff; font-size: 1.05rem; background: linear-gradient(0deg, rgba(0,0,0,.75), rgba(0,0,0,0)); z-index: 2; }
.s-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #222; font-size: 1.6rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.s-nav.prev { left: 12px; } .s-nav.next { right: 12px; }
.s-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; }
.dots button { width: 14px; height: 14px; border-radius: 50%; border: 0; background: rgba(0,0,0,.2); cursor: pointer; padding: 0; }
.dots button[aria-current="true"] { background: var(--k-primary); transform: scale(1.2); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; margin-top: 10px; }
.thumbs button { flex: none; width: 96px; height: 64px; border-radius: 8px; overflow: hidden; border: 3px solid transparent; padding: 0; cursor: pointer; background: #ddd; }
.thumbs button[aria-current="true"] { border-color: var(--k-primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Letter */
.letter-meta { color: var(--brand-muted); font-weight: 600; margin-bottom: 6px; }
.letter h3 { color: var(--k-ink); }
.hl { list-style: none; padding: 0; margin: 12px 0 18px; display: grid; gap: 8px; }
.hl li { padding-left: 30px; position: relative; }
.hl li::before { content: ""; position: absolute; left: 6px; top: .55em; width: 12px; height: 12px; border-radius: 3px; background: var(--k-accent); transform: rotate(45deg); }
.letter-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-k { --b-bg: var(--k-primary); --b-fg: var(--k-on-primary, #fff); }
.btn-k-tint { --b-bg: color-mix(in srgb, var(--k-primary) 12%, white); --b-fg: var(--k-primary); }
.transcript { white-space: pre-line; background: var(--k-paper); border-radius: 12px; padding: 20px; margin-top: 16px; font-size: 1.02rem; line-height: 1.75; max-height: 70vh; overflow: auto; }
.pages { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pages button { border: 1px solid var(--brand-line); border-radius: 8px; padding: 0; overflow: hidden; cursor: zoom-in; width: 150px; background: #fff; }
.pages img { width: 100%; height: 190px; object-fit: cover; object-position: top; }
.pages span { display: block; padding: 6px; font-size: .85rem; }

/* Prayer */
.pray-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pray-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--k-paper); font-size: 1.05rem; }
.pray-list li .ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--k-primary); color: var(--k-on-primary, #fff); font-size: .9rem; }
.praise-list li .ic { background: var(--k-accent); color: var(--k-on-accent, #222); }
.quote { margin: 18px 0 0; padding: 20px 22px; border-left: 6px solid var(--k-accent); background: var(--k-paper); border-radius: 0 12px 12px 0; font: 300 1.2rem/1.5 var(--font-display); }
.quote cite { display: block; margin-top: 8px; font: 600 .9rem/1 var(--font-body); font-style: normal; color: var(--brand-muted); }

/* Place */
.now { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.now .tile { flex: 1 1 200px; padding: 16px 18px; border-radius: 14px; background: var(--k-primary); color: var(--k-on-primary, #fff); }
.now .tile .big { font: 700 1.8rem/1.1 var(--font-display); }
.now .tile .lbl { font-size: .85rem; opacity: .9; text-transform: uppercase; letter-spacing: .06em; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0; }
.facts div { padding: 12px 14px; border-radius: 10px; background: var(--k-paper); }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-muted); font-weight: 700; }
.facts dd { margin: 4px 0 0; color: var(--k-ink); }
.advisory { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin: 16px 0; background: #FFF6E0; color: #5A4300; }
.advisory.l1 { background: #E9F7EE; color: #155D2E; }
.advisory.l3, .advisory.l4 { background: #FDEBEA; color: #7A1F1A; }
.news { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.news li { padding: 16px 18px; border-radius: 12px; border: 1px solid var(--brand-line); background: #fff; }
.news .when { font-size: .85rem; color: var(--brand-muted); font-weight: 600; }
.news h4 { margin: 4px 0 6px; font-size: 1.08rem; }
.news h4 a { color: var(--k-ink); }
.news .why { margin: 8px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--k-paper); font-size: .95rem; }
.news .why b { color: var(--k-primary); }
.fine { font-size: .85rem; color: var(--brand-muted); margin-top: 14px; }

/* Support */
.support { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.support div { padding: 16px; border-radius: 12px; background: var(--k-paper); }
.support h4 { margin: 0 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--k-primary); }
.support p { margin: 0; overflow-wrap: anywhere; }
.k-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; flex-direction: column; }
.lightbox .lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; color: #fff; gap: 10px; }
.lightbox .lb-stage { flex: 1; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 8px; -webkit-overflow-scrolling: touch; }
.lightbox img { max-width: min(100%, 1100px); height: auto; transition: max-width .2s; background: #fff; }
.lightbox.zoom img { max-width: none; width: 1600px; }

/* Narration bar */
.narration-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 120; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-radius: 999px; background: rgba(20,20,20,.92); color: #fff; box-shadow: var(--shadow-2); max-width: calc(100vw - 24px); }
.narration-bar .nb-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }
.narration-bar .btn { min-height: 44px; }
body.walking .narration-bar { bottom: 150px; }

@media (max-width: 900px) {
  .choices { grid-template-columns: 1fr; margin-top: -36px; }
  .choice { min-height: 0; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .choice .go { margin-top: 0; width: 100%; }
  .k-hero .inner { grid-template-columns: 1fr; text-align: left; }
  .k-portrait { max-width: 260px; }
  .k-two { grid-template-columns: 1fr; }
  .map-wrap { grid-template-columns: 1fr; grid-template-rows: 55vh auto; height: auto; }
  .map-list { border-left: 0; border-top: 1px solid var(--brand-line); }
}
@media (max-width: 560px) {
  .s-nav { width: 46px; height: 46px; }
  .k-jump { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .k-jump a { white-space: nowrap; }
}
.narration-bar[hidden] { display: none; }

/* Public demo: a strip above the header that always leads back to missionarylane.org */
.demo-strip { background: #17325C; color: #fff; text-align: center; font: 500 .85rem/1.4 var(--font-body); padding: 7px var(--gutter); }
.demo-strip a { color: #fff; font-weight: 700; margin-left: .6em; }
.demo-strip a.demo-cta { background: #D93D32; padding: 3px 10px; border-radius: 999px; text-decoration: none; white-space: nowrap; display: inline-block; }
@media (max-width: 560px) {
  /* Phones: one tight line — short message, the two links side by side, the pill never wraps. */
  .demo-strip:not([hidden]) { font-size: .78rem; padding: 6px 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; }
  .demo-strip a { margin-left: 0; white-space: nowrap; }
}
.site-footer .powered { width: 100%; font-size: .8rem; opacity: .75; }
.site-footer .powered a { color: inherit; }

/* =====================================================================================================
   Church style (churches.brand.style → html[data-ml-*], set by js/tenant.js applyStyleAttrs).
   These change STRUCTURE (header, hero, cards, buttons, headings, surface, texture, alignment), not just colour.
   The first value of each key is the original look and has no rules here, so a church without a style is unchanged.
   Kiosk interiors keep their own per-missionary palette; only their outer chrome (section shape, buttons) follows.
   ===================================================================================================== */

/* ---------- buttons ---------- */
html[data-ml-buttons="pill"] .btn, html[data-ml-buttons="pill"] .btn-lg, html[data-ml-buttons="pill"] .btn-hero { border-radius: 999px; }
html[data-ml-buttons="pill"] .btn { padding-inline: 1.5em; }
html[data-ml-buttons="square"] .btn, html[data-ml-buttons="square"] .btn-lg, html[data-ml-buttons="square"] .btn-hero,
html[data-ml-buttons="square"] .pill, html[data-ml-buttons="square"] .chip { border-radius: 0; }
html[data-ml-buttons="square"] .btn { letter-spacing: .01em; }

/* ---------- headings ---------- */
html[data-ml-headings="upper"] :is(h1, h2, h3, .section-title) {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: -.005em; font-weight: 800; line-height: 1;
}
html[data-ml-headings="upper"] .display { font-weight: 800; letter-spacing: -.01em; }
html[data-ml-headings="upper"] .hero h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); line-height: .92; }
html[data-ml-headings="upper"]:not([data-ml-hero="split"]) .hero .display strong { color: var(--brand-accent-on-dark); }
html[data-ml-headings="upper"] .section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); }
html[data-ml-headings="upper"] :is(.mcard h3, .choice h2) { font-size: 1.35rem; letter-spacing: 0; }
html[data-ml-headings="upper"] .site-header nav a { text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; font-weight: 600; }
html[data-ml-headings="serif-italic"] :is(h1, h2, .section-title, .display) {
  font-family: var(--font-display); font-style: italic; font-weight: 600; letter-spacing: 0;
}
html[data-ml-headings="serif-italic"] h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
html[data-ml-headings="serif-italic"] .display { font-weight: 500; }
html[data-ml-headings="serif-italic"] .display strong { font-weight: 700; }
html[data-ml-headings="serif-italic"] .hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.2rem); }
html[data-ml-headings="serif-italic"] .section-title { font-size: clamp(1.9rem, 3.6vw, 2.5rem); }
html[data-ml-headings="serif-italic"] .section-title::after { content: ""; display: block; width: 64px; height: 0; margin: 14px auto 0; border-top: 3px double var(--brand-primary); }
html[data-ml-headings="serif-italic"][data-ml-align="left"] .section-title::after { margin-left: 0; }

/* ---------- alignment ---------- */
html:is([data-ml-align="left"], [data-ml-hero="split"]) .hero .inner { max-width: calc(var(--maxw) - 2 * var(--gutter)); }
html[data-ml-align="left"] .hero .inner { text-align: left; }
html[data-ml-align="left"] .hero p.lead { margin-left: 0; }
html[data-ml-align="left"] .hero .ctas { justify-content: flex-start; }
html[data-ml-align="left"] .section-title, html[data-ml-align="left"] .section .sub { text-align: left; margin-left: 0; }

/* ---------- header ---------- */
html[data-ml-header="light"] .site-header {
  background: color-mix(in srgb, var(--brand-surface) 94%, transparent); color: var(--brand-ink);
  box-shadow: 0 1px 0 var(--brand-line);
}
html[data-ml-header="light"] .site-header .brand .name { color: var(--brand-primary-deep); font-weight: 700; }
html[data-ml-header="light"] .site-header .brand .sub { color: var(--brand-muted); }
html[data-ml-header="light"] .site-header nav a[aria-current="page"] { background: none; color: var(--brand-primary-deep); box-shadow: inset 0 -3px 0 var(--brand-primary); border-radius: 0; }
html[data-ml-header="light"] .site-header nav :is(a, button):hover { background: var(--brand-primary-tint); color: var(--brand-primary-deep); }
/* overlay: transparent over the lobby hero, solid (the dark hero colour) once scrolled and on every other page */
html[data-ml-header="overlay"] .site-header { background: color-mix(in srgb, var(--brand-hero) 94%, transparent); color: #fff; }
html[data-ml-header="overlay"][data-ml-view="lobby"]:not([data-ml-scrolled]) .site-header {
  background: linear-gradient(180deg, rgba(0,0,0,.5), rgba(0,0,0,0)); backdrop-filter: none;
}
html[data-ml-header="overlay"] .site-header { transition: background-color .3s var(--ease); }
html[data-ml-header="overlay"] .site-header nav a[aria-current="page"] { background: none; box-shadow: inset 0 -2px 0 var(--brand-accent-on-dark); border-radius: 0; }
html[data-ml-header="overlay"][data-ml-view="lobby"] .hero { margin-top: calc(-1 * var(--chrome-h, 60px)); padding-top: calc(var(--chrome-h, 60px) + clamp(64px, 12vw, 132px)); }
html[data-ml-header="overlay"][data-ml-view="lobby"] .ticker { background: color-mix(in srgb, var(--brand-hero) 55%, transparent); backdrop-filter: blur(6px); }

/* ---------- hero ---------- */
/* photo (default) on a dark page or under an overlay header: full-bleed, the photo carries it, a quiet dark gradient */
html[data-ml-hero="photo"][data-ml-header="overlay"] .hero { min-height: min(88vh, 780px); display: flex; align-items: center; }
html[data-ml-hero="photo"][data-ml-header="overlay"] .hero .inner { width: 100%; }
html[data-ml-hero="photo"][data-ml-surface="dark"] .hero::before { opacity: .78; }
html[data-ml-hero="photo"][data-ml-surface="dark"] .hero::after { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.18) 38%, rgba(0,0,0,.35) 70%, var(--brand-surface) 100%); }
/* photo + left alignment: a soft side gradient so the photo shows on the right */
html[data-ml-hero="photo"][data-ml-align="left"] .hero::before { opacity: 1; }
html[data-ml-hero="photo"][data-ml-align="left"] .hero::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-hero) 92%, transparent) 0%, color-mix(in srgb, var(--brand-hero) 78%, transparent) 42%, color-mix(in srgb, var(--brand-hero) 10%, transparent) 78%);
}
html[data-ml-hero="photo"][data-ml-align="left"] .hero .inner > * { max-width: 640px; }
html[data-ml-hero="photo"][data-ml-align="left"]:not([data-ml-header="overlay"]) .hero {
  margin: 14px max(14px, calc((100vw - var(--maxw)) / 2 - 40px)) 0; border-radius: var(--radius-xl);
  padding-inline: calc(var(--gutter) + 8px);
}
/* tint: the photo in one colour (the deep brand colour, which always reads with white text) */
html[data-ml-hero="tint"] .hero { --ml-tint: var(--ml-light-deep, var(--brand-primary-deep)); background: var(--ml-tint); }
html[data-ml-hero="tint"] .hero::before { filter: grayscale(1) brightness(1.7) contrast(1.1); mix-blend-mode: multiply; opacity: 1; }
html[data-ml-hero="tint"] .hero::after { background: linear-gradient(180deg, rgba(0,0,0,.08) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.32) 100%); }
html[data-ml-hero="tint"] .hero .count { color: #fff; opacity: .92; }
html[data-ml-hero="tint"] .hero .btn:not(.btn-hero) { --b-bg: #fff; --b-fg: var(--ml-tint); }
/* block: a solid colour block with large geometric shapes, no photo */
html[data-ml-hero="block"] .hero { --ml-block: var(--ml-light-deep, var(--brand-primary-deep)); background: var(--ml-block); padding-bottom: clamp(88px, 12vw, 140px); }
html[data-ml-hero="block"] .hero::before {
  opacity: 1;
  background:
    radial-gradient(circle at calc(100% - 70px) 70px, var(--brand-accent-on-dark) 0 92px, transparent 93px),
    radial-gradient(circle at 70px calc(100% - 40px), transparent 0 112px, color-mix(in srgb, var(--brand-primary-bright) 70%, transparent) 113px 146px, transparent 147px),
    radial-gradient(circle at 18% 22%, color-mix(in srgb, #fff 16%, transparent) 0 26px, transparent 27px),
    radial-gradient(circle at 84% 86%, color-mix(in srgb, #fff 14%, transparent) 0 14px, transparent 15px),
    radial-gradient(circle, color-mix(in srgb, #fff 13%, transparent) 2px, transparent 2.6px) 0 0 / 22px 22px;
}
html[data-ml-hero="block"] .hero::after {
  inset: auto auto 18% calc(50% + min(42vw, 520px)); width: 170px; height: 170px; border-radius: 34px;
  background: color-mix(in srgb, var(--brand-primary-bright) 55%, transparent); transform: rotate(18deg);
}
html[data-ml-hero="block"] .hero .count { color: var(--brand-accent-on-dark); }
html[data-ml-hero="block"] .hero h1 { font-weight: 800; }
html[data-ml-hero="block"] .hero .display { font-weight: 800; letter-spacing: -.02em; }
html[data-ml-hero="block"] .hero .display strong { color: var(--brand-accent-on-dark); }
html[data-ml-hero="block"] .hero .btn:not(.btn-hero) { --b-bg: var(--brand-accent-on-dark); --b-fg: var(--brand-on-accent); font-weight: 700; }
/* split: words on the left, the photo on the right, on the page colour */
html[data-ml-hero="split"] .hero { background: var(--brand-surface); color: var(--brand-text); padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(40px, 6vw, 72px); }
html[data-ml-hero="split"] .hero::before { inset: clamp(40px, 6vw, 72px) var(--gutter) clamp(40px, 6vw, 72px) auto; width: calc(min(100vw, var(--maxw)) * .44); right: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); opacity: 1; border-radius: var(--radius); }
html[data-ml-hero="split"] .hero::after { display: none; }
html[data-ml-hero="split"] .hero .inner { text-align: left; min-height: clamp(360px, 38vw, 480px); display: flex; flex-direction: column; justify-content: center; }
html[data-ml-hero="split"] .hero .inner > * { max-width: 52%; }
html[data-ml-hero="split"] .hero h1 { color: var(--brand-ink); }
html[data-ml-hero="split"] .hero p.lead { color: var(--brand-text); margin-left: 0; }
html[data-ml-hero="split"] .hero .count { color: var(--brand-primary-deep); }
html[data-ml-hero="split"] .hero .ctas { justify-content: flex-start; }
html[data-ml-hero="split"] .hero .btn-hero { --b-bg: transparent; --b-fg: var(--brand-ink); border-color: var(--brand-ink); backdrop-filter: none; }
html[data-ml-hero="split"] .hero .btn-hero:hover { --b-bg: var(--brand-ink); --b-fg: var(--brand-surface); }
html[data-ml-hero="split"] .choices { margin-top: 0; }
html[data-ml-hero="split"] .jumbo { margin-top: 0; }
@media (max-width: 900px) {
  html[data-ml-hero="split"] .hero { padding-top: calc(52vw + 24px); }
  html[data-ml-hero="split"] .hero::before { inset: 0 0 auto 0; width: auto; height: 52vw; border-radius: 0; }
  html[data-ml-hero="split"] .hero .inner { min-height: 0; }
  html[data-ml-hero="split"] .hero .inner > * { max-width: none; }
  html[data-ml-hero="block"] .hero::after { display: none; }
  html[data-ml-hero="block"] .hero::before {
    background:
      radial-gradient(circle at calc(100% + 18px) -18px, var(--brand-accent-on-dark) 0 66px, transparent 67px),
      radial-gradient(circle at -10px 100%, transparent 0 70px, color-mix(in srgb, var(--brand-primary-bright) 70%, transparent) 71px 92px, transparent 93px),
      radial-gradient(circle, color-mix(in srgb, #fff 13%, transparent) 2px, transparent 2.6px) 0 0 / 22px 22px;
  }
}

/* ---------- cards ---------- */
html[data-ml-cards="outline"] .card { box-shadow: none; border: 1px solid color-mix(in srgb, var(--brand-ink) 24%, transparent); border-radius: var(--radius); }
html[data-ml-cards="outline"] :is(.card, .choice, .mcard):hover { box-shadow: none; border-color: var(--brand-ink); transform: none; }
html[data-ml-cards="outline"] .mcard { border-top: 1px solid color-mix(in srgb, var(--brand-ink) 24%, transparent); }
html[data-ml-cards="outline"] .mcard .ph { border-bottom: 4px solid var(--k-primary, var(--brand-primary)); }
html[data-ml-cards="outline"] .choice .ico { border-radius: 0; background: none; border: 1px solid currentColor; width: 44px; height: 44px; }
html[data-ml-cards="outline"] .section .wrap > .section-title { padding-top: 16px; border-top: 1px solid var(--brand-ink); }
html[data-ml-cards="flat"] .card { background: var(--brand-surface-2); border: 0; box-shadow: none; }
html[data-ml-cards="flat"] .mcard { background: transparent; border-top: 0; }
html[data-ml-cards="flat"] .mcard .ph { border-radius: var(--radius-xl); }
html[data-ml-cards="flat"] .mcard .body { padding: 14px 2px 4px; }
html[data-ml-cards="flat"] :is(.choice, .mcard):hover { box-shadow: none; }
html[data-ml-cards="flat"] .mcard:hover .ph img { transform: scale(1.04); }
html[data-ml-cards="flat"] .mcard .ph img { transition: transform .5s var(--ease); }
html[data-ml-cards="framed"] .card { border-radius: var(--radius); box-shadow: 0 0 0 5px var(--brand-surface), 0 0 0 6px color-mix(in srgb, var(--brand-primary) 45%, transparent), 0 10px 24px rgba(40,20,10,.08);
  border: 1px solid color-mix(in srgb, var(--brand-primary) 30%, transparent); }
html[data-ml-cards="framed"] .mcard { border-top: 1px solid color-mix(in srgb, var(--brand-primary) 30%, transparent); padding: 8px; }
html[data-ml-cards="framed"] .mcard .ph { border-radius: 2px; }
html[data-ml-cards="framed"] .mcard .body { padding: 14px 10px 10px; text-align: center; justify-items: center; }
html[data-ml-cards="framed"] .mcard .place { justify-content: center; }
html[data-ml-cards="framed"] .choice .ico { border-radius: 50%; }
html[data-ml-cards="framed"] .choices { gap: 26px; }
/* kiosk outer chrome follows the card shape */
html[data-ml-cards="outline"] .k-section { box-shadow: none; border: 1px solid rgba(0,0,0,.18); border-radius: var(--radius); }
html[data-ml-cards="flat"] .k-section { box-shadow: none; border: 0; }
html[data-ml-cards="framed"] .k-section { border-radius: var(--radius); box-shadow: 0 0 0 5px var(--k-paper), 0 0 0 6px color-mix(in srgb, var(--k-primary) 35%, transparent); }

/* ---------- texture ---------- */
html[data-ml-texture="dots"] main { background-image: radial-gradient(color-mix(in srgb, var(--brand-primary) 20%, transparent) 1.2px, transparent 1.7px); background-size: 24px 24px; }
html[data-ml-texture="shapes"] main { position: relative; overflow-x: clip;
  background:
    radial-gradient(circle at -60px 900px, color-mix(in srgb, var(--brand-accent-on-dark) 26%, transparent) 0 190px, transparent 191px),
    radial-gradient(circle at calc(100% + 40px) 1180px, transparent 0 130px, color-mix(in srgb, var(--brand-primary) 14%, transparent) 131px 172px, transparent 173px);
  background-repeat: no-repeat; }
html[data-ml-texture="grain"] :is(main, .site-footer) { position: relative; }
html[data-ml-texture="grain"] :is(main, .site-footer)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-ml-texture="grain"] .kiosk { position: relative; z-index: 1; }

/* ---------- surface ---------- */
/* warm: paper page; tenant.js supplies the paper neutrals. Cards stay white so they lift off the paper. */
html[data-ml-surface="warm"] .site-footer { border-top: 3px double color-mix(in srgb, var(--brand-footer-text) 40%, transparent); }
/* dark: tenant.js flips the neutral tokens (light text on a dark page); these replace the hard-coded whites. */
html[data-ml-surface="dark"] { color-scheme: dark; }
html[data-ml-surface="dark"] :is(.card, .pill:not([aria-pressed="true"]), .map-list, .map-list button, .j-card, .j-arrow, .j-pause, .news li) { background: var(--brand-surface-2); }
html[data-ml-surface="dark"][data-ml-cards="flat"] .mcard { background: transparent; }
html[data-ml-surface="dark"] .j-ctrl { background: var(--brand-surface); }
html[data-ml-surface="dark"] :is(.section-title, .page-head h1, .map-list h1) { color: var(--brand-primary-deep); }
html[data-ml-surface="dark"] .map-list button:hover { background: color-mix(in srgb, var(--brand-surface-2), #fff 6%); }
html[data-ml-surface="dark"] :is(input, select, textarea) { background: var(--brand-surface-2); color: var(--brand-ink); border-color: var(--brand-line); }
html[data-ml-surface="dark"] .skip-link { color: #141414; }
html[data-ml-surface="dark"] .btn-ghost:hover { --b-bg: var(--brand-surface-2); }
html[data-ml-surface="dark"] .site-footer { border-top: 1px solid var(--brand-line); }
/* kiosk interiors stay light whatever the page surface: restore the light neutrals inside them */
html[data-ml-surface="dark"] .kiosk {
  --brand-ink: var(--ml-light-ink); --brand-text: var(--ml-light-text); --brand-muted: var(--ml-light-muted); --brand-line: var(--ml-light-line);
  --brand-primary-deep: var(--ml-light-deep); --brand-primary-tint: color-mix(in srgb, var(--ml-light-deep) 12%, transparent);
  --brand-surface: #fff; --brand-surface-2: #F4F4F4; color-scheme: light;
}
html[data-ml-surface="dark"] .kiosk .btn-ghost { background: #fff; }
