/* Shared editorial frame. Charts retain their data-specific colour scales. */
:root {
  --du-font-brand: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --du-font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --du-color-brand-paper:#fafaf7; --du-color-brand-ink:#181a1b;
  --du-color-brand-ink-muted:#626660; --du-color-brand-line:#c8cbc5;
  --du-color-brand-accent:#1746a2; --du-color-brand-focus:#1746a2;
  --accent-hover:#12377e; --top-strip-bg:#fafaf7; --top-strip-text:#181a1b;
}
.top-strip { height:72px; border-bottom:1px solid var(--panel-text); position:relative; z-index:1001; }
.top-strip-inner { max-width:1800px; margin:auto; padding:0 28px; gap:28px; }
.atlas-brand { font-size:25px; font-weight:600; letter-spacing:-1.2px; text-decoration:none; color:inherit; white-space:nowrap; }
.atlas-identity { display:flex; align-items:baseline; gap:16px; min-width:0; }
.atlas-label { font-size:11px; text-transform:uppercase; letter-spacing:.11em; color:var(--panel-muted); white-space:nowrap; }
.atlas-project { font-size:15px; font-weight:500; line-height:1.2; }
.atlas-header-nav { display:flex; gap:24px; align-items:center; margin-left:auto; font-size:12px; white-space:nowrap; }
.atlas-header-nav a { color:inherit; text-decoration:none; }
.atlas-header-nav a:hover { text-decoration:underline; text-underline-offset:4px; }
.atlas-explore { position:relative; }
.atlas-explore summary { cursor:pointer; padding:12px 0; }
.atlas-explore nav { position:absolute; right:0; top:100%; width:280px; background:var(--page-bg); border:1px solid var(--panel-line); padding:10px 18px; display:grid; box-shadow:0 8px 20px #181a1b12; }
.atlas-explore nav a { padding:12px 0; border-bottom:1px solid var(--panel-line); line-height:1.35; white-space:normal; }
.atlas-explore nav a:last-child { border:0; }
.atlas-explore nav a[aria-current] { color:var(--accent); font-weight:600; }
.shell { height:calc(100dvh - 72px); min-height:640px; grid-template-columns:220px minmax(0,1fr); gap:28px; padding:24px 28px; max-width:1800px; margin:auto; }
.sidebar { overflow:auto; scrollbar-width:thin; padding-right:12px; }
.sidebar-top { justify-content:space-between; margin-bottom:20px; }
.sidebar-top::before { content:'FILTERS'; color:var(--panel-muted); font-size:10px; letter-spacing:.12em; align-self:center; }
html[lang=it] .sidebar-top::before { content:'FILTRI'; }
.reset-all { font-size:12px; min-height:28px; text-transform:none; letter-spacing:0; }
.accordion { margin-bottom:22px; padding-top:12px; }
.accordion-title { font-size:10px; letter-spacing:.1em; font-weight:600; padding-bottom:10px; }
.select-row { align-items:center; gap:6px; }
.select-row select { appearance:auto; min-height:36px; border:1px solid var(--panel-line); color:var(--panel-text); background:transparent; padding:7px; font-size:13px; font-weight:400; border-radius:0; }
.field-reset { min-width:24px; min-height:32px; color:var(--accent); font-size:16px; }
.stats-list { margin-top:12px; font-size:12px; line-height:1.5; }
.sidebar-bottom { padding-top:24px; }
.legend-block { margin-top:0; font-size:11px; line-height:1.5; }
.legend-entry,.legend-text-entry { line-height:1.4; white-space:normal; }
.source-block { font-size:10px; line-height:1.5; }
.atlas-place-search { margin-bottom:7px; }
.atlas-place-search input { display:block; width:100%; min-width:0; border:1px solid var(--panel-line); background:#fff; color:var(--panel-text); border-radius:0; min-height:36px; padding:8px; font:12px var(--du-font-ui); }
.atlas-search-status { font-size:10px; line-height:1.4; color:var(--panel-muted); margin:5px 0 0; }
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.stage { grid-template-rows:auto auto minmax(0,1fr); gap:12px; min-height:0; }
.stage-head { padding-bottom:12px; border-bottom:1px solid var(--panel-line); }
.stage-topline { gap:16px; }
.stage-controls { gap:10px; max-width:100%; }
.result-line { font-size:12px; line-height:1.45; margin-bottom:12px; color:var(--panel-muted); }
.breadcrumb { font-family:var(--du-font-ui); font-size:20px; line-height:1.3; letter-spacing:-.5px; }
.context-line { font-size:12px; line-height:1.45; }
.view-tabs,.subview-tabs,.language-tabs { flex-wrap:wrap; gap:4px; }
.view-tab,.subview-tab,.language-tab { min-height:30px; padding:5px 6px; font-size:11px; letter-spacing:.03em; }
.view-tab.is-active,.subview-tab.is-active { background:var(--panel-text); color:var(--page-bg); }
.view-tabs .control-separator,.subview-tabs .control-separator { display:none; }
.segment-controls { max-width:100%; flex-wrap:wrap; gap:6px; }
.segment-controls select,.metric-controls select { max-width:100%; font-size:12px; min-height:32px; }
.atlas-filter-summary { display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:var(--panel-muted); font-size:11px; min-height:28px; }
.atlas-scope-label { text-transform:uppercase; letter-spacing:.1em; font-size:9px; margin-right:6px; }
.atlas-filter-chip { border:1px solid var(--panel-line); background:transparent; color:var(--panel-text); font-size:11px; padding:5px 8px; cursor:pointer; border-radius:0; }
.atlas-mobile-tools { display:none; }
.loading-overlay { background:#fafaf7e8; font-size:15px; }
@media(min-width:981px) and (max-width:1200px) {
 .atlas-identity { gap:10px; } .atlas-project { max-width:210px; }
 .shell { grid-template-columns:195px minmax(0,1fr); gap:20px; padding:20px; }
 .stage-topline { flex-direction:column; } .stage-controls { align-items:flex-start; }
}
@media(max-width:980px) {
 .top-strip { height:auto; min-height:96px; }
 .top-strip-inner { flex-wrap:wrap; padding:16px 20px; column-gap:20px; row-gap:10px; }
 .atlas-identity { flex:1; justify-content:flex-end; }
 .atlas-project { font-size:13px; max-width:250px; }
 .atlas-header-nav { flex-basis:100%; margin:0; justify-content:space-between; }
 .atlas-explore summary { padding:0; }
 .shell { height:auto; min-height:calc(100dvh - 96px); display:flex; flex-direction:column; gap:18px; padding:18px 20px; overflow:visible; }
 .atlas-mobile-tools { display:flex; }
 .atlas-filter-toggle { background:transparent; border:1px solid var(--panel-line); color:var(--panel-text); padding:10px 14px; font-size:12px; min-height:40px; width:100%; text-align:left; }
 .atlas-filter-toggle::after { content:'+'; float:right; font-size:16px; }
 .atlas-filter-toggle[aria-expanded=true]::after { content:'−'; }
 .shell[data-filters-open=false] .sidebar { display:none; }
 .sidebar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; overflow:visible; padding:0; }
 .sidebar-top,.sidebar-bottom,.correlation-explanation { grid-column:1/-1; }
 .sidebar .accordion { margin:0; }
 .stage { min-height:650px; gap:12px; }
 .stage-controls { align-items:flex-start; }
 .stage-canvas { min-height:520px; }
 .stage-topline { gap:12px; }
 .view-tab,.subview-tab,.language-tab { min-height:36px; }
 .stage-topline,.stage-controls,.stage-secondaryline { min-width:0; max-width:100%; }
 .polygon-layout.has-info-panel { grid-template-columns:1fr; }
}
@media(max-width:520px) {
 .atlas-brand { font-size:24px; }
 .atlas-label { font-size:9px; }
 .atlas-project { display:none; }
 .sidebar { display:flex; flex-direction:column; }
 .breadcrumb { font-size:18px; }
 .stage-canvas { min-height:480px; }
}
@media(max-width:1200px) {
 .stage-topline { justify-content:flex-start; }
 .stage-topline > .stage-heading { flex:0 0 auto; width:100%; align-content:start; }
}

@media(max-width:520px) {
 .atlas-identity { display:contents; }
 .atlas-label { margin-left:auto; }
 .atlas-project { display:block; order:1; flex-basis:100%; max-width:none; font-size:13px; }
 .atlas-header-nav { order:2; }
}
.stage { grid-template-columns:minmax(0,1fr); }
#graph-scope-tabs, #scope-tabs { flex-wrap:wrap; white-space:normal; min-width:0; max-width:100%; }
.stage-head, .stage-canvas, .atlas-filter-summary { min-width:0; }

/* Draw navigation and disclosure arrows identically at all viewport sizes. */
.du-arrow { display:inline-block; width:16px; height:16px; flex:0 0 16px; vertical-align:-.2em; }
[data-atlas-journal] { display:inline-flex; align-items:center; gap:6px; }
[data-atlas-journal] .du-arrow { width:14px; height:14px; flex-basis:14px; }
.atlas-explore > summary { display:flex; align-items:center; gap:9px; list-style:none; }
.atlas-explore > summary::-webkit-details-marker { display:none; }
.atlas-explore > summary::marker { content:''; }
.atlas-explore > summary::before,
.atlas-filter-toggle::after { content:''; display:inline-block; width:6px; height:6px; border-top:1.25px solid currentColor; border-right:1.25px solid currentColor; transform:rotate(45deg); }
.atlas-explore[open] > summary::before,
.atlas-filter-toggle[aria-expanded=true]::after { content:''; transform:rotate(135deg); }
.atlas-filter-toggle::after { margin:4px 3px 0 0; }
.shell select, .shell .select-row select {
 -webkit-appearance:none; appearance:none;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23626660' stroke-width='1.25'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
 background-position:right 7px center; background-repeat:no-repeat; background-size:16px 16px; padding-right:28px;
}
.shell select:disabled { opacity:.6; }
