:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-deep: #040c17;
  --surface: #0d192b;
  --surface-strong: #101f34;
  --surface-soft: #12243b;
  --surface-hover: #162b45;
  --border: rgba(142, 168, 198, 0.17);
  --border-strong: rgba(142, 168, 198, 0.29);
  --text: #f1f6fb;
  --muted: #93a5bb;
  --muted-strong: #b8c6d6;
  --teal: #28d3bd;
  --teal-bright: #48ead3;
  --teal-soft: rgba(40, 211, 189, 0.12);
  --aqua: #50a8ff;
  --gold: #f4c56b;
  --coral: #ff7f7f;
  --green: #74d69b;
  --purple: #ad93ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
  --radius: 13px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7f8;
  --bg-deep: #edf1f3;
  --surface: #ffffff;
  --surface-strong: #f9fbfb;
  --surface-soft: #eef4f5;
  --surface-hover: #e8f1f2;
  --border: rgba(31, 58, 71, 0.13);
  --border-strong: rgba(31, 58, 71, 0.22);
  --text: #142834;
  --muted: #526873;
  --muted-strong: #415d6c;
  --teal: #006f66;
  --teal-bright: #00655d;
  --teal-soft: rgba(7, 157, 142, 0.1);
  --aqua: #155f99;
  --gold: #875700;
  --coral: #c94c4c;
  --green: #24824b;
  --purple: #735bc4;
  --shadow: 0 16px 45px rgba(39, 73, 85, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 1%, rgba(25, 117, 135, 0.11), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--teal);
  color: #021817;
  border-radius: 6px;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.appbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0 2rem;
  background: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.brand {
  min-width: max-content;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
}

.platform-mark {
  width: 36px;
  height: 36px;
}

.brand-copy,
.workspace-brand > span:last-child,
.account-menu > span {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-copy strong,
.workspace-brand strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.brand-copy small,
.workspace-brand small,
.account-menu small {
  color: var(--muted);
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--gold);
}

.brand-divider {
  width: 1px;
  height: 36px;
  margin: 0 0.25rem;
  background: var(--border-strong);
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.workspace-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #06231f;
  background: linear-gradient(145deg, var(--teal-bright), var(--gold));
  border-radius: 9px;
  box-shadow: 0 0 22px rgba(40, 211, 189, 0.15);
}

.workspace-mark i {
  font-size: 1rem;
}

.appnav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-item {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.44rem;
  padding: 0.65rem 0.73rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.79rem;
  transition: color 0.16s ease, background 0.16s ease, border 0.16s ease;
}

.nav-item i {
  color: color-mix(in srgb, var(--muted) 80%, var(--teal));
  font-size: 0.9rem;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.nav-item.active {
  color: var(--text);
  background: var(--teal-soft);
  border-color: var(--teal);
  box-shadow: inset 0 0 0 1px rgba(40, 211, 189, 0.16);
}

.nav-item.active i {
  color: var(--teal-bright);
}

.appbar-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-left: 0.7rem;
  border-left: 1px solid var(--border);
}

.mode-toggle {
  display: flex;
  padding: 0.16rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.mode-toggle button {
  padding: 0.38rem 0.62rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 0.67rem;
}

.mode-toggle button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface-soft);
}

.account-menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.account-menu strong {
  max-width: 110px;
  overflow: hidden;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu button {
  padding: 0.44rem 0.55rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.63rem;
}

.mobile-nav-toggle {
  display: none;
  margin-left: auto;
  padding: 0.55rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.demo-banner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  color: var(--muted-strong);
  background: linear-gradient(90deg, rgba(244, 197, 107, 0.09), rgba(40, 211, 189, 0.08));
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.demo-banner i,
.demo-banner strong {
  color: var(--gold);
}

main {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.hero {
  min-height: 445px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: 2rem;
  padding: 3.2rem 0 2.5rem;
}

.hero-copy {
  min-width: 0;
}

body:not([data-view="mission"]) .hero {
  min-height: 0;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 1.8rem 0 1.35rem;
}

body:not([data-view="mission"]) .hero h1 {
  max-width: none;
  margin-bottom: 0.45rem;
  font-size: clamp(2.25rem, 4vw, 3.55rem);
  line-height: 1.02;
}

body:not([data-view="mission"]) .hero .page-subtitle {
  max-width: 880px;
  margin-bottom: 0;
}

body:not([data-view="mission"]) .hero-metric,
body:not([data-view="mission"]) .hero-supporting,
body:not([data-view="mission"]) .hero .reporting-summary,
body:not([data-view="mission"]) .leader-brief {
  display: none;
}

body:not([data-view="mission"]) .section-intro {
  min-height: 105px;
  padding: 1.5rem 0 1rem;
}

body:not([data-view="mission"]) .section-intro h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

body[data-view="reach"] #reach-view .section-intro,
body[data-view="growth"] #growth-view .section-intro,
body[data-view="content"] #content-view .section-intro,
body[data-view="health"] #health-view .section-intro {
  display: none;
}

body:not([data-view="mission"]) .view.active-view {
  padding-top: 1rem;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--teal-bright);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5vw, 5.1rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.82rem);
  font-weight: 400;
  line-height: 1.12;
}

h3 {
  margin-bottom: 0.22rem;
  font-size: 0.9rem;
}

.page-subtitle,
.section-copy {
  color: var(--muted);
  line-height: 1.55;
}

.page-subtitle {
  max-width: 850px;
  margin-bottom: 1.55rem;
  font-size: 0.94rem;
}

.section-copy {
  margin-bottom: 0;
  font-size: 0.74rem;
}

.hero-metric {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.hero-metric strong {
  font-family: var(--font-display);
  font-size: clamp(3.15rem, 5vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.hero-metric span {
  max-width: 270px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.hero-metric .delta {
  align-self: center;
}

.hero-supporting {
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 0.9rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-stat {
  padding-right: 1rem;
}

.hero-stat + .hero-stat {
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}

.hero-stat strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
}

.hero-stat small {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reporting-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.leader-brief {
  min-width: 0;
  padding: 1.35rem;
  background:
    linear-gradient(145deg, rgba(40, 211, 189, 0.08), transparent 48%),
    var(--surface);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--teal);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
}

.leader-brief-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.leader-brief-heading h2 {
  max-width: 12ch;
}

.leader-brief-primary {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.leader-brief-primary strong,
.leader-brief-primary span {
  display: block;
}

.leader-brief-primary strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
}

.leader-brief-primary span {
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.leader-brief-signals {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 0 0.35rem;
}

.leader-signal {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid var(--border);
}

.leader-signal:last-child {
  border-bottom: 0;
}

.leader-signal i {
  color: var(--teal-bright);
}

.leader-signal span {
  min-width: 0;
  color: var(--muted-strong);
  font-size: 0.66rem;
  line-height: 1.35;
}

.leader-signal strong {
  color: var(--text);
  font-size: 0.67rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.leader-brief-link {
  margin-top: 0.45rem;
}

.filter-ribbon {
  position: sticky;
  z-index: 20;
  top: 86px;
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.45fr 1fr 1fr auto;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.7rem;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.filter-ribbon label,
.search-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

select,
input {
  min-width: 0;
  height: 40px;
  padding: 0 0.72rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

select:focus,
input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(40, 211, 189, 0.12);
}

.primary {
  min-width: 86px;
  align-self: end;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #03221e;
  background: var(--teal);
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

.primary:hover {
  background: var(--teal-bright);
}

html[data-theme="light"] .primary,
html[data-theme="light"] .skip-link {
  color: #ffffff;
}

.primary.loading i {
  animation: spin 0.8s linear infinite;
}

.view {
  display: none;
  animation: view-in 0.25s ease;
}

.view.active-view {
  display: block;
}

.notice {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  color: var(--muted-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  font-size: 0.75rem;
}

.hidden {
  display: none !important;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.kpi-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
  position: relative;
  min-height: 133px;
  padding: 1rem 1.05rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -20px;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, var(--teal-soft), transparent 70%);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.kpi-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  color: var(--teal-bright);
  background: var(--teal-soft);
  border-radius: 8px;
  font-size: 0.85rem;
}

.kpi-source {
  color: var(--muted);
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kpi-card strong {
  display: block;
  margin-bottom: 0.18rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1;
}

.kpi-card > span {
  display: block;
  color: var(--muted);
  font-size: 0.67rem;
}

.kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.kpi-foot small {
  color: var(--muted);
  font-size: 0.57rem;
}

.delta {
  width: max-content;
  padding: 0.2rem 0.42rem;
  border-radius: 999px;
  font-size: 0.57rem;
  font-weight: 700;
  white-space: nowrap;
}

.delta.up {
  color: var(--green);
  background: rgba(116, 214, 155, 0.1);
}

.delta.down {
  color: var(--coral);
  background: rgba(255, 127, 127, 0.1);
}

.delta.neutral {
  color: var(--muted);
  background: var(--surface-soft);
}

.panel {
  min-width: 0;
  padding: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.panel-heading {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.panel-heading .eyebrow {
  margin-bottom: 0.36rem;
}

.lead-grid,
.two-grid,
.three-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.lead-grid {
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.72fr);
}

.two-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trend-panel {
  border-top-color: var(--teal);
  box-shadow: inset 0 2px 0 var(--teal), 0 8px 30px rgba(0, 0, 0, 0.08);
}

.chart-meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 0.6rem;
}

.legend-key {
  position: relative;
  padding-left: 1.3rem;
  white-space: nowrap;
}

.legend-key::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.95rem;
  height: 2px;
  background: var(--teal);
}

.legend-key.comparison::before {
  background: repeating-linear-gradient(90deg, var(--muted), var(--muted) 3px, transparent 3px, transparent 6px);
}

.chart-wrap {
  position: relative;
  height: 320px;
}

.chart-wrap canvas {
  width: 100%;
  height: 100%;
}

.chart-wrap canvas:focus-visible,
.map-panel canvas:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.chart-data {
  margin-top: 0.65rem;
  color: var(--muted-strong);
  font-size: 0.62rem;
}

.chart-data summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--teal-bright);
  cursor: pointer;
}

.chart-data[open] .table-wrap {
  max-height: 280px;
  margin-top: 0.45rem;
}

.chart-tooltip {
  position: absolute;
  z-index: 5;
  top: 0.75rem;
  right: 0.75rem;
  min-width: 130px;
  padding: 0.55rem 0.65rem;
  pointer-events: none;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.65rem;
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip span {
  margin-top: 0.18rem;
  color: var(--muted);
}

.signal-list,
.story-list,
.health-summary,
.metric-list,
.platform-list,
.source-health-list,
.action-list {
  display: flex;
  flex-direction: column;
}

.signal-row,
.story-row,
.metric-row,
.platform-row,
.source-health-row,
.action-row {
  display: grid;
  align-items: center;
  gap: 0.65rem;
  padding: 0.76rem 0;
  border-top: 1px solid var(--border);
}

.signal-row:first-child,
.story-row:first-child,
.metric-row:first-child,
.platform-row:first-child,
.source-health-row:first-child,
.action-row:first-child {
  border-top: 0;
}

.signal-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.signal-icon,
.story-icon,
.platform-icon,
.action-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--teal-bright);
  background: var(--teal-soft);
  border-radius: 9px;
}

.signal-row strong,
.story-row strong,
.metric-row strong,
.platform-row strong,
.source-health-row strong,
.action-row strong {
  font-size: 0.72rem;
}

.signal-row small,
.story-row small,
.metric-row small,
.platform-row small,
.source-health-row small,
.action-row small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.59rem;
  line-height: 1.4;
}

.signal-value {
  text-align: right;
}

.signal-value strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.signal-value .delta {
  margin-top: 0.22rem;
  margin-left: auto;
}

.text-button {
  min-height: 32px;
  padding: 0.42rem 0;
  color: var(--teal-bright);
  background: transparent;
  border: 0;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.78rem;
}

.bar-list.spacious {
  gap: 1rem;
}

.bar-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
}

.bar-item-head span:last-child {
  color: var(--muted-strong);
  font-variant-numeric: tabular-nums;
}

.bar-progress {
  width: 100%;
  height: 7px;
  display: block;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
}

.bar-progress::-webkit-progress-bar {
  background: var(--surface-soft);
  border-radius: 999px;
}

.bar-progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  border-radius: 999px;
}

.bar-progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--teal), var(--aqua));
  border-radius: 999px;
}

.bar-note {
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.56rem;
}

.story-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.story-icon {
  color: var(--gold);
  background: rgba(244, 197, 107, 0.09);
}

.health-score {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.5rem;
  padding: 0.8rem;
  background: var(--surface-strong);
  border-radius: 10px;
}

.health-gauge {
  width: 64px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 50%;
}

.health-gauge progress {
  width: 38px;
  height: 4px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
}

.health-gauge progress::-webkit-progress-bar {
  background: rgba(255, 255, 255, 0.08);
}

.health-gauge progress::-webkit-progress-value,
.health-gauge progress::-moz-progress-bar {
  background: var(--teal);
}

.health-gauge strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}

.health-score p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.45;
}

.health-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.52rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.64rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 0.35rem;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(116, 214, 155, 0.08);
}

.status-dot.warn {
  background: var(--gold);
}

.status-dot.error {
  background: var(--coral);
}

.section-intro {
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.4rem 0 1.35rem;
}

.section-intro h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-intro .section-copy {
  max-width: 760px;
  font-size: 0.83rem;
}

.search-label {
  min-width: 260px;
}

.search-label > span {
  position: relative;
  display: block;
}

.search-label i {
  position: absolute;
  top: 50%;
  left: 0.7rem;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-label input {
  width: 100%;
  padding-left: 2rem;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.summary-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  color: var(--muted-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.62rem;
}

.summary-chip strong {
  color: var(--text);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.property-card {
  position: relative;
  min-height: 190px;
  padding: 1rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.18s ease, border 0.18s ease;
}

.property-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.property-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.property-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--teal-bright);
  background: var(--teal-soft);
  border-radius: 9px;
}

.property-card .status-pill {
  font-size: 0.48rem;
}

.property-card h3 {
  min-height: 2.3em;
  margin-bottom: 0.28rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.property-meta {
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.45;
}

.property-metrics {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.7rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.property-metrics strong,
.property-metrics small {
  display: block;
}

.property-metrics strong {
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
}

.property-metrics small {
  color: var(--muted);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-panel {
  margin-bottom: 0.75rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.65rem;
}

th,
td {
  padding: 0.72rem 0.65rem;
  border-top: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

td {
  color: var(--muted-strong);
  font-variant-numeric: tabular-nums;
}

td:first-child {
  color: var(--text);
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.45rem;
  color: var(--green);
  background: rgba(116, 214, 155, 0.09);
  border: 1px solid rgba(116, 214, 155, 0.16);
  border-radius: 999px;
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.warn {
  color: var(--gold);
  background: rgba(244, 197, 107, 0.08);
  border-color: rgba(244, 197, 107, 0.17);
}

.status-pill.modeled {
  color: var(--purple);
  background: rgba(173, 147, 255, 0.08);
  border-color: rgba(173, 147, 255, 0.17);
}

.map-panel canvas {
  width: 100%;
  height: 245px;
  display: block;
  background:
    radial-gradient(circle at 50% 45%, rgba(40, 211, 189, 0.08), transparent 50%),
    var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.country-rank {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.country-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0.55rem;
  background: var(--surface-strong);
  border-radius: 7px;
  font-size: 0.58rem;
}

.country-chip span {
  color: var(--muted);
}

.geo-explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(210px, 0.67fr) minmax(210px, 0.67fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.geo-map-panel {
  min-width: 0;
  scroll-margin-top: 12rem;
}

.geo-map-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 45%, rgba(40, 211, 189, 0.08), transparent 50%),
    var(--surface-strong);
}

.map-panel canvas.geo-map {
  width: 100%;
  height: clamp(300px, 27vw, 390px);
  border: 0;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
}

.map-panel canvas.geo-map.dragging {
  cursor: grabbing;
}

.geo-controls {
  position: absolute;
  z-index: 2;
  top: 0.55rem;
  right: 0.55rem;
  display: flex;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.geo-controls button {
  min-width: 32px;
  height: 30px;
  padding: 0 0.55rem;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  font-size: 0.62rem;
  font-weight: 700;
}

.geo-controls button:last-child {
  border-right: 0;
}

.geo-controls button:hover,
.geo-controls button:focus-visible {
  color: var(--teal-bright);
  background: var(--surface-hover);
}

.geo-legend {
  position: absolute;
  bottom: 0.45rem;
  left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.3rem 0.38rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-size: 0.5rem;
}

.geo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.geo-legend i {
  display: block;
  width: 9px;
  height: 9px;
  border: 1px solid var(--border-strong);
}

.geo-legend .geo-no-data {
  background: var(--surface-soft);
  border-radius: 2px;
}

.geo-ramp {
  gap: 1px !important;
}

.geo-ramp i:nth-child(1) { background: color-mix(in srgb, var(--teal) 18%, var(--surface-soft)); }
.geo-ramp i:nth-child(2) { background: color-mix(in srgb, var(--teal) 34%, var(--surface-soft)); }
.geo-ramp i:nth-child(3) { background: color-mix(in srgb, var(--teal) 52%, var(--surface-soft)); }
.geo-ramp i:nth-child(4) { background: color-mix(in srgb, var(--teal) 72%, var(--surface-soft)); }
.geo-ramp i:nth-child(5) { background: var(--teal); }

.geo-instruction {
  position: absolute;
  right: 0.55rem;
  bottom: 0.5rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.5rem;
  pointer-events: none;
}

.geo-country-picker {
  display: inline-grid;
  grid-template-columns: auto minmax(130px, 1fr);
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.geo-country-picker select {
  min-height: 32px;
  padding: 0.35rem 1.8rem 0.35rem 0.55rem;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.62rem;
  letter-spacing: 0;
  text-transform: none;
}

.geo-breadcrumb {
  min-height: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.42rem;
  color: var(--muted);
  font-size: 0.58rem;
}

.geo-breadcrumb button {
  padding: 0.16rem 0.4rem;
  color: var(--muted-strong);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.57rem;
  font-weight: 700;
}

.geo-breadcrumb button:hover,
.geo-breadcrumb button:focus-visible {
  color: var(--teal-bright);
  border-color: var(--teal);
}

.geo-rank {
  display: grid;
  align-content: start;
}

.geo-rank-row {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.12rem 0.48rem;
  padding: 0.56rem 0.5rem 0.56rem 0.62rem;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 7px;
  font: inherit;
  text-align: left;
}

button.geo-rank-row {
  cursor: pointer;
}

.geo-rank-row:hover,
.geo-rank-row:focus-visible {
  background: var(--surface-hover);
}

.geo-rank-row.selected {
  background: rgba(244, 197, 107, 0.08);
  border-left-color: var(--gold);
}

.geo-rank-row .rank {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1rem;
}

.geo-rank-row strong {
  overflow: hidden;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-rank-row > span:last-child {
  color: var(--muted);
  font-size: 0.56rem;
}

.geo-tooltip {
  position: fixed;
  z-index: 60;
  max-width: min(310px, calc(100vw - 1rem));
  display: grid;
  gap: 0.18rem;
  padding: 0.58rem 0.68rem;
  color: #f1f6fb;
  background: rgba(4, 12, 23, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.44);
  font-size: 0.6rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.geo-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.geo-tooltip strong {
  font-size: 0.67rem;
}

.geo-tooltip span {
  color: #b8c6d6;
}

.market-properties-panel {
  margin-bottom: 0.75rem;
}

.market-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.market-summary span,
.market-summary strong {
  padding: 0.35rem 0.52rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 0.58rem;
}

.market-summary strong {
  color: var(--text);
}

.reach-support-grid {
  align-items: start;
}

.momentum-panel,
.indexed-trend-panel,
.content-opportunity-panel {
  margin-bottom: 0.75rem;
}

.portfolio-momentum-wrap {
  height: 320px;
}

.growth-momentum-wrap,
.content-opportunity-wrap {
  height: 330px;
}

.chart-caption {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.45;
}

.growth-chart-legend {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legend-key.organic::before { background: var(--teal); }
.legend-key.paid::before { background: var(--gold); }
.legend-key.email::before { background: var(--aqua); }
.legend-key.gifts::before { background: var(--purple); }

.opportunity-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.56rem;
}

.opportunity-key span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.opportunity-key i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.opportunity-key .proven { background: var(--teal); }
.opportunity-key .improve { background: var(--gold); }
.opportunity-key .nurture { background: var(--aqua); }

.metric-row,
.platform-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.metric-number,
.platform-number {
  text-align: right;
}

.metric-number strong,
.platform-number strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 400;
}

.platform-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.journey-panel {
  margin-bottom: 0.75rem;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.signal-stage {
  position: relative;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem;
  background: linear-gradient(145deg, var(--surface-strong), var(--surface-soft));
  border: 1px solid var(--border);
  border-radius: 10px;
}

.signal-stage i {
  margin-bottom: 0.65rem;
  color: var(--teal-bright);
}

.signal-stage strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
}

.signal-stage span {
  color: var(--muted);
  font-size: 0.58rem;
}

.signal-stage small {
  margin-top: 0.35rem;
  color: var(--green);
  font-size: 0.52rem;
}

.search-groups {
  display: grid;
  gap: 0.65rem;
}

.search-card {
  padding: 0.8rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.search-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.48rem;
}

.search-card-head strong {
  font-size: 0.7rem;
}

.search-card-head span {
  color: var(--muted);
  font-size: 0.56rem;
}

.search-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.search-card-metrics strong,
.search-card-metrics small {
  display: block;
}

.search-card-metrics strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 400;
}

.search-card-metrics small {
  color: var(--muted);
  font-size: 0.48rem;
  text-transform: uppercase;
}

.language-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.language-card {
  padding: 0.9rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.language-card .language-code {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  color: var(--teal-bright);
  background: var(--teal-soft);
  border-radius: 8px;
  font-size: 0.59rem;
  font-weight: 700;
}

.language-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
}

.language-card span {
  color: var(--muted);
  font-size: 0.57rem;
}

.source-health-row {
  grid-template-columns: auto minmax(0, 1fr) minmax(100px, 0.7fr) auto;
}

.source-health-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--aqua);
  background: rgba(80, 168, 255, 0.08);
  border-radius: 8px;
}

.coverage-progress {
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
}

.coverage-progress::-webkit-progress-bar {
  background: var(--surface-soft);
}

.coverage-progress::-webkit-progress-value,
.coverage-progress::-moz-progress-bar {
  background: var(--green);
}

.action-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.action-icon {
  color: var(--gold);
  background: rgba(244, 197, 107, 0.08);
}

.priority {
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.priority.high {
  color: var(--coral);
}

.method-note {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  color: var(--muted-strong);
  background: var(--teal-soft);
  border: 1px solid rgba(40, 211, 189, 0.16);
  border-radius: 10px;
  font-size: 0.65rem;
}

.method-note i {
  color: var(--teal-bright);
}

.method-note strong {
  color: var(--text);
}

.method-note p {
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

footer {
  width: min(1560px, calc(100% - 4rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: 1.1rem 0 2rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.58rem;
}

.empty-state {
  padding: 1.4rem;
  color: var(--muted);
  text-align: center;
  background: var(--surface-strong);
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  font-size: 0.67rem;
}

.skeleton {
  opacity: 0.6;
  animation: pulse 1.4s ease-in-out infinite;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 78% 18%, rgba(40, 211, 189, 0.12), transparent 28rem),
    radial-gradient(circle at 15% 85%, rgba(244, 197, 107, 0.07), transparent 24rem),
    var(--bg-deep);
}

.login-shell {
  width: min(760px, 100%);
  padding: 0;
}

.login-card {
  padding: clamp(1.4rem, 4vw, 2.7rem);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 3rem;
}

.login-platform,
.login-workspace {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.login-platform img {
  width: 38px;
  height: 38px;
}

.login-platform > div,
.login-workspace > div {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.login-platform strong,
.login-workspace strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
}

.login-platform span,
.login-workspace span:not(.workspace-mark) {
  color: var(--muted);
  font-size: 0.53rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-platform span {
  color: var(--gold);
}

.login-brand-divider {
  width: 1px;
  height: 40px;
  background: var(--border-strong);
}

.login-copy h1 {
  max-width: 620px;
  margin-bottom: 0.75rem;
  font-size: clamp(2.25rem, 7vw, 4rem);
}

.login-copy > p:last-child {
  max-width: 590px;
  margin-bottom: 1.8rem;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.6;
}

.login-form > label {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.login-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.login-fields input,
.login-fields button {
  height: 46px;
}

.login-fields button {
  align-self: auto;
  padding: 0 1rem;
}

.login-status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.5;
}

.login-dev-link {
  display: inline-block;
  margin-top: 0.7rem;
  color: var(--teal-bright);
  font-size: 0.68rem;
}

.login-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.2rem;
}

.login-trust span {
  padding: 0.42rem 0.62rem;
  color: var(--muted-strong);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.56rem;
}

.login-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.55rem;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes grow-bar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1280px) {
  .appbar {
    padding-inline: 1.25rem;
  }

  .appnav {
    gap: 0.05rem;
  }

  .nav-item {
    padding-inline: 0.58rem;
  }

  main {
    padding-inline: 1.25rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1380px) {
  body[data-authenticated="true"] .mode-toggle {
    display: none;
  }
}

@media (max-width: 1080px) {
  .appbar {
    min-height: 72px;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .appnav {
    position: fixed;
    top: 72px;
    right: 1rem;
    left: 1rem;
    display: none;
    align-items: stretch;
    padding: 0.65rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }

  .appnav.open {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-item {
    justify-content: center;
  }

  .appbar-right {
    border-left: 0;
  }

  .account-menu {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(250px, 0.6fr);
  }

  .filter-ribbon {
    top: 72px;
    grid-template-columns: repeat(3, 1fr);
  }

  .filter-ribbon .primary {
    align-self: end;
  }

  .kpi-grid,
  .kpi-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lead-grid,
  .lead-grid.reach-grid,
  .lead-grid.content-grid {
    grid-template-columns: 1fr;
  }

  .geo-explorer-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(210px, 0.55fr);
  }

  .geo-explorer-grid > :last-child {
    grid-column: 1 / -1;
  }

  .three-grid {
    grid-template-columns: 1fr 1fr;
  }

  .three-grid > :last-child {
    grid-column: 1 / -1;
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) and (min-width: 1081px) {
  .brand-copy {
    display: none;
  }
}

@media (max-width: 760px) {
  .appbar {
    padding-inline: 0.8rem;
  }

  .brand-copy,
  .brand-divider {
    display: none;
  }

  .workspace-brand small {
    display: none;
  }

  .workspace-brand strong {
    font-size: 0.9rem;
  }

  .mode-toggle {
    display: none;
  }

  .appnav.open {
    grid-template-columns: 1fr 1fr;
  }

  .demo-banner {
    justify-content: flex-start;
    font-size: 0.6rem;
  }

  .demo-banner span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  main {
    padding-inline: 0.75rem;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    padding-top: 2.3rem;
  }

  h1 {
    font-size: clamp(2.55rem, 13vw, 3.6rem);
  }

  .leader-brief {
    margin-bottom: 0.6rem;
  }

  .hero-supporting {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .hero-stat:nth-child(n + 3) {
    padding-top: 0.65rem;
  }

  .filter-ribbon {
    position: relative;
    top: auto;
    grid-template-columns: 1fr 1fr;
  }

  .filter-ribbon label:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .filter-ribbon .primary {
    align-self: end;
  }

  .kpi-grid,
  .kpi-grid.compact {
    grid-template-columns: 1fr 1fr;
  }

  .lead-grid,
  .two-grid,
  .three-grid {
    grid-template-columns: 1fr;
  }

  .geo-explorer-grid {
    grid-template-columns: 1fr;
  }

  .geo-explorer-grid > :last-child {
    grid-column: auto;
  }

  .three-grid > :last-child {
    grid-column: auto;
  }

  .chart-wrap {
    height: 260px;
  }

  .map-panel canvas.geo-map {
    height: 300px;
  }

  .geo-instruction {
    display: none;
  }

  .panel-heading {
    flex-direction: column;
  }

  .chart-meta {
    flex-wrap: wrap;
  }

  .section-intro {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    padding-top: 2rem;
  }

  .search-label {
    min-width: 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .signal-strip {
    grid-template-columns: 1fr;
  }

  .signal-stage {
    min-height: 90px;
  }

  .country-rank,
  .language-cards {
    grid-template-columns: 1fr;
  }

  .source-health-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .source-health-row .coverage-progress {
    grid-column: 2 / -1;
  }

  footer {
    width: calc(100% - 1.5rem);
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .brand {
    gap: 0.45rem;
  }

  .platform-mark {
    width: 30px;
    height: 30px;
  }

  .workspace-mark {
    width: 28px;
    height: 28px;
  }

  .demo-banner {
    padding-inline: 0.75rem;
  }

  .hero-metric {
    display: block;
  }

  .hero-metric span {
    display: block;
    margin-top: 0.35rem;
  }

  .hero-metric strong {
    font-size: 3rem;
  }

  .filter-ribbon {
    grid-template-columns: 1fr;
  }

  .filter-ribbon label:nth-of-type(3) {
    grid-column: auto;
  }

  .kpi-grid,
  .kpi-grid.compact,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .property-card {
    min-height: 165px;
  }

  .login-page {
    padding: 0;
  }

  .login-card {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 0;
    border-radius: 0;
  }

  .login-brand {
    align-items: flex-start;
    margin-bottom: 2rem;
  }

  .login-brand-divider {
    display: none;
  }

  .login-workspace {
    margin-left: auto;
  }

  .login-platform > div,
  .login-workspace > div {
    display: none;
  }

  .login-fields {
    grid-template-columns: 1fr;
  }

  .login-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
