.public-page { padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2rem) 1rem; }
.page-intro, .home-embed-panel { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid #dce6f5; border-radius: 1rem; margin-bottom: 1rem; background: linear-gradient(115deg, #f4f7fc, #e8f0fa); }
.page-intro h1 { color: #152d55; font-size: clamp(1.7rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.12; }
.page-intro p, .home-embed-panel p { margin-top: .4rem; color: #475569; font-size: clamp(.875rem, 1.5vw, 1rem); line-height: 1.45; }
.dark :is(.page-intro, .home-embed-panel) { border-color: #2a508a; background: linear-gradient(115deg, #0d1f3c, #152d55); }
.dark .page-intro h1 { color: #f0f4fa; }
.dark :is(.page-intro, .home-embed-panel) p { color: #dce6f5; }
.public-art { flex: none; width: clamp(4.25rem, 16vw, 12rem); height: auto; color: #2a508a; }
.public-art-back { fill: #dce6f5; }
.public-art-lines { stroke: currentColor; }
.public-art-lines circle, .public-art-lines rect { fill: #f4f7fc; }
.public-art-detail { stroke: #3866a5; }
.dark .public-art { color: #bacde8; }
.dark .public-art-back { fill: #1e3d70; }
.dark .public-art-lines circle, .dark .public-art-lines rect { fill: #152d55; }
.dark .public-art-detail { stroke: #8aabd3; }
@media (prefers-reduced-motion: no-preference) {
  .public-art-visible .public-art-lines, .contact-confirmation-icon { animation: public-art-enter .42s ease-out both; }
  .public-art-visible .public-art-trace { stroke-dasharray: 1; animation: public-art-trace .55s .12s ease-out both; }
  .public-art-visible .public-art-node { transform-box: fill-box; transform-origin: center; animation: public-art-node .38s var(--art-delay, .12s) ease-out both; }
  .public-art-visible .public-art-embed-map {
    transform-box: fill-box;
    transform-origin: center;
    animation: public-art-unfold .42s ease-out both;
  }
  .public-art-visible .public-art-embed-code { animation-delay: .28s; }
  @keyframes public-art-unfold { from { opacity: .35; transform: scaleX(.44); } to { opacity: 1; transform: scaleX(1); } }
  .art-delay-one { --art-delay: .22s; }
  .art-delay-two { --art-delay: .32s; }
  @keyframes public-art-enter { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes public-art-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes public-art-node { from { opacity: .2; transform: scale(.55); } 65% { transform: scale(1.1); } to { opacity: 1; transform: scale(1); } }
}

.page-intro-illustrated > div { min-width: 0; }
.header-art {
  --art-accent: #357dc4;
  --art-tint: #d6e8fb;
  --art-wash-start: #f8fbff;
  --art-wash-end: #dbe9fa;
  --art-paper: #f9fcff;
  --art-shadow: #c7d9f0;
  --art-line: #88a5c7;
  --art-grid: #9eb7d4;
  display: block;
  flex: 0 0 auto;
  width: clamp(11rem, 30vw, 22rem);
  height: auto;
}
.header-art-timeline { --art-accent: #287f85; --art-tint: #d7efef; }
.header-art-statistics { --art-accent: #6156b6; --art-tint: #e6e0fb; }
.header-art-embed { --art-accent: #237389; --art-tint: #d7eef4; }
.header-art-mail { --art-accent: #306eb5; --art-tint: #dbe9fc; }
.dark .header-art {
  --art-wash-start: #142c4b;
  --art-wash-end: #0b1930;
  --art-paper: #182f50;
  --art-shadow: #203f65;
  --art-line: #6589ad;
  --art-grid: #6385ad;
  --art-accent: #84bbfa;
  --art-tint: #24486b;
}
.dark .header-art-timeline { --art-accent: #7fdaca; --art-tint: #1c4956; }
.dark .header-art-statistics { --art-accent: #b8a7ff; --art-tint: #3a3a6a; }
.dark .header-art-embed { --art-accent: #7dd9ee; --art-tint: #1f4b65; }
.header-art-wash-start { stop-color: var(--art-wash-start); }
.header-art-wash-end { stop-color: var(--art-wash-end); }
.header-art-grid-line { stroke: var(--art-grid); stroke-opacity: .2; }
.header-art-frame { stroke: var(--art-line); stroke-opacity: .5; }
.header-art-scene { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.header-art-paper { fill: var(--art-paper); stroke: var(--art-line); }
.header-art-shadow { fill: var(--art-shadow); stroke: var(--art-line); }
.header-art-tint { fill: var(--art-tint); stroke: var(--art-line); }
.header-art-muted { stroke: var(--art-line); }
.header-art-accent, .header-art-ring { stroke: var(--art-accent); }
.header-art-ring { opacity: .55; }
.header-art-accent-fill { fill: var(--art-accent); }
@media (max-width: 639px) {
  .header-art { width: clamp(7rem, 33vw, 12rem); }
}
@media (max-width: 359px) {
  .page-intro-illustrated { flex-wrap: wrap; }
  .header-art { width: min(12rem, 100%); margin-inline: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .header-art.public-art-visible .header-art-scene { animation: header-art-appear .45s ease-out both; }
  .header-art.public-art-visible .header-art-stage { animation: header-art-appear .4s var(--art-stage, .1s) ease-out both; }
  .header-art.public-art-visible .header-art-grow {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: header-art-grow .45s var(--art-stage, .1s) ease-out both;
  }
  .header-art.public-art-visible .header-art-draw {
    stroke-dasharray: 1;
    animation: public-art-trace .55s .19s ease-out both;
  }
  .header-art-delay-one { --art-stage: .1s; }
  .header-art-delay-two { --art-stage: .18s; }
  .header-art-delay-three { --art-stage: .26s; }
  .header-art-delay-four { --art-stage: .34s; }
  @keyframes header-art-appear { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes header-art-grow { from { opacity: 0; transform: scaleY(.16); } to { opacity: 1; transform: scaleY(1); } }
}

.page-panel { padding: clamp(.85rem, 2.5vw, 1.4rem); border: 1px solid #dce6f5; border-radius: .85rem; background: #fff; }
.dark .page-panel { border-color: #2a508a; background: #0d1f3c; }
.page-field { min-width: 0; }
.page-field label { display: block; margin-bottom: .3rem; font-size: .8125rem; font-weight: 700; }
.page-field :is(input, select, textarea) { display: block; min-width: 0; width: 100%; min-height: 44px; padding: .45rem .65rem; border: 1px solid #94a3b8; border-radius: .5rem; background: #fff; color: #0f172a; font-size: .875rem; }
.dark .page-field :is(input, select, textarea) { border-color: #5a84ba; background: #080f1f; color: #f0f4fa; color-scheme: dark; }
.page-field textarea { resize: vertical; min-height: 8rem; }
.page-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; gap: .4rem; padding: .45rem .85rem; border: 1px solid #94a3b8; border-radius: .55rem; color: #1e3d70; font-size: .875rem; font-weight: 700; transition: background-color .16s, border-color .16s; }
.page-button:hover { background: #f0f4fa; }
.dark .page-button { color: #dce6f5; border-color: #5a84ba; }
.dark .page-button:hover { background: #1e3d70; }
.page-button-primary { background: #1e3d70; border-color: #1e3d70; color: #fff; }
.page-button-primary:hover { background: #2a508a; }
.dark .page-button-primary { background: #dce6f5; border-color: #dce6f5; color: #080f1f; }
.dark .page-button-primary:hover { background: #bacde8; }
.page-button:disabled { opacity: .72; cursor: wait; }

.page-disclosure summary { list-style: none; cursor: pointer; }
.page-disclosure summary::-webkit-details-marker { display: none; }
.disclosure-chevron { transition: transform .16s; }
.page-disclosure[open] .disclosure-chevron { transform: rotate(180deg); }
.page-popover { position: relative; }
.page-popover .public-menu-panel { inset-inline-start: auto; inset-inline-end: 0; min-width: 6rem; }
.page-results-bar, .page-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .7rem; }
.page-results-bar { justify-content: space-between; margin-bottom: .75rem; }
.page-filter-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .6rem; font-size: .8125rem; }
.page-filter-chips a { display: inline-flex; align-items: center; min-height: 36px; gap: .3rem; padding: .2rem .65rem; border-radius: 1rem; background: #e8f0fa; color: #1e3d70; overflow-wrap: anywhere; }
.page-filter-chips a:hover { text-decoration: underline; }
.dark .page-filter-chips a { background: #1e3d70; color: #f0f4fa; }
.page-notice { margin-block: 1rem; padding: .65rem .85rem; border-radius: .5rem; background: #fef3c7; color: #713f12; font-size: .875rem; }
.dark .page-notice { background: #422006; color: #fde68a; }
.page-empty { padding-block: 2rem; text-align: center; color: #475569; }
.dark .page-empty { color: #dce6f5; }

.archive-search, .archive-advanced, .timeline-filters { display: grid; align-items: end; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.archive-search .page-field:first-child { grid-column: 1 / -1; }
.archive-search .page-button, .archive-advanced .page-button { justify-self: start; }
.archive-advanced { padding-top: .35rem; }
.archive-result-actions { gap: .5rem 1rem; }
.archive-view-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .3rem;
  padding-inline: .65rem .2rem;
  border-radius: .65rem;
  background: #f0f4fa;
}
.archive-view-actions > span { color: #475569; font-size: .8125rem; font-weight: 600; }
.dark .archive-view-actions { background: #0d1f3c; }
.dark .archive-view-actions > span { color: #bacde8; }
.archive-sort { display: flex; gap: .35rem; align-items: end; }
.archive-records { display: grid; gap: .55rem; }
.archive-record article, .timeline-record { padding: .8rem 1rem; border: 1px solid #dce6f5; border-radius: .65rem; overflow-wrap: anywhere; transition: border-color .16s, background-color .16s; }
.dark :is(.archive-record article, .timeline-record) { border-color: #2a508a; background: #0d1f3c; }
:is(.archive-record article, .timeline-record):is(:hover, :focus-within) { border-color: #5a84ba; }
:is(.archive-record, .timeline-record) h3 { font-size: 1rem; font-weight: 750; line-height: 1.35; margin-block: .25rem; }
:is(.archive-record, .timeline-record) h3 a:hover { text-decoration: underline; text-underline-offset: .18em; }
:is(.archive-record, .timeline-record) p { color: #475569; font-size: .875rem; }
.dark :is(.archive-record, .timeline-record) p { color: #dce6f5; }
.record-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; color: #475569; font-size: .75rem; }
.dark .record-meta { color: #bacde8; }
.record-ref { font-family: ui-monospace, monospace; }
.record-label, .demo-label { display: inline-block; padding: .14rem .45rem; border-radius: .3rem; background: #e8f0fa; color: #1e3d70; font-size: .75rem; font-weight: 650; }
.dark .record-label { background: #1e3d70; color: #dce6f5; }
.demo-label { background: #fef3c7; color: #713f12; }
.dark .demo-label { background: #422006; color: #fde68a; }

.timeline-groups { display: grid; gap: 1.2rem; }
.timeline-year-heading { width: max-content; padding: .25rem .55rem; margin-bottom: .55rem; border-radius: .4rem; background: #e8f0fa; color: #1e3d70; font-size: 1.05rem; font-weight: 800; scroll-margin-top: 5rem; }
.dark .timeline-year-heading { background: #1e3d70; color: #f0f4fa; }
.timeline-year-target { animation: timeline-target .65s ease-out; }
@keyframes timeline-target { from { box-shadow: 0 0 0 5px #5a84ba69; } to { box-shadow: 0 0 0 0 #5a84ba00; } }
.timeline-rail { display: grid; gap: .5rem; margin-inline-start: .55rem; padding-inline-start: 1rem; border-inline-start: 2px solid #a3bbd9; }
.timeline-record { position: relative; }
.timeline-record::before { content: ''; position: absolute; top: 1rem; inset-inline-start: -1.42rem; width: .7rem; height: .7rem; border-radius: 50%; background: #3866a5; border: 2px solid #fff; }
.dark .timeline-record::before { border-color: #080f1f; background: #8aabd3; }

.stats-metrics, .stats-grid { display: grid; gap: .75rem; margin-block: .9rem; }
.stats-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.stats-metric dt { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; color: #475569; font-size: clamp(.7rem, 1.7vw, .875rem); font-weight: 650; }
.dark .stats-metric dt { color: #dce6f5; }
.stats-metric dd { margin-top: .25rem; color: #1e3d70; font-size: clamp(1.4rem, 4vw, 2.15rem); font-weight: 800; }
.dark .stats-metric dd { color: #bacde8; }
.stats-card h2 { font-size: 1.08rem; font-weight: 750; margin-bottom: .3rem; }
.stats-canvas { height: clamp(12rem, 29vw, 20rem); position: relative; }
.stats-bars { display: grid; gap: .65rem; margin-block: .8rem; }
.stats-bars li > div:first-child { display: flex; justify-content: space-between; gap: .5rem; font-size: .875rem; }
.stats-bar-track { height: .48rem; margin-top: .2rem; border-radius: 2rem; background: #e8f0fa; }
.dark .stats-bar-track { background: #152d55; }
.stats-bar-track span { display: block; width: var(--bar-width); height: 100%; border-radius: inherit; background: #3866a5; }
.stats-bar-track .stats-bar-neutral { background: #64748b; }
.dark .stats-bar-track .stats-bar-neutral { background: #94a3b8; }
.stats-table { margin-top: .6rem; }
.stats-table-scroll { max-height: 23rem; overflow: auto; }
.stats-table table { width: 100%; font-size: .875rem; }
.stats-table :is(th, td) { padding: .45rem .55rem; border-bottom: 1px solid #dce6f5; text-align: left; }
.dark .stats-table :is(th, td) { border-color: #2a508a; }
.stats-table :is(th, td):last-child { text-align: right; }
.stats-empty { margin-block: .8rem; font-size: .875rem; }

.contact-form { display: grid; gap: 1rem; }
.contact-hint { color: #475569; margin-bottom: .35rem; font-size: .8125rem; }
.dark .contact-hint { color: #bacde8; }
.contact-form > button { justify-self: start; }
.contact-privacy { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem; font-size: .875rem; }
.contact-privacy input { width: 1.15rem; height: 1.15rem; accent-color: #1e3d70; }
.contact-privacy label { padding-block: .55rem; cursor: pointer; }
.contact-privacy a, .contact-errors a { text-decoration: underline; text-underline-offset: .2em; }
.contact-errors { margin-bottom: .75rem; border-color: #b91c1c; color: #991b1b; scroll-margin-top: 5rem; }
.contact-errors h2 { font-weight: 800; margin-bottom: .3rem; }
.contact-error { margin-top: .3rem; color: #991b1b; font-size: .875rem; }
.dark :is(.contact-error, .contact-errors) { color: #fecaca; border-color: #f87171; }
.contact-form [aria-invalid="true"] { border-color: #b91c1c; }
.dark .contact-form [aria-invalid="true"] { border-color: #f87171; }
.contact-confirmation { text-align: center; padding-block: 2.5rem; }
.contact-confirmation-icon { display: grid; place-items: center; margin: auto; width: 3rem; height: 3rem; border-radius: 50%; background: #dce6f5; color: #1e3d70; }

.home-embed-panel { margin: 0; }
.home-embed-panel .public-art { width: clamp(4.5rem, 20vw, 14rem); }
.home-embed-panel .page-button { margin-top: .8rem; }

@media (min-width: 640px) {
  .archive-search { grid-template-columns: 2fr minmax(8rem, 1fr) max-content; }
  .archive-search .page-field:first-child { grid-column: auto; }
  .archive-advanced, .timeline-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-metrics { gap: .75rem; }
}
@media (min-width: 900px) {
  .archive-advanced { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .timeline-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

.archive-export-dialog {
  width: min(31rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  margin: auto;
  overflow: auto;
  padding: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid #c7d7ed;
  border-radius: 1rem;
  background: #fff;
  color: #152d55;
  box-shadow: 0 18px 58px #0d1f3c45;
}
.archive-export-dialog::backdrop { background: #080f1fb0; }
.dark .archive-export-dialog { background: #0d1f3c; color: #e8f0fa; border-color: #2a508a; }
.archive-export-header, .archive-export-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.archive-export-header h2 { font-weight: 800; font-size: 1.35rem; }
.archive-export-dialog p { font-size: .9rem; line-height: 1.5; }
.archive-export-dialog form { display: grid; gap: .9rem; margin-top: 1rem; }
.archive-export-formats { display: flex; flex-wrap: wrap; gap: .45rem; }
.archive-export-formats legend { font-size: .85rem; font-weight: 700; margin-bottom: .35rem; }
.archive-export-formats label { display: flex; align-items: center; gap: .4rem; min-height: 44px; border: 1px solid #b4c8e1; border-radius: .5rem; padding: .35rem .7rem; font-size: .85rem; cursor: pointer; }
.archive-export-formats label:has(:checked) { background: #e8f0fa; border-color: #5a84ba; }
.dark .archive-export-formats label { border-color: #3e6799; }
.dark .archive-export-formats label:has(:checked) { background: #1e3d70; }
.archive-export-api { border-radius: .65rem; background: #f4f7fc; padding: .65rem .8rem; }
.dark .archive-export-api { background: #152d55; }
.archive-export-api a { display: inline-block; font-size: .875rem; font-weight: 700; text-decoration: underline; text-underline-offset: .15em; margin-top: .15rem; }
.archive-export-feedback progress { width: 100%; height: .65rem; accent-color: #3866a5; }
.archive-export-feedback progress[hidden] { display: none; }
.archive-export-feedback p { margin-top: .2rem; }
.archive-export-feedback:has(progress[hidden]) p:empty { display: none; }
.archive-export-actions { justify-content: flex-end; }
.archive-export-actions button:disabled { cursor: default; }
