/* Shared navigation is deliberately scoped so the original home keeps its design. */
.site-header.header { position: relative; z-index: 30; background: var(--paper, #f8f6ef); border-bottom: 1px solid var(--line, #dcded1); color: var(--ink, #244536); font-family: LocalReading, 'Segoe UI', Arial, sans-serif; font-size: var(--body-size, 18px); }
.site-header .header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'brand nav settings'; align-items: center; min-height: 110px; padding-block: 18px; gap: 25px; width: min(1220px, calc(100% - 72px)); margin-inline: auto; }
.site-header .site-brand { grid-area: brand; display: flex; align-items: center; min-width: 0; gap: 10px; line-height: 1; text-decoration: none; }
.site-header .site-brand > svg { width: 41px; height: 41px; flex-shrink: 0; }
.site-header .site-brand > span { font-size: 30px; letter-spacing: -1.3px; font-weight: 700; white-space: nowrap; }
.site-header .site-brand .brand-light { font-weight: 400; }
.site-header .site-brand small { display: block; font-size: 8px; letter-spacing: 1.5px; line-height: 1.4; margin-top: 9px; }
.site-header .site-nav { grid-area: nav; display: block; height: auto; padding: 0; width: auto; border: 0; order: initial; }
.site-header .site-nav-list { display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 17px; list-style: none; padding: 0; margin: 0; }
.site-header .site-nav-item { position: relative; min-width: 0; padding: 0; margin: 0; }
.site-header .nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 0; color: inherit; font-size: .9em; line-height: 1.4; white-space: nowrap; text-decoration: none; }
.site-header .nav-link:hover { color: #9b442e; }
.site-header .nav-link.active::after { content: ''; position: absolute; bottom: 1px; left: 0; right: 0; height: 2px; background: #bd6448; }
.site-header .site-nav-pair { display: flex; align-items: center; gap: 1px; }
.site-header .site-nav-pair > .nav-link { position: relative; }
.site-header .site-dropdown-toggle { display: grid; place-items: center; width: 35px; min-height: 44px; padding: 8px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: inherit; }
.site-header .site-dropdown-toggle:hover, .site-header .site-dropdown-toggle[aria-expanded='true'] { background: #e8ecdf; border-color: #c4ceba; }
.site-header .site-dropdown-toggle svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.site-header .site-dropdown-toggle[aria-expanded='true'] svg { transform: rotate(180deg); }
.site-header .site-dropdown { position: absolute; top: calc(100% + 13px); left: -18px; width: 320px; max-width: calc(100vw - 32px); padding: 19px; background: var(--paper, #f8f6ef); border: 1px solid #cdd5c3; border-radius: 10px; box-shadow: 0 12px 30px #24453620; }
.site-header .site-nav-item:last-child .site-dropdown { left: auto; right: -18px; }
.site-header .site-dropdown-label { margin: 0 0 10px; color: var(--muted, #62685f); font-size: .76em; font-weight: 600; line-height: 1.5; }
.site-header .site-dropdown a { display: block; padding: 11px; min-height: 44px; border-radius: 5px; white-space: normal; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }
.site-header .site-dropdown a:hover { background: #e9edde; color: inherit; }
.site-header .site-dropdown-feature strong { display: block; font-size: 1em; font-weight: 600; }
.site-header .site-dropdown-feature > span { display: block; color: var(--muted, #62685f); font-size: .86em; margin: 6px 0 0; }
.site-header .site-dropdown .site-dropdown-all { margin-top: 13px; padding-top: 16px; border-top: 1px solid var(--line, #dcded1); border-radius: 0; font-size: .86em; font-weight: 600; }
.site-header .site-dropdown-all > span { color: #9b442e; margin-left: 6px; }
.site-header .reading-button { grid-area: settings; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 45px; padding: 9px 14px; margin: 0; background: transparent; border: 1px solid #bfc9b5; border-radius: 7px; font-size: .85em; line-height: 1.4; white-space: nowrap; order: initial; }
.site-header .reading-button:hover { background: #e8ecdf; }
.site-header .reading-button > span:last-child { max-width: none; white-space: nowrap; }
.site-header .aa { font-family: Georgia, serif; font-size: 22px; }
.site-header .site-menu-toggle { grid-area: toggle; display: none; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 12px; border: 1px solid #bdc7b3; border-radius: 6px; background: transparent; font-size: .88em; line-height: 1.4; }
.site-header .site-menu-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.site-header .site-menu-toggle:hover { background: #e8ecdf; }
.site-header button:focus-visible, .site-header a:focus-visible { outline: 3px solid #9b442e; outline-offset: 4px; border-radius: 4px; }
.site-header [hidden] { display: none !important; }

/* A managed dialog is used only on the new pages; home keeps its original one. */
.site-settings-dialog { padding: 0; border: 1px solid var(--line, #dcded1); border-radius: 14px; width: min(580px, calc(100% - 28px)); max-height: calc(100dvh - 28px); background: var(--paper, #f8f6ef); color: var(--ink, #244536); font-family: LocalReading, 'Segoe UI', Arial, sans-serif; font-size: var(--body-size, 18px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 25px 100px #15241e50; }
.site-settings-dialog::backdrop { background: #132a24b8; backdrop-filter: blur(4px); }
.site-settings-dialog .dialog-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 25px; border-bottom: 1px solid var(--line, #dcded1); background: var(--paper, #f8f6ef); }
.site-settings-dialog .dialog-brand { font-size: .85em; font-weight: 600; }
.site-settings-dialog .close-dialog { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 7px 12px; border: 1px solid #bfc9b5; border-radius: 5px; background: transparent; font-size: .85em; }
.site-settings-dialog .close-dialog > span { font-size: 25px; line-height: 1; }
.site-settings-content { padding: 25px 30px 30px; }
.site-settings-dialog h2 { margin: 0 0 15px; font-size: 1.55em; line-height: 1.25; letter-spacing: -.025em; }
.site-settings-dialog p { font-size: 1em; line-height: var(--reading-line, 1.7); }
.site-settings-dialog fieldset { border: 0; padding: 0; margin: 26px 0 20px; min-width: 0; }
.site-settings-dialog legend { margin-bottom: 12px; font-size: .95em; font-weight: 600; }
.site-settings-dialog .setting-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.site-settings-dialog .setting-options button { background: transparent; border: 1px solid #aebb9e; border-radius: 6px; padding: 12px 7px; min-height: 75px; line-height: 1.5; font-size: 1.4em; }
.site-settings-dialog .setting-options button > span { display: block; font-size: .55em; line-height: 1.45; overflow-wrap: anywhere; }
.site-settings-dialog .setting-options [aria-pressed='true'] { background: var(--green, #254b3d); border-color: var(--green, #254b3d); color: #fff; }
.site-settings-dialog .check-row { display: flex; align-items: center; gap: 12px; min-height: 51px; font-size: .95em; line-height: 1.5; }
.site-settings-dialog .check-row input { flex-shrink: 0; width: 23px; height: 23px; accent-color: var(--green, #254b3d); }
.site-settings-dialog .site-settings-reset { display: inline-block; padding: 10px 0; margin-top: 14px; min-height: 44px; background: transparent; border: 0; color: inherit; text-align: left; text-decoration: underline; text-underline-offset: 4px; font-size: .9em; }
.site-settings-dialog .settings-note, .site-settings-dialog .site-settings-status { margin: 16px 0 0; font-size: .85em; color: var(--muted, #62685f); }
.site-settings-dialog .site-settings-status:empty { display: none; }

/* Listing pages inherit the site's typography and reading preferences. */
.activity-page { min-height: 65vh; width: min(1120px, calc(100% - 80px)); margin-inline: auto; padding: 27px 0 70px; font-size: var(--body-size, 18px); }
.activity-page p, .activity-page li { line-height: var(--reading-line, 1.7); }
.activity-page .breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; list-style: none; padding: 0; margin: 0 0 25px; color: var(--muted, #62685f); font-size: .85em; line-height: 1.5; height: auto; }
.activity-page .breadcrumbs a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: underline; text-underline-offset: 4px; font-size: inherit; white-space: normal; }
.activity-page .breadcrumbs [aria-current='page'] { color: var(--ink, #244536); }
.activity-page .preview-hero { max-width: 850px; margin: 0 0 37px; padding: 15px 0 0; }
.activity-page .preview-hero .eyebrow { font-size: .75em; letter-spacing: .04em; margin-bottom: 14px; }
.activity-page .preview-hero h1 { font-size: clamp(2.3rem, 4.9vw, 3.7rem); line-height: 1.12; letter-spacing: -.04em; margin: 0 0 21px; font-weight: 500; overflow-wrap: anywhere; }
.activity-page .preview-hero h1 em { color: #a04c34; font-family: Georgia, serif; font-weight: 400; }
.activity-page .preview-hero p { max-width: 700px; font-size: 1.05em; color: var(--muted, #62685f); margin-bottom: 18px; }
.activity-page .activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
.activity-page .activity-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; overflow: hidden; border: 1px solid #d0d8c5; border-radius: 13px; background: #fffdf5; }
.activity-page .activity-art { display: grid; place-items: center; width: 100%; min-height: 220px; background: #e9eddc; overflow: hidden; }
.activity-page .activity-art svg { display: block; max-width: 100%; width: 100%; height: 235px; }
.activity-page .activity-art img { width: 100%; height: auto; max-height: 300px; object-fit: cover; }
.activity-page .activity-content, .activity-page .activity-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; width: 100%; padding: 26px; }
.activity-page .activity-card h2 { margin: 0 0 14px; font-size: 1.55em; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.activity-page .activity-card p { color: var(--muted, #62685f); font-size: 1em; }
.activity-page .activity-facts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 2px 0 22px; list-style: none; }
.activity-page .activity-facts > * { padding: 5px 10px; border-radius: 5px; background: #edf0e2; font-size: .8em; line-height: 1.5; color: var(--ink, #244536); }
.activity-page .activity-card .button { margin-top: auto; }
.activity-page .button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 49px; max-width: 100%; padding: 12px 18px; border: 1px solid var(--green, #254b3d); border-radius: 6px; background: var(--green, #254b3d); color: #fff; font-size: .94em; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; }
.activity-page .button:hover { background: #34624c; transform: none; }
.activity-page .button.outline { background: transparent; color: var(--ink, #244536); }
.activity-page .button.outline:hover { background: #e8ecdf; }
.activity-page .preview-note { padding: 20px 23px; margin-top: 32px; border-left: 3px solid #bd6448; border-radius: 0 8px 8px 0; background: #eeeadd; font-size: .95em; }
.activity-page .preview-back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 30px; font-size: .95em; text-decoration: underline; text-underline-offset: 4px; }
html[data-high-contrast='true'] .site-header .nav-link:hover, html[data-high-contrast='true'] .site-header .site-dropdown-all > span { color: #702915; }
html[data-high-contrast='true'] .site-header .site-dropdown, html[data-high-contrast='true'] .activity-page .activity-card { background: #fff; border-color: #687964; }
html[data-high-contrast='true'] .site-header .site-dropdown-toggle:hover, html[data-high-contrast='true'] .site-header .reading-button:hover { background: #e1e9d9; }
html[data-high-contrast='true'] .activity-page .activity-card p { color: #344334; }
html[data-text-size='large'] .activity-page .preview-hero h1 { font-size: clamp(2.5rem, 5.3vw, 4rem); }
html[data-text-size='xl'] .activity-page .preview-hero h1 { font-size: clamp(2.7rem, 5.6vw, 4.2rem); }

@media (max-width: 1100px) {
  .site-header .header-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'brand toggle' 'settings settings' 'nav nav'; gap: 16px; width: calc(100% - 48px); padding-block: 22px 17px; min-height: 0; }
  .site-header .site-menu-toggle { display: flex; }
  .site-header .reading-button { justify-self: start; }
  .site-header .site-nav { display: none; width: 100%; height: auto; border-top: 1px solid var(--line, #dcded1); margin-top: 0; padding-top: 8px; }
  .site-header[data-nav-open='true'] .site-nav { display: block; }
  .site-header .site-nav-list { display: block; }
  .site-header .site-nav-item { border-bottom: 1px solid var(--line, #dcded1); }
  .site-header .site-nav-item:last-child { border-bottom: 0; }
  .site-header .nav-link { display: flex; min-height: 49px; padding: 12px 8px; width: 100%; font-size: .95em; white-space: normal; }
  .site-header .nav-link.active::after { left: 8px; right: auto; width: 28px; bottom: 5px; }
  .site-header .site-nav-pair { justify-content: space-between; gap: 10px; }
  .site-header .site-dropdown-toggle { width: 49px; min-height: 49px; margin-right: 2px; flex-shrink: 0; }
  .site-header .site-dropdown, .site-header .site-nav-item:last-child .site-dropdown { position: static; top: auto; left: auto; right: auto; width: 100%; max-width: 100%; padding: 12px; margin: 0 0 13px; box-shadow: none; background: #f0f1e7; }
  .site-header .site-dropdown-feature > span { font-size: .9em; }
  .site-header .site-dropdown .site-dropdown-all { font-size: .9em; }
}
@media (max-width: 700px) {
  .activity-page { width: calc(100% - 40px); padding-top: 20px; padding-bottom: 48px; }
  .activity-page .activity-grid { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .activity-page .preview-hero { margin-bottom: 28px; }
  .activity-page .activity-content, .activity-page .activity-card-body { padding: 24px; }
}
@media (max-width: 400px) {
  .site-header .header-inner { width: calc(100% - 28px); gap: 14px 10px; padding-top: 18px; }
  .site-header .site-brand { gap: 7px; }
  .site-header .site-brand > svg { width: 33px; height: 37px; }
  .site-header .site-brand > span { font-size: 25px; letter-spacing: -1px; }
  .site-header .site-brand small { font-size: 6.5px; letter-spacing: .7px; margin-top: 8px; }
  .site-header .site-menu-toggle { gap: 6px; padding: 9px 8px; font-size: .85em; }
  .site-header .reading-button { padding: 9px 12px; font-size: .9em; }
  .site-header .site-dropdown { padding: 10px; }
  .site-settings-content { padding: 23px 18px; }
  .site-settings-dialog .dialog-top { padding: 13px 18px; }
  .site-settings-dialog .setting-options { gap: 5px; }
  .site-settings-dialog .setting-options button { padding: 11px 4px; }
  .site-settings-dialog .setting-options button > span { font-size: .6em; }
  .activity-page { width: calc(100% - 28px); }
  .activity-page .activity-content, .activity-page .activity-card-body { padding: 21px 18px; }
  .activity-page .preview-hero h1 { letter-spacing: -.035em; }
  .activity-page .activity-card h2 { font-size: 1.4em; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header *, .activity-page *, .site-settings-dialog * { transition: none !important; scroll-behavior: auto !important; }
}
