/* Data workspace components only. Global identity, fonts and chrome live in shared/site.css. */

.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 20px; margin-bottom: 12px; }
#page-context { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
#page-context a { text-decoration: none; }
#page-context a:hover { text-decoration: underline; }
.breadcrumb-separator { color: var(--muted); }
#snapshot-date { font-size: 11px; color: var(--muted); }
.headline-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.headline-card { display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 1px 12px; min-height: 62px; padding: 8px 18px; text-align: left; min-width: 0; text-decoration: none; }
.headline-card:first-child { padding-left: 0; }
.headline-card + .headline-card { border-left: 1px solid var(--grid); }
.headline-card:hover { background: color-mix(in srgb,var(--navy) 5%,var(--surface)); }
.card-title { grid-column: 1/-1; font-size: 12px; color: var(--muted); }
.card-period { align-self: end; padding-bottom: 3px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.headline-card strong { font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -.4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: 216px minmax(0,1fr); gap: 24px; align-items: start; margin-top: 18px; }
.catalog-panel { min-width: 0; }
.catalog-panel > summary { display: none; }
.search-field { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); border-radius: 3px; padding: 8px 9px; min-height: 38px; }
.search-field > svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--muted); }
.search-field input { width: 100%; min-width: 0; background: none; border: 0; font-size: 13px; color: var(--text); outline: none; }
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.search-field:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.search-field kbd { font: 11px var(--font); color: var(--muted); border: 1px solid var(--grid); border-radius: 2px; padding: 0 4px; }
.catalog-heading,.directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.catalog-heading { margin: 16px 0 6px; }
.catalog-heading h2,.directory-heading h2 { font-size: 12px; font-weight: 600; margin: 0; }
#available-summary,#series-count { font-size: 11px; color: var(--muted); }
.topic-nav { display: grid; }
.topic-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 9px; min-height: 31px; border-left: 2px solid transparent; font-size: 13px; text-decoration: none; }
.topic-link:hover { background: color-mix(in srgb,var(--navy) 5%,var(--surface)); }
.topic-link.active { border-left-color: var(--primary); background: color-mix(in srgb,var(--primary) 10%,var(--surface)); color: var(--primary); font-weight: 600; }
.topic-count { font-size: 11px; color: var(--muted); font-weight: 400; }
.series-directory { border-top: 1px solid var(--grid); margin-top: 14px; }
.directory-heading { padding: 12px 0 7px; }
#series-list { max-height: 260px; overflow: auto; scrollbar-width: thin; }
.series-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 9px; text-align: left; border-left: 2px solid transparent; text-decoration: none; }
.series-item.selected { background: var(--surface); border-left-color: var(--primary); }
.series-item:hover { background: color-mix(in srgb,var(--navy) 5%,var(--surface)); }
.series-item-title { grid-column: 1/-1; font-size: 12px; line-height: 1.45; }
.series-item-value { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.series-item-meta { font-size: 10px; color: var(--muted); align-self: center; }
.status-label { font-size: 11px; font-weight: 400; color: var(--muted); }
.status-label.error { color: var(--loss); }
.catalog-download { display: inline-block; font-size: 11px; color: var(--muted); margin-top: 15px; }
.workspace-content { min-width: 0; }
.topic-intro { margin-bottom: 14px; }
.topic-intro h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.4px; }
.topic-intro p { margin: 0; font-size: 13px; color: var(--muted); }
.focus-panel { background: var(--surface); border: 1px solid var(--grid); border-radius: 3px; padding: 18px 22px 0; min-width: 0; }
.focus-header { display: flex; justify-content: space-between; align-items: start; gap: 24px; min-height: 58px; }
.focus-heading { min-width: 0; }
.focus-heading h1,.focus-heading h2 { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.5px; }
.series-description { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 6px 0 0; }
.current-reading { display: flex; flex-direction: column; text-align: right; flex-shrink: 0; gap: 2px; }
.current-reading strong { font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.current-reading > span { font-size: 11px; color: var(--muted); }
.chart-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0 4px; }
.range-buttons,.chart-type-buttons,.chart-tools { display: flex; align-items: center; gap: 2px; }
.range-buttons { flex-wrap: wrap; }
.chart-toolbar button { background: var(--surface); border: 1px solid transparent; border-radius: 3px; min-height: 32px; padding: 5px 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.chart-toolbar button.active { color: var(--primary); background: color-mix(in srgb,var(--primary) 10%,var(--surface)); border-color: color-mix(in srgb,var(--primary) 30%,var(--surface)); }
.chart-toolbar button:hover:not(:disabled) { background: color-mix(in srgb,var(--primary) 10%,var(--surface)); }
.chart-toolbar button:disabled { color: var(--muted); background: var(--background); }
.chart-tools { gap: 10px; flex-shrink: 0; }
.chart-type-buttons { border-right: 1px solid var(--grid); padding-right: 8px; }
.chart-toolbar .share-button { border-color: color-mix(in srgb,var(--muted) 42%,var(--surface)); color: var(--text); padding-inline: 11px; }
.chart-wrap { position: relative; width: 100%; min-height: 260px; }
.chart-crosshair { pointer-events: none; }
.chart-tooltip { position: absolute; pointer-events: none; padding: 6px 9px; border: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); border-radius: 3px; background: var(--surface); color: var(--text); font-size: 12px; white-space: nowrap; box-shadow: 0 2px 6px color-mix(in srgb,var(--navy) 7%,transparent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 14px; font-size: 11px; color: var(--muted); line-height: 1.5; padding-bottom: 12px; }
.chart-caption a { text-decoration-color: color-mix(in srgb,var(--muted) 42%,var(--surface)); }
.data-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 11px 0; border-top: 1px solid var(--grid); }
.text-button { border: 0; padding: 0; background: none; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.data-actions > span { font-size: 11px; color: var(--muted); margin-left: auto; }
.coverage-note { font-size: 11px; color: var(--muted); margin: 0 0 12px; line-height: 1.6; }
.detail-sections { margin-inline: -22px; padding-inline: 22px; background: var(--background); border-top: 1px solid var(--grid); }
.details-panel { padding: 11px 0; }
.details-panel + .details-panel { border-top: 1px solid var(--grid); }
.details-panel summary { cursor: pointer; font-size: 12px; }
.details-panel p,.details-panel li { font-size: 13px; color: var(--muted); line-height: 1.7; }
.details-panel ul { padding-left: 18px; }
.details-panel dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 15px; font-size: 12px; line-height: 1.7; }
.details-panel dt { color: var(--muted); }
.details-panel dd { margin: 0; overflow-wrap: anywhere; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 12px; }
.data-table caption { text-align: left; color: var(--muted); padding-bottom: 8px; }
.data-table td,.data-table th { border-bottom: 1px solid var(--grid); padding: 8px; text-align: left; font-weight: 400; }
.data-table td:last-child,.data-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.empty-search,.unavailable { padding: 12px 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

.view-title { margin: 12px 0 20px; font-size: 24px; font-weight: 600; }
.source-summary { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.sources-table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 13px; }
.sources-table td,.sources-table th { padding: 14px; text-align: left; border-bottom: 1px solid var(--grid); line-height: 1.6; }
.sources-table th { font-weight: 600; background: color-mix(in srgb,var(--navy) 5%,var(--surface)); }
.sources-table td:first-child { min-width: 200px; }
.source-series-link { font-size: 13px; text-decoration: underline; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.method-grid article { background: var(--surface); padding: 22px; border: 1px solid var(--grid); }
.method-grid h3 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.method-grid p,.method-scope { font-size: 14px; color: var(--muted); line-height: 1.75; max-width: 75ch; }
.method-scope { margin: 25px 0; }
dialog { width: min(1100px,calc(100% - 40px)); max-height: calc(100vh - 40px); padding: 23px; border: 1px solid var(--grid); border-radius: 5px; color: var(--text); background: var(--background); }
dialog::backdrop { background: color-mix(in srgb,var(--navy) 72%,transparent); }
body:has(dialog[open]) { overflow: hidden; }
.share-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.share-dialog-head h2 { font-size: 20px; font-weight: 600; margin: 0; }
.icon-button { width: 36px; height: 36px; background: none; border: 0; font-size: 26px; color: var(--muted); }
.share-layout { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(230px,1fr); gap: 22px; }
.share-preview { border: 1px solid var(--grid); background: var(--surface); }
.share-preview svg { width: 100%; height: auto; display: block; }
.format-controls { display: flex; justify-content: center; gap: 8px; margin-top: 13px; }
.format-controls button { padding: 8px 10px; font-size: 12px; border: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); border-radius: 3px; background: none; }
.format-controls button.selected { background: var(--navy); color: var(--surface); }
.share-actions { display: flex; flex-direction: column; gap: 10px; }
.share-actions label { font-size: 12px; margin-top: 7px; }
.share-actions textarea { width: 100%; padding: 11px; font-size: 12px; line-height: 1.7; background: var(--surface); color: var(--text); border: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); resize: vertical; }
.share-hint { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; text-decoration: none; background: var(--surface); border: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); border-radius: 3px; padding: 9px 14px; min-height: 38px; font-size: 13px; white-space: nowrap; }
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--surface); }
.button:hover { background: color-mix(in srgb,var(--primary) 10%,var(--surface)); }
.button.primary:hover { background: color-mix(in srgb,var(--primary) 84%,var(--navy)); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--navy); color: var(--surface); padding: 12px 18px; font-size: 13px; border-radius: 4px; visibility: hidden; opacity: 0; z-index: 99; max-width: calc(100% - 35px); }
.toast.visible { visibility: visible; opacity: 1; }
.load-status { font-size: 12px; color: var(--muted); margin: 8px 0; }
.noscript-note { margin: 20px auto; max-width: 80ch; padding: 0 20px; font-size: 13px; }
@media(max-width:1200px) {
 .headline-card { grid-template-columns: 1fr; gap: 0; min-height: 70px; }
 .card-period { padding: 0; }
 .workspace { grid-template-columns: 196px minmax(0,1fr); gap: 20px; }
 .focus-panel { padding-inline: 18px; }
 .detail-sections { margin-inline: -18px; padding-inline: 18px; }
 .focus-header { gap: 18px; }
 .chart-toolbar button { padding-inline: 6px; }
 .chart-tools { gap: 6px; }
}
@media(max-width:900px) {

 .workspace { grid-template-columns: minmax(0,1fr); gap: 12px; margin-top: 14px; }
 .catalog-panel { border: 1px solid var(--grid); border-radius: 3px; background: var(--surface); }
 .catalog-panel > summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 44px; padding: 10px 13px; font-size: 13px; cursor: pointer; }
 .catalog-panel > summary::after { content: '+'; font-size: 18px; }
 .catalog-panel[open] > summary::after { content: '−'; }
 #catalog-current { font-size: 12px; color: var(--muted); margin-left: auto; }
 .catalog-inner { padding: 0 13px 14px; }
 .catalog-heading { margin-top: 13px; }
 .topic-nav { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px 12px; }
 .topic-link { min-height: 40px; }
 .series-item { min-height: 44px; }
 .share-layout { grid-template-columns: 1fr; }
 .share-actions { display: grid; grid-template-columns: 1fr 1fr; }
 .share-actions label,.share-actions textarea,.share-hint { grid-column: 1/-1; }
}
@media(max-width:560px) {

 .page-heading { align-items: start; gap: 10px; margin-bottom: 9px; }
 #page-context { font-size: 11px; flex-wrap: wrap; gap: 5px; }
 #snapshot-date { font-size: 10px; white-space: nowrap; }
 .headline-grid { grid-template-columns: 1fr 1fr; }
 .headline-card { padding: 8px 12px; min-height: 68px; }
 .headline-card:nth-child(odd) { padding-left: 0; border-left: 0; }
 .headline-card:nth-child(n+3) { border-top: 1px solid var(--grid); }
 .headline-card strong { font-size: 19px; }
 .card-title { font-size: 11px; }
 .card-period { font-size: 10px; }
 .focus-panel { padding: 15px 13px 0; }
 .detail-sections { margin-inline: -13px; padding-inline: 13px; }
 .focus-header { flex-direction: column; gap: 10px; }
 .focus-heading h1,.focus-heading h2 { font-size: 20px; }
 .series-description { font-size: 12px; }
 .current-reading { flex-direction: row; align-items: baseline; gap: 10px; text-align: left; flex-wrap: wrap; }
 .current-reading strong { font-size: 27px; }
 .chart-toolbar { align-items: start; flex-direction: column; gap: 4px; padding-top: 10px; }
 .chart-toolbar button { padding: 6px; min-height: 34px; }
 .chart-tools { align-self: end; }
 .chart-type-buttons { border: 0; }
 .chart-wrap { min-height: 245px; }
 .chart-caption { font-size: 10px; }
 .data-actions { gap: 12px; }
 .data-actions>span { width: 100%; margin-left: 0; }
 .text-button,.coverage-note { font-size: 11px; }
 .details-panel dl { grid-template-columns: 85px 1fr; }

 .method-grid { grid-template-columns: 1fr; }
 dialog { width: calc(100% - 20px); padding: 15px; }
 .share-dialog-head h2 { font-size: 18px; }
 .share-actions { grid-template-columns: 1fr; }
 .share-actions label,.share-actions textarea,.share-hint { grid-column: auto; }
}
@media(pointer:coarse) {
 .topic-link,.series-item,.chart-toolbar button,.format-controls button,.icon-button { min-height: 44px; }
 .data-actions .text-button { display: inline-flex; align-items: center; min-height: 44px; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
/* Timeline uses source dates; both thumbs and date fields snap to real observations. */
.chart-toolbar { justify-content: flex-end; padding-top: 4px; }
.timeline { border-top: 1px solid var(--grid); padding: 9px 0 10px; }
.timeline-main { display: flex; align-items: center; gap: 12px; }
.timeline-play { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; padding: 7px; border: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); border-radius: 3px; background: var(--surface); color: var(--primary); }
.timeline-play:hover:not(:disabled) { background: color-mix(in srgb,var(--primary) 10%,var(--surface)); }
.timeline-play svg { width: 18px; height: 18px; }
.timeline-date { display: flex; flex-direction: column; gap: 2px; flex: 0 0 118px; color: var(--muted); font-size: 10px; }
.timeline-date input { background: var(--surface); border: 0; border-bottom: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); width: 118px; padding: 1px 0 3px; color: var(--text); font: 12px var(--font); min-width: 0; }
.timeline-speed select { padding: 4px 2px; border: 1px solid color-mix(in srgb,var(--muted) 42%,var(--surface)); border-radius: 3px; background: var(--surface); color: var(--muted); font: 11px var(--font); width: 50px; }
.timeline-track { position: relative; height: 34px; min-width: 70px; flex: 1; cursor: pointer; margin-inline: 8px; }
.timeline-rail,.timeline-selected { position: absolute; height: 4px; top: 15px; border-radius: 2px; left: 0; right: 0; background: var(--grid); pointer-events: none; }
.timeline-selected { background: color-mix(in srgb,var(--primary) 75%,var(--surface)); }
.timeline-handle { position: absolute; margin: 0; inset: 0; width: 100%; height: 34px; padding: 0; appearance: none; background: transparent; pointer-events: none; outline: none; }
.timeline-handle::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.timeline-handle::-webkit-slider-thumb { appearance: none; width: 15px; height: 22px; border: 2px solid var(--primary); border-radius: 3px; background: var(--surface); pointer-events: auto; cursor: ew-resize; margin-top: -9px; }
.timeline-handle::-moz-range-track { background: transparent; }
.timeline-handle::-moz-range-thumb { width: 12px; height: 19px; border: 2px solid var(--primary); border-radius: 3px; background: var(--surface); pointer-events: auto; cursor: ew-resize; }
.timeline-handle:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--navy); outline-offset: 3px; }
.timeline-handle:focus-visible::-moz-range-thumb { outline: 2px solid var(--navy); outline-offset: 3px; }
.timeline-handle-end { z-index: 2; }
.timeline-handle:focus { z-index: 3; }
.timeline .range-buttons { justify-content: center; gap: 3px; margin-top: 7px; }
.timeline .range-buttons button { border: 1px solid transparent; border-radius: 3px; background: var(--surface); color: var(--muted); padding: 4px 8px; min-height: 28px; font-size: 11px; }
.timeline .range-buttons button.active { color: var(--primary); background: color-mix(in srgb,var(--primary) 10%,var(--surface)); border-color: color-mix(in srgb,var(--primary) 30%,var(--surface)); }
.timeline .range-buttons button:hover:not(:disabled) { background: color-mix(in srgb,var(--primary) 10%,var(--surface)); }
.timeline .range-buttons button:disabled { color: var(--muted); background: var(--background); }
@media(max-width:560px) {
 .chart-toolbar { align-items: end; flex-direction: row; }
 .timeline-main { display: grid; grid-template-columns: 34px minmax(0,1fr) minmax(0,1fr) 48px; gap: 8px; }
 .timeline-date { min-width: 0; }
 .timeline-date input { width: 100%; font-size: 11px; }
 .timeline-track { grid-column: 1/-1; grid-row: 2; width: calc(100% - 16px); margin-inline: 8px; }
 .timeline .range-buttons { gap: 1px; justify-content: space-between; }
 .timeline .range-buttons button { padding-inline: 5px; font-size: 10px; }
 .timeline-speed select { width: 48px; }
}
@media(pointer:coarse) {
 .timeline-play,.timeline-handle,.timeline-date input,.timeline-speed select,.timeline .range-buttons button { min-height: 44px; }
 .timeline-track { height: 44px; }
 .timeline-rail,.timeline-selected { top: 20px; }
}
@media(pointer:coarse) {
 .timeline-play { width: 44px; flex-basis: 44px; }
 .timeline-handle::-webkit-slider-thumb { width: 44px; height: 44px; margin-top: -20px; border: 0; border-radius: 0; background: linear-gradient(var(--surface),var(--surface)) center/12px 22px no-repeat,linear-gradient(var(--primary),var(--primary)) center/16px 26px no-repeat; }
 .timeline-handle::-moz-range-thumb { width: 44px; height: 44px; border: 0; border-radius: 0; background: linear-gradient(var(--surface),var(--surface)) center/12px 22px no-repeat,linear-gradient(var(--primary),var(--primary)) center/16px 26px no-repeat; }
}
@media(max-width:560px) and (pointer:coarse) { .timeline-main { grid-template-columns: 44px minmax(0,1fr) minmax(0,1fr) 48px; } }

.source-packages { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0 24px; }
.source-package { background:var(--surface);border:1px solid var(--grid);padding:18px 20px;min-width:0; }
.source-package-heading { display:flex;align-items:baseline;justify-content:space-between;gap:12px; }
.source-package h2 { font-size:16px;font-weight:600;margin:0 0 10px; }
.source-package-heading > span { font-size:11px;color:var(--muted);text-align:right; }
.source-package strong { font-size:13px;font-weight:600; }
.source-package p { font-size:12px;line-height:1.7;color:var(--muted);margin:8px 0 12px; }
.source-package-links { display:flex;flex-wrap:wrap;gap:8px 16px;font-size:12px; }
.source-definitions > summary { cursor:pointer;margin-bottom:16px;font-weight:600; }
@media(max-width:700px) { .source-packages {grid-template-columns:1fr;} .source-package {padding:15px;} }

.source-filters {display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:18px 0;}
.source-filters label {display:grid;gap:5px;font-size:12px;}
.source-filters select,.source-filters input {padding:8px;background:var(--surface);border:1px solid color-mix(in srgb,var(--muted) 42%,var(--surface));border-radius:3px;max-width:100%;}
#source-match-count {font-size:12px;color:var(--muted);padding-bottom:8px;}

