/* Shared public layout and navigation, October 2026. */
:root {
    --page-width: 1440px;
    --page-gutter: 32px;
    --ui-border: #dce5ed;
    --ui-muted: #465d75;
}
/* One outer edge; prose keeps its own readable measure inside it. */
.wrap,
.page-hero .wrap.narrow,
.is-inner-page .section > .wrap.narrow,
.is-inner-page .section > .wrap.narrow:has(.rich-content),
.is-inner-page .section > .wrap.narrow:has(.content-card > .rich-content),
.site-footer .wrap,
.topbar .wrap {
    width: min(var(--page-width), calc(100% - var(--page-gutter) * 2));
    margin-inline: auto;
}
.social-links {
    margin-left: calc((100vw - min(var(--page-width), calc(100vw - var(--page-gutter) * 2))) / -2);
    padding-left: max(var(--page-gutter), calc((100vw - var(--page-width)) / 2));
}
.page-hero { padding: 32px 0 24px; }
.page-hero .hero-copy { max-width: 70ch; width: auto; }
.rich-content > p,
.rich-content > ul,
.rich-content > ol { max-width: 75ch; }
.is-inner-page .rich-content { overflow-wrap: anywhere; }
.is-inner-page .rich-content .table-scroll { max-width: 100%; overflow-x: auto; }
.is-inner-page .rich-content table { min-width: 0; width: 100%; }
.is-inner-page .rich-content table th,
.is-inner-page .rich-content table td {
    min-width: 0;
    overflow-wrap: anywhere;
}
.is-inner-page .rich-content table th:first-child,
.is-inner-page .rich-content table td:first-child,
.is-inner-page .rich-content table th:nth-child(2),
.is-inner-page .rich-content table td:nth-child(2),
.is-inner-page .rich-content table th:nth-child(3),
.is-inner-page .rich-content table td:nth-child(3) { min-width: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 200; padding: 12px 18px; background: #075f59; color: white; transform: translateY(-160%); border-radius: 8px; }
.skip-link:focus { transform: none; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #075f59; outline-offset: 4px; }
html { scroll-padding-top: 120px; }
body.is-inner-page { background: #f7f9fc; }
body.is-home:not([data-home-background="white"]) { background: linear-gradient(180deg, #f0f7fc, #f7faf8 65%, #fff); }
body.is-home[data-hero-theme="color"] .hero::before {
    height: 100%;
    background: radial-gradient(circle at 85% 20%, rgb(191 226 213 / 45%), transparent 40%), linear-gradient(125deg, #edf5fd, #f4f0fc 55%, #eff8f2);
}
.section.alt { background: #eef6f5; }
.content-card, .resource-card, .article-card { border: 1px solid var(--ui-border); box-shadow: 0 6px 20px rgb(17 42 87 / 5%); border-radius: 20px; }
.resource-card, .article-card { background: #fff; }
.resource-card:nth-child(3n+1) { border-top: 4px solid #93c9be; }
.resource-card:nth-child(3n+2) { border-top: 4px solid #b5a6de; }
.resource-card:nth-child(3n) { border-top: 4px solid #a2c5e6; }
.button.button-primary { background: #075f59; color: #fff; box-shadow: 0 6px 14px rgb(7 95 89 / 14%); }
.button.button-primary:hover { background: #064b46; }
.button { min-height: 46px; }
.site-header .nav-row { grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: 20px; }
.site-header .site-nav { flex-wrap: nowrap; gap: clamp(10px, 1.25vw, 22px); }
.site-header .site-nav-link { font-size: .875rem; white-space: nowrap; }
@media (min-width: 1200px) { .site-header .site-nav-link { min-height: 46px; } }
.site-header .nav-dropdown,
.site-header .nav-group:hover .nav-dropdown,
.site-header .nav-group:focus-within .nav-dropdown { display: none !important; }
.site-header .nav-group.is-open > .nav-dropdown { display: grid !important; gap: 4px; }
.site-header .nav-dropdown { background: #fff; max-height: min(65vh, 560px); overflow-y: auto; }
.site-header .nav-group:nth-last-of-type(-n+2) .nav-dropdown { left: auto; right: 0; }
.site-header .nav-dropdown-link { min-height: 44px; display: flex; align-items: center; }
.site-header [aria-current="page"],
.site-header .is-current-group > button { color: #075f59; font-weight: 800; }
.site-header [aria-current="page"] { background: #e6f3ee; border-radius: 8px; padding-inline: 12px; }
.site-header .is-current-group > button::before { transform: scaleX(1); background: #075f59; height: 3px; }
.mobile-priority-links { display: none; }
.task-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.task-shortcuts a { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 72px; padding: 12px; border: 1px solid #c8ddd8; border-radius: 14px; color: #143d4c; background: #eff8f4; font-size: .88rem; font-weight: 700; }
.task-shortcuts a:nth-child(2) { background: #f1edfa; border-color: #ded5ee; }
.task-shortcuts a:nth-child(3) { background: #edf4fc; border-color: #d4e2f0; }
.task-shortcuts a:nth-child(4) { background: #fff5de; border-color: #ebdfbe; }
.task-shortcuts a:hover { border-color: #075f59; transform: translateY(-2px); }
.task-shortcuts span { font-size: .72rem; color: #516277; }
.is-home .hero { padding: 24px 0 32px; }
.is-home .hero-copy-block { padding-top: 0; }
.is-home .hero h1 { font-size: clamp(2.2rem, 4.2vw, 4rem); max-width: 18ch; }
.is-home .hero-grid { align-items: center; gap: 32px; }
.is-home .hero-shortcuts { gap: 8px; }
.is-home .shortcut-pill { min-height: 44px; height: auto; padding: 8px 12px; line-height: 1.35; white-space: normal; }
.is-home .hero-stage { min-width: 0; }
.is-home .hero-stage { min-height: 450px; box-shadow: 0 12px 30px rgb(17 42 87 / 8%); }
.breaking-ticker { background: #fff2d8; border: 1px solid #e8d5ab; color: #624216; box-shadow: none; }
.breaking-ticker-label { background: #f1ddaf; color: #624216; }
.breaking-ticker-link { color: #624216; }
.resource-search { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; gap: 16px; align-items: end; padding: 24px; margin-bottom: 20px; background: #fff; border: 1px solid var(--ui-border); border-radius: 18px; }
.resource-search label { display: grid; gap: 8px; color: var(--ink); font-weight: 700; }
.resource-search input, .resource-search select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid #a6b6c4; background: #fff; color: var(--ink); border-radius: 8px; font: inherit; }
.resource-search .filter-reset { display: inline-flex; align-items: center; min-height: 46px; text-decoration: underline; }
.resource-results-count { color: var(--ui-muted); margin: 0 0 24px; }
.resource-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.resource-pagination a { min-height: 44px; display: inline-flex; align-items: center; padding: 10px 16px; background: #fff; border: 1px solid var(--ui-border); border-radius: 10px; }
@media (min-width: 768px) and (max-width: 1199px) {
    :root { --page-gutter: 24px; }
    .article-grid, .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
    .site-header .topbar { display: none; }
    .site-header .nav-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 76px; padding: 10px 0; gap: 0 12px; }
    .site-header .brand { width: auto; min-width: 0; padding: 0; }
    .site-header .brand-copy { min-width: 0; max-width: none; }
    .site-header .brand strong { white-space: normal; overflow: visible; line-height: 1.25; }
    .site-header .menu-toggle { display: inline-flex; position: relative; align-items: center; justify-content: flex-end; min-width: 92px; width: 92px; min-height: 44px; padding: 0 10px 0 36px; grid-column: 2; border: 1px solid var(--ui-border); border-radius: 12px; background: white; }
    .site-header .menu-toggle-label { position: static; width: auto; height: auto; padding: 0; margin: 0; overflow: visible; clip: auto; font-size: .85rem; }
    .site-header .menu-toggle-line { position: absolute; left: 12px; width: 18px; height: 2px; margin: 0; background: currentColor; }
    .site-header .menu-toggle-line:nth-child(1) { top: 14px; }
    .site-header .menu-toggle-line:nth-child(2) { top: 21px; }
    .site-header .menu-toggle-line:nth-child(3) { top: 28px; }
    .site-header.is-menu-open .menu-toggle-line:nth-child(1) { top: 21px; transform: rotate(45deg); }
    .site-header.is-menu-open .menu-toggle-line:nth-child(2) { opacity: 0; }
    .site-header.is-menu-open .menu-toggle-line:nth-child(3) { top: 21px; transform: rotate(-45deg); }
    .site-header .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; width: 100%; margin: 0; border: 1px solid var(--ui-border); border-radius: 16px; background: #f7fafc; box-shadow: 0 12px 28px rgb(17 42 87 / 12%); }
    .site-header.is-menu-open .site-nav { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; max-height: var(--menu-space, calc(100dvh - 96px)); padding: 12px; margin: 0; overflow: auto; visibility: visible; opacity: 1; transform: none; overscroll-behavior: contain; }
    .site-header .site-nav > * { flex: 0 0 auto; }
    .site-header .nav-group { width: 100%; }
    .site-header .site-nav-link { width: 100%; min-height: 46px; height: auto; padding: 10px 14px; justify-content: space-between; white-space: normal; line-height: 1.4; border: 1px solid var(--ui-border); border-radius: 10px; background: #fff; box-shadow: none; }
    .site-header .site-nav-link::before { display: none; }
    .site-header .nav-dropdown { position: static; min-width: 0; width: auto; max-height: none; margin: 6px 0 0 10px; padding: 4px; border: 0; border-left: 2px solid #b8d7ce; border-radius: 0; background: #fff; box-shadow: none; visibility: visible; opacity: 1; transform: none; }
    .site-header .nav-dropdown-link { padding: 10px 12px; }
    .site-header .mobile-priority-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
    .mobile-priority-links a { min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 10px; background: #e7f3ee; border: 1px solid #c8ddd8; border-radius: 10px; }
    .mobile-priority-links .mobile-priority-login { grid-column: 1 / -1; background: #075f59; color: white; }
    .site-header .mobile-menu-utility { display: grid; gap: 14px; padding: 16px; margin-top: 8px; border: 1px solid var(--ui-border); border-radius: 12px; background: #eef3fa; }
    .site-header .mobile-menu-login { display: none; }
    .site-header .mobile-menu-quick-links a { min-height: 44px; display: inline-flex; align-items: center; }
    .resource-search { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
@media (max-width: 767px) {
    :root { --page-gutter: 16px; }
    .site-header .brand strong { font-size: .75rem; }
    .site-header .brand small { font-size: .48rem; }
    .page-hero { padding: 24px 0 16px; }
    .page-hero h1 { overflow-wrap: anywhere; }
    .is-inner-page .section > .wrap.narrow .content-card { padding: 20px; }
    .article-grid, .resource-grid { grid-template-columns: 1fr; }
    .is-home .hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
    .is-home .hero-grid { gap: 24px; }
    .is-home .hero-stage { min-height: 300px; }
    .task-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .task-shortcuts a { min-height: 64px; }
    .resource-search { grid-template-columns: 1fr; padding: 18px; }
    .resource-search .button { width: 100%; }
    .is-inner-page .rich-content table { display: block; overflow-x: auto; }
    .is-inner-page .rich-content table th, .is-inner-page .rich-content table td { min-width: 130px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
