/* CityBuilder v2.2 Historical Backtesting Lab — isolated page styles. */
.hist-app{max-width:1660px;margin:0 auto;padding:0 clamp(16px,3vw,42px) 42px;color:#dfedf0}
.hist-app .docs-nav{margin:0 0 26px;border-bottom:1px solid #37566b}
.hist-hero{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(245px,.7fr);gap:26px;align-items:center;margin:16px 0 20px}
.hist-eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;color:#7ed9d0;text-transform:uppercase}
.hist-hero h1{font-size:clamp(34px,4.5vw,66px);font-weight:850;line-height:1.1;letter-spacing:-2px;color:#ecf8fa;margin:12px 0}
.hist-hero h1 em{font-style:normal;color:#8bdbdf}
.hist-hero p{font-size:15px;color:#bacdd5;line-height:1.65;max-width:840px}
.hist-hero-card,.hist-card{border:1px solid #29475b;background:linear-gradient(145deg,#0e2738,#112332 76%);border-radius:15px}
.hist-hero-card{padding:24px;min-height:176px}
.hist-hero-date{font-size:clamp(25px,3vw,41px);font-weight:850;letter-spacing:-1px;color:#e9f5f5}
.hist-hero-date span{color:#79d7c6}
.hist-hero-card strong{display:block;color:#8bd9d0;font-size:11px;letter-spacing:1.5px;margin-top:10px}
.hist-hero-card p{font-size:12px;line-height:1.6;margin:8px 0 12px}
.hist-tag{display:inline-flex;align-items:center;padding:7px 9px;border-radius:5px;border:1px solid #49677a;color:#add4e4;font-size:10px;letter-spacing:.5px;font-weight:800;white-space:normal}
.hist-notice{background:#2a352d;border:1px solid #817350;border-radius:12px;padding:14px 17px;color:#f0dbb0;font-size:13px;line-height:1.65;margin:20px 0}
.hist-notice strong{color:#fff2d2}
.hist-columns{display:grid;grid-template-columns:minmax(285px,.76fr) minmax(0,1.5fr);gap:16px;align-items:start}
.hist-card{padding:21px;min-width:0}
.hist-card-heading,.hist-result-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.hist-app h2{font-size:23px;line-height:1.1;margin:7px 0 4px;font-weight:800;letter-spacing:-.5px}
.hist-app h3{font-size:18px;font-weight:800;color:#e3f2f3;margin:0}
.hist-sub{color:#99b4c1;font-size:12px;line-height:1.55;margin:-5px 0 14px}
.hist-config form{display:grid;gap:10px}
.hist-app label{display:block;font-size:12px;font-weight:700;color:#bfdbdf}
.hist-app input:not([type="range"]):not([type="checkbox"]):not([type="file"]),.hist-app select,.hist-app textarea{box-sizing:border-box;width:100%;min-height:39px;color:#ecf4f4;border-radius:7px;border:1px solid #42627a;background:#091d2c;padding:9px 11px;font:inherit;font-size:13px;margin-top:5px}
.hist-app input:focus-visible,.hist-app select:focus-visible,.hist-app button:focus-visible,.hist-app textarea:focus-visible{outline:2px solid #79cfff;outline-offset:2px}
.hist-app input[type="range"]{width:100%;margin:8px 0;accent-color:#72dbcc}
.hist-two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.hist-adjust-head{display:flex;align-items:center;justify-content:space-between;gap:5px;flex-wrap:wrap;margin:10px 0 0;padding-top:14px;border-top:1px solid #315065}
.hist-adjust-head strong{font-size:13px}.hist-adjust-head span{font-size:10px;color:#88a7b3}
.hist-config output{float:right;color:#8cddd7;font-size:11px}
.hist-check{display:flex;align-items:center;gap:10px;font-size:12px}.hist-check label{font-weight:500}.hist-check input{accent-color:#70d9c8;width:16px;height:16px}
.hist-primary,.hist-secondary,.hist-year-buttons button,.hist-table button{cursor:pointer;border-radius:7px;font-weight:750;border:1px solid #436078;padding:10px 13px;color:#daeff0;background:#173346;white-space:normal}
.hist-primary{background:#50d3b8;color:#092b33;border-color:#5deacc}
.hist-primary:hover{background:#92e9d7}
.hist-secondary:hover,.hist-year-buttons button:hover,.hist-table button:hover{background:#244c62;border-color:#82bcd2}
.hist-app button:disabled{cursor:not-allowed;opacity:.48}
.hist-status{min-height:40px;margin-top:15px;border-radius:6px;color:#afccd3;font-size:12px;line-height:1.4;padding:9px 11px;border:1px solid #27465a;background:#0b2233}
.hist-status.error{color:#ffc4b7;border-color:#a35752}
.hist-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 16px}
.hist-actions button{font-size:12px;padding:9px 11px}
.hist-record-scroll{overflow-x:auto;min-width:0}
.hist-table{width:100%;border-collapse:collapse;text-align:left;font-size:12px;color:#d1e5e9}
.hist-table th{background:#17384c;color:#8ad8d3;font-size:10px;letter-spacing:.6px;text-transform:uppercase;padding:11px 9px}
.hist-table td{border-bottom:1px solid #2c4759;padding:12px 9px;vertical-align:top;line-height:1.55}
.hist-table td small{color:#7daab9;font-size:10px;display:block}
.hist-table td strong{color:#f2f7f3}
.hist-table a{color:#85d2ec;text-underline-offset:2px;overflow-wrap:anywhere}
.hist-table .hist-row-actions{display:flex;flex-direction:column;gap:5px}
.hist-table button{padding:5px 8px;font-size:11px}
.hist-editor{margin-top:18px;border-top:1px solid #365469;padding-top:16px}
.hist-editor summary{color:#86e2d3;font-size:13px;font-weight:750;cursor:pointer}
.hist-editor form{display:grid;gap:11px;margin-top:16px}
.hist-editor-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}
.hist-results{margin-top:26px}
.hist-result-heading{align-items:center}
.hist-result-heading h2{font-size:30px}
.hist-result-heading p{color:#acc9d2;font-size:13px}
.hist-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.hist-stat{border:1px solid #3b5a6c;background:#103045;border-radius:11px;padding:16px;min-width:0}
.hist-stat small{color:#90b6c3;font-size:11px;display:block}
.hist-stat strong{font-size:clamp(18px,2.4vw,26px);display:block;color:#f0f8f6;margin:9px 0;overflow-wrap:anywhere}
.hist-stat span{font-size:11px;color:#a8c9d3}
.hist-stat.hist-observed{border-color:#b7a16c;background:#373327}
.hist-stat.hist-observed strong{color:#ffe2a0}
.hist-graph-card{margin-bottom:16px}
.hist-chart-head,.hist-year-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:14px}
.hist-chart-head h3{margin-bottom:4px}
.hist-chart-head p{color:#a9c2d0;font-size:12px;line-height:1.4;margin:0}
.hist-chart-head label{min-width:185px}
.hist-canvas-wrap{width:100%;margin-top:16px;background:#0a1c2a;border:1px solid #25485e;border-radius:8px;overflow:hidden}
.hist-canvas-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:1100/365}
.hist-legend{display:flex;flex-wrap:wrap;gap:20px;margin-top:16px;color:#b8d0d8;font-size:12px}
.hist-legend span{display:flex;align-items:center;gap:7px}
.hist-swatch{display:inline-block;width:18px;height:3px;border-radius:3px}
.hist-c{background:#67c7ff}.hist-s{background:#fa7187}.hist-m{background:#f0d06b}
.hist-diamond{width:10px;height:10px;background:#fff9de;border:2px solid #c7a05d;transform:rotate(45deg);display:inline-block;margin:3px}
.hist-year-card{margin-bottom:16px}
.hist-year-heading strong{font-size:27px;color:#8cddc6}
.hist-year-buttons{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px;margin:9px 0 20px}
.hist-year-buttons button{padding:7px 9px;font-size:12px}
.hist-year-buttons span{color:#7ca5b7;font-size:11px}
.hist-year-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.hist-year-grid article{border:1px solid #325669;background:#0d2939;border-radius:8px;padding:12px;min-width:0}
.hist-year-grid article small{display:block;color:#86b5c4;font-size:10px;line-height:1.3}
.hist-year-grid article b{display:block;color:#ebf8f5;font-size:18px;margin:6px 0;overflow-wrap:anywhere}
.hist-year-grid article p{font-size:11px;color:#bad0d6;margin:0;line-height:1.45}
.hist-year-grid article.actual{border-color:#a28a50;background:#2d2d27}
.hist-year-grid article.actual b{color:#ffe0a6}
.hist-limit{border:1px solid #506075;border-radius:12px;margin:18px 0;padding:20px;background:#152b3d}
.hist-limit ul{color:#bcd0db;font-size:12px;line-height:1.7;padding-left:21px}
.hist-limit p{font-size:12px;line-height:1.65;color:#a9c2d0}
.hist-limit a{color:#81d1f3}
.hist-app [hidden]{display:none!important}
@media (max-width:1030px){.hist-columns{grid-template-columns:1fr}.hist-hero{grid-template-columns:1fr}.hist-cards,.hist-year-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:570px){.hist-app{padding:0 12px 25px}.hist-hero h1{font-size:35px;letter-spacing:-1px}.hist-hero-card{padding:16px}.hist-card{padding:14px}.hist-two{grid-template-columns:1fr}.hist-cards,.hist-year-grid{grid-template-columns:1fr 1fr;gap:6px}.hist-stat{padding:12px}.hist-stat strong{font-size:17px}.hist-year-buttons button{font-size:11px;padding:9px 10px}.hist-year-buttons span{flex-basis:100%;text-align:center;order:5}.hist-table{min-width:720px}.hist-chart-head label{width:100%}}

/* v2.3: independent source-coverage audit, responsive cards. */
.hist-quality{margin-top:18px;margin-bottom:22px}
.hist-quality .hist-card-heading{align-items:center}
.hist-quality .hist-sub{max-width:860px;margin:4px 0 0}
.hist-quality-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:12px}
.hist-quality-stat{border:1px solid #36586e;background:#102e42;border-radius:9px;padding:11px;min-width:0}
.hist-quality-stat small{display:block;font-size:10px;color:#a0c8d2}
.hist-quality-stat strong{font-size:18px;color:#ecf6f5;display:block;overflow-wrap:anywhere;margin-top:6px}
.hist-quality-issues{color:#d6b9a0;font-size:12px;line-height:1.5;padding-left:24px;margin:12px 0}
.hist-quality-issues li{margin-bottom:5px}
@media(max-width:1050px){.hist-quality-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.hist-quality-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.hist-quality-stat{padding:9px}}

/* v2.4 — traceable historical series catalog. */
.hist-catalog{margin:18px 0 22px}
.hist-catalog-head{align-items:center;gap:16px}
.hist-catalog-head .hist-sub{max-width:800px}
.hist-catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
.hist-catalog-pack{min-width:0;border:1px solid #3c6171;background:#0c2a3b;border-radius:10px;padding:16px}
.hist-catalog-pack h3{margin:0 0 4px;font-size:16px;color:#e9f5ed}
.hist-catalog-pack p{margin:5px 0 8px;color:#a9c9d2;font-size:12px;line-height:1.55}
.hist-catalog-pack .hist-catalog-publisher{color:#e7c67b;font-size:11px}
.hist-catalog-pack small{display:block;color:#9ebbc7;margin-bottom:8px;line-height:1.4}
.hist-catalog-pack a{color:#83d7ef;font-size:12px;overflow-wrap:anywhere}
.hist-catalog-caveat{background:#192b33;border:1px solid #7c6845;padding:12px 14px;border-radius:9px;color:#dcd1b7;font-size:12px;line-height:1.6}
.hist-catalog .hist-status{line-height:1.5;overflow-wrap:anywhere}
@media(max-width:800px){.hist-catalog-grid{grid-template-columns:1fr}.hist-catalog .hist-actions{flex-wrap:wrap}}
