/* Healing: MT Deaf Community. MCDi's maroon is on the main buttons. */

/* ---------- The look: wildflower colors (plum, teal, marigold, coral) ---------- */
:root {
  --bg: #fffaf3; --surface: #ffffff; --ink: #2b1a2e; --ink-soft: #5d4a60;
  --primary: #4b2557; --primary-2: #0f6b5c; --primary-ink: #ffffff;
  --accent: #8c1d40; --accent-deep: #6b1631; --gold: #f4b41a; --gold-ink: #3a2700;
  --soft: #fbe6d6; --line: #ecd9c8; --sky: #7fc3df;
  --bar: linear-gradient(90deg, #f4b41a, #ef6f4b, #6b2d73, #0f6b5c, #5aa9d6);
  --font-head: "DM Serif Display", Georgia, "Times New Roman", serif; --head-weight: 400;
  --font-body: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --map-land: #f7e9d9; --map-line: #e2c6a8; --map-major: #c99a6c; --map-dot: #6b2d73;
}

:root {
  --fluid: clamp(16px, 1.25vw, 44px);
  --heading: var(--primary); --link: var(--accent-deep); --link-hover: var(--accent);
  --on-accent: #ffffff; --on-primary: #ffffff; --field-line: #8b8078;
  --good: #1f6b43; --bad: #a3162f; --radius: 16px; --shadow: 0 6px 18px rgba(32, 24, 20, 0.1); --shadow-lg: 0 16px 34px rgba(32, 24, 20, 0.18); color-scheme: light; }

/* ---------- Universal Design Access choices (set on the page by the script) ---------- */
html[data-size="1"] { font-size: calc(var(--fluid) * 1.25); }
html[data-size="2"] { font-size: calc(var(--fluid) * 1.5); }
html[data-size="3"] { font-size: calc(var(--fluid) * 2); }
html[data-font="readable"] body, html[data-font="readable"] body * { font-family: Verdana, "Atkinson Hyperlegible", "Trebuchet MS", Arial, sans-serif !important; }
/* Wider spacing: the amounts WCAG asks pages to survive. */
html[data-spacing="wide"] body { letter-spacing: 0.12em; word-spacing: 0.16em; line-height: 1.9; }
html[data-spacing="wide"] p { margin-bottom: 2em; }

/* High contrast: black on white, black bars, strong borders, underlined links. */
html[data-contrast="high"] {
  --bg: #ffffff; --surface: #ffffff; --ink: #000000; --ink-soft: #111111; --line: #000000; --soft: #f1f1f1; --sky: #ffffff;
  --primary: #000000; --primary-2: #000000; --heading: #000000; --accent: #5a0a22; --accent-deep: #3d0616; --link: #0a0a96; --link-hover: #000000;
  --gold: #ffd400; --gold-ink: #000000; --field-line: #000000;
  --map-land: #ffffff; --map-line: #777777; --map-major: #000000; --map-dot: #000000;
}
/* Dark: light words on black, yellow buttons. */
html[data-contrast="dark"] {
  color-scheme: dark;
  --bg: #000000; --surface: #0b0b0b; --ink: #ffffff; --ink-soft: #ececec; --line: #ffffff; --soft: #1b1b1b; --sky: #000000;
  --primary: #000000; --primary-2: #000000; --heading: #ffffff; --accent: #ffdd33; --accent-deep: #fff3a6; --link: #9fe3ff; --link-hover: #ffffff;
  --on-accent: #000000; --gold: #ffdd33; --gold-ink: #000000; --bad: #ff9a9a; --good: #7ff0b0; --field-line: #ffffff;
  --map-land: #1b1b1b; --map-line: #5a5a5a; --map-major: #9a9a9a; --map-dot: #ffdd33;
  --bar: linear-gradient(90deg, #ffdd33, #9fe3ff, #ffffff);
}
html[data-contrast="high"] .card, html[data-contrast="dark"] .card { border: 2px solid var(--line); box-shadow: none; }
html[data-contrast="high"] a, html[data-contrast="dark"] a { text-decoration: underline; }
html[data-contrast="high"] .hero-text, html[data-contrast="dark"] .hero-text { background: #000; }
html[data-contrast="high"] .donate-band, html[data-contrast="dark"] .donate-band { background: #000; border-top: 3px solid var(--line); border-bottom: 3px solid var(--line); }
html[data-contrast="dark"] .site-footer, html[data-contrast="high"] .site-footer { border-top: 3px solid var(--line); }
html[data-contrast="dark"] .alert { background: #2b0000; color: #ffd6d6; border-color: var(--bad); }
html[data-contrast="dark"] .notice { background: #002b12; color: #c9f7dc; border-color: var(--good); }
html[data-contrast="dark"] .display-panel, html[data-contrast="high"] .display-panel { border: 3px solid var(--line); }
html[data-contrast="dark"] .button.disabled, html[data-contrast="dark"] .button:disabled { background: #333; border-color: #888; color: #ddd; }
html[data-contrast="high"] .tab, html[data-contrast="dark"] .tab { border: 2px solid var(--line); box-shadow: none; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; font-size: var(--fluid); }
/* The page always fills the window. Everything is measured in rem, and the rem follows the width of the window (never smaller than 16px), so the page looks the same at every size, from a phone to an ultra-wide monitor, and short pages push the footer to the bottom. */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; overflow-wrap: break-word; margin: 0; background: var(--bg); color: var(--ink); font: 1.125rem/1.65 var(--font-body); }
body > main { flex: 1 0 auto; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.2rem; }
.narrow { max-width: 42rem; }
.section { padding-top: 2.6rem; padding-bottom: 1.2rem; }

h1, h2, h3, .brand, .place { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); color: var(--heading); line-height: 1.15; margin: 0 0 0.7rem; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 0.95rem; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
.small { font-size: 0.95rem; color: var(--ink-soft); }
.muted { opacity: 0.6; }
.center { text-align: center; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent-deep); color: var(--on-accent); padding: 0.7rem 1rem; z-index: 50; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A colorful line, the way DeafGain's headings have one. */
.accent-bar { height: 6px; background: var(--bar); }

/* ---------- Header ---------- */
.site-header { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; transition: box-shadow 0.25s; }
.site-header.scrolled { box-shadow: 0 6px 20px rgba(32, 24, 20, 0.12); }
/* The site name sits in the middle of the top bar; the Universal Design Access button is at the right. An empty first cell keeps the name truly centered. */
.header-row { display: grid; grid-template-columns: minmax(4.2rem, 1fr) minmax(0, auto) minmax(4.2rem, 1fr); align-items: center; gap: 0.4rem 1rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.header-row::before { content: ""; }
/* The top bar spans the whole window, so the Universal Design Access symbol sits at the far right edge. */
.header-row:not(.admin-row) { max-width: none; padding-left: 1.2rem; padding-right: 1.2rem; }
.header-row .brand { justify-self: center; text-align: center; }
.header-row .udv-button { justify-self: end; }
/* The private admin pages keep a plain bar: name on the left, links on the right. */
.header-row.admin-row { display: flex; flex-wrap: wrap; justify-content: space-between; }
.header-row.admin-row::before { content: none; }
.admin-row nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 1.2rem; }
.admin-row nav a { color: var(--heading); font-weight: 700; text-decoration: none; padding: 0.45rem 0; }
.admin-row nav a:hover, .admin-row nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.brand { display: inline-flex; align-items: center; gap: 1rem; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.5rem; line-height: 1.15; text-wrap: balance; color: var(--heading); text-decoration: none; }
.brand-link { display: inline-flex; border-radius: 16px; position: relative; }
/* The bubble that pops up under a logo, so people can see it is a link. Same idea as the town names on the map. */
.link-tip { position: absolute; z-index: 30; top: calc(100% + 0.7rem); left: 0; width: min(17rem, 86vw); display: flex; flex-direction: column; gap: 0.3rem; padding: 0.6rem 0.6rem 0.8rem; text-align: center; background: var(--heading); color: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); font-family: var(--font-body); font-size: 1rem; line-height: 1.3; visibility: hidden; opacity: 0; transform: translateY(-8px) scale(0.95); transform-origin: 20% 0; transition: opacity 0.15s, transform 0.18s, visibility 0s 0.18s; pointer-events: none; }
.link-tip.tip-right { left: auto; right: 0; transform-origin: 80% 0; }
.link-tip::before { content: ""; position: absolute; top: -0.5rem; left: 2.4rem; border: 0.5rem solid transparent; border-top: 0; border-bottom-color: var(--heading); }
.link-tip.tip-right::before { left: auto; right: 2.4rem; }
.link-tip img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 9px; border: 2px solid rgba(255, 255, 255, 0.7); transform: none !important; background: #fff; }
.link-tip strong { font-size: 1.05rem; }
.link-tip span { color: #f4c842; font-weight: 700; font-size: 0.95rem; }
.brand-link:hover .link-tip, .brand-link:focus-visible .link-tip, .date-wrap:hover .link-tip, .udv-button:hover .link-tip, .udv-button:focus-visible .link-tip { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@media (hover: none), (max-width: 640px) { .link-tip { display: none; } }
/* The bubble on the Universal Design Access button shows a picture of the panel that opens. */
.udv-button { position: relative; }
.link-tip.access-tip { width: min(15rem, 86vw); font-weight: 400; text-align: center; }
.link-tip.access-tip::before { right: 0.9rem; }
.link-tip.access-tip img { aspect-ratio: auto; object-fit: contain; }
html[data-motion="calm"] .link-tip { transition: none; transform: none; }
html[data-layout="simple"] .link-tip { display: none; }
.brand img { width: 4.75rem; height: 4.75rem; border-radius: 14px; transition: transform 0.3s; }
/* MCDi's gold logo on MCDi's maroon, the way it looks on deafmissoula.org, a little larger so it stands out. */
.brand .brand-mcdi { width: 6rem; height: 6rem; padding: 4px; border-radius: 50%; background: #6b1631; object-fit: contain; box-shadow: 0 4px 12px rgba(75, 20, 40, 0.35); }
.brand-link:hover img { transform: rotate(-6deg) scale(1.06); }
.brand-link:hover .brand-mcdi { transform: rotate(6deg) scale(1.06); }
.udv-button { flex: none; display: inline-grid; place-items: center; font: inherit; color: var(--accent); background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 0; width: 3rem; height: 3rem; cursor: pointer; box-shadow: var(--shadow); transition: background 0.2s, transform 0.2s, box-shadow 0.2s; }
.udv-button svg { width: 1.9rem; height: 1.9rem; }
.udv-button:hover { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.udv-button.on { background: #7fe5df; border-color: #0a6f69; color: #000; }
html[data-contrast="high"] .udv-button, html[data-contrast="dark"] .udv-button { background: #000; color: #fff; border: 2px solid #fff; box-shadow: none; }
.udv-button[hidden] { display: none; }

/* ---------- Buttons ---------- */
.button { max-width: 100%; overflow-wrap: anywhere; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; padding: 0.8rem 1.5rem; border-radius: 12px; border: 2px solid transparent; min-height: 48px; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.button:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.button:active { transform: translateY(0); box-shadow: none; }
.button-main { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.button-main:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--on-accent); }
.button-quiet { background: var(--surface); color: var(--link); border-color: var(--accent); }
.button-quiet:hover { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.button-gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.button-gold:hover { background: #fff; color: var(--accent-deep); border-color: #fff; }
.button.disabled, .button:disabled { background: #d9dde0; border-color: #d9dde0; color: #3d4852; cursor: not-allowed; transform: none; box-shadow: none; }
.link-button { background: none; border: 0; padding: 0.3rem 0; font: inherit; font-weight: 700; color: var(--link); text-decoration: underline; cursor: pointer; text-underline-offset: 3px; }
.inline { display: inline; margin: 0; }

/* ---------- Hero: words on a colored panel, the Montana mountains beside it ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 36rem; color: var(--on-primary); }
.media-layout > *, .hero > * { min-width: 0; }
.hero-text { position: relative; container-type: inline-size; background: radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 40%), linear-gradient(135deg, var(--primary), var(--primary-2)); padding: 3.4rem 2.6rem 3.4rem max(1.2rem, calc((100vw - 72rem) / 2 + 1.2rem)); display: flex; flex-direction: column; justify-content: center; }
/* The title is two lines: "Join the Confluence:" and then "A Dialogue for Healing" on ONE line. The size follows the width of the panel so the second line always fits. */
.hero h1 { color: var(--on-primary); text-align: center; font-size: min(2.7rem, 9cqi); line-height: 1.15; }
.hero h1 .t1, .hero h1 .t2 { display: block; }
.hero h1 .t2 { white-space: nowrap; }
/* If someone chose bigger text, a wider font or wider spacing in Universal Design Access, the line is allowed to wrap, so nothing is ever cut off. */
html[data-size] .hero h1, html[data-font] .hero h1, html[data-spacing] .hero h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); }
html[data-size] .hero h1 .t2, html[data-font] .hero h1 .t2, html[data-spacing] .hero h1 .t2 { white-space: normal; }
.hero .lead { font-size: 1.25rem; }
/* A maroon pill, the same maroon as the main buttons, with white words (maroon words would not be readable on the dark panel). */
.lead-note { display: block; width: 100%; box-sizing: border-box; margin: 1rem 0 0; padding: 0.7rem 1.4rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); border: 2px solid rgba(255, 255, 255, 0.55); font-size: 1.05rem; font-weight: 700; text-align: center; }
.hero-photo { position: relative; min-height: 20rem; background: var(--sky); }
.hero-pic { position: absolute; inset: 0; overflow: hidden; }
.hero-pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: saturate(1.15) contrast(1.04); animation: slow-zoom 22s ease-out both; }
@keyframes slow-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.date-wrap { position: absolute; right: 1.4rem; bottom: 1.4rem; width: 7.8rem; }
.date-badge { width: 100%; text-align: center; background: var(--surface); color: var(--heading); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.date-badge .mon { display: block; background: var(--accent); color: var(--on-accent); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0; font-size: 0.95rem; }
.date-badge .day { display: block; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 2.8rem; line-height: 1.1; padding-top: 0.2rem; }
.date-badge .sat { display: block; font-size: 0.85rem; font-weight: 700; padding-bottom: 0.45rem; color: var(--ink-soft); }

/* ---------- Cards, icons, placeholders ---------- */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.icon { display: inline-grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 14px; background: var(--soft); color: var(--accent); margin-bottom: 0.8rem; }
.icon.big { width: 4rem; height: 4rem; background: rgba(255, 255, 255, 0.18); color: var(--on-accent); margin: 0; }
.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.6rem; padding: 1.4rem; border-radius: var(--radius); border: 3px dashed color-mix(in srgb, var(--heading) 35%, var(--line)); color: var(--heading); background: linear-gradient(160deg, var(--soft), color-mix(in srgb, var(--sky) 30%, var(--surface))); transition: transform 0.25s, box-shadow 0.25s; }
.ph:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ph .ph-icon { display: grid; place-items: center; width: 4.6rem; height: 4.6rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.ph .ph-icon svg { width: 2.2rem; height: 2.2rem; }
.ph strong { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.5rem; color: var(--heading); }
.ph p { margin: 0; color: var(--ink-soft); }
.video-ph { aspect-ratio: 16 / 9; }
.video { width: 100%; height: auto; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); }

/* ---------- The vlog, with the drop-down tabs beside it ---------- */
.media-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
.media-side { align-self: start; }
/* The details as drop-down tabs with bullets. They open and close with Enter or Space, and need no script. */
.tab { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 0.8rem; box-shadow: var(--shadow); overflow: hidden; transition: box-shadow 0.25s, transform 0.25s; }
.tab:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tab summary { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 2.4rem; text-align: center; align-items: center; gap: 0.75rem; cursor: pointer; list-style: none; padding: 0.85rem 1rem; min-height: 56px; font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.3rem; color: var(--heading); }
.tab summary::-webkit-details-marker { display: none; }
.tab summary::after { content: ""; justify-self: end; margin-right: 0.8rem; width: 0.7rem; height: 0.7rem; border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(45deg); transition: transform 0.25s; flex: none; }
.tab[open] > summary::after { transform: rotate(-135deg); }
.tab summary:hover { background: var(--soft); }
.tab-icon { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: var(--soft); color: var(--accent); flex: none; }
.tab-icon svg { width: 1.4rem; height: 1.4rem; }
.tab-body { padding: 0.2rem 1.2rem 1.3rem; }
.tab-body > :last-child { margin-bottom: 0; }
.tab ul { margin: 0; padding: 0.2rem 1.2rem 1.1rem 2.8rem; }
.tab li { margin-bottom: 0.4rem; }
.tab .plain-bullets { padding: 0 0 0 1.4rem; }
.tab li::marker { color: var(--accent); }
/* When and Where: the lines are centered, so there are no bullets to line up. */
.tab ul.center-list { list-style: none; padding: 0.2rem 1.2rem 1.1rem; text-align: center; }
/* A tab inside the About tab: the Facilitator. */
.sub-tab { margin: 1.1rem 0 0; box-shadow: none; background: color-mix(in srgb, var(--soft) 55%, var(--surface)); }
.sub-tab:hover { box-shadow: var(--shadow); }
.sub-tab summary { font-size: 1.15rem; min-height: 3rem; padding: 0.6rem 0.9rem; }
.facilitator { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem; }
.fac-ph, .fac-photo { width: 9rem; height: 9rem; border-radius: 50%; flex: none; max-width: 100%; }
.fac-ph { padding: 0.6rem; gap: 0.2rem; }
.fac-ph .ph-icon { width: 3.4rem; height: 3.4rem; }
.fac-ph .ph-icon svg { width: 1.8rem; height: 1.8rem; }
.fac-ph p { font-size: 0.85rem; }
.fac-photo { object-fit: cover; box-shadow: var(--shadow); }
.fac-info { flex: 1 1 10rem; min-width: 0; }
.fac-info p:last-child { margin-bottom: 0; }

/* ---------- Where + the Montana map ---------- */
.where { background: linear-gradient(180deg, var(--soft), var(--bg)); margin-top: 2.6rem; padding: 3rem 0; }
.where-center { display: flex; flex-direction: column; align-items: center; }
.place { font-size: 1.25rem; }
.map-stage { width: 100%; max-width: 52rem; margin: 0.6rem auto 0.8rem; }
.map-buttons { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.7rem; margin: 0.9rem 0 0; }
.map-buttons .button svg { width: 22px; height: 22px; }
.mt-map { margin: 0; }
.mt-map svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(32, 24, 20, 0.14)); overflow: visible; }
.mt-map figcaption { margin-top: 0.5rem; font-size: 0.95rem; color: var(--ink-soft); text-align: center; }
.mt-map .land { fill: var(--map-land); stroke: none; }
.mt-map .contour { fill: none; stroke: var(--map-line); stroke-width: 1; }
.mt-map .contour.major { stroke: var(--map-major); stroke-width: 1.6; }
.mt-map .border { fill: none; stroke: var(--heading); stroke-width: 2.4; stroke-linejoin: round; }
/* Other towns: small dots that grow, and the name pops up by itself the moment you point at one. */
.mt-map .town { cursor: default; }
.mt-map .town .hit { fill: transparent; }
.mt-map .town .dot { fill: var(--map-dot); transform-box: fill-box; transform-origin: center; transition: transform 0.25s, fill 0.25s; }
.mt-map .town:hover .dot { transform: scale(2); fill: var(--accent); }
.mt-map .town .tip { opacity: 0; transform: translateY(10px) scale(0.9); transform-box: fill-box; transform-origin: 50% 100%; transition: opacity 0.12s, transform 0.15s; pointer-events: none; }
.mt-map .town .tip rect, .mt-map .town .tip path { fill: var(--heading); stroke: var(--surface); stroke-width: 2px; }
.mt-map .town .tip path { stroke: none; }
.mt-map .town .tip text { font: 700 26px var(--font-body); fill: var(--surface); }
.mt-map .town:hover .tip { opacity: 1; transform: none; }
/* Missoula: a diamond that ripples a few times when the map scrolls into view or you point at it. */
.mt-map .here { cursor: default; }
.mt-map .pin { fill: var(--accent); stroke: var(--surface); stroke-width: 4; transform-box: fill-box; transform-origin: center; transition: transform 0.25s; }
.mt-map .pin-core { fill: var(--on-accent); }
.mt-map .here:hover .pin { transform: rotate(45deg) scale(1.25); }
.mt-map .ripple { fill: none; stroke: var(--accent); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ripple 1.6s ease-out 3 both; }
.mt-map .r2 { animation-delay: 0.5s; }
.mt-map .r3 { animation-delay: 1s; }
.mt-map .here:hover .ripple { animation-name: ripple; animation-iteration-count: 3; }
@keyframes ripple { from { transform: scale(0.35); opacity: 0.8; } to { transform: scale(2.6); opacity: 0; } }
.mt-map .here-label { font: 700 34px var(--font-head); fill: var(--link); paint-order: stroke; stroke: var(--map-land); stroke-width: 8px; }

/* ---------- Forms ---------- */
.form-card { max-width: 40rem; }
.form-card h2 { margin-bottom: 0.9rem; }
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.hint { font-size: 0.95rem; color: var(--ink-soft); margin: 0 0 0.3rem; }
input[type="text"], input[type="email"], input[type="password"], select, textarea { width: 100%; font: inherit; padding: 0.7rem 0.85rem; border: 2px solid var(--field-line); border-radius: 10px; background: var(--surface); color: var(--ink); min-height: 48px; transition: border-color 0.2s, box-shadow 0.2s; }
input:hover, select:hover, textarea:hover { border-color: var(--primary-2); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); outline: none; }
textarea { min-height: 12rem; }
#q-message { min-height: 8rem; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }
.error { color: var(--bad); font-weight: 700; margin: 0.35rem 0 0; }
.alert { background: #fdecef; border: 2px solid var(--bad); color: #6d0f20; border-radius: 12px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-weight: 700; }
.notice { background: #e8f3ec; border: 2px solid var(--good); color: #14472c; border-radius: 12px; padding: 0.8rem 1rem; margin-bottom: 1rem; font-weight: 700; }
/* The spam trap: invisible to people and to screen readers, but a bot that fills every box fills this one. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.message.problem { border-left: 6px solid var(--bad); }
.message.good { border-left: 6px solid var(--good); }

/* ---------- Support this event: roomy, centered, one thing after another ---------- */
.donate-band { margin-top: 3.5rem; background: linear-gradient(120deg, var(--accent-deep), var(--accent)); color: var(--on-accent); padding: 4.5rem 0 4.8rem; }
.donate-stack { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 46rem; gap: 1.4rem; }
.donate-stack .icon.big { margin: 0; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: #6b1631; color: #f4c842; box-shadow: 0 4px 12px rgba(75, 20, 40, 0.35), 0 0 0 3px #f4c842, inset 0 0 0 4px #6b1631, inset 0 0 0 5px rgba(244, 200, 66, 0.6); }
.donate-stack .icon.big svg { width: 2.2rem; height: 2.2rem; fill: #f4c842; }
.donate-band h2 { color: var(--on-accent); margin: 0; font-size: clamp(2rem, 4.5vw, 2.8rem); }
.donate-band p { margin: 0; max-width: 100%; width: 40rem; font-size: 1.2rem; line-height: 1.85; overflow-wrap: anywhere; }
.donate-stack .button { margin-top: 0.8rem; }
/* The Donate or Join button carries Zeffy's own icon, on a white round tile. */
.button-zeffy { background: #fff; color: #3a2700; border-color: #fff; gap: 0.8rem; padding: 0.6rem 1.6rem 0.6rem 0.7rem; min-height: 60px; font-size: 1.15rem; }
.button-zeffy img { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #fff; padding: 4px; box-shadow: 0 0 0 2px #0fd1a6; object-fit: contain; }
.button-zeffy:hover { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.button-zeffy.disabled { background: #e6e9eb; border-color: #e6e9eb; color: #333c44; }

/* ---------- Footer ---------- */
.peaks { display: block; width: 100%; height: 5.5rem; margin-top: 2.5rem; fill: var(--primary); }
.site-footer { background: var(--primary); color: var(--on-primary); padding: 0.4rem 0 2rem; }
.site-footer a { color: var(--on-primary); }
.site-footer .small { color: var(--on-primary); opacity: 0.9; }
/* The same idea as DeafGain's footer: a line across, "DeafGain LLC." in yellow, and an underlined Privacy link. */
.footer-legal { margin-top: 0.4rem; text-align: center; }
.footer-legal p { margin: 0 0 0.4rem; }
.footer-legal .yellow { color: #facc15; font-weight: 700; }
.footer-legal .small { opacity: 1; font-size: 1rem; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 0.5rem 0.6rem; }

/* ---------- Privacy page: styled like DeafGain's own privacy page (its font, its colors) ---------- */
.dg-privacy { --pv-head: #3b5a4c; --pv-text: #4a5568; --pv-bg: #f5f7f9; background: var(--pv-bg); color: var(--pv-text); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; padding: 4rem 0 3rem; }
.dg-privacy .pv-wrap { max-width: 48rem; margin: 0 auto; padding: 0 1.2rem; }
.dg-privacy h1, .dg-privacy h2 { font-family: inherit; font-weight: 700; color: var(--pv-head); }
.dg-privacy h1 { font-size: clamp(1.9rem, 4.5vw, 2.4rem); text-align: center; margin-bottom: 0.7rem; }
.dg-privacy .pv-date { text-align: center; font-size: 1.15rem; margin-bottom: 2.4rem; }
.dg-privacy h2 { font-size: 1.35rem; margin: 0 0 0.6rem; }
.dg-privacy .pv-body { font-size: 1.125rem; line-height: 1.7; }
.dg-privacy .pv-body section { margin-top: 2rem; }
.dg-privacy ul { list-style: disc; padding-left: 1.6rem; margin: 0; }
.dg-privacy li { margin-bottom: 0.6rem; }
.dg-privacy .pv-close { text-align: center; margin: 0 0 1.6rem; }
.dg-privacy .pv-close:last-child { margin: 2.4rem 0 0; }
.dg-privacy .pv-close .button { text-decoration: none; }
.dg-privacy .pv-strong { font-weight: 700; color: var(--pv-head); }
html[data-contrast="high"] .dg-privacy, html[data-contrast="dark"] .dg-privacy { --pv-head: var(--heading); --pv-text: var(--ink); --pv-bg: var(--bg); }

/* ---------- Fade in as you scroll (only when the script is on; never hides anything without it) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .tilt.reveal.in { transition: opacity 0.7s ease, transform 0.25s, box-shadow 0.25s; }

/* ---------- Display panel ---------- */
.display-panel { border: 0; border-radius: 18px; padding: 1.6rem; max-width: 30rem; width: calc(100% - 2rem); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); background: var(--surface); color: var(--ink); }
.display-panel::backdrop { background: rgba(20, 20, 24, 0.55); }
.display-panel h2 { font-size: 1.7rem; }
.dp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.dp-close { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--heading); background: var(--surface); color: var(--heading); font: 700 1.8rem/1 var(--font-body); cursor: pointer; }
.dp-close:hover { background: var(--soft); }
.display-panel { max-height: calc(100vh - 2rem); overflow-y: auto; }
.display-panel fieldset { border: 0; padding: 0; margin: 1rem 0; }
.display-panel legend { font-weight: 700; margin-bottom: 0.4rem; color: var(--heading); padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { margin: 0; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; border: 2px solid var(--heading); border-radius: 999px; padding: 0.35rem 1rem; font-weight: 700; background: var(--surface); transition: background 0.2s; }
.chip:hover span { background: var(--soft); }
.chip input:checked + span { background: var(--gold); border-color: var(--heading); color: var(--gold-ink); box-shadow: inset 0 0 0 2px var(--gold-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch { display: flex; gap: 0.8rem; align-items: flex-start; font-weight: 400; margin: 0 0 1rem; cursor: pointer; }
.switch input { width: 1.5rem; height: 1.5rem; margin-top: 0.25rem; flex: none; accent-color: var(--accent); }
.dp-actions { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 1.2rem; }

/* ---------- Admin ---------- */
.admin h1 { font-size: 1.9rem; }
.stat .big { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--heading); }
.stat .big span { font-size: 1.1rem; font-weight: 600; color: var(--ink-soft); }
.checks { list-style: none; padding: 0; }
.checks li { padding: 0.4rem 0 0.4rem 1.8rem; position: relative; }
.checks li::before { position: absolute; left: 0; font-weight: 800; }
.checks .ok::before { content: "\2713"; color: var(--good); }
.checks .bad::before { content: "!"; color: var(--bad); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 1rem; }
th { background: var(--soft); color: var(--heading); }
.bad-row td { color: var(--bad); }
.preview { white-space: pre-wrap; word-wrap: break-word; background: var(--soft); border-radius: 10px; padding: 1rem; font: 1rem/1.5 ui-monospace, Menlo, monospace; }

/* ---------- Calm page: the Display panel's switch and the computer's own setting both turn motion off ---------- */
html[data-motion="calm"] *, html[data-motion="calm"] *::before, html[data-motion="calm"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion="calm"] .reveal, html[data-layout="simple"] .reveal { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Simple layout: one plain column, no decorative pictures or map. Best with a screen reader or a braille display. ---------- */
html[data-layout="simple"] *, html[data-layout="simple"] *::before, html[data-layout="simple"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-layout="simple"] .hero, html[data-layout="simple"] .where-grid, html[data-layout="simple"] .two-up, html[data-layout="simple"] .media-row, html[data-layout="simple"] .media-layout, html[data-layout="simple"] .grid3, html[data-layout="simple"] .hosts { grid-template-columns: minmax(0, 1fr); }
html[data-layout="simple"] .hero { min-height: 0; }
html[data-layout="simple"] .hero-photo, html[data-layout="simple"] .mt-map, html[data-layout="simple"] .peaks, html[data-layout="simple"] .accent-bar,
html[data-layout="simple"] .icon, html[data-layout="simple"] .ph-icon, html[data-layout="simple"] .host img, html[data-layout="simple"] .initials { display: none; }
html[data-layout="simple"] .wrap { max-width: 46rem; }
html[data-layout="simple"] .hero-text { padding: 2rem 1.2rem; }
html[data-layout="simple"] .card { box-shadow: none; border: 2px solid var(--line); }
html[data-layout="simple"] .tab:hover, html[data-layout="simple"] .tilt:hover, html[data-layout="simple"] .tilt:focus-within, html[data-layout="simple"] .ph:hover, html[data-layout="simple"] .button:hover { transform: none; box-shadow: none; }
html[data-layout="simple"] .tilt::before { display: none; }
html[data-layout="simple"] .where { background: none; }
html[data-layout="simple"] .tab-icon { display: none; }
html[data-layout="simple"] .tab summary { grid-template-columns: minmax(0, 1fr) 2.4rem; }

/* ---------- Smaller screens ---------- */
@media (max-width: 54rem) {
  .hero, .where-grid, .two-up, .media-row, .media-layout { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .hero-text { padding: 2.2rem 1.2rem; }
  .hero-photo { min-height: 16rem; }
  body { font-size: 1.05rem; }
  .card { padding: 1.1rem 1.1rem; }
  .header-row { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .header-row::before { display: none; }
  .header-row .udv-button { justify-self: center; width: 2.9rem; height: 2.9rem; }
  /* On a phone the two logos sit side by side and the name goes on its own line under them, so nothing is ever too wide. */
  .header-row .brand { font-size: 1.2rem; gap: 0.6rem 0.8rem; flex-wrap: wrap; justify-content: center; max-width: 100%; }
  .header-row .brand > span { order: 3; flex: 1 1 100%; }
  .brand img { width: 3.5rem; height: 3.5rem; }
  .brand .brand-mcdi { width: 4.25rem; height: 4.25rem; }
  .site-header { position: static; }
  .button { padding-left: 1rem; padding-right: 1rem; }
}
@media print { .site-header, .site-footer, .peaks, form, .accent-bar { display: none; } }

/* RSVP guests: one name and email for each extra person */
.guests { margin: 0 0 1rem; }
.guests[hidden], fieldset.guest[hidden] { display: none; }
fieldset.guest { border: 1px solid var(--line); border-radius: 12px; padding: 0.4rem 1rem 0.2rem; margin: 0 0 0.9rem; min-width: 0; }
fieldset.guest legend { font-weight: 700; color: var(--heading); padding: 0 0.4rem; }
.host-body { display: block; }
.host-body::after { content: ""; display: block; clear: both; }
.host-body .fac-photo, .host-body .fac-ph { display: block; margin: 0.2rem auto 0.8rem; }
.host-body .fac-ph { display: flex; }
.host-org .host-head, .host-org .host-quote { text-align: center; }
.host-body .host-logo { float: none; display: block; width: min(100%, 17rem); height: auto; aspect-ratio: 2 / 1; object-fit: contain; border-radius: var(--radius); background: #fff; margin: 0.2rem auto 0.8rem; padding: 0.4rem; box-shadow: var(--shadow); shape-outside: none; }
.host-body .host-quote, .host-body .host-link { clear: both; }
.host-org .host-link { text-align: center; }
/* The quote sits under a line that runs between the first paragraph and the quote. */
.host-quote { margin: 1.1rem 0 0.8rem; padding: 0.9rem 0 0; border: 0; border-top: 4px solid var(--accent); font-style: italic; color: var(--heading); }

/* The date card: pointing at it (or tapping it on a touch screen) shows January 2027 with the event day marked.
   Narrow windows and phones: the bubble opens above the card. Wide windows: to the left of the card. */
.link-tip.date-tip { display: flex; top: auto; left: auto; right: 0; bottom: calc(100% + 0.8rem); width: min(18rem, 86vw); transform-origin: 90% 100%; transform: translateY(8px) scale(0.95); }
.link-tip.date-tip::before { top: auto; left: auto; bottom: -0.5rem; right: 2.6rem; border: 0.5rem solid transparent; border-bottom: 0; border-top-color: var(--heading); }
.link-tip.date-tip img { aspect-ratio: auto; object-fit: contain; border: 0; background: transparent; }
.link-tip.date-tip strong { font-size: 1.2rem; }
.link-tip.date-tip span { font-size: 1.05rem; }
.date-wrap.open .link-tip { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@media (min-width: 66rem) {
  .link-tip.date-tip { right: calc(100% + 0.9rem); bottom: 0; transform-origin: 100% 100%; transform: translateX(10px) scale(0.95); }
  .link-tip.date-tip::before { bottom: 2.8rem; right: -0.5rem; border: 0.5rem solid transparent; border-right: 0; border-left-color: var(--heading); }
}
/* Yellow outlines, the gold of the MCDi logo */
.map-buttons .button-main, .button-zeffy { border: 3px solid #f4c842; }
.map-buttons .button-main:hover, .button-zeffy:hover, .button-zeffy.disabled { border-color: #f4c842; }
.lead-note { border: 3px solid #f4c842; }

/* The logo bubbles: the screenshot fills the whole top of the bubble, edge to edge, with the name under it. */
.brand-link .link-tip { padding: 0 0 0.2rem; gap: 0; width: min(20rem, 86vw); }
.brand .brand-link .link-tip img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 0; border-radius: 14px 14px 0 0; display: block; }
.brand-link .link-tip strong { padding: 0.7rem 0.8rem 0.15rem; }
.brand-link .link-tip span { padding: 0 0.8rem 0.6rem; }


/* A slow heartbeat on the two logos, the access button and the date card (the card beats a little bigger), so people can see they are buttons. It is ON for everyone by default, even when
   the computer's "reduce motion" is on (then it is smaller). A switch in Universal Design Access turns it off; so does the Calm view and the
   Simple layout. It stops while the pointer or keyboard is on one of them. */
@keyframes heartbeat {
  0%, 38%, 100% { transform: scale(1); }
  10% { transform: scale(1.1); }
  20% { transform: scale(1); }
  28% { transform: scale(1.07); }
}
@keyframes heartbeat-soft {
  0%, 38%, 100% { transform: scale(1); }
  10% { transform: scale(1.05); }
  20% { transform: scale(1); }
  28% { transform: scale(1.035); }
}
@keyframes heartbeat-big {
  0%, 38%, 100% { transform: scale(1); }
  10% { transform: scale(1.14); }
  20% { transform: scale(1); }
  28% { transform: scale(1.09); }
}
@keyframes heartbeat-big-soft {
  0%, 38%, 100% { transform: scale(1); }
  10% { transform: scale(1.07); }
  20% { transform: scale(1); }
  28% { transform: scale(1.045); }
}
.header-row .brand-link > img, .header-row .udv-button { animation: heartbeat 2.6s ease-in-out infinite; }
.date-wrap:not(:hover):not(:focus-within) .date-badge { animation: heartbeat-big 2.6s ease-in-out 0.45s infinite; }
.header-row .brand-link > img.brand-mcdi { animation-delay: 0.15s; }
.header-row .udv-button { animation-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-beat="off"]):not([data-motion="calm"]):not([data-layout="simple"]) .date-wrap:not(:hover):not(:focus-within) .date-badge { animation: heartbeat-big-soft 2.6s ease-in-out 0.45s infinite !important; }
  html:not([data-beat="off"]):not([data-motion="calm"]):not([data-layout="simple"]) .header-row .brand-link:not(:hover):not(:focus-visible) > img,
  html:not([data-beat="off"]):not([data-motion="calm"]):not([data-layout="simple"]) .header-row .udv-button:not(:hover):not(:focus-visible) { animation: heartbeat-soft 2.6s ease-in-out infinite !important; }
}
.header-row .brand-link:hover > img, .header-row .brand-link:focus-visible > img, .header-row .udv-button:hover, .header-row .udv-button:focus-visible { animation: none !important; }
html[data-beat="off"] .date-badge, html[data-layout="simple"] .date-badge,
html[data-beat="off"] .header-row .brand-link > img, html[data-beat="off"] .header-row .udv-button,
html[data-layout="simple"] .header-row .brand-link > img, html[data-layout="simple"] .header-row .udv-button { animation: none !important; }
