@import url("/ui-foundation.css?v=shared-actions");

:root {
  --ink: #101726;
  --navy: #12263f;
  --navy-2: #183553;
  --paper: #f4f1e8;
  --white: #ffffff;
  --muted: #667085;
  --line: #d8d4c8;
  --lime: #d9ff22;
  --lime-dark: #bbdf00;
  --blue: #2962ff;
  --warning: #fff3c4;
  --max: 1180px;
  --radius: 20px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button, summary, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 10px 14px; background: var(--lime); color: #000; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.eyebrow { margin: 0 0 14px; font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: .9rem; font-weight: 850; letter-spacing: .09em; }
.brand > span { width: 15px; height: 15px; border: 4px solid currentColor; }

/* Hub */
.hub-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(16,23,38,.12); background: rgba(244,241,232,.92); backdrop-filter: blur(14px); }
.nav-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-start { display: flex; align-items: center; gap: 18px; }
.hub-back { display: inline-flex; min-height: 42px; align-items: center; gap: 7px; padding: 8px 15px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: .85rem; font-weight: 800; }
.back-mark { font-size: 1.08em; font-weight: inherit; line-height: 1; }
.hub-back:hover { color: white; background: var(--ink); }
.nav-row nav { display: flex; gap: 28px; font-weight: 700; }
.nav-row nav a { text-decoration: none; }
.nav-row nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.hub-hero { padding: 44px 0 40px; background: var(--ink); color: white; }
.hub-hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr); gap: 44px; align-items: center; }
.hub-hero h1 { margin: 0; max-width: none; font-size: clamp(2.6rem, 4vw, 4.2rem); line-height: 1.02; letter-spacing: -.055em; }
.hub-hero h1 > span { display: block; white-space: nowrap; }
.hero-copy { max-width: 680px; margin: 16px 0 0; color: #cdd5df; font-size: 1rem; line-height: 1.6; }
.schedule-card { padding: 20px 22px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius); background: rgba(255,255,255,.06); }
.schedule-card > p { margin: 0; color: var(--lime); font-weight: 800; }
.schedule-card > strong { display: block; margin-top: 6px; font-size: 1.8rem; line-height: 1.1; }
.schedule-card > span { display: block; margin-top: 10px; color: #cdd5df; }
.schedule-card dl { margin: 16px 0 0; border-top: 1px solid rgba(255,255,255,.22); }
.schedule-card dl div { display: flex; justify-content: space-between; gap: 20px; padding-top: 10px; }
.schedule-card dt { color: #cdd5df; }
.schedule-card dd { margin: 0; font-weight: 800; color: var(--lime); }
.report-section { padding: 42px 0 48px; }
.section-heading { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1; letter-spacing: -.045em; }
.section-heading > p { max-width: 520px; margin: 0; color: var(--muted); }
.section-heading.light { color: white; }
.section-heading.light > p { color: #c9d2de; }
.latest-card { overflow: hidden; display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.latest-main { padding: 42px; }
.latest-meta { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.period { margin: 0; color: var(--muted); font-weight: 750; }
.latest-card h3 { max-width: 840px; margin: 26px 0 14px; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.08; letter-spacing: -.045em; }
.latest-card h3 + p { margin: 0; color: var(--muted); }
.metric-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.metric-row div { min-width: 154px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.metric-row strong { display: block; font-size: 1.55rem; }
.metric-row span { color: var(--muted); font-size: .9rem; }
.latest-actions { min-width: 230px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 32px; background: #edf0f4; }
.latest-actions .primary-button { min-width: 174px; }
.primary-button, .secondary-button, .download-menu summary {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 999px; font-weight: 800; text-decoration: none; cursor: pointer;
}
.primary-button { background: var(--ink); color: white; }
.secondary-button { border: 1px solid currentColor; }
.download-menu { position: relative; }
.download-menu summary { list-style: none; border: 1px solid currentColor; background: white; color: var(--ink); }
.download-menu summary::-webkit-details-marker { display: none; }
.download-menu summary::after { content: none; }
.download-menu > div { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 190px; overflow: hidden; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 18px 45px rgba(16,23,38,.14); }
.download-menu > div a { display: block; padding: 13px 14px; border-radius: 9px; background: #f2f5f8; color: var(--ink) !important; text-decoration: none; font-weight: 750; }
.download-menu > div a + a { margin-top: 7px; }
.download-menu > div a:hover { background: #edf0f4; }
.artifact-viewer-page { min-height: 100vh; background: #f1efe8; color: var(--ink); }
.artifact-viewer-bar { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 64px; padding: 10px clamp(18px, 4vw, 56px); border-bottom: 1px solid var(--line); background: #0e1b2d; color: white; }
.artifact-viewer-bar > a { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; font-weight: 700; }
.artifact-viewer-bar > div { display: grid; text-align: center; }
.artifact-viewer-bar > div span { color: #b9c5d6; font-size: 13px; }
.artifact-download { justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 12px; border: 1px solid rgba(255,255,255,.6); }
.artifact-download[hidden] { display: none; }
.artifact-download span { font-size: 21px; }
.artifact-viewer-main { min-height: calc(100vh - 72px); }
#pdf-viewer { width: 100%; height: calc(100vh - 76px); border: 0; background: #525659; }
.markdown-viewer { width: min(900px, calc(100% - 36px)); margin: 42px auto; padding: clamp(30px, 6vw, 78px); background: white; box-shadow: 0 20px 70px rgba(16,23,38,.12); }
.markdown-viewer h1 { margin-top: 0; font-size: clamp(34px, 5vw, 56px); }
.markdown-viewer h2 { margin-top: 46px; padding-top: 20px; border-top: 3px solid var(--navy); font-size: 30px; }
.markdown-viewer h3 { margin-top: 30px; font-size: 22px; }
.markdown-viewer p, .markdown-viewer li { font-size: 17px; line-height: 1.85; }
.markdown-viewer blockquote { margin: 24px 0; padding: 18px 22px; border-left: 5px solid var(--lime); background: #edf0f4; }
.markdown-table-wrap { overflow-x: auto; margin: 24px 0 34px; }
.markdown-viewer table { width: 100%; border-collapse: collapse; font-size: 15px; }
.markdown-viewer th, .markdown-viewer td { padding: 13px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.markdown-viewer th { background: #0e1b2d; color: white; }
@media (max-width: 640px) {
  .nav-row { min-height: 64px; gap: 10px; }
  .nav-start { gap: 8px; }
  .nav-start .brand { gap: 0; font-size: 0; }
  .nav-start .brand > span { width: 14px; height: 14px; }
  .hub-back { min-height: 38px; padding: 7px 11px; font-size: .78rem; white-space: nowrap; }
  .nav-row nav { gap: 12px; font-size: .82rem; white-space: nowrap; }
  .artifact-viewer-bar { grid-template-columns: auto 1fr auto; gap: 10px; }
  .artifact-viewer-bar > div strong { font-size: 14px; }
  .artifact-download b { display: none; }
  .markdown-viewer { margin: 18px auto; padding: 24px 20px; }
}
.provenance-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.provenance-badge.legacy { background: var(--warning); color: #725500; }
.provenance-badge.live { background: #d7f7e3; color: #146638; }
.archive-section { padding: 44px 0 52px; background: var(--navy); }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.archive-card { min-height: 230px; display: flex; flex-direction: column; padding: 22px 24px; border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius); color: white; background: rgba(255,255,255,.06); }
.archive-card-top { display: flex; justify-content: space-between; gap: 20px; color: #aebccc; font-size: .9rem; font-weight: 700; }
.archive-card h3 { margin: 14px 0 8px; font-size: 1.45rem; line-height: 1.2; }
.coverage { margin: 0; color: #c9d2de; }
.archive-status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.qa { padding: 5px 9px; border: 1px solid rgba(255,255,255,.32); border-radius: 999px; font-size: .76rem; font-weight: 800; }
.archive-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 28px; }
.archive-actions .secondary-button { min-width: 132px; }
.archive-actions .secondary-button, .archive-actions .download-menu summary { min-height: 44px; color: white; border-color: rgba(255,255,255,.65); background: transparent; }
.archive-actions .download-menu > div { color: var(--ink); }
.loading-card, .empty-card, .error-card { padding: 40px; border: 1px dashed var(--line); border-radius: var(--radius); background: white; color: var(--muted); }
.error-card { color: #8b1f1f; }
footer { background: var(--ink); color: #b8c1cc; }
footer .wrap { min-height: 88px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }

/* Report */
.report-loading, .report-error { width: min(720px, calc(100% - 40px)); margin: 22vh auto; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: white; text-align: center; }
.report-error strong { font-size: 1.5rem; }
.report-error a { display: inline-flex; margin-top: 14px; font-weight: 800; }
.report-hero { padding-bottom: 52px; color: white; background: var(--navy); }
.report-nav { min-height: 84px; display: flex; justify-content: space-between; align-items: center; gap: 30px; border-bottom: 1px solid rgba(255,255,255,.2); }
.report-nav-links { display: flex; align-items: center; gap: 24px; }
.report-nav-links > a { color: white; font-weight: 700; text-decoration: none; }
.light-brand { color: white; }
.report-nav .download-menu summary { min-height: 44px; color: #000; border: 0; background: var(--lime); }
.report-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .62fr); gap: 74px; align-items: end; padding-top: 86px; }
.report-hero h1 { margin: 0; font-size: clamp(3.5rem, 8vw, 7.4rem); line-height: .88; letter-spacing: -.075em; }
.report-hero h1 small { display: block; margin-top: 18px; font-size: .38em; line-height: 1.1; letter-spacing: -.035em; color: #c8d4e1; }
.report-lede { max-width: 760px; margin: 36px 0 0; color: #c8d4e1; font-size: 1.18rem; }
.period-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 36px; }
.period-row > span { color: #9fb0c1; }
.period-row strong { font-size: 1.05rem; }
.signal-card { padding: 28px; border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius); background: rgba(255,255,255,.07); }
.signal-card > p { margin: 0; color: var(--lime); font-weight: 800; }
.signal-card > strong { display: block; margin: 18px 0 26px; font-size: 1.8rem; line-height: 1.25; }
.signal-card > div > div { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.17); }
.signal-card b { color: var(--lime); font-size: 1.35rem; }
.provenance-banner { display: flex; gap: 18px; align-items: baseline; margin-top: 48px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.18); background: rgba(0,0,0,.16); }
.provenance-banner strong { color: var(--lime); white-space: nowrap; }
.provenance-banner p { margin: 0; color: #c8d4e1; }
.provenance-banner.legacy { border-left: 5px solid #ffc94d; }
.findings-section, .edm-section, .boundary-section { padding: 96px 0; }
.report-heading { align-items: start; }
.finding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.finding-card { min-height: 310px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.finding-card.dark { color: white; background: var(--ink); border-color: var(--ink); }
.finding-card.accent { background: var(--lime); border-color: var(--lime); }
.finding-card small { font-size: .8rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.finding-card h3 { margin: 42px 0 16px; font-size: 1.72rem; line-height: 1.2; letter-spacing: -.03em; }
.finding-card p { margin: 0; color: var(--muted); }
.finding-card.dark p { color: #cdd5df; }
.finding-card.accent p { color: #263000; }
.evidence-note { margin-top: 22px; padding: 20px 24px; border-left: 5px solid var(--lime-dark); background: white; color: #46505d; }
.website-section { padding: 96px 0; color: white; background: var(--navy); }
.website-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.website-card { overflow: hidden; display: grid; grid-template-columns: 44% 1fr; min-height: 330px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.06); }
.website-card > img { width: 100%; height: 100%; object-fit: cover; object-position: top; background: #0a1726; }
.website-card-body { display: flex; flex-direction: column; padding: 24px; }
.website-card-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--lime); font-size: .82rem; font-weight: 800; }
.website-card h3 { margin: 26px 0 10px; font-size: 2rem; }
.website-card p { margin: 0; color: #c8d4e1; }
.website-card a { margin-top: auto; padding-top: 22px; color: white; font-weight: 800; }
.journey-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.journey-card { min-height: 220px; padding: 26px; border-left: 5px solid var(--navy); background: white; }
.journey-card > span { color: #2b5580; font-weight: 850; }
.journey-card h3 { margin: 24px 0 12px; font-size: 1.35rem; }
.journey-card p { margin: 0; color: var(--muted); }
.synthesis-table { margin-top: 34px; border: 1px solid var(--line); background: white; }
.synthesis-heading { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: center; padding: 22px 24px; background: #e7edf3; }
.synthesis-heading span { color: #2f5b87; font-size: .78rem; font-weight: 850; letter-spacing: .1em; }
.synthesis-heading h3 { margin: 0; font-size: 1.7rem; }
.synthesis-row { display: grid; grid-template-columns: 120px 1fr 1fr 1.35fr; gap: 22px; align-items: start; padding: 24px; border-top: 1px solid var(--line); }
.synthesis-row b { color: #1f4e7a; font-size: 1.2rem; }
.synthesis-row p, .synthesis-row strong { margin: 0; }
.synthesis-row small { display: block; color: #7891aa; font-size: .74rem; font-weight: 850; letter-spacing: .08em; }
.email-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.email-card { overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; text-align: left; cursor: zoom-in; }
.email-card:hover { transform: translateY(-4px); box-shadow: 0 16px 35px rgba(16,23,38,.12); }
.email-card img { width: 100%; height: 260px; object-fit: cover; object-position: top; background: #eef0f2; }
.email-card div { padding: 18px; }
.email-card span { color: #607081; font-size: .82rem; font-weight: 750; }
.email-card h3 { margin: 10px 0 4px; font-size: 1.05rem; line-height: 1.25; }
.email-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.gallery-tip { margin: 16px 0 0; color: var(--muted); }
.implications-section { padding: 96px 0; color: white; background: var(--navy); }
.implication-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.26); border-left: 1px solid rgba(255,255,255,.26); }
.implication-card { min-height: 360px; padding: 30px; border-right: 1px solid rgba(255,255,255,.26); border-bottom: 1px solid rgba(255,255,255,.26); }
.implication-number { display: block; color: var(--lime); font-size: 1.15rem; font-weight: 900; }
.implication-card small { display: block; margin-top: 26px; color: var(--lime); font-weight: 800; }
.implication-card h3 { margin: 14px 0 20px; font-size: 1.55rem; line-height: 1.2; }
.implication-card p { margin: 10px 0 0; color: #c8d4e1; }
.implication-card p strong { color: white; }
.action-panel { margin-top: 42px; padding: 42px; color: #101600; background: var(--lime); }
.action-panel h3 { max-width: 900px; margin: 0 0 30px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.08; letter-spacing: -.04em; }
.action-list { border-top: 1px solid rgba(16,22,0,.25); }
.action-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 28px; padding: 20px 0; border-bottom: 1px solid rgba(16,22,0,.25); }
.action-list p { margin: 0; }
.boundary-section ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0; list-style: none; }
.boundary-section li { padding: 22px; border: 1px solid var(--line); background: white; }
.qa-card { margin-top: 28px; padding: 26px; border-left: 6px solid var(--blue); background: white; }
.qa-card.pass_with_caveats { border-left-color: #d3a30f; }
.qa-card.blocked { border-left-color: #b42318; }
.qa-card > strong { font-size: 1.15rem; }
.qa-card ul { display: block; margin: 12px 0 0; padding-left: 22px; list-style: disc; }
.qa-card li { padding: 3px 0; border: 0; background: transparent; }

/* Lightbox */
dialog { width: min(1500px, calc(100vw - 24px)); height: min(94vh, 1050px); padding: 0; border: 0; border-radius: 18px; color: white; background: #07101c; box-shadow: 0 30px 90px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(5px); }
.modal-head { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 12px 16px; border-bottom: 1px solid #293646; }
.modal-head > div:first-child { display: flex; align-items: center; gap: 14px; min-width: 0; }
.modal-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#modal-counter { color: var(--lime); font-weight: 850; white-space: nowrap; }
.modal-controls { display: flex; gap: 7px; }
.modal-controls button { min-width: 42px; min-height: 40px; padding: 7px 11px; border: 1px solid #3e4c5d; border-radius: 9px; color: white; background: #142235; cursor: pointer; }
.modal-controls button:hover { border-color: var(--lime); }
#close-lightbox { color: #000; background: var(--lime); }
.image-stage { position: relative; height: calc(100% - 68px); overflow: auto; display: grid; place-items: start center; padding: 24px; cursor: grab; touch-action: none; }
.image-stage:active { cursor: grabbing; }
.image-stage img { max-width: none; width: min(760px, 88vw); transform-origin: top center; transition: transform .12s ease; user-select: none; }
.image-stage.has-error::after { content: attr(data-error); position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: #ffb4ab; background: #07101c; }

@media (max-width: 980px) {
  .hub-hero-grid, .report-hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .latest-card { grid-template-columns: 1fr; }
  .latest-actions { min-width: 0; flex-direction: row; justify-content: flex-start; }
  .archive-grid, .finding-grid, .journey-grid, .implication-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .website-grid { grid-template-columns: 1fr; }
  .email-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .synthesis-row { grid-template-columns: 100px 1fr 1fr; }
  .synthesis-row > strong { grid-column: 2 / -1; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 30px, var(--max)); }
  .nav-row { min-height: 62px; }
  .nav-row nav { display: flex; gap: 10px; font-size: .76rem; }
  .portal-page #projects-nav, .portal-page #archive-nav { display: none; }
  .portal-signout { min-height: 40px; padding: 0 4px; }
  .hub-hero { padding: 64px 0; }
  .hub-hero h1 { font-size: clamp(2.85rem, 15vw, 4.8rem); }
  .hero-copy { font-size: 1.05rem; }
  .report-section, .archive-section, .findings-section, .edm-section, .boundary-section, .website-section, .implications-section { padding: 68px 0; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 14px; }
  .latest-main { padding: 26px; }
  .latest-meta { align-items: flex-start; flex-direction: column; }
  .latest-actions { padding: 22px; flex-direction: column; }
  .archive-grid, .finding-grid, .journey-grid, .implication-grid, .boundary-section ul { grid-template-columns: 1fr; }
  .archive-card { min-height: 310px; }
  .report-nav { min-height: 70px; }
  .report-nav-links > a:not(.report-pdf-download) { display: none; }
  .report-hero-grid { padding-top: 56px; }
  .report-hero h1 { font-size: clamp(3.2rem, 18vw, 5rem); }
  .provenance-banner { display: block; }
  .provenance-banner p { margin-top: 8px; }
  .website-card { grid-template-columns: 1fr; }
  .website-card > img { height: 260px; }
  .synthesis-heading { grid-template-columns: 1fr; }
  .synthesis-row { grid-template-columns: 1fr; }
  .synthesis-row > strong { grid-column: auto; }
  .email-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-card img { height: 220px; }
  .action-panel { padding: 28px 22px; }
  .action-list > div { grid-template-columns: 1fr; gap: 7px; }
  footer .wrap { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
  footer p { margin: 0; }
  dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; }
  .modal-head { align-items: flex-start; flex-direction: column; }
  .modal-controls { width: 100%; overflow-x: auto; }
  .modal-controls button { flex: 0 0 auto; }
  .image-stage { height: calc(100% - 116px); padding: 12px; }
  .image-stage img { width: 92vw; }
}

@media (max-width: 420px) {
  .brand { font-size: .78rem; }
  .archive-actions { flex-direction: column; }
  .archive-actions .download-menu > div { left: 0; right: auto; }
  .email-gallery { grid-template-columns: 1fr; }
  .email-card { display: grid; grid-template-columns: 38% 1fr; }
  .email-card img { height: 180px; }
  .email-card div { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.portal-signout { border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.portal-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.portal-project-card { padding: 22px 24px; border: 1px solid #c8c4ba; border-top: 5px solid #122c45; background: #fff; }
.portal-project-card .eyebrow { margin-bottom: 8px; }
.portal-project-card h3 { margin: 8px 0; font-size: 24px; line-height: 1.25; }
.portal-project-card > p:not(.eyebrow) { min-height: 0; margin: 8px 0; color: #687486; line-height: 1.5; }
.portal-project-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: 16px 0; border-block: 1px solid #d9d5ca; }
.portal-project-card dl div { padding: 10px 0; }
.portal-project-card dt { color: #687486; font-size: 13px; }
.portal-project-card dd { margin: 6px 0 0; font-weight: 900; }
.portal-project-card > a, .portal-report-actions a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border: 1px solid currentColor; border-radius: 999px; color: #102941; text-decoration: none; font-weight: 900; }
.portal-report-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; }
.archive-card .portal-report-actions a { min-height: 40px; padding: 0 14px; border-color: rgba(255,255,255,.72); color: #fff; background: transparent; }
.archive-card .portal-report-actions a:hover { border-color: var(--lime); color: var(--ink); background: var(--lime); }
.archive-card .portal-report-actions .pdf-link { border-color: var(--lime); color: var(--ink); background: var(--lime); }
.project-view .hub-hero { padding-block: 32px; }
.project-view .hub-hero-grid { grid-template-columns: 1fr; }
.project-view .hub-hero h1 { max-width: 980px; font-size: clamp(2.35rem, 3.8vw, 3.7rem); }
.project-view .hero-copy { margin-top: 12px; }
.project-view .schedule-card { display: none; }
.project-view .archive-section .section-heading { margin-bottom: 18px; }
.project-view .archive-section .section-heading h2 { font-size: clamp(2rem, 3vw, 2.8rem); }
.report-nav .report-home { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; }
.download-menu.client-download summary { background: #d7ff00; color: #071728; }
@media (max-width: 900px) { .portal-project-grid { grid-template-columns: 1fr; } }

/* Project report center: V5 visual system */
.project-view {
  --project-canvas: #f3f0e8;
  --project-card: rgba(255,255,255,.86);
  --project-accent: #cfff2a;
  color: #111827;
  background: var(--project-canvas);
}
.project-view .hub-header {
  border-bottom-color: rgba(17,24,39,.08);
  background: rgba(249,247,241,.82);
  box-shadow: 0 10px 35px rgba(17,24,39,.04);
  backdrop-filter: blur(20px) saturate(150%);
}
.project-view .nav-row { min-height: 76px; }
.project-view .hub-back {
  gap: 11px;
  min-height: 48px;
  padding: 5px 16px 5px 6px;
  border: 0;
  border-radius: 16px;
  color: #111827;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(17,24,39,.10), 0 6px 18px rgba(17,24,39,.06);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.project-view .hub-back .back-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: #111827;
  font-size: 0;
  line-height: 1;
}
.project-view .hub-back .back-mark::after {
  content: "‹";
  transform: translateY(-1px);
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 800;
}
.project-view .hub-back:hover {
  color: #111827;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(17,24,39,.12), 0 12px 28px rgba(17,24,39,.10);
  transform: translateY(-1px);
}
.project-view .brand > span {
  border: 0;
  border-radius: 5px;
  background: #111827;
  box-shadow: inset 0 0 0 4px var(--project-accent);
}
.project-view .nav-row nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(17,24,39,.05);
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.project-view .nav-row nav a:hover {
  background: var(--project-accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.project-view .hub-hero {
  position: relative;
  overflow: hidden;
  padding-block: 54px 48px;
  color: #111827;
  background:
    radial-gradient(circle at 83% 20%, rgba(207,255,42,.75) 0 9%, transparent 28%),
    radial-gradient(circle at 8% 110%, rgba(109,143,255,.20) 0 14%, transparent 38%),
    linear-gradient(135deg, #fbfaf6 0%, #f0ede4 100%);
}
.project-view .hub-hero::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -118px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(17,24,39,.09);
  border-radius: 50%;
  box-shadow: 0 0 0 36px rgba(255,255,255,.20), 0 0 0 72px rgba(17,24,39,.025);
  pointer-events: none;
}
.project-view .hub-hero-grid { position: relative; z-index: 1; }
.project-view .hub-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  color: #4b5563;
}
.project-view .hub-hero .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111827;
  box-shadow: 0 0 0 5px var(--project-accent);
}
.project-view .hub-hero h1 {
  max-width: 920px;
  font-size: clamp(2.55rem, 4.25vw, 4.35rem);
  line-height: .98;
  letter-spacing: -.065em;
}
.project-view .hero-copy { max-width: 720px; margin-top: 18px; color: #5a6472; }
.project-view .archive-section {
  position: relative;
  padding: 52px 0 64px;
  color: #111827;
  background:
    linear-gradient(rgba(17,24,39,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,.035) 1px, transparent 1px),
    var(--project-canvas);
  background-size: 44px 44px;
}
.project-view .archive-section .section-heading.light { color: #111827; }
.project-view .archive-section .eyebrow { color: #687181; }
.project-view .archive-grid { gap: 22px; }
.project-view .archive-card {
  min-height: 260px;
  padding: 26px 28px;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 24px;
  color: #111827;
  background: var(--project-card);
  box-shadow: 0 18px 55px rgba(17,24,39,.08);
  backdrop-filter: blur(16px);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.project-view .archive-card:hover {
  border-color: rgba(17,24,39,.16);
  box-shadow: 0 26px 70px rgba(17,24,39,.12);
  transform: translateY(-4px);
}
.project-view .archive-card > div:first-child { color: #697386; }
.project-view .archive-card h3 { font-size: 1.65rem; letter-spacing: -.035em; }
.project-view .archive-card > p { color: #697386; }
.project-view .archive-card .portal-report-actions a {
  min-height: 44px;
  border-color: rgba(17,24,39,.15);
  color: #111827;
  background: rgba(255,255,255,.72);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.project-view .archive-card .portal-report-actions a:hover {
  border-color: #111827;
  color: white;
  background: #111827;
  transform: translateY(-1px);
}
.project-view .archive-card .portal-report-actions .pdf-link {
  border-color: var(--project-accent);
  color: #111827;
  background: var(--project-accent);
}
.project-view footer { color: #677181; background: #ebe7dc; }

@media (max-width: 700px) {
  .project-view .nav-row { min-height: 68px; }
  .project-view .hub-back { min-height: 42px; padding-right: 11px; }
  .project-view .hub-back .back-mark { width: 32px; height: 32px; }
  .project-view .hub-hero { padding-block: 38px 36px; }
  .project-view .archive-section { padding-block: 38px 48px; }
  .project-view .archive-card { min-height: 0; padding: 22px; }
}

/* Shared report and workspace visual rhythm */
body { font-family: var(--ui-font); background: var(--ui-paper); color: var(--ui-ink); letter-spacing: .012em; }
body :is(h1, h2, h3), body .report-hero h1 small {
  letter-spacing: var(--ui-title-tracking);
  line-height: var(--ui-title-leading);
}
.portal-page :is(.hub-hero, .archive-section), .report-page .report-hero {
  color: var(--ui-ink);
  background: radial-gradient(ellipse at 90% 0%, #e6efcd, transparent 65%), var(--ui-paper);
}
.portal-page .hub-hero::after { content: none; }
.portal-page .hub-hero { padding-block: 24px; border-bottom: 1px solid var(--ui-border); }
.portal-page .hub-hero-grid { gap: 16px; }
.portal-page .hub-hero h1, .report-page .report-hero h1 { font-size: clamp(28px, 4vw, 46px); }
.portal-page .hero-copy, .report-page .report-hero h1 small { color: var(--ui-muted); }
.portal-page .hub-hero .eyebrow, .portal-page .section-heading .eyebrow { display: none; }
.portal-page .schedule-card { padding: 12px 16px; border-color: var(--ui-border); background: #ffffffad; }
.portal-page .schedule-card > p, .portal-page .schedule-card dt, .portal-page .schedule-card dd { color: var(--ui-muted); }
.portal-page .schedule-card > strong { font-size: 1rem; }
.portal-page .schedule-card dl { margin-top: 6px; }
.portal-page .schedule-card dl div { padding-top: 3px; }
.portal-page :is(.report-section, .archive-section), .report-page :is(.findings-section, .edm-section, .boundary-section, .website-section, .implications-section) { padding-block: var(--ui-section); }
.portal-page .archive-section { background: var(--ui-paper); }
.portal-page .section-heading h2, .report-page .section-heading h2 { font-size: clamp(22px, 3vw, 32px); }
.portal-page :is(.archive-grid, .portal-project-grid) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 315px), 1fr)); gap: 14px; }
.portal-page :is(.archive-card, .portal-project-card) {
  min-height: 0;
  padding: 16px 18px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  color: var(--ui-ink);
  background: #fff;
  box-shadow: 0 5px 18px #2030200a;
}
.portal-page :is(.archive-card, .portal-project-card) h3 { font-size: 1.12rem; margin: 8px 0; }
.portal-page :is(.archive-card, .portal-project-card) > p:empty { display: none; }
.portal-page .portal-project-card dl { margin: 10px 0; }
.portal-page .portal-project-card dl div { padding: 5px 0; }
.portal-page .portal-report-actions { padding-top: 8px; }
.portal-page .archive-card .portal-report-actions a,
.portal-page .portal-project-card > a {
  min-height: 40px;
  padding-inline: 12px;
  font-size: .875rem;
  font-weight: 680;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  color: var(--ui-ink);
  background: #fff;
}
.portal-page .archive-card .portal-report-actions a:first-child,
.portal-page .portal-project-card > a,
.portal-page .archive-card .portal-report-actions a:hover { background: var(--ui-accent); color: var(--ui-ink); }
.report-page .report-nav { border-color: var(--ui-border); min-height: 64px; }
.report-page .report-nav :is(a:not(.ui-back), .light-brand) { color: var(--ui-ink); }
.report-page .report-hero-grid { padding-top: var(--ui-section); gap: 24px; }
.report-page .report-hero :is(p, dt, dd, small, .eyebrow) { color: var(--ui-muted); }
.report-page .signal-card { padding: 18px; background: #fff; border-color: var(--ui-border); }
.report-page .signal-card > strong { font-size: 1.25rem; margin: 10px 0 14px; }
.report-page .signal-card > div > div { padding: 8px 0; border-color: var(--ui-border); }
.report-page :is(.signal-card b, .period-row > span) { color: var(--ui-muted); }
.report-page .report-lede, .report-page .period-row { margin-top: 16px; }
.report-page .report-hero h1 small { font-size: .62em; margin-top: 8px; }
.portal-page .hub-header { background: #fafaf5; }
.portal-page .hub-back { border-color: var(--ui-border); border-radius: 10px; background: white; color: var(--ui-ink); }
.portal-page .hub-back:hover { background: var(--ui-accent); }
.portal-page .portal-project-card .eyebrow { display: none; }
.portal-page .archive-card .portal-report-actions .pdf-link { background: white; border-color: var(--ui-border); }
.portal-page .archive-card .portal-report-actions .pdf-link:hover { background: var(--ui-accent); }
.report-page :is(.website-section, .implications-section) { background: #edf0e6; color: var(--ui-ink); }
.report-page :is(.website-section, .implications-section) .section-heading { color: inherit; }
.report-page :is(.finding-card, .website-card, .journey-card, .implication-card) { min-height: 0; color: var(--ui-ink); border: 1px solid var(--ui-border); border-radius: var(--ui-radius); background: white; }
.report-page :is(.finding-card, .journey-card, .implication-card, .website-card-body, .action-panel) { padding: 18px; }
.report-page :is(.finding-card, .journey-card, .implication-card, .website-card) h3 { font-size: 1.15rem; margin: 10px 0; }
.report-page :is(.finding-card, .website-card, .implication-card) :is(p, a, small, strong, .website-card-meta, .implication-number) { color: var(--ui-muted); }
.report-page .implication-grid { border: 0; gap: 14px; }
.report-page .action-panel { background: var(--ui-accent); border-radius: var(--ui-radius); }
.report-page .action-panel h3 { font-size: clamp(20px, 3vw, 28px); }
.artifact-viewer-bar { color: var(--ui-ink); background: #fafaf5; border-color: var(--ui-border); }
.artifact-viewer-bar :is(a, small, span) { color: inherit; }
.artifact-download { border-color: var(--ui-border); border-radius: 10px; }
.artifact-viewer-bar > div span { color: var(--ui-muted); }
.artifact-viewer-bar .artifact-download {
  min-height: 44px;
  padding: 8px 13px;
  gap: 8px;
  border-color: #cbd5d6;
  background: #ffffffb5;
  color: #274458;
  font-size: .9rem;
}
.artifact-viewer-bar .artifact-download:hover { background: #e9f0f2; border-color: #91a8b0; }
.viewer-download-icon {
  position: relative;
  width: 16px;
  height: 15px;
  flex: 0 0 16px;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(currentColor, currentColor) left bottom / 2px 4px no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 2px 4px no-repeat;
}
.viewer-download-icon::before, .viewer-download-icon::after { content: ""; position: absolute; }
.viewer-download-icon::before { left: 7px; top: 0; width: 2px; height: 9px; background: currentColor; }
.viewer-download-icon::after {
  left: 5px;
  top: 4px;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.markdown-viewer { padding: clamp(22px, 5vw, 56px); border-radius: var(--ui-radius); }
.portal-page footer, .report-page footer { background: #eaece3; color: var(--ui-muted); }
footer .wrap { min-height: 52px; }
.portal-page :is(.hub-hero, .section-heading, .archive-card) :is(h1, h2, h3),
.report-page :is(.report-hero, .section-heading, .finding-card, .action-panel) :is(h1, h2, h3) {
  letter-spacing: var(--ui-title-tracking);
  line-height: var(--ui-title-leading);
}

.report-page {
  --report-title: #182d43;
  --report-chapter: #38576f;
  --report-subtitle: #526575;
  --report-card-title: #303b42;
  --report-signal: #285a50;
}
.report-page .report-hero h1 { color: var(--report-title); font-weight: 800; }
.report-page .report-hero h1 small { color: var(--report-subtitle); font-weight: 550; }
.report-page .section-heading h2 { color: var(--report-chapter); font-weight: 740; }
.report-page .section-heading .eyebrow { color: var(--report-subtitle); font-weight: 650; }
.report-page main h3 { color: var(--report-card-title); font-weight: 700; }
.report-page .finding-card small { color: var(--report-subtitle); }
.report-page .signal-card { border-inline-start: 3px solid #709a8e; }
.report-page .signal-card > p,
.report-page .signal-card > strong,
.report-page .signal-card b,
.report-page .action-panel h3 { color: var(--report-signal); }

.report-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--ui-border);
  background: rgb(250 250 245 / 96%);
  backdrop-filter: blur(12px);
}
.report-page .report-toolbar .report-nav { border-bottom: 0; gap: 12px; }
.report-toolbar .report-nav-links { gap: 6px; }
.report-page .report-toolbar .report-nav :is(.ui-back, .report-nav-links > a, .download-menu summary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 13px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: inherit;
  white-space: nowrap;
}
.report-page .report-toolbar .report-nav :is(.ui-back, .download-menu summary) {
  border-color: #cbd5d6;
  background: #ffffffb5;
  color: #274458;
}
.report-page .report-toolbar .report-nav :is(.ui-back, .download-menu summary):hover {
  background: #e9f0f2;
  border-color: #91a8b0;
}
.report-toolbar :is(a, summary):focus-visible {
  outline: 2px solid #477889;
  outline-offset: 2px;
}
.report-toolbar .download-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
}
.report-toolbar .download-menu { position: relative; }
.report-page .report-toolbar .report-nav-links > a[aria-current="location"],
.report-page .report-toolbar .report-nav-links > a:hover,
.report-page .report-toolbar .download-menu[open] summary,
.report-toolbar .download-menu > div a:is(:hover, :focus-visible) {
  background: #dceae7;
  color: #23584d !important;
}
.report-toolbar .download-menu > div a { background: #fff; }
.portal-page #portal-shell .hub-header .nav-row nav {
  align-items: center;
  gap: clamp(2px, 1vw, 12px);
}
.portal-page #portal-shell .hub-header .nav-row nav > :is(a, button):not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 8px clamp(5px, 1vw, 12px);
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ui-ink);
  font: 700 .9rem/1.35 var(--ui-font);
  letter-spacing: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.portal-page #portal-shell .hub-header .nav-row nav > :is(a, button):not([hidden]):hover {
  background: #e9f0f2;
  color: #274458;
}
.report-page :is(#website, #edm, #implications, #main) {
  scroll-margin-top: calc(var(--report-toolbar-height, 64px) + 12px);
}
@media (max-width: 700px) {
  .report-page .report-toolbar .report-nav { flex-wrap: wrap; padding-block: 8px; gap: 6px; }
  .report-toolbar .report-nav-links { flex-wrap: wrap; }
  .report-page .report-toolbar .report-nav :is(.ui-back, .report-nav-links > a, .download-menu summary) {
    padding-inline: 8px;
  }
}
