/* TourismSignal command-center theme
   A calm destination-intelligence UI layered over the original component system. */

:root {
  --navy-950: #08152f;
  --navy-900: #0b1735;
  --navy-800: #14264b;
  --blue-600: #3156d9;
  --blue-500: #4a6ce5;
  --aqua-500: #0a8176;
  --coral-500: #ed7656;
  --gold-500: #e0a52d;
  --ink: #17223b;
  --muted: #5f6d84;
  --muted-2: #65738a;
  --line: #dce3ed;
  --line-strong: #b9c5d6;
  --canvas: #f3f6fa;
  --surface: #ffffff;
  --surface-blue: #f2f6ff;
  --success: #087c70;
  --shadow-sm: 0 1px 2px rgba(8, 21, 47, 0.05);
  --shadow-md: 0 14px 34px rgba(8, 21, 47, 0.08);
  --radius-sm: 8px;
  --radius-md: 13px;
  --radius-lg: 18px;
  color: var(--ink);
  background: var(--canvas);
}

body {
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #3156d9;
  outline-offset: 2px;
}

::selection {
  color: #fff;
  background: var(--blue-600);
}

.topbar {
  min-height: 64px;
  padding: 10px clamp(18px, 2.6vw, 42px);
  color: #fff;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 21, 47, 0.98);
  box-shadow: 0 8px 24px rgba(8, 21, 47, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  gap: 11px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow: none;
}

.brand-mark::before {
  width: 20px;
  height: 20px;
  background: conic-gradient(from 25deg, #5de0ce 0 28%, #5f7fed 0 58%, #f0b94b 0 78%, #5de0ce 0);
}

.brand-name {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-transform: none;
}

.brand-sub {
  color: #aebbd0;
  font-size: 0.78rem;
}

.top-actions {
  gap: 8px;
}

.btn {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  box-shadow: none;
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  border-color: var(--blue-600);
  background: var(--blue-600);
  box-shadow: 0 6px 15px rgba(49, 86, 217, 0.2);
}

.btn-primary:hover {
  color: #fff;
  border-color: #2548c3;
  background: #2548c3;
}

.btn-light {
  color: #e8eef8;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.btn-light:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.13);
}

.btn-inline,
.btn-reset {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #fff;
}

.btn-inline:hover,
.btn-reset:hover {
  color: var(--blue-600);
  border-color: var(--blue-500);
  background: var(--surface-blue);
}

.workspace {
  width: min(1720px, 100%);
  grid-template-columns: minmax(300px, 326px) minmax(0, 1fr);
  gap: 24px;
  padding: 24px clamp(16px, 2.4vw, 38px) 64px;
}

.builder {
  top: 88px;
  max-height: calc(100vh - 112px);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.builder-head {
  padding: 23px 21px 18px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, #fff 0%, #f7f9fd 100%);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--aqua-500);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.eyebrow::before {
  width: 18px;
  height: 2px;
  background: var(--aqua-500);
}

.builder h1 {
  max-width: none;
  color: var(--navy-950);
  font-size: 1.8rem;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-transform: none;
}

.builder-head p:last-child {
  max-width: 38ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.875rem;
}

.form-body {
  padding: 0 19px 19px;
}

.form-section,
.form-disclosure {
  border-color: var(--line);
}

.form-section {
  padding: 18px 0;
}

.section-legend {
  margin-bottom: 13px;
  color: var(--navy-900);
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: 0;
}

.section-number {
  color: var(--aqua-500);
  font-size: 0.72rem;
}

.field label,
.field-label,
.acs-field label {
  color: #4b5a72;
  font-size: 0.82rem;
  font-weight: 600;
}

.optional-label {
  color: var(--muted-2);
  font-size: 0.7rem;
  font-weight: 500;
}

.input,
.select,
.textarea {
  min-height: 44px;
  padding: 10px 11px;
  color: var(--ink);
  border: 1px solid #cbd5e3;
  border-radius: 8px;
  background: #fbfcfe;
  box-shadow: inset 0 1px 1px rgba(8, 21, 47, 0.02);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #96a6bd;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue-500);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(49, 86, 217, 0.1);
}

.textarea {
  min-height: 76px;
}

.input-prefix > span {
  color: var(--muted);
}

.channel-selector {
  gap: 7px;
}

.channel-option-card {
  min-height: 47px;
  padding: 8px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
  box-shadow: none;
}

.channel-option-card strong {
  color: inherit;
  font-size: 0.8rem;
}

.channel-option-card small {
  color: var(--muted);
}

.channel-initial {
  color: var(--blue-600);
  border: 1px solid #ced8f6;
  background: #edf2ff;
}

.channel-option input:checked + .channel-option-card {
  color: var(--navy-900);
  border-color: #8499df;
  background: #edf2ff;
  box-shadow: inset 0 0 0 1px #8499df;
}

.channel-option input:checked + .channel-option-card small {
  color: #53658b;
}

.range-row input[type="range"] {
  accent-color: var(--blue-600);
}

.range-value {
  color: var(--blue-600);
  border: 1px solid #ccd7f6;
  border-radius: 999px;
  background: #eef2ff;
  font-size: 0.75rem;
}

.microcopy,
.source-note,
.source-note a,
.evidence-caution,
.form-disclosure > summary small {
  color: var(--muted);
  font-size: 0.76rem;
}

.source-note a {
  color: var(--blue-600);
}

.form-disclosure > summary {
  min-height: 64px;
  color: var(--ink);
}

.form-disclosure > summary strong {
  color: var(--navy-900);
  font-size: 0.875rem;
}

.disclosure-mark {
  color: var(--blue-600);
  border: 1px solid #cfdaef;
  border-radius: 7px;
  background: #f0f4fb;
}

.disclosure-body,
.acs-details {
  border-color: var(--line);
}

.acs-details {
  background: #f7f9fc;
}

.acs-details summary {
  color: var(--ink);
  font-size: 0.82rem;
}

.assumption-input-grid {
  gap: 12px 10px;
}

.preset {
  min-height: 36px;
  color: var(--muted);
  border-color: var(--line-strong);
  background: #fff;
}

.preset:hover,
.preset.is-active {
  color: var(--blue-600);
  border-color: #91a4e5;
  background: #eef2ff;
}

.season-control-label {
  color: var(--muted);
}

.season-control-bar {
  background: #8ca3eb;
}

.season-control:hover .season-control-bar {
  background: var(--aqua-500);
}

.form-actions {
  padding-top: 15px;
  background: #fff;
}

.results {
  min-width: 0;
}

.hero-card {
  min-height: 232px;
  overflow: hidden;
  color: #fff;
  border: 0;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgba(8, 21, 47, 0.97) 0%, rgba(8, 21, 47, 0.9) 55%, rgba(8, 21, 47, 0.56) 100%),
    var(--hero-image) center 48% / cover no-repeat;
  box-shadow: var(--shadow-md);
}

.hero-card::after {
  width: 150px;
  height: 150px;
  right: 34px;
  bottom: -42px;
  border: 1px solid rgba(93, 224, 206, 0.28);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 224, 206, 0.55) 0 2px, transparent 3px) 0 0 / 18px 18px;
  opacity: 0.7;
}

.hero-content {
  min-height: 232px;
  align-items: flex-end;
  padding: clamp(24px, 3vw, 38px);
}

.hero-copy {
  max-width: 850px;
}

.hero-kicker {
  margin-bottom: 9px;
  color: #72dccc;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.09em;
}

.hero-title {
  max-width: 18ch;
  color: #fff;
  font-size: clamp(2.4rem, 4.5vw, 4.5rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-transform: none;
}

.hero-desc {
  max-width: 760px;
  margin-top: 13px;
  color: #dce5f2;
  font-size: 0.94rem;
  line-height: 1.5;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.hero-tags .provenance-badge {
  color: #e5edf8;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.hero-status {
  z-index: 1;
  align-self: flex-start;
  padding: 8px 11px;
  color: #d8fff8;
  border: 1px solid rgba(93, 224, 206, 0.35);
  border-radius: 999px;
  background: rgba(15, 159, 146, 0.18);
  font-size: 0.76rem;
  backdrop-filter: blur(8px);
}

.hero-status span {
  background: #5de0ce;
}

.metric-strip {
  margin: 14px 0;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.metric {
  min-height: 103px;
  padding: 16px 17px;
  border-right: 1px solid var(--line);
  background: #fff !important;
}

.metric:last-child {
  border-right: 0;
}

.metric-label,
.metric-note {
  color: var(--muted);
  font-size: 0.75rem;
}

.metric-label {
  font-weight: 650;
  letter-spacing: 0.035em;
}

.metric strong {
  color: var(--navy-900);
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.output-card {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.tablist {
  position: sticky;
  top: 64px;
  z-index: 18;
  gap: 3px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 16px rgba(8, 21, 47, 0.04);
  backdrop-filter: blur(14px);
  scrollbar-width: thin;
}

.tab {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 9px 13px;
  color: var(--muted);
  border: 0;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.tab:hover {
  color: var(--navy-900);
  background: #f2f5f9;
}

.tab[aria-selected="true"] {
  color: var(--blue-600);
  border: 0;
  background: #edf2ff;
  box-shadow: inset 0 0 0 1px #d2dcf7;
}

.panel {
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: #fff;
}

.panel-head {
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  max-width: 24ch;
  color: var(--navy-950);
  font-size: clamp(1.65rem, 2.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-transform: none;
}

.panel-copy {
  max-width: 68ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.quality-pill,
.model-stamp {
  padding: 6px 9px;
  color: var(--success);
  border: 1px solid #b9dfd9;
  border-radius: 999px;
  background: #edfaf7;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.module-heading,
.subsection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.module-heading > div:first-child,
.subsection-heading > div:first-child {
  max-width: 720px;
}

.module-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--aqua-500);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.module-heading h3,
.subsection-heading h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.module-heading p,
.subsection-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.subsection-heading {
  align-items: center;
  margin-bottom: 16px;
}

.market-section-divider {
  height: 1px;
  margin: 34px 0;
  background: var(--line);
}

.provenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  color: #53627a;
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 0.67rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.provenance-badge > span {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8290a5;
}

.provenance-badge.is-input {
  color: #2855bd;
  border-color: #ccd8fa;
  background: #f0f4ff;
}

.provenance-badge.is-input > span {
  background: var(--blue-500);
}

.provenance-badge.is-public {
  color: #086d65;
  border-color: #c2e6e0;
  background: #effaf8;
}

.provenance-badge.is-public > span,
.provenance-badge.is-live > span {
  background: var(--aqua-500);
}

.provenance-badge.is-live {
  color: #087368;
  border-color: #bde4de;
  background: #ebfaf7;
}

.provenance-badge.is-modeled > span {
  background: #7c67d9;
}

.provenance-badge.is-warning {
  color: #84570a;
  border-color: #ecd9a7;
  background: #fff9e8;
}

.provenance-badge.is-warning > span {
  background: var(--gold-500);
}

.provenance-badge.is-pending > span {
  background: #96a1b2;
}

/* Executive overview */
.overview-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.62fr);
  gap: 16px;
}

.decision-brief,
.outcome-card,
.scenario-lab,
.impact-module {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.decision-brief {
  padding: 20px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.decision-grid article {
  min-width: 0;
  padding: 15px;
  background: #fafbfd;
}

.decision-grid article > span,
.activation-card-head > div > span,
.activation-meta span,
.utm-row > span,
.scenario-inputs label > span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.decision-grid strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--navy-900);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-grid p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.outcome-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #fff;
  border: 0;
  background: linear-gradient(150deg, var(--navy-900), #183568);
}

.outcome-card .module-kicker {
  color: #72dccc;
}

.outcome-card > strong {
  margin-top: auto;
  color: #fff;
  font-size: clamp(2.4rem, 4vw, 4.1rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.065em;
}

.outcome-card h3 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 550;
}

.outcome-card p {
  margin: 10px 0 14px;
  color: #c4d0e3;
  font-size: 0.82rem;
}

.text-link {
  width: max-content;
  padding: 0;
  color: #80e4d5;
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.readiness-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.readiness-item {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfd;
}

.readiness-item > div {
  display: grid;
  gap: 8px;
}

.readiness-item strong {
  color: var(--navy-900);
  font-size: 0.82rem;
}

.readiness-item > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

/* Scenario lab */
.scenario-lab {
  margin-top: 16px;
  padding: 20px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.scenario-heading {
  align-items: flex-end;
}

.scenario-inputs {
  display: flex;
  flex: 0 1 550px;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 9px;
}

.scenario-inputs label {
  display: grid;
  flex: 1 1 140px;
  gap: 5px;
  min-width: 128px;
}

.scenario-inputs .input {
  width: 100%;
  min-height: 42px;
}

.comparison-table-wrap {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.comparison-head th {
  color: var(--muted);
  background: #f3f6fa;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.comparison-row {
  font-size: 0.82rem;
}

.comparison-row:last-child > * {
  border-bottom: 0;
}

.comparison-row > th {
  color: var(--muted);
  font-weight: 500;
}

.comparison-row strong {
  color: var(--navy-900);
  font-weight: 650;
}

.comparison-row em {
  width: max-content;
  min-width: 48px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.comparison-row em.is-up {
  color: #08756a;
  background: #e9f8f5;
}

.comparison-row em.is-down {
  color: #ad543d;
  background: #fff0ec;
}

.scenario-attainment {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(130px, 0.8fr);
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.scenario-attainment > strong {
  color: var(--navy-900);
  font-size: 1rem;
}

.scenario-attainment > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e7ef;
}

.scenario-attainment > div span {
  display: block;
  width: var(--coverage);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-500), var(--aqua-500));
}

.scenario-attainment small {
  grid-column: 1 / -1;
  color: var(--muted-2);
  font-size: 0.7rem;
}

/* Impact module */
.impact-module {
  margin-top: 22px;
  padding: 20px;
  background: #f8fafd;
}

.impact-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 18px;
}

.impact-case {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.impact-case.is-primary {
  border-color: #9aabe5;
  box-shadow: inset 0 3px 0 var(--blue-500);
}

.impact-case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.impact-case-head > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
}

.impact-room-nights {
  display: block;
  margin-top: 15px;
  color: var(--navy-900);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.055em;
}

.impact-unit {
  color: var(--muted);
  font-size: 0.73rem;
}

.impact-case dl {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.impact-case dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.impact-case dt {
  color: var(--muted);
  font-size: 0.71rem;
}

.impact-case dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
}

.model-guardrail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 13px;
  color: #5c6474;
  border: 1px solid #e8dbb7;
  border-radius: 9px;
  background: #fffaf0;
}

.model-guardrail > span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  color: #7b5a17;
  border: 1px solid #d7bd82;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
}

.model-guardrail p {
  margin: 0;
  font-size: 0.75rem;
}

.assumption-ledger {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.assumption-ledger > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
}

.assumption-ledger > summary::-webkit-details-marker {
  display: none;
}

.assumption-ledger > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.assumption-ledger > summary strong {
  color: var(--navy-900);
  font-size: 0.82rem;
}

.assumption-ledger > summary small {
  color: var(--muted);
  font-size: 0.72rem;
}

.assumption-ledger > summary > span:last-child {
  color: var(--blue-600);
  font-size: 1rem;
}

.assumption-ledger[open] > summary > span:last-child {
  transform: rotate(45deg);
}

.assumption-ledger-body {
  border-top: 1px solid var(--line);
}

.assumption-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) minmax(110px, 0.8fr) minmax(120px, 0.7fr);
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
}

.assumption-row:last-child {
  border-bottom: 0;
}

.assumption-row > span:first-child {
  color: var(--muted);
}

.assumption-row > strong {
  color: var(--ink);
  font-weight: 650;
}

/* Need-period calendar */
.need-priority-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.need-priority-grid article {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, #fff 0%, #f8faff 100%);
}

.need-priority-grid article > span {
  color: var(--aqua-500);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.need-priority-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--navy-900);
  font-size: 1.35rem;
  font-weight: 620;
}

.need-priority-grid p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.need-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
}

.need-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.need-table th,
.need-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.need-table th {
  color: var(--muted);
  background: #f5f7fa;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.need-table td {
  color: var(--ink);
  font-size: 0.78rem;
}

.need-table td > strong,
.need-table td > small {
  display: block;
}

.need-table td > small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.need-table tbody tr:last-child td {
  border-bottom: 0;
}

.need-meter {
  display: inline-block;
  width: 54px;
  height: 6px;
  margin-right: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  vertical-align: middle;
}

.need-meter span {
  display: block;
  width: var(--need);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aqua-500), var(--gold-500));
}

.need-level {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  color: #526078;
  background: #edf1f5;
  font-size: 0.68rem;
  font-weight: 700;
}

.need-level.is-priority {
  color: #9f4634;
  background: #ffebe7;
}

.need-level.is-support {
  color: #855b0d;
  background: #fff4d6;
}

.need-level.is-monitor {
  color: #3156a0;
  background: #eaf0ff;
}

.need-level.is-maintain {
  color: #087267;
  background: #e8f8f5;
}

/* Activation kit */
.activation-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.activation-toolbar label {
  display: grid;
  gap: 5px;
}

.activation-toolbar label > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.activation-toolbar .select {
  min-width: 260px;
}

.activation-intro {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  padding: 11px 13px;
  color: #43536c;
  border-left: 3px solid var(--aqua-500);
  border-radius: 0 8px 8px 0;
  background: #eef9f7;
  font-size: 0.78rem;
}

.activation-list {
  display: grid;
  gap: 14px;
}

.activation-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.activation-card::before {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--persona);
  content: "";
}

.activation-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.activation-card-head h3 {
  margin: 4px 0 0;
  color: var(--navy-900);
  font-size: 1.25rem;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.activation-card-head p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.activation-card-head > strong {
  color: var(--navy-900);
  font-size: 1.15rem;
  white-space: nowrap;
}

.activation-meta {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.7fr;
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.activation-meta > div {
  min-width: 0;
  padding: 12px 16px;
  background: #fff;
}

.activation-meta strong,
.activation-meta code {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 650;
}

.activation-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 0;
}

.activation-grid > section {
  min-width: 0;
  padding: 17px;
}

.activation-grid > section + section {
  border-left: 1px solid var(--line);
}

.activation-grid h4 {
  margin: 0 0 10px;
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 700;
}

.activation-grid ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activation-grid li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
}

.activation-grid li span {
  color: var(--muted);
  text-align: right;
}

.activation-caution {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.platform-briefs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.platform-briefs > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.platform-briefs span {
  color: var(--blue-600);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.platform-briefs strong {
  display: block;
  margin-top: 3px;
  color: var(--navy-900);
  font-size: 0.76rem;
}

.platform-briefs small {
  display: block;
  margin-top: 5px;
  color: #3e5277;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.35;
}

.platform-briefs p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.utm-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #f4f7fb;
}

.utm-row code {
  overflow: hidden;
  color: #42506a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Existing content, harmonized */
.persona-grid {
  gap: 14px;
}

.persona-card,
.origin-persona-section,
.origin-market,
.place-persona-section,
.place-card,
.dataset-card,
.source-signal-card,
.method-card,
.chart-card,
.insight-card,
.persona-comparison-card,
.origin-heatmap-card {
  border-width: 1px;
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.persona-card:nth-child(even) {
  background: #fbfcfe;
}

.persona-card::before {
  height: 5px;
}

.persona-index,
.persona-share,
.place-type,
.place-count,
.origin-count,
.source-button,
.origin-pill {
  border-width: 1px;
  border-radius: 999px;
}

.visual-card-head {
  align-items: center;
  padding: 18px 20px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.visual-kicker {
  color: var(--aqua-500);
  font-size: 0.68rem;
}

.visual-card-head h3 {
  color: var(--navy-900);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-transform: none;
}

.visual-card-head p {
  color: var(--muted);
  font-size: 0.82rem;
}

.visual-control > span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.visual-control select {
  min-height: 42px;
  color: var(--ink);
  border: 1px solid #c9d4e2;
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
}

.radar-stage,
.origin-map-stage {
  border-color: var(--line);
  background-color: #f6f8fb;
}

.origin-map-stage {
  background-image:
    linear-gradient(rgba(8, 21, 47, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 21, 47, 0.025) 1px, transparent 1px);
}

.origin-map-outline {
  fill: #fff;
  stroke: #53647e;
  stroke-width: 1.25;
}

.radar-grid-ring,
.radar-axis,
.origin-map-guide {
  stroke: #cbd5e1;
}

.radar-axis-label,
.heatmap-label {
  fill: var(--ink);
  font-weight: 650;
}

.heatmap-label {
  stroke: #fff;
}

.heatmap-ranking-panel,
.radar-table-wrap {
  background: #fff;
}

.radar-table th,
.radar-table td,
.heatmap-ranking li,
.heatmap-ranking-head {
  border-color: var(--line);
}

.radar-table thead th {
  color: var(--muted);
  background: #f4f7fa;
}

.radar-delta {
  border-color: var(--line-strong);
  background: #fff;
}

.origins-toolbar,
.places-toolbar,
.origins-alert,
.places-alert,
.places-source-card,
.origins-source-card,
.assumption-box {
  border-width: 1px;
  border-color: var(--line);
  border-radius: 10px;
  background: #f7f9fc;
}

.assumption-box {
  color: var(--muted);
}

.media-table th,
.evidence-table th {
  color: var(--muted);
  background: #f4f7fa;
}

.media-table td,
.media-table th,
.evidence-table td,
.evidence-table th {
  border-color: var(--line);
}

.table-total {
  color: var(--navy-900);
  background: #edf3ff;
}

.plan-notes {
  border-color: var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.plan-note {
  border-color: var(--line);
}

.evidence-heading,
.method-card,
.dataset-card {
  color: var(--ink);
}

.evidence-section + .evidence-section {
  border-color: var(--line);
}

.source-button {
  color: var(--blue-600);
  border-color: #ccd7ec;
  background: #f2f5fb;
}

.source-button:hover {
  color: #fff;
  border-color: var(--blue-600);
  background: var(--blue-600);
}

.toast {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: var(--navy-900);
  box-shadow: 0 15px 35px rgba(8, 21, 47, 0.25);
}

/* High-specificity legacy-theme resets */
.origins-toolbar strong,
.places-toolbar strong {
  color: var(--navy-900);
}

.origins-toolbar small,
.places-toolbar small {
  color: var(--muted);
}

.origins-live-mark,
.places-live-mark {
  background: var(--aqua-500);
}

.places-source-card {
  color: #fff;
  border-color: var(--navy-900);
  background: linear-gradient(140deg, var(--navy-900), var(--navy-800));
}

.places-source-card strong {
  color: #fff;
}

.places-source-card p {
  color: #c5d1e1;
}

.places-source-card a {
  color: #79dfd1;
}

.source-signal-card {
  color: #fff;
  border-color: var(--navy-900);
  background: linear-gradient(140deg, var(--navy-900), var(--navy-800));
}

.source-signal-card h4 {
  color: #fff;
}

.source-signal-card p {
  color: #b8c7da;
}

.source-bar > div {
  color: #e3eaf4;
}

.source-bar-track {
  background: rgba(255, 255, 255, 0.14);
}

.method-card {
  color: #fff;
  border-color: var(--navy-900);
  background: linear-gradient(140deg, var(--navy-950), var(--navy-800));
}

.method-card h3 {
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 620;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-transform: none;
}

.method-grid p {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

.method-grid strong {
  color: #72dccc;
}

.method-grid span {
  color: #c5d1e1;
}

.method-formula {
  color: #fff;
  border: 1px solid rgba(114, 220, 204, 0.24);
  background: rgba(15, 159, 146, 0.13);
}

.method-formula p {
  color: #c5d1e1;
}

.evidence-links {
  border-top-color: rgba(255, 255, 255, 0.14);
}

.evidence-links a {
  color: #72dccc;
}

.media-table thead th,
.evidence-table thead th {
  color: var(--muted);
  background: #f4f7fa;
}

.table-total td {
  color: var(--navy-900);
  background: #edf3ff;
}

.persona-card h3 {
  color: var(--navy-900);
  font-weight: 620;
  line-height: 1.1;
  text-transform: none;
}

.persona-quick {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}

.persona-quick > span {
  background: #f8fafc;
}

.persona-quick > span + span {
  border-left: 1px solid var(--line);
}

.persona-origin-summary {
  background: var(--navy-900);
}

.persona-origin-summary > span {
  color: #72dccc;
}

.persona-origin-summary.is-pending {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #f7f9fc;
}

.creative-hook,
.persona-detail {
  border-top: 1px solid var(--line);
}

.demographic-profile,
.persona-evidence {
  border-color: var(--line);
  background: #f8fafc;
}

.demographic-profile-head {
  border-bottom-color: var(--line);
}

.demographic-grid {
  background: var(--line);
}

.demographic-grid > span {
  background: #fff;
}

.share-ring {
  color: var(--navy-900);
  border: 1px solid #cbd6e6;
  border-radius: 9px;
  background: #f1f4f9;
  box-shadow: inset 3px 0 0 var(--persona);
}

.share-ring strong {
  color: var(--navy-900);
}

.origin-persona-head strong,
.place-persona-name {
  color: var(--navy-900);
  text-transform: none;
}

.origin-persona-body,
.place-persona-body {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.origin-profile-grid {
  border-color: var(--line);
  background: var(--line);
}

.origin-profile-grid > span {
  background: #fff;
}

.origin-profile-grid > span + span {
  border-left-color: var(--line);
}

.origin-confidence {
  color: #7b5a17;
  border-color: #ead7a8;
  border-radius: 999px;
  background: #fff8e6;
}

.origin-bar {
  height: 9px;
  border-color: var(--line);
  background: #e7ebf1;
}

.origin-demographics {
  background: var(--line);
}

.origin-demographics > span {
  background: #fff;
}

.origin-method {
  border-top-color: var(--line);
}

.origin-method > div span {
  background: #fff;
}

.origin-caution {
  background: var(--navy-900);
}

.origin-caution strong {
  color: #72dccc;
}

.dataset-card:nth-child(4n + 2),
.dataset-card:nth-child(4n + 3) {
  background: #fff;
}

.dataset-card-head {
  border-bottom-color: var(--line);
}

.dataset-card p {
  color: var(--muted);
}

.evidence-heading h3 {
  color: var(--navy-900);
  font-weight: 620;
  line-height: 1.1;
  text-transform: none;
}

.table-wrap,
.radar-stage,
.tablist {
  scrollbar-color: #aebad0 transparent;
  scrollbar-width: thin;
}

.need-table th:first-child,
.need-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 8px 0 12px -13px rgba(8, 21, 47, 0.7);
}

.need-table th:first-child {
  z-index: 2;
  background: #f5f7fa;
}

.need-table td:first-child {
  background: #fff;
}

@media (max-width: 1260px) {
  .workspace {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    padding-inline: 18px;
  }

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

  .scenario-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .scenario-inputs {
    width: 100%;
    flex-basis: auto;
    justify-content: flex-start;
  }

  .platform-briefs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .topbar {
    position: static;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 16px 14px 46px;
  }

  .builder {
    position: static;
    max-height: none;
  }

  .tablist {
    top: 0;
  }

  .overview-lead {
    grid-template-columns: 1fr;
  }

  .outcome-card {
    min-height: 220px;
  }

  .impact-case-grid {
    grid-template-columns: 1fr;
  }

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

  .activation-grid > section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 700px) {
  .topbar {
    align-items: flex-start;
    padding: 11px 12px;
  }

  .brand-sub {
    display: none;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .btn {
    flex: 1;
    padding-inline: 10px;
  }

  .builder-head,
  .form-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-card,
  .hero-content {
    min-height: 276px;
  }

  .hero-content {
    align-items: flex-start;
    flex-direction: column-reverse;
    justify-content: flex-end;
    padding: 22px 19px;
  }

  .hero-title {
    font-size: clamp(2.15rem, 11vw, 3.5rem);
  }

  .hero-desc {
    font-size: 0.86rem;
  }

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

  .metric {
    min-height: 96px;
    border-bottom: 1px solid var(--line);
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(n + 3) {
    border-bottom: 0;
  }

  .panel {
    padding: 20px 14px;
  }

  .panel-head,
  .module-heading,
  .subsection-heading {
    flex-direction: column;
  }

  .decision-grid,
  .readiness-strip,
  .need-priority-grid {
    grid-template-columns: 1fr;
  }

  .scenario-inputs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .comparison-table th,
  .comparison-table td {
    padding-inline: 10px;
  }

  .comparison-head > :last-child,
  .comparison-row > :last-child {
    display: none;
  }

  .scenario-attainment {
    grid-template-columns: 1fr auto;
  }

  .scenario-attainment > div {
    grid-column: 1 / -1;
  }

  .assumption-row {
    grid-template-columns: 1fr auto;
  }

  .assumption-row .provenance-badge {
    grid-column: 1 / -1;
  }

  .activation-toolbar,
  .activation-intro,
  .activation-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .activation-toolbar .select {
    width: 100%;
    min-width: 0;
  }

  .activation-meta {
    grid-template-columns: 1fr;
  }

  .utm-row {
    grid-template-columns: 1fr;
  }

  .utm-row code {
    white-space: normal;
  }

  .visual-card-head {
    align-items: stretch;
  }

  .persona-radar-svg {
    min-width: 480px;
  }

  .radar-table {
    min-width: 540px;
  }
}

@media (max-width: 430px) {
  .top-actions {
    flex-direction: column;
  }

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

  .metric,
  .metric:nth-child(2),
  .metric:nth-child(n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .hero-tags {
    display: none;
  }

  .panel-title {
    font-size: 1.55rem;
  }
}

@media print {
  :root,
  body {
    color: #111;
    background: #fff;
  }

  .topbar,
  .builder,
  .tablist,
  .activation-toolbar,
  .text-link,
  .utm-row .btn,
  .scenario-inputs {
    display: none !important;
  }

  .workspace {
    display: block;
    width: 100%;
    padding: 0;
  }

  .hero-card,
  .metric-strip,
  .output-card,
  .decision-brief,
  .outcome-card,
  .scenario-lab,
  .impact-module,
  .activation-card {
    border-color: #aaa;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .output-card {
    border: 0;
  }

  .panel,
  .panel[hidden] {
    display: block !important;
    padding: 22px 0;
    break-before: page;
  }

  .overview-lead,
  .activation-grid,
  .impact-case-grid {
    grid-template-columns: 1fr;
  }
}

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