:root {
  --green: #00aa13;
  --eco: #00573f;
  --charcoal: #1d252d;
  --granite: #4f758b;
  --steel: #b7c9d3;
  --steel-soft: #e7eef1;
  --canvas: #f4f7f8;
  --white: #ffffff;
  --yellow: #eaaa00;
  --blue: #004986;
  --aqua: #64ccc9;
  --orange: #db6b30;
  --shadow: 0 8px 30px rgba(29, 37, 45, 0.06);
  --radius: 12px;
  --title: "Titillium Web", Arial, sans-serif;
  --body: "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--canvas);
  color: var(--charcoal);
  font-family: var(--body);
  font-size: 15px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--title); line-height: 1.08; }
a { color: var(--blue); }
.sr-only { position: absolute; clip: rect(0, 0, 0, 0); width: 1px; height: 1px; overflow: hidden; }
.eyebrow {
  color: var(--granite);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}
.muted { color: var(--granite); }

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: 100vh;
}
.nav-rail {
  background: var(--charcoal);
  color: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
  padding: 27px 17px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { padding: 0 13px 34px; }
.brand-word {
  color: var(--white);
  font-family: var(--title);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand-rule { background: var(--green); height: 5px; margin: 2px 0 12px; width: 56px; }
.brand p { color: var(--steel); font-size: 14px; font-weight: 600; }
.primary-nav { display: grid; gap: 5px; }
.nav-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #d4e0e6;
  display: flex;
  gap: 12px;
  padding: 12px 12px;
  text-align: left;
  transition: background 150ms, color 150ms;
  width: 100%;
}
.nav-link span { color: var(--steel); font-size: 11px; font-weight: 700; }
.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}
.nav-link.active { box-shadow: inset 3px 0 0 var(--green); }
.nav-link.active span { color: var(--green); }
.rail-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(183, 201, 211, 0.22);
  border-radius: var(--radius);
  margin-top: auto;
  padding: 16px 13px 13px;
}
.rail-card .eyebrow { color: var(--steel); margin-bottom: 13px; }
.data-freshness div {
  border-bottom: 1px solid rgba(183, 201, 211, 0.16);
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
}
.data-freshness strong { font-size: 13px; }
.data-freshness span { color: var(--steel); font-size: 12px; }
.key-control {
  display: grid;
  gap: 5px;
  margin-top: 13px;
}
.key-control span {
  color: var(--steel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.key-control input {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(183, 201, 211, .35);
  border-radius: 7px;
  color: var(--white);
  min-width: 0;
  padding: 8px 9px;
  width: 100%;
}
.key-control input::placeholder { color: rgba(231, 238, 241, .68); }
.secondary-action {
  background: transparent;
  border: 1px solid var(--green);
  border-radius: 7px;
  color: var(--white);
  font-weight: 600;
  margin-top: 14px;
  padding: 8px 9px;
  width: 100%;
}
.secondary-action:hover { background: rgba(0, 170, 19, 0.16); }
.status-text { color: var(--steel); font-size: 12px; line-height: 1.35; margin-top: 9px; }

.surface { min-width: 0; }
.topbar {
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid var(--steel-soft);
  display: flex;
  justify-content: space-between;
  min-height: 88px;
  padding: 18px 27px 16px 31px;
}
.topbar h1 { font-size: 29px; font-weight: 600; margin-top: 5px; }
.top-actions { align-items: center; display: flex; gap: 9px; }
.search-control input {
  background: var(--canvas);
  border: 1px solid var(--steel-soft);
  border-radius: 8px;
  color: var(--charcoal);
  min-width: 230px;
  padding: 10px 13px;
}
.utility-action, .primary-action {
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 14px;
}
.utility-action {
  background: var(--white);
  border: 1px solid var(--steel);
  color: var(--charcoal);
}
.utility-action span {
  background: var(--steel-soft);
  border-radius: 13px;
  color: var(--blue);
  margin-left: 5px;
  padding: 1px 7px;
}
.primary-action {
  background: var(--green);
  border: 1px solid var(--green);
  color: var(--white);
}
.primary-action:hover { background: #008d10; }
.context-bar {
  align-items: end;
  background: var(--white);
  border-bottom: 1px solid var(--steel-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 13px 28px 15px 31px;
}
.context-bar .crumb {
  align-items: center;
  color: var(--granite);
  display: flex;
  flex: 1 1 100%;
  gap: 8px;
  padding-bottom: 3px;
}
.crumb b { color: var(--steel); font-weight: 400; }
.context-bar label { display: grid; gap: 4px; }
.context-bar label span {
  color: var(--granite);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.context-bar select {
  background: var(--white);
  border: 1px solid var(--steel);
  border-radius: 7px;
  color: var(--charcoal);
  min-width: 132px;
  padding: 8px 30px 8px 9px;
}
.view-container { padding: 24px 27px 35px 31px; }
.view-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 19px;
}
.view-header h2 { font-size: 26px; font-weight: 600; }
.view-header p { color: var(--granite); line-height: 1.4; margin-top: 6px; max-width: 740px; }
.inline-actions { display: flex; gap: 8px; }

.grid { display: grid; gap: 16px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 17px; }
.kpi {
  background: var(--white);
  border: 1px solid var(--steel-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 116px;
  padding: 15px 17px 14px;
}
.kpi .label {
  color: var(--granite);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kpi strong {
  display: block;
  font-family: var(--title);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 8px 0 3px;
}
.kpi small { color: var(--granite); }
.metric-badge, .badge {
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  text-transform: uppercase;
}
.badge.modeled { background: rgba(0, 73, 134, 0.10); color: var(--blue); }
.badge.forecast { background: rgba(219, 107, 48, 0.13); color: #a94315; }
.badge.published { background: rgba(0, 87, 63, 0.12); color: var(--eco); }
.badge.watch { background: rgba(234, 170, 0, 0.15); color: #825d00; }

.dashboard-grid { grid-template-columns: minmax(450px, 1.46fr) minmax(325px, 1fr); }
.panel {
  background: var(--white);
  border: 1px solid var(--steel-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--steel-soft);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 16px 18px 13px;
}
.panel-header h3 { font-size: 20px; font-weight: 600; }
.panel-header p { color: var(--granite); font-size: 13px; margin-top: 4px; }
.panel-body { padding: 16px 18px 18px; }
.map-panel { grid-row: span 2; }
.map-controls { display: flex; gap: 4px; }
.toggle {
  background: var(--white);
  border: 1px solid var(--steel);
  color: var(--granite);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}
.toggle:first-child { border-radius: 6px 0 0 6px; }
.toggle:last-child { border-radius: 0 6px 6px 0; }
.toggle.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.map-stage {
  background: linear-gradient(180deg, #f6fafb, #eef4f6);
  border-radius: 8px;
  min-height: 355px;
  overflow: hidden;
  position: relative;
}
.map-stage svg { display: block; height: auto; width: 100%; }
.map-legend {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--steel-soft);
  border-radius: 7px;
  bottom: 12px;
  color: var(--granite);
  display: flex;
  font-size: 12px;
  gap: 7px;
  left: 13px;
  padding: 7px 9px;
  position: absolute;
}
.gradient {
  background: linear-gradient(90deg, #e6f0f4, var(--green));
  border-radius: 8px;
  display: inline-block;
  height: 9px;
  width: 72px;
}
.geo-point {
  cursor: pointer;
  transition: transform 150ms;
}
.geo-point:hover { filter: brightness(0.92); }
.rank-table { border-collapse: collapse; width: 100%; }
.rank-table th {
  color: var(--granite);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 0 10px 9px 0;
  text-align: left;
  text-transform: uppercase;
}
.rank-table td {
  border-top: 1px solid var(--steel-soft);
  padding: 9px 10px 9px 0;
  vertical-align: middle;
}
.rank-table tr[data-market] { cursor: pointer; }
.rank-table tr[data-market]:hover { background: #f5f9fa; }
.rank-num { color: var(--granite); font-weight: 600; }
.market-name { font-weight: 700; }
.market-name small { color: var(--granite); display: block; font-weight: 400; }
.score {
  background: var(--charcoal);
  border-radius: 13px;
  color: var(--white);
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-width: 39px;
  padding: 3px 8px;
}
.positive { color: var(--eco); font-weight: 700; }
.forecast-chart { height: 230px; width: 100%; }
.forecast-chart text { fill: var(--granite); font-family: var(--body); font-size: 11px; }
.drivers { display: grid; gap: 12px; }
.driver-row { display: grid; gap: 5px; grid-template-columns: 130px minmax(80px, 1fr) 42px; }
.driver-row span:first-child { color: var(--granite); font-size: 13px; }
.driver-track { background: var(--steel-soft); border-radius: 20px; height: 9px; overflow: hidden; margin-top: 5px; }
.driver-bar { background: var(--green); border-radius: 20px; height: 100%; }

.split-grid { grid-template-columns: minmax(500px, 1.55fr) minmax(300px, .95fr); }
.detail-stack { display: grid; gap: 16px; }
.geo-card h3 { font-size: 25px; margin-bottom: 5px; }
.geo-path {
  color: var(--granite);
  font-size: 13px;
  margin: 5px 0 17px;
}
.profile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
.profile-stat {
  background: var(--canvas);
  border-radius: 8px;
  padding: 11px 12px;
}
.profile-stat span { color: var(--granite); display: block; font-size: 12px; }
.profile-stat strong { display: block; font-size: 21px; font-family: var(--title); margin: 5px 0; }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.small-action {
  background: var(--white);
  border: 1px solid var(--steel);
  border-radius: 7px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
}
.small-action.selected, .small-action:hover { border-color: var(--green); color: var(--eco); }
.layer-list { display: grid; gap: 8px; }
.layer {
  align-items: center;
  background: var(--canvas);
  border-radius: 7px;
  display: flex;
  font-size: 13px;
  gap: 9px;
  padding: 9px 11px;
}
.layer input { accent-color: var(--green); }

.browser-grid { grid-template-columns: 285px minmax(0, 1fr); }
.tree-panel .panel-body { padding: 11px; }
.tree-group {
  border: 1px solid var(--steel-soft);
  border-radius: 8px;
  margin: 7px 0;
  overflow: hidden;
}
.tree-root {
  background: var(--white);
  border: 0;
  display: flex;
  gap: 9px;
  padding: 11px;
  text-align: left;
  width: 100%;
}
.tree-root.active { background: rgba(0, 170, 19, 0.08); box-shadow: inset 3px 0 var(--green); }
.tree-root code { color: var(--granite); font-size: 12px; min-width: 54px; }
.tree-root strong { font-size: 14px; }
.tree-children {
  border-top: 1px solid var(--steel-soft);
  color: var(--granite);
  display: grid;
  font-size: 13px;
  gap: 8px;
  padding: 9px 11px 11px 74px;
}
.chart-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(300px, 1fr)); }
.bar-chart { display: grid; gap: 11px; }
.bar-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 132px minmax(100px, 1fr) 66px;
}
.bar-row label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-wrap { background: var(--steel-soft); border-radius: 12px; height: 14px; }
.bar-fill { background: var(--blue); border-radius: 12px; height: 100%; }
.bar-row strong { font-size: 14px; text-align: right; }
.matrix {
  border-collapse: collapse;
  font-size: 13px;
  width: 100%;
}
.matrix th, .matrix td { border-bottom: 1px solid var(--steel-soft); padding: 10px 8px; text-align: left; }
.matrix th { color: var(--granite); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.matrix small {
  color: var(--granite);
  display: block;
  font-size: 12px;
  line-height: 1.25;
  margin-top: 3px;
}
.strength {
  background: rgba(0, 170, 19, 0.1);
  border-radius: 4px;
  color: var(--eco);
  display: inline-block;
  min-width: 54px;
  padding: 3px 7px;
  text-align: center;
}
.product-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.pill {
  background: var(--canvas);
  border: 1px solid var(--steel-soft);
  border-radius: 17px;
  color: var(--granite);
  padding: 6px 11px;
}

.forecast-layout { grid-template-columns: minmax(470px, 1.35fr) minmax(330px, .85fr); }
.scenario-cards { display: grid; gap: 10px; }
.scenario-card {
  border: 1px solid var(--steel-soft);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px 13px;
}
.scenario-card.selected { background: #f5faf9; }
.scenario-card header { display: flex; justify-content: space-between; }
.scenario-card h4 { font-size: 18px; }
.scenario-card strong { font-size: 21px; }
.scenario-card p { color: var(--granite); font-size: 13px; margin-top: 5px; }
.assumptions { display: grid; gap: 14px; }
.slider-row label { color: var(--granite); display: flex; font-size: 13px; justify-content: space-between; margin-bottom: 6px; }
.slider-row input { accent-color: var(--green); width: 100%; }
.model-note {
  background: #f5faf9;
  border-left: 3px solid var(--green);
  color: var(--granite);
  font-size: 13px;
  line-height: 1.45;
  padding: 12px;
}

.activate-grid { grid-template-columns: repeat(3, minmax(230px, 1fr)); }
.feature-panel .panel-body { min-height: 215px; }
.item-list { display: grid; gap: 9px; margin-top: 12px; }
.item {
  background: var(--canvas);
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
}
.empty { color: var(--granite); font-style: italic; padding: 13px 0; }
.export-options { display: flex; gap: 8px; margin-top: 17px; }
.dictionary-grid { display: grid; gap: 15px; grid-template-columns: 1fr 1fr; }
.definition {
  border-bottom: 1px solid var(--steel-soft);
  padding: 11px 0;
}
.definition strong { display: block; }
.definition p { color: var(--granite); line-height: 1.4; margin-top: 3px; }
.source-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.source-layout { grid-template-columns: minmax(420px, .8fr) minmax(520px, 1.2fr); }
.pipeline {
  display: grid;
  gap: 12px;
}
.pipeline-step {
  align-items: flex-start;
  background: var(--canvas);
  border: 1px solid var(--steel-soft);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 13px;
}
.pipeline-step > span {
  align-items: center;
  background: var(--charcoal);
  border-radius: 50%;
  color: var(--white);
  display: inline-flex;
  flex: 0 0 30px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  width: 30px;
}
.pipeline-step strong { display: block; font-family: var(--title); font-size: 18px; }
.pipeline-step p { color: var(--granite); line-height: 1.4; margin-top: 3px; }
.source-table td { vertical-align: top; }
.roadmap-layout { grid-template-columns: minmax(460px, .9fr) minmax(560px, 1.1fr); }
.value-cost-chart {
  display: block;
  min-height: 310px;
  width: 100%;
}
.value-cost-chart text {
  fill: var(--granite);
  font-family: var(--body);
  font-size: 12px;
}
.story-table td { vertical-align: middle; }
.story-detail summary {
  color: var(--charcoal);
  cursor: pointer;
  font-weight: 700;
}
.story-detail summary::marker { color: var(--green); }
.story-detail summary small {
  color: var(--granite);
  display: block;
  font-weight: 400;
}
.story-detail p {
  color: #33434d;
  font-weight: 400;
  line-height: 1.4;
  margin: 10px 0;
  max-width: 62ch;
}
.story-detail dl {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  margin: 0 0 8px;
}
.story-detail dl div {
  background: var(--canvas);
  border-left: 3px solid var(--steel);
  padding: 8px;
}
.story-detail dt {
  color: var(--granite);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.story-detail dd {
  color: var(--charcoal);
  font-size: 13px;
  margin: 2px 0 0;
}
.sprint-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
}
.sprint-card {
  background: var(--canvas);
  border: 1px solid var(--steel-soft);
  border-radius: 8px;
  padding: 13px;
}
.sprint-card header span {
  color: var(--eco);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sprint-card h3 { font-size: 19px; margin-top: 5px; }
.sprint-card p { line-height: 1.35; margin-top: 8px; }
.sprint-card small {
  color: var(--granite);
  display: block;
  line-height: 1.35;
  margin-top: 7px;
}
.sprint-story-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
.sprint-story-list div {
  background: var(--white);
  border-radius: 7px;
  padding: 8px;
}
.sprint-story-list strong {
  display: block;
  font-size: 13px;
}
.sprint-story-list span {
  color: var(--granite);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.compare-tray {
  background: var(--white);
  border-left: 1px solid var(--steel-soft);
  box-shadow: -9px 0 35px rgba(29, 37, 45, 0.13);
  height: 100vh;
  overflow-y: auto;
  padding: 24px 18px;
  position: fixed;
  right: 0;
  top: 0;
  width: min(430px, 100vw);
  z-index: 30;
}
.compare-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 19px; }
.compare-header h2 { font-size: 25px; }
.close-button {
  background: transparent;
  border: 0;
  color: var(--granite);
  font-size: 25px;
}
.compare-item {
  border: 1px solid var(--steel-soft);
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 13px;
}
.compare-item h3 { font-size: 19px; }
.compare-item div { display: flex; justify-content: space-between; margin-top: 9px; }
.toast {
  background: var(--charcoal);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  bottom: 22px;
  color: var(--white);
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  right: 25px;
  transform: translateY(10px);
  transition: opacity 160ms, transform 160ms;
  z-index: 50;
}
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .brand-word { font-size: 22px; }
  .brand p, .brand-rule, .nav-link span, .rail-card { display: none; }
  .nav-link { font-size: 0; justify-content: center; min-height: 45px; }
  .nav-link::after { content: attr(data-view); font-size: 11px; text-transform: uppercase; }
  .dashboard-grid, .split-grid, .forecast-layout, .browser-grid, .source-layout, .roadmap-layout { grid-template-columns: 1fr; }
  .sprint-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .map-panel { grid-row: auto; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .nav-rail { height: auto; min-height: 0; position: static; }
  .brand { padding-bottom: 15px; }
  .primary-nav { grid-template-columns: repeat(3, 1fr); }
  .topbar { align-items: flex-start; display: grid; gap: 14px; padding: 18px; }
  .top-actions { flex-wrap: wrap; }
  .context-bar, .view-container { padding-left: 18px; padding-right: 18px; }
  .kpi-grid, .chart-grid, .activate-grid, .dictionary-grid, .sprint-grid { grid-template-columns: 1fr; }
  .story-detail dl { grid-template-columns: 1fr; }
}

/* ===================== Meridian Pro shell + new modules ===================== */
.skip-link {
  background: var(--charcoal); border-radius: 0 0 8px 0; color: var(--white);
  left: 0; padding: 10px 14px; position: fixed; top: -60px; transition: top 140ms; z-index: 80;
}
.skip-link:focus { top: 0; }
.reduced-motion * { transition: none !important; animation: none !important; }

.nav-section {
  color: var(--steel); font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  margin: 16px 13px 4px; text-transform: uppercase;
}
.primary-nav .nav-section:first-child { margin-top: 0; }

.topbar-lead { min-width: 0; }
.top-actions { flex-wrap: wrap; }
.palette-hint { align-items: center; display: inline-flex; gap: 8px; }
kbd {
  background: var(--steel-soft); border-radius: 5px; color: var(--granite);
  font-family: var(--body); font-size: 11px; font-weight: 700; padding: 1px 6px;
}
.account-menu { position: relative; }
.account-button {
  align-items: center; background: var(--white); border: 1px solid var(--steel-soft);
  border-radius: 9px; display: flex; gap: 9px; padding: 6px 10px 6px 7px;
}
.account-button:hover { border-color: var(--steel); }
.avatar {
  align-items: center; background: var(--eco); border-radius: 8px; color: var(--white);
  display: inline-flex; font-family: var(--title); font-size: 13px; font-weight: 700;
  height: 32px; justify-content: center; width: 32px;
}
.account-meta { display: grid; text-align: left; }
.account-meta strong { font-size: 13px; }
.account-meta small { color: var(--granite); font-size: 11px; }
.account-panel {
  background: var(--white); border: 1px solid var(--steel-soft); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px; position: absolute; right: 0; top: calc(100% + 8px);
  width: 280px; z-index: 60;
}
.account-panel select, .account-panel .pref-row select {
  background: var(--white); border: 1px solid var(--steel); border-radius: 7px;
  padding: 7px 8px; width: 100%;
}
.plan-row { align-items: center; display: flex; justify-content: space-between; }
.pref-row { display: grid; gap: 4px; margin-top: 8px; }
.pref-row span { color: var(--granite); font-size: 12px; }
.pref-toggle { align-items: center; display: flex; gap: 8px; font-size: 13px; margin-top: 10px; }
.pref-toggle input { accent-color: var(--green); }

.trial-banner {
  align-items: center; background: linear-gradient(90deg, rgba(0,87,63,.10), rgba(0,170,19,.08));
  border-bottom: 1px solid var(--steel-soft); color: var(--charcoal); display: flex;
  font-size: 13px; gap: 12px; justify-content: space-between; padding: 9px 28px 9px 31px;
}
.trial-banner.hidden { display: none; }
.banner-dismiss { background: transparent; border: 0; color: var(--granite); font-size: 18px; }

.palette-overlay {
  align-items: flex-start; background: rgba(29,37,45,.45); display: flex; inset: 0;
  justify-content: center; padding-top: 12vh; position: fixed; z-index: 90;
}
.palette {
  background: var(--white); border-radius: 14px; box-shadow: 0 24px 60px rgba(29,37,45,.3);
  overflow: hidden; width: min(560px, 92vw);
}
.palette input {
  border: 0; border-bottom: 1px solid var(--steel-soft); font-size: 16px; outline: none;
  padding: 16px 18px; width: 100%;
}
.palette-results { list-style: none; margin: 0; max-height: 340px; overflow-y: auto; padding: 6px; }
.palette-results li {
  align-items: center; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; padding: 9px 11px;
}
.palette-results li.active, .palette-results li:hover { background: var(--canvas); }
.palette-type {
  background: var(--steel-soft); border-radius: 5px; color: var(--granite); font-size: 10px;
  font-weight: 700; letter-spacing: .05em; min-width: 54px; padding: 2px 6px; text-align: center; text-transform: uppercase;
}
.palette-empty { color: var(--granite); cursor: default; font-style: italic; padding: 12px; }
.palette-foot { border-top: 1px solid var(--steel-soft); color: var(--granite); display: flex; flex-wrap: wrap; font-size: 12px; gap: 6px; padding: 10px 14px; }

.dual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-pro { display: flex; flex-direction: column; min-height: 150px; }
.kpi-trend { align-items: center; display: flex; gap: 8px; margin: 6px 0 4px; }
.spark { height: 34px; width: 130px; }
.delta { font-size: 12px; font-weight: 700; white-space: nowrap; }
.delta.up { color: var(--eco); }
.delta.down { color: var(--orange); }

.treemap, .quadrant, .waterfall, .tornado { display: block; width: 100%; }
.treemap { min-height: 320px; }
.quadrant { min-height: 320px; }
.waterfall { min-height: 280px; }
.tornado { min-height: 240px; }

.news-layout { grid-template-columns: minmax(0, 1.5fr) minmax(300px, .9fr); }
.news-list { display: grid; gap: 12px; }
.news-card { border: 1px solid var(--steel-soft); border-radius: 10px; padding: 13px 14px; }
.news-card h4 { font-size: 16px; margin: 6px 0 4px; }
.news-card p { color: #33434d; font-size: 13px; line-height: 1.45; }
.news-meta { align-items: center; display: flex; gap: 9px; }
.news-meta time { color: var(--granite); font-size: 12px; margin-left: auto; }
.news-card footer { align-items: center; color: var(--granite); display: flex; flex-wrap: wrap; font-size: 12px; gap: 10px; margin-top: 9px; }
.news-kind { background: var(--canvas); border-radius: 5px; padding: 2px 7px; }
.chip { border-radius: 5px; font-size: 11px; font-weight: 700; padding: 2px 8px; text-transform: uppercase; }
.chip-market { background: rgba(0,73,134,.12); color: var(--blue); }
.chip-economic { background: rgba(0,87,63,.12); color: var(--eco); }
.chip-financial { background: rgba(234,170,0,.18); color: #825d00; }
.chip-policy { background: rgba(100,204,201,.22); color: #0b6f6c; }
.chip-company { background: rgba(219,107,48,.15); color: #a94315; }
.impact { border-radius: 50%; display: inline-block; height: 9px; width: 9px; }
.impact.positive { background: var(--green); }
.impact.watch { background: var(--yellow); }
.impact.negative { background: var(--orange); }
.impact.neutral { background: var(--steel); }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-toggle { background: var(--white); border: 1px solid var(--steel); border-radius: 16px; color: var(--granite); font-size: 12px; font-weight: 600; padding: 5px 11px; }
.chip-toggle.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

.econ-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.econ-card { border: 1px solid var(--steel-soft); border-radius: 10px; padding: 12px; }
.econ-top { align-items: center; color: var(--granite); display: flex; font-size: 12px; justify-content: space-between; }
.econ-card strong { display: block; font-family: var(--title); font-size: 24px; margin: 4px 0; }
.econ-card strong small { color: var(--granite); font-size: 13px; font-weight: 400; }
.econ-card .spark { height: 32px; width: 100%; }
.econ-card p { color: var(--granite); font-size: 12px; line-height: 1.4; margin-top: 6px; }
.econ-card footer { color: var(--granite); font-size: 11px; margin-top: 8px; }

.tick-list { color: var(--granite); font-size: 13px; line-height: 1.5; margin: 10px 0; padding-left: 18px; }
.watch-row { align-items: center; background: var(--canvas); border-radius: 8px; display: flex; justify-content: space-between; padding: 9px 11px; }
.watch-row strong { display: block; font-size: 14px; }
.watch-row span { color: var(--granite); font-size: 12px; }
.watch-meta { align-items: center; display: flex; gap: 8px; }
.watch-meta .spark { width: 70px; }

.report-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.seg { display: inline-flex; }
.seg .toggle:first-child { border-radius: 7px 0 0 7px; }
.seg .toggle:last-child { border-radius: 0 7px 7px 0; }
.report-actions-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.report-panel .panel-body { background: #fbfdfd; }
.report-doc { color: var(--charcoal); margin: 0 auto; max-width: 880px; }
.report-head { align-items: flex-start; border-bottom: 4px solid var(--green); display: flex; justify-content: space-between; padding-bottom: 12px; }
.report-brand { font-family: var(--title); font-size: 30px; font-weight: 700; letter-spacing: .08em; }
.report-sub { color: var(--granite); }
.report-headmeta { text-align: right; }
.report-headmeta strong { display: block; }
.report-headmeta span { color: var(--granite); display: block; font-size: 12px; }
.report-kpis { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.report-kpis div { background: var(--canvas); border-radius: 8px; flex: 1 1 160px; padding: 11px 13px; }
.report-kpis span { color: var(--granite); display: block; font-size: 12px; }
.report-kpis strong { font-family: var(--title); font-size: 23px; }
.report-section { margin: 18px 0; }
.report-section h3 { border-left: 4px solid var(--blue); font-size: 17px; padding-left: 9px; }
table.report-table { border-collapse: collapse; font-size: 13px; margin-top: 8px; width: 100%; }
.report-table th, .report-table td { border: 1px solid var(--steel-soft); padding: 7px 9px; text-align: left; }
.report-table th { background: var(--canvas); color: var(--granite); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.report-news { margin: 6px 0; padding-left: 18px; }
.report-news li, .report-actions li { line-height: 1.45; margin-bottom: 9px; }
.report-src { color: var(--granite); font-size: 12px; }
.report-actions { margin: 6px 0; padding-left: 20px; }
.report-foot { border-top: 1px solid var(--steel-soft); color: var(--granite); font-size: 12px; margin-top: 18px; padding-top: 10px; }

.integration-grid { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.integration-card { border: 1px solid var(--steel-soft); border-radius: 10px; display: flex; flex-direction: column; padding: 13px; }
.integration-card header { align-items: flex-start; display: flex; justify-content: space-between; }
.integration-card header strong { font-size: 15px; }
.int-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.int-tags .pill { font-size: 11px; padding: 3px 8px; }
.int-tags .pill.free { background: rgba(0,170,19,.12); border-color: rgba(0,170,19,.3); color: var(--eco); }
.integration-card p { color: var(--granite); font-size: 12px; line-height: 1.4; }
.integration-card footer { align-items: center; display: flex; justify-content: space-between; margin-top: auto; padding-top: 11px; }

.plan-grid { display: grid; gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan-card { border: 1px solid var(--steel-soft); border-radius: 12px; display: flex; flex-direction: column; padding: 16px; position: relative; }
.plan-card.featured { border-color: var(--green); box-shadow: 0 0 0 2px rgba(0,170,19,.18); }
.plan-flag { background: var(--green); border-radius: 12px; color: var(--white); font-size: 10px; font-weight: 700; letter-spacing: .05em; padding: 3px 9px; position: absolute; right: 14px; top: -10px; text-transform: uppercase; }
.plan-card h4 { font-size: 19px; }
.plan-price { font-family: var(--title); font-size: 28px; font-weight: 700; margin: 6px 0; }
.plan-price small { color: var(--granite); font-size: 13px; font-weight: 400; }
.plan-tag { color: var(--granite); font-size: 13px; }
.plan-card ul { color: #33434d; flex: 1; font-size: 13px; line-height: 1.5; margin: 12px 0; padding-left: 18px; }
.plan-card button { margin-top: auto; }

.sprint-timeline { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.timeline-sprint { background: var(--canvas); border: 1px solid var(--steel-soft); border-left: 4px solid var(--blue); border-radius: 10px; padding: 14px; }
.timeline-window { color: var(--eco); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.timeline-sprint h3 { font-size: 17px; margin: 4px 0 2px; }
.timeline-theme { color: var(--granite); font-size: 12px; }
.timeline-goal { font-size: 13px; line-height: 1.4; margin: 9px 0; }
.timeline-stories { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; }
.timeline-stories li { align-items: center; background: var(--white); border-radius: 7px; display: flex; flex-wrap: wrap; font-size: 13px; gap: 7px; padding: 7px 9px; }
.timeline-stories small { color: var(--granite); margin-left: auto; }

@media (max-width: 1180px) {
  .nav-section { display: none; }
  .dual-grid, .news-layout { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .trial-banner { padding-left: 18px; padding-right: 18px; }
  .account-panel { right: auto; left: 0; }
  .report-headmeta { text-align: left; }
}
.map-geo { background: linear-gradient(180deg, #f9fcfd, #eef4f6); min-height: 420px; }
.geo-states path { transition: fill 150ms; }
.geo-state.has-data { cursor: pointer; }
.geo-state.has-data:hover { fill: #00aa13 !important; }
.geo-state-label { fill: #1d252d; font-family: var(--body); font-size: 11px; font-weight: 700; opacity: 0.62; pointer-events: none; }
.map-legend.graduated { align-items: center; flex-wrap: wrap; gap: 10px; }
.map-legend .lg-title { color: var(--charcoal); font-weight: 700; text-transform: capitalize; }
.lg-swatch { align-items: center; color: var(--granite); display: inline-flex; font-size: 11px; gap: 5px; }
.lg-swatch i { border-radius: 3px; display: inline-block; height: 11px; width: 16px; }
.map-tip {
  background: var(--white); border: 1px solid var(--steel-soft); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(29, 37, 45, 0.22); font-size: 12px; min-width: 168px;
  padding: 11px 13px; pointer-events: none; position: fixed; z-index: 98;
}
.map-tip strong { display: block; font-size: 14px; }
.map-tip .mt-sub { color: var(--granite); font-size: 11px; }
.map-tip .mt-big { color: var(--eco); font-family: var(--title); font-size: 19px; font-weight: 700; margin: 5px 0; }
.map-tip .mt-row { display: flex; justify-content: space-between; gap: 14px; }
.map-tip .mt-row span { color: var(--granite); }
.geo-markers .geo-point { cursor: pointer; }
.geo-markers .geo-point:hover circle { filter: brightness(0.9); }
.map-legend em { color: var(--granite); font-style: normal; margin-left: 8px; opacity: 0.8; }
.map-controls-group { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.map-scope-bar { align-items: center; background: var(--canvas); border-radius: 8px; color: var(--granite); display: flex; flex-wrap: wrap; font-size: 13px; gap: 10px; margin-bottom: 10px; padding: 8px 10px; }
.year-scrub { align-items: center; gap: 7px; }
.year-scrub input[type="range"] { accent-color: var(--green); width: 116px; }
.year-scrub #mapYearLabel { color: var(--charcoal); font-weight: 700; min-width: 30px; }
.geo-counties path { transition: fill 150ms; }
.bm-table th { text-align: center; }
.bm-table th:first-child, .bm-table td:first-child { text-align: left; }
.bm-table th:first-child + th { color: var(--eco); }
.bm-cell { text-align: center; }
.bm-dot { border-radius: 50%; display: inline-block; height: 12px; width: 12px; }
.bm-dot.full { background: var(--green); }
.bm-dot.part { background: var(--yellow); }
.bm-dot.none { background: var(--steel); }
.bm-total td { border-top: 2px solid var(--steel); padding-top: 8px; }
.bm-total strong { font-family: var(--title); font-size: 15px; }
.naics-tree { display: grid; gap: 7px; }
.naics-map { color: var(--eco); display: block; font-size: 11px; font-style: normal; margin-top: 2px; }
.phier { display: grid; gap: 10px; }
.phier-cat { border: 1px solid var(--steel-soft); border-radius: 8px; overflow: hidden; }
.phier-cat-head { align-items: center; background: var(--canvas); display: flex; gap: 9px; padding: 9px 11px; }
.phier-cat-head code { color: var(--granite); font-size: 11px; }
.phier-fams { display: grid; gap: 0; }
.phier-fam { border-top: 1px solid var(--steel-soft); padding: 8px 11px 8px 22px; }
.phier-fam-name { color: var(--charcoal); font-size: 13px; font-weight: 700; }
.phier-sub { align-items: center; color: var(--granite); display: flex; font-size: 12px; gap: 8px; justify-content: space-between; padding: 4px 0 0 12px; }
.tax { list-style: none; margin: 0; padding-left: 0; }
.tax-l1, .tax-l2 { padding-left: 16px; border-left: 1px solid var(--steel-soft); margin-left: 4px; }
.tax li { margin: 2px 0; }
.tax summary { cursor: pointer; padding: 4px 0; }
.tax summary::marker { color: var(--green); }
.tax summary code, .tax-leaf code { background: var(--canvas); border-radius: 4px; color: var(--granite); font-size: 11px; margin-right: 6px; padding: 1px 5px; }
.tax summary strong { font-size: 13px; }
.tax-l0 > li > details > summary strong { font-size: 14px; }
.tax-leaf { color: #33434d; font-size: 12px; padding: 3px 0 3px 16px; }

.help-panel {
  background: var(--white); border-left: 1px solid var(--steel-soft);
  box-shadow: -9px 0 35px rgba(29, 37, 45, 0.13); height: 100vh; overflow-y: auto;
  padding: 22px 18px; position: fixed; right: 0; top: 0; width: min(440px, 100vw); z-index: 70;
}
.help-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 14px; }
.help-head h2 { font-size: 23px; }
.help-tour-btn { width: 100%; margin-bottom: 16px; }
.help-body section { border-top: 1px solid var(--steel-soft); padding: 14px 0; }
.help-body h3 { font-size: 15px; margin-bottom: 8px; }
.help-list { color: #33434d; font-size: 13px; line-height: 1.6; margin: 0; padding-left: 18px; }
.help-body .badge { margin-right: 3px; }

.tour-overlay { inset: 0; pointer-events: none; position: fixed; z-index: 95; }
.tour-cutout {
  border: 2px solid var(--green); border-radius: 8px; pointer-events: none; position: fixed;
  box-shadow: 0 0 0 9999px rgba(29, 37, 45, 0.55);
  transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s;
}
.tour-pop {
  background: var(--white); border-radius: 12px; box-shadow: 0 18px 50px rgba(29, 37, 45, 0.35);
  padding: 16px; pointer-events: auto; position: fixed; width: 300px; z-index: 96;
}
.tour-pop h4 { font-size: 18px; margin: 4px 0 6px; }
.tour-pop p { color: #33434d; font-size: 13px; line-height: 1.45; }
.tour-count { color: var(--granite); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tour-actions { align-items: center; display: flex; justify-content: space-between; margin-top: 14px; }
.tour-actions > div { display: flex; gap: 8px; }
.tour-pop .primary-action, .tour-pop .small-action { padding: 7px 12px; }
.tour-pop .small-action[disabled] { opacity: 0.45; }

@media print {
  .nav-rail, .topbar, .context-bar, .trial-banner, .compare-tray, .palette-overlay, .help-panel, .tour-overlay, .report-toolbar, .view-header, .skip-link { display: none !important; }
  .app-shell { display: block; }
  .surface, .view-container { padding: 0 !important; }
  .panel { border: none !important; box-shadow: none !important; }
  body { background: #fff; }
}
