/* Daily Chartbook brand tokens (dc-chart-style). */
:root {
  --ink: #111111;
  --body: #333333;
  --muted: #8a8a8a;
  --paper: #ffffff;
  --card: #ffffff;
  --line: #e2e2e2;
  --head-blue: #0a2b4d;
  --green: #43885f;
  --green-soft: #e6f0ea;
  --red: #ff3b30;
  --red-soft: #ffe9e7;
  --amber: #00a6a6;
  --amber-soft: #e0f4f4;
  --teal: #00a6a6;
  --teal-soft: #e0f4f4;
  --blue: #2548ff;
  --navy: #0a2b4d;
  --slate: #33566f;
  --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Google Sans Flex", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.app-shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 40; height: 70px; padding: 0 4vw; display: flex; align-items: center; gap: 36px; border-bottom: 0; color: white; background: var(--head-blue); }
.brand { display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; letter-spacing: .08em; }
.brand-text { display: block; }
.brand strong, .brand em { display: block; font-size: 10px; line-height: 1.05; font-style: normal; }
.brand em { color: var(--green); font-weight: 800; }
.brand-mark { width: 81px; height: 40px; display: block; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.topnav { display: flex; align-items: stretch; gap: 28px; height: 100%; }
.topnav a { position: relative; display: flex; align-items: center; color: rgba(255,255,255,.66); font-size: 13px; font-weight: 650; text-decoration: none; }
.topnav a:hover, .topnav a.active { color: white; }
.topnav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: white; }
.live-status { margin-left: auto; display: flex; align-items: center; gap: 9px; color: white; }
.live-status > span:last-child { display: flex; flex-direction: column; }
.live-status b { font-size: 12px; }.live-status small { max-width: 180px; color: rgba(255,255,255,.66); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #5fd08f; box-shadow: 0 0 0 5px rgba(95,208,143,.18); }
.status-dot::after { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(34,160,107,.3); border-radius: 50%; animation: pulse 2.2s infinite; }
.live-status.static .status-dot { background: rgba(255,255,255,.7); box-shadow: none; }
.live-status.static .status-dot::after { display: none; }
.live-status.error .status-dot { background: #ff8a80; box-shadow: 0 0 0 5px rgba(255,138,128,.18); }
@keyframes pulse { 0%,100% { transform: scale(.8); opacity: .2; } 50% { transform: scale(1.25); opacity: .8; } }
main { width: min(1520px, 94vw); margin: 0 auto; }
.hero { min-height: 300px; padding: 58px 1vw 42px; display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: end; }
.eyebrow { margin: 0 0 13px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .15em; }
h1 { margin: 0; max-width: 820px; font-size: clamp(36px, 4.65vw, 66px); font-weight: 700; line-height: .94; letter-spacing: -.045em; }
.hero-controls { min-width: 308px; padding: 17px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
.hero-controls label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.range-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: #f3f4f6; }
.range-switch button { flex: 1; min-width: 34px; padding: 6px 7px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.range-switch button:hover { color: var(--ink); }.range-switch button.active { color: white; background: var(--head-blue); box-shadow: none; }
.range-switch button[data-range="CUSTOM"] { min-width: 54px; }
.global-custom-range { display: none; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.global-custom-range.show { display: grid; }
.global-custom-range label { margin: 0; color: var(--muted); font-size: 9px; }
.global-custom-range label span { display: block; margin-bottom: 4px; }
.global-custom-range input, .custom-range-panel input { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: white; font: inherit; font-size: 11px; }
.global-custom-range button, .custom-range-panel .apply-custom-range { padding: 8px 11px; border: 1px solid var(--head-blue); border-radius: 4px; color: white; background: var(--head-blue); cursor: pointer; font-size: 10px; font-weight: 750; white-space: nowrap; }
.refresh-button, .download-button { width: 100%; margin-top: 10px; padding: 8px 11px; border: 1px solid var(--ink); border-radius: 5px; color: var(--ink); background: transparent; cursor: pointer; font-weight: 750; }
.refresh-button:hover, .download-button:hover { color: white; border-color: var(--head-blue); background: var(--head-blue); }.refresh-button.loading span { display: inline-block; animation: rotate .9s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.stat-stack { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-bottom: 86px; }
.stat-column { min-width: 0; display: grid; align-content: start; gap: 18px; }
.stat-group { min-width: 0; display: grid; align-content: start; gap: 7px; }
.stat-group-label { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.stat-group-header { display: flex; align-items: baseline; gap: 12px; }
.stat-group-header > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-group-date { margin-left: auto; color: color-mix(in srgb, var(--muted) 78%, var(--paper)); font-size: 9px; font-weight: 650; letter-spacing: .045em; text-align: right; text-transform: none; white-space: nowrap; }
.summary-copy-button { position: absolute; z-index: 3; right: 0; bottom: -38px; opacity: .68; }
.summary-copy-button:hover, .summary-copy-button.copied { opacity: 1; }
.stat-strip { --accent: var(--ink); display: grid; grid-template-columns: 58px minmax(96px, 1fr) minmax(112px, 155px) minmax(110px, 170px) 70px 78px; gap: 10px; align-items: center; min-height: 42px; padding: 8px 10px; border: 1px solid rgba(217,221,211,.8); border-left: 4px solid var(--accent); border-radius: 3px; background: var(--card); box-shadow: none; }
.stat-source { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.stat-title { min-width: 0; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-title, .stat-value, .stat-change { text-decoration: none; }
.stat-title:hover, .stat-value:hover, .stat-change:hover { text-decoration: none; }
.stat-title:focus-visible, .stat-value:focus-visible, .stat-change:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.stat-percentile { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .01em; text-align: right; white-space: nowrap; }
.stat-strip strong, .stat-value { color: var(--accent); font-size: 17px; font-weight: 700; text-align: right; white-space: nowrap; }
.stat-change { font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.stat-change.positive { color: var(--green); }.stat-change.negative { color: var(--red); }.stat-change.muted { color: var(--muted); font-weight: 500; }
.stat-distribution { position: relative; height: 20px; min-width: 110px; outline: 0; }
.stat-distribution::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #c8cec5; transform: translateY(-50%); }
.stat-distribution::after { content: attr(data-tooltip); position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 10px); width: max-content; max-width: 245px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: rgba(255,255,255,.98); box-shadow: 0 12px 32px rgba(23,32,25,.18); font-size: 11px; line-height: 1.35; white-space: pre-line; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .12s ease, transform .12s ease; }
.stat-distribution:hover::after, .stat-distribution:focus::after { opacity: 1; transform: translate(-50%, 0); }
.stat-whisker { position: absolute; top: 50%; left: var(--whisker-left, 0%); right: calc(100% - var(--whisker-right, 100%)); height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 66%, #c8cec5); transform: translateY(-50%); }
.stat-box { position: absolute; top: 50%; left: var(--box-left, 25%); right: calc(100% - var(--box-right, 75%)); height: 12px; border: 1px solid var(--accent); border-radius: 3px; background: rgba(255,255,255,.88); transform: translateY(-50%); }
.stat-mean { position: absolute; z-index: 2; top: 50%; left: var(--mean-left, 50%); width: 2px; height: 16px; border-radius: 2px; background: var(--accent); transform: translate(-50%,-50%); opacity: .72; }
.stat-dot { position: absolute; top: 50%; left: var(--dot-left, 50%); width: 9px; height: 9px; border: 2px solid var(--card); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); transform: translate(-50%,-50%); }
.stat-strip.bullish { --accent: var(--ink); }.stat-strip.bearish { --accent: var(--red); }.stat-strip.spread.positive { --accent: var(--green); }.stat-strip.spread.negative { --accent: var(--red); }.stat-strip.neutral { --accent: var(--teal); }.stat-strip.stocks { --accent: var(--red); }.stat-strip.bonds { --accent: var(--blue); }.stat-strip.cash { --accent: var(--green); }.stat-strip.stax { --accent: var(--ink); }.stat-strip.naaim { --accent: var(--ink); }
.stat-guide { display: grid; grid-template-columns: 118px minmax(150px, 1fr) auto; gap: 10px; align-items: center; justify-self: stretch; min-height: 42px; padding: 8px 10px; border: 1px solid rgba(217,221,211,.72); border-radius: 3px; color: var(--muted); background: var(--card); box-shadow: none; }
.stat-guide-title { color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.stat-guide-plot { position: relative; height: 22px; justify-self: center; width: min(210px, 100%); }
.stat-guide-plot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #c8cec5; transform: translateY(-50%); }
.stat-guide-whisker { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 55%, #c8cec5); transform: translateY(-50%); }
.stat-guide-box { position: absolute; left: 29%; right: 29%; top: 50%; height: 12px; border: 1px solid var(--ink); border-radius: 3px; background: rgba(255,255,255,.9); transform: translateY(-50%); }
.stat-guide-mean { position: absolute; z-index: 2; left: 50%; top: 50%; width: 2px; height: 16px; border-radius: 2px; background: var(--ink); opacity: .72; transform: translate(-50%,-50%); }
.stat-guide-dot { position: absolute; z-index: 3; left: 67%; top: 50%; width: 9px; height: 9px; border: 2px solid var(--card); border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1px var(--ink); transform: translate(-50%,-50%); }
.stat-guide-key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 9px; max-width: 235px; font-size: 9px; line-height: 1.25; text-align: right; }
.section-block { padding: 30px 1vw 86px; scroll-margin-top: 86px; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(300px, 520px); gap: 32px; align-items: end; margin-bottom: 27px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.section-heading h2 { margin: 0; font-size: clamp(30.6px, 3.6vw, 48.6px); font-weight: 700; letter-spacing: -.035em; }
.section-heading > p, .section-copy p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.section-copy { text-align: left; }
.section-copy a { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-align: right; text-decoration: none; text-transform: uppercase; }
.section-copy a:hover { color: var(--ink); }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.chart-card { position: relative; min-width: 0; scroll-margin-top: 86px; padding: 20px 21px 47px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); box-shadow: none; }
.chart-card.wide { grid-column: span 2; }.chart-card.feature { padding: 24px 26px 47px; }
.chart-card.expanded { position: fixed; z-index: 100; inset: 18px; display: flex; flex-direction: column; background: var(--card); box-shadow: 0 25px 80px rgba(0,0,0,.28); }
.chart-card.expanded .chart-stage { flex: 1; min-height: 0; }
.chart-header { min-height: 51px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.chart-header h3 { margin: 0 0 4px; color: var(--ink); font-size: 17px; font-weight: 700; }
.chart-header p { margin: 0; color: var(--muted); font-size: 12px; }
.chart-actions { display: flex; align-items: center; gap: 7px; }
.chart-actions .range-switch { min-width: 322px; }
.chart-actions .range-switch button { min-width: 32px; padding: 5px 6px; font-size: 9px; }
.chart-actions .range-switch button[data-range="CUSTOM"] { min-width: 48px; }
.icon-button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--ink); border-color: var(--ink); }
.chart-footer-actions { position: absolute; right: 13px; bottom: 10px; display: flex; align-items: center; gap: 7px; }
.copy-image-button { height: 28px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--card); cursor: pointer; }
.copy-image-button { width: 29px; display: grid; place-items: center; padding: 0; }
.copy-image-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.copy-image-button:hover, .copy-image-button.copied { color: var(--head-blue); border-color: var(--head-blue); }
.metric-controls { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fafafa; }
.metric-controls > span { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.metric-controls .metric-switch { width: auto; }
.metric-controls .metric-switch button { min-width: 46px; padding: 5px 9px; font-size: 9px; }
.custom-range-panel { position: absolute; z-index: 12; top: 65px; right: 54px; display: none; width: 310px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); box-shadow: 0 13px 38px rgba(23,32,25,.18); }
.custom-range-panel.show { display: block; }
.custom-range-panel strong { display: block; margin-bottom: 10px; font-size: 15px; }
.custom-range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.custom-range-panel label { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.custom-range-panel label span { display: block; margin-bottom: 4px; }
.custom-range-panel .apply-custom-range { width: 100%; margin-top: 10px; }
.chart-stage { position: relative; height: 305px; margin-top: 8px; }.chart-stage.tall { height: 410px; }
.chart-stage canvas { width: 100%; height: 100%; display: block; }
.chart-tooltip { position: absolute; z-index: 3; min-width: 160px; padding: 10px 12px; pointer-events: none; opacity: 0; transform: translate(-50%,-112%); border: 1px solid rgba(255,255,255,.15); border-radius: 4px; color: white; background: rgba(10,43,77,.96); box-shadow: 0 7px 24px rgba(0,0,0,.18); font-size: 11px; transition: opacity .08s; }
.chart-tooltip.show { opacity: 1; }.chart-tooltip strong { display: block; margin-bottom: 5px; color: rgba(255,255,255,.72); font-size: 10px; }.chart-tooltip span { display: flex; justify-content: space-between; gap: 14px; margin: 3px 0; }.chart-tooltip i { width: 7px; height: 7px; margin: 3px 7px 0 0; display: inline-block; border-radius: 50%; }
.chart-legend { min-height: 27px; display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; padding-top: 5px; }
.legend-button { padding: 4px; border: 0; color: var(--legend-color); background: transparent; cursor: pointer; font-size: 11px; }.legend-button::before { content: ""; width: 14px; height: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; background: var(--legend-color); }.legend-button.off { opacity: .38; text-decoration: line-through; }

.data-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 12px; }
.dataset-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: #f3f4f6; }.dataset-tabs button { padding: 8px 14px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }.dataset-tabs button.active { color: white; background: var(--head-blue); }
.download-button { width: auto; margin: 0; padding: 9px 15px; }
.table-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 12px; } thead { position: sticky; top: 0; z-index: 2; } th { padding: 12px 14px; color: white; background: var(--head-blue); text-align: right; white-space: nowrap; } th:first-child, td:first-child { text-align: left; } td { padding: 10px 14px; border-bottom: 1px solid #e8e8e1; text-align: right; white-space: nowrap; } tbody tr:nth-child(even) { background: #fafafa; } tbody tr:hover { background: var(--green-soft); }
footer { padding: 25px 4vw; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; } footer span { color: var(--ink); font-weight: 850; letter-spacing: .1em; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; max-width: 360px; padding: 12px 17px; border-radius: 4px; color: white; background: var(--head-blue); box-shadow: 0 9px 30px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; font-size: 12px; }.toast.show { opacity: 1; transform: translateY(0); }
body.modal-open { overflow: hidden; }

/* copy dialog */
.copy-modal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(17,17,17,.45); }
.copy-modal[hidden] { display: none; }
.copy-modal-card { width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 18px 20px 16px; border-radius: 4px; background: var(--card); }
.copy-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.copy-modal-head h3 { margin: 0; font-size: 17px; }
.copy-modal-close { border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 24px; line-height: 1; }
.copy-modal-close:hover { color: var(--ink); }
.copy-field { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.copy-field input { display: block; width: 100%; margin-top: 3px; padding: 7px 9px; border: 1px solid #cfcfcf; border-radius: 4px; color: var(--ink); font: inherit; font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.copy-field input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.copy-field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.copy-warn { margin: 0 0 8px; color: #9a3b2e; font-size: 12.5px; }
.copy-preview { margin: 6px 0 12px; padding: 8px; border: 1px solid var(--line); background: #f5f5f5; }
.copy-preview canvas { display: block; width: 100%; height: auto; background: white; }
.copy-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.copy-status { margin-right: auto; color: var(--muted); font-size: 12.5px; }
.copy-button { padding: 7px 14px; border: 1px solid #cfcfcf; border-radius: 4px; color: var(--ink); background: white; cursor: pointer; font-size: 13px; }
.copy-button:hover { border-color: var(--ink); }
.copy-button.primary { color: white; border-color: var(--head-blue); background: var(--head-blue); }
.copy-button.primary:hover { background: #061d35; }
@media (max-width: 680px) { .copy-field-row { grid-template-columns: 1fr; } }

/* composer tray & chart studio */
.composer-button { height: 28px; display: inline-flex; align-items: center; gap: 4px; padding: 0 9px 0 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--card); cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.composer-button svg { width: 13px; height: 13px; }
.composer-button:hover, .composer-button.done { color: var(--head-blue); border-color: var(--head-blue); }
.tray-count { display: inline-block; min-width: 17px; margin-left: 6px; padding: 1px 5px; border-radius: 9px; color: var(--head-blue); background: white; font-size: 10px; font-weight: 800; line-height: 1.4; text-align: center; }
.tray-count[hidden] { display: none; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.studio-main { position: sticky; top: 86px; min-width: 0; }
.studio-preview { margin-top: 0; }
.studio-actions { flex-wrap: wrap; }
.studio-empty { padding: 48px 24px; border: 1px dashed #cfcfcf; border-radius: 4px; color: var(--muted); text-align: center; }
.studio-empty p { margin: 4px 0; }
.studio-empty b { color: var(--ink); }
.studio-notice { margin: 0 0 14px; padding: 8px 12px; border-left: 3px solid var(--blue); background: #f3f4f6; font-size: 13px; }
#studioWarn { margin-top: 10px; }
.studio-warning { margin: 0 0 6px; padding: 6px 10px; color: #6b4b00; background: #fff6e0; font-size: 12.5px; }
.studio-warning.error { color: #8a1c13; background: #fdecea; }
.panel-box { margin-bottom: 12px; padding: 12px 14px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
.panel-box h4 { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.box-note { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.4; }
.panel-box h4 .box-note { margin: 0; }
.box-tools { display: flex; gap: 4px; }
.box-actions { display: flex; gap: 6px; margin: 8px 0; }
.mini { padding: 2px 8px; border: 1px solid #cfcfcf; border-radius: 4px; color: var(--body); background: white; cursor: pointer; font-size: 12px; font-weight: 400; }
.mini:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
.mini:disabled { color: #c4c4c4; cursor: default; }
.studio-field { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.studio-field .field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.studio-field input, .studio-field select, .panel-box select.wide { display: block; width: 100%; margin-top: 3px; padding: 6px 8px; border: 1px solid #cfcfcf; border-radius: 4px; color: var(--ink); background: white; font: inherit; font-size: 13.5px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.studio-field input:focus, .studio-field select:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.link-button { padding: 0; border: 0; color: var(--blue); background: none; cursor: pointer; font-size: 11.5px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.link-button[hidden] { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 8px; }
.togs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; font-size: 13px; }
.tog { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.series-row { display: grid; grid-template-columns: 16px 12px 1fr; gap: 7px; align-items: center; margin-top: 4px; }
.series-row .swatch { width: 12px; height: 12px; border-radius: 2px; }
.studio-field .series-row input[type="text"] { margin-top: 0; padding: 3px 7px; font-size: 13px; }
.studio-field .series-row input[type="text"]:disabled { color: var(--muted); background: #f3f4f6; }
.tray-list { display: flex; flex-direction: column; gap: 5px; }
.tray-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 9px; background: #f3f4f6; font-size: 13px; }
.tray-meta { color: var(--muted); }
.tray-chip .link-button { color: var(--muted); font-size: 13px; }
.tray-chip .link-button:hover { color: var(--ink); }
@media (max-width: 1100px) { .studio { grid-template-columns: 1fr; } .studio-main { position: static; } }

@media (max-width: 1100px) {
  .topnav { display: none; }.hero { grid-template-columns: 1fr; }.hero-controls { width: min(520px,100%); }.stat-stack { grid-template-columns: minmax(0, 1fr); }.stat-strip { grid-template-columns: 68px minmax(115px, 1fr) minmax(112px, 150px) minmax(150px, 240px) 78px 94px; gap: 12px; }.section-heading { grid-template-columns: 1fr; }.chart-grid { grid-template-columns: 1fr; }.chart-card.wide { grid-column: auto; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 18px; }.live-status small { max-width: 100px; }.hero { padding: 55px 0 35px; }.hero-controls { min-width: 0; }.global-custom-range { grid-template-columns: 1fr 1fr; }.global-custom-range button { grid-column: span 2; }.stat-stack { margin-bottom: 60px; }.stat-strip { grid-template-columns: 58px minmax(0, 1fr) minmax(104px, max-content) 76px 86px; gap: 9px; }.stat-percentile { font-size: 9px; }.stat-distribution { grid-column: 1 / -1; grid-row: 2; min-width: 0; }.stat-source { font-size: 10px; }.stat-title { font-size: 14px; }.stat-strip strong, .stat-value { font-size: 15px; }.stat-change { font-size: 11px; }.stat-guide { grid-template-columns: 1fr; justify-self: stretch; }.stat-guide-title, .stat-guide-key { justify-content: flex-start; text-align: left; }.stat-guide-plot { justify-self: stretch; width: 100%; }.section-block { padding-left: 0; padding-right: 0; }.section-copy { text-align: left; }.chart-card { padding: 16px 12px 12px; }.chart-header { flex-direction: column; }.chart-actions { width: 100%; }.chart-actions .range-switch { flex: 1; min-width: 0; overflow-x: auto; }.metric-controls { align-items: flex-start; flex-direction: column; }.metric-controls .metric-switch { width: 100%; overflow-x: auto; }.custom-range-panel { position: static; width: 100%; margin-top: 10px; }.chart-stage { height: 275px; }.chart-stage.tall { height: 330px; }.data-toolbar { align-items: stretch; flex-direction: column; }.download-button { width: 100%; }.section-heading > p, .section-copy p { font-size: 14px; } footer { gap: 10px; flex-direction: column; }
}
@media (max-width: 470px) { .stat-strip { grid-template-columns: 1fr auto; }.stat-source { grid-column: 1; grid-row: 1; }.stat-title { grid-column: 1; grid-row: 2; }.stat-strip strong, .stat-value { grid-column: 2; grid-row: 1; }.stat-change { grid-column: 2; grid-row: 2; }.stat-percentile { grid-column: 1 / -1; grid-row: 3; text-align: left; }.stat-distribution { grid-column: 1 / -1; grid-row: 4; }.global-range button[data-range="YTD"] { display: none; } }
