/* Presentation only: existing behavior and backend are unchanged. */
/* ==========================================================================
   1. LIQUID GLASS TOKENS & CANVAS SETUP
   ========================================================================== */
:root {
  --green: #0F8A63;
  --green-2: #34B88A;
  --mint: #EAF7F2;
  --bg-soft: #F6F8F7;
  --ink: #111615;
  --muted: #69726F;
  --line: rgba(231, 235, 233, 0.7);

  /* Translucent Liquid Glass Plates (Not solid white) */
  --glass-hero: rgba(255, 255, 255, 0.72);
  --glass-card: rgba(255, 255, 255, 0.60);
  --glass-well: rgba(234, 247, 242, 0.45);

  /* Specular Rim Light + Deep Ambient Elevation */
  --liquid-sheen: inset 0 1px 1px 0 rgba(255, 255, 255, 0.95),
                  inset 0 -1px 1px 0 rgba(231, 235, 233, 0.3);
  --liquid-shadow: 0 20px 48px -12px rgba(17, 22, 21, 0.07),
                   0 2px 6px -1px rgba(17, 22, 21, 0.03);
}

/* 2. RE-ENABLE AMBIENT MESH CANVAS (CRITICAL FOR GLASS REFRACTION) */
body {
  background-color: var(--bg-soft) !important;
  background-image:
    radial-gradient(at 0% 0%, rgba(234, 247, 242, 0.9) 0px, transparent 45%),
    radial-gradient(at 95% 5%, rgba(52, 184, 138, 0.18) 0px, transparent 40%),
    radial-gradient(at 50% 50%, rgba(15, 138, 99, 0.05) 0px, transparent 60%),
    radial-gradient(at 80% 95%, rgba(234, 247, 242, 0.85) 0px, transparent 50%) !important;
  background-attachment: fixed !important;
  min-height: 100vh;
}

/* Do NOT hide the background pseudo-element if you want extra lighting blooms */
body::before {
  display: block !important;
  content: "";
  position: fixed;
  top: -15%;
  right: 10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(52, 184, 138, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
}

/* ==========================================================================
   2. MAIN WORKSPACE / HERO CARDS (LIQUID PLATES)
   ========================================================================== */
.workspace-overview,
.results .goal-overview {
  padding: 36px !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 32px !important;
  background: var(--glass-hero) !important;
  -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  box-shadow: var(--liquid-shadow), var(--liquid-sheen) !important;
}

/* ==========================================================================
   3. FLOATING TOP TABS & CONTROLS
   ========================================================================== */
.results .tab-ribbon {
  position: sticky;
  top: 16px;
  z-index: 20;
  margin: 0 0 28px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 9999px !important; /* Smooth pill curve */
  background: rgba(255, 255, 255, 0.65) !important;
  -webkit-backdrop-filter: blur(28px) saturate(170%) !important;
  backdrop-filter: blur(28px) saturate(170%) !important;
  box-shadow: 0 16px 36px -8px rgba(17, 22, 21, 0.06), var(--liquid-sheen) !important;
}

.results .tab-group-items .tab.active {
  border-color: rgba(52, 184, 138, 0.5) !important;
  background: rgba(234, 247, 242, 0.85) !important;
  color: var(--green) !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(15, 138, 99, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
  font-weight: 700;
}

/* ==========================================================================
   4. INSET ITEM WELLS (SETTINGS LIST & ROADMAP CARDS)
   ========================================================================== */
.results .profile-list {
  background: var(--glass-hero) !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: 32px !important;
  -webkit-backdrop-filter: blur(30px) saturate(170%) !important;
  backdrop-filter: blur(30px) saturate(170%) !important;
  box-shadow: var(--liquid-shadow), var(--liquid-sheen) !important;
}

.results .profile-list > .list-row,
.results .product-field,
.results .roadmap-field {
  background: var(--glass-well) !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 2px rgba(17, 22, 21, 0.02),
              0 2px 6px rgba(17, 22, 21, 0.015) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
}

/* ==========================================================================
   5. TACTILE LIQUID ACTION BUTTONS
   ========================================================================== */
.results .roadmap-view-products,
.country-segments button[aria-checked="true"],
.results .analysis-status-action {
  background: linear-gradient(180deg, #17996f 0%, #0F8A63 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 20px -4px rgba(15, 138, 99, 0.38),
              inset 0 1px 1px 0 rgba(255, 255, 255, 0.45) !important;
  border-radius: 9999px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.results .roadmap-view-products:hover,
.results .analysis-status-action:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 12px 24px -4px rgba(15, 138, 99, 0.45),
              inset 0 1px 2px 0 rgba(255, 255, 255, 0.6) !important;
}

/* Compatibility tokens used by the existing application styles. */
:root {
  --soft: var(--bg-soft);
  --amber: #B77608;
  --amber-bg: #FFF6E5;
  --red: #B24C45;
  --red-bg: #FFF0EF;
  --glass-shadow: var(--liquid-shadow);
  --glass-radius: 32px;
  --glass-card-radius: 24px;
}
body { isolation: isolate; }

.app-header {
  background: var(--glass-hero);
  border-bottom: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: 0 1px 0 rgba(231, 235, 233, .65);
}
.brand-mark { background: var(--green); border-radius: 10px; }
.analysis { background: transparent; }
.input-shell, .result-hero, .credibility, .summary-card, .goal-overview-scenario {
  background: var(--glass-hero);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--glass-radius);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .95), 0 0 0 1px rgba(231, 235, 233, .65), var(--glass-shadow);
}
.result-hero { padding: 28px; margin-bottom: 24px; gap: 20px; }
.credibility { overflow: hidden; margin-bottom: 28px; }
.summary-card { padding: 24px; }
.summary-card.accent { background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(234,247,242,.70)); }
.cred-grid { gap: 8px; padding: 12px; }
.cred-grid div, .cred-grid div:last-child {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .65);
  border-radius: 16px;
  padding: 16px 12px;
}
.cred-grid span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.confidence-ring {
  width: 100px;
  height: 100px;
  background: conic-gradient(from 0deg, var(--green-2), var(--green) calc(var(--score) * 1%), var(--line) 0);
  box-shadow: 0 4px 16px rgba(15,138,99,.08);
}
.confidence-ring::after { inset: 9px; background: #f6fbf8; }
.confidence-ring b { font-size: 32px; }
.confidence-ring span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.tabs { gap: 8px; }
.tab, .new-plan, .language-select__trigger, .examples button { border-radius: 16px; }
.tab.active { background: var(--mint); color: var(--green); border-color: rgba(52,184,138,.4); }
.language-select__menu { border-radius: 16px; border-color: var(--line); }
.language-select__option:hover, .language-select__option:focus-visible { background: var(--mint); }
.language-select__option.is-selected, .language-select__option[aria-selected="true"] { background: var(--green); }

.profile-list, .signal-list, .risk-list, .question-list, .source-table,
.product-card, .journey-step-content, .product-roadmap-item, .api-card,
.profile-card, .catalog-card, .catalog-modal-panel {
  background: var(--glass-card);
  border: 1px solid rgba(231, 235, 233, .8);
  border-radius: var(--glass-card-radius);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 4px 16px -2px rgba(17, 22, 21, .03);
}
.product-card { padding: 24px; transition: background .2s, border-color .2s, box-shadow .2s; }
.product-card:hover, .catalog-card:hover { background: rgba(234,247,242,.55); border-color: var(--green-2); }
.catalog-card-metric { background: rgba(234,247,242,.8); border-color: rgba(52,184,138,.4); border-radius: 16px; }
.catalog-card-metric strong { color: var(--green); }
.catalog-details-button { border-radius: 16px; background: var(--mint); border-color: rgba(52,184,138,.4); color: var(--green); }
.product-field span, .journey-field b, .roadmap-field b { color: var(--muted); font-size: 11px; }
.product-field p, .journey-field p, .roadmap-field p { font-size: 13px; line-height: 1.6; }
.product-side .score { color: var(--green); font-weight: 800; }
.profile-input, .clarification-input, .income-trigger,
.product-category-filter select, .universal-question input {
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: var(--glass-well);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
}
input[type="range"] { accent-color: var(--green); }
.input-shell:focus-within, .profile-input:focus, .clarification-input:focus,
.income-trigger:focus-visible, .product-category-filter select:focus,
.universal-question input:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15,138,99,.18);
}
.results button:focus-visible, .results summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.action-pill { min-height: 44px; background: var(--mint); border-color: rgba(52,184,138,.4); font-size: 12px; }
.action-pill--primary { background: var(--green); color: white; border-color: var(--green); }
.action-pill--primary:hover:not(:disabled) { background: #0d7554; }
.product-roadmap-item:has(.category-role.primary) {
  border: 1.5px solid var(--green-2);
  background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(234,247,242,.70));
}
.category-role.primary { background: var(--green); color: white; }
.journey-step { position: relative; }
.journey-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: -12px;
  width: 2px;
  background: linear-gradient(var(--green), var(--green-2), var(--line));
}
/* Steps express order only; do not imply completion without a data state. */
.journey-step-number { position: relative; background: rgba(255,255,255,.8); border: 1px solid var(--line); color: var(--muted); }
.journey-field { padding: 12px; background: rgba(255,255,255,.6); border: 1px solid var(--line); border-radius: 16px; }
.signal-list .list-row:nth-child(even), .universal-table tbody tr:nth-child(even) { background: rgba(234,247,242,.4); }
.status, .universal-status, .category-role { border-radius: 9999px; }
.status.success, .status.verified, .status.known, .status-VALID {
  background: rgba(234,247,242,.85); border: 1px solid rgba(52,184,138,.4); color: var(--green);
}
.status.warning, .status-WARNING, .status-REJECTED {
  background: rgba(255,246,229,.9); border: 1px solid rgba(183,118,8,.35); color: var(--amber);
}
.status.danger, .status-IMPOSSIBLE {
  background: rgba(255,240,239,.9); border: 1px solid rgba(178,76,69,.35); color: var(--red);
}
.status-INFO { background: rgba(255,255,255,.65); border: 1px solid var(--line); color: var(--muted); }
.universal-risk, .universal-alternatives, .fallback-notice-banner, .filter-banner {
  border-radius: 24px;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.universal-risk, .fallback-notice-banner, .filter-banner {
  background: rgba(255,246,229,.9); border: 1px solid rgba(183,118,8,.3); color: var(--amber);
}
.universal-alternatives { background: rgba(234,247,242,.85); border: 1px solid rgba(52,184,138,.4); color: var(--green); }

@media (max-width: 700px) {
  .result-hero { padding: 20px 16px; gap: 10px; }
  .summary-card, .product-card { padding: 20px; }
  .confidence-ring { width: 90px; height: 90px; margin-left: 0; }
  .confidence-ring b { font-size: 26px; }
  .confidence-ring span { font-size: 9px; }
  .cred-grid { gap: 6px; padding: 8px; }
  .cred-grid div { min-width: 0; padding: 12px 10px; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-hero: #fff; --glass-card: #fff; --glass-well: #f6f8f7; }
  body::before { display: none; }
}

/* Adapted from the supplied React workspace. Existing controls own all state. */
::selection { background: var(--mint); color: var(--green); }
body:has(#results:not(.hidden)) .app-header {
  top: 16px;
  width: min(1152px, calc(100% - 48px));
  margin: 24px auto 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(17,22,21,.03);
}
body:has(#results:not(.hidden)) .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  padding-bottom: 12px;
  background: linear-gradient(45deg, var(--green), var(--green-2));
  box-shadow: 0 4px 12px rgba(15,138,99,.2);
}
/* One country toggle across planner views and viewport sizes. */
.country-segments,
body:has(#results:not(.hidden)) .country-segments {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e2e9e5;
  border-radius: 999px;
  background: #eff3f0;
  max-width: 100%;
}
.country-segments button,
body:has(#results:not(.hidden)) .country-segments button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #707b77;
  font: 600 12px var(--font-ui);
  white-space: nowrap;
}
.country-segments button[aria-checked="true"],
body:has(#results:not(.hidden)) .country-segments button[aria-checked="true"] {
  box-shadow: 0 1px 4px #0f8a6340, inset 0 1px 1px #ffffff70 !important;
}
@media (pointer: coarse) {
  .country-segments button { min-height: 44px; }
}

.results {
  width: min(1200px, 100%);
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 96px;
}
.results .analysis-status-banner {
  border-radius: 24px;
  padding: 18px 20px;
  margin: 0 0 24px;
  line-height: 1.6;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.results .analysis-status-banner[data-status="NEEDS_CLARIFICATION"],
.results .analysis-status-banner.needs-clarification {
  background: rgba(255,246,229,.9);
  border-color: rgba(183,118,8,.3);
}
.results .analysis-status-action {
  padding: 10px 14px;
  border: 1px solid rgba(183,118,8,.3);
  border-radius: 16px;
  background: rgba(183,118,8,.15);
  color: var(--amber);
  font-size: 12px;
  text-decoration: none;
}
.results .analysis-status-action:hover { background: rgba(183,118,8,.25); }
.results .execution-mode-banner { border-radius: 24px; font-size: 13px; line-height: 1.6; }
.results .execution-mode-banner--hybrid { background: rgba(234,247,242,.85); border-color: rgba(52,184,138,.4); color: var(--ink); }
.results .analysis-status-banner[data-status="COMPLETE"],
.results .analysis-status-banner[data-status="DETERMINISTIC_COMPLETE"] { background: rgba(234,247,242,.85); border-color: rgba(52,184,138,.4); }
.results .tabs { padding: 0; gap: 12px; }
.results .tab-group { gap: 4px; padding: 4px 0; }
.results .tab-group-title {
  margin: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .1em;
}
.results .tab-group-items { gap: 4px; border: 0; border-radius: 16px; }
.results .tab-group-items .tab { border: 1px solid transparent; padding: 10px 14px; font-size: 12px; }
.results .tab:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.results .tab.active::after { display: none; }
.results .tab span { width: 22px; height: 22px; border-radius: 8px; font-size: 10px; }
.results .tab.active span { background: var(--green); color: white; }
.results .tab-arrow { border-radius: 16px; background: transparent; }
/* Match the reference's screen views while retaining every live metric node. */
.results:has(.tab.active:not([data-tab="summary"])) .workspace-overview { display: none; }
.workspace-overview .result-hero, .workspace-overview .credibility {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  margin: 0;
  padding: 0;
}
.workspace-overview .result-hero { padding-bottom: 28px; gap: 32px; }
.result-heading { min-width: 0; }
.results .result-kicker { color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.results .result-heading h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 800; line-height: 1.15; letter-spacing: -.035em; margin: 16px 0; }
.results #resultSubtitle { font-size: 14px; line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.results .result-tags { gap: 8px; }
.results .result-tags > span { border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; background: rgba(255,255,255,.8); color: var(--ink); font-size: 12px; }
.workspace-overview .confidence-ring { width: 128px; height: 128px; margin: 12px; flex-shrink: 0; outline: 12px solid rgba(255,255,255,.6); }
.workspace-overview .credibility { border-top: 1px solid var(--line); padding-top: 20px; overflow: visible; }
.results .cred-title { padding: 0 0 14px; font-size: 12px; }
.results .cred-title small { font-size: 11px; }
.workspace-overview .cred-grid { padding: 0; gap: 12px; }
.workspace-overview .cred-grid > div { padding: 14px; border: 1px solid var(--line); }
.workspace-overview .cred-grid b { font-size: 22px; font-weight: 800; }
.results .confidence-key { margin-top: 16px; padding: 12px 0 0; flex-wrap: wrap; }
.results .tab-content { padding-top: 24px; }
.results .section-intro { padding-bottom: 20px; border-bottom: 1px solid var(--line); gap: 16px; }
.results .section-intro h2 { font-size: 26px; font-weight: 700; }
.results .section-intro p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.results .evidence-chip { border-radius: 12px; padding: 6px 10px; font-size: 11px; }
.results .summary-grid { gap: 24px; }
.results .summary-card { border-radius: 28px; }
.results .summary-card p, .results .main-finding-list li { font-size: 13px; line-height: 1.7; }
.results .summary-card > span { font-size: 11px; color: var(--muted); }
.results .summary-card > b { font-size: 20px; }
.results .profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
  padding: 24px;
  overflow: visible;
  border-radius: 32px;
  background: var(--glass-hero);
}
.results .profile-list > .list-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-content: start;
  align-items: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.6);
}
.results .profile-list > .list-row:has(.location-combobox.is-open) {
  position: relative;
  z-index: 1;
}
.results .profile-list > .list-row > :is(span, label) { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.results .profile-list > .list-row > div { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
.results .profile-list > .list-row > .status { grid-column: 2; grid-row: 1; }
.results .profile-list > .profile-row--required-missing { background: var(--red-bg); border-color: rgba(178,76,69,.3); }
.results .status { padding: 5px 8px; font-size: 10px; font-style: normal; font-weight: 700; white-space: normal; }
.results .status.required-missing { background: var(--red-bg); color: var(--red); border: 1px solid rgba(178,76,69,.3); }
.results .status.medium { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(183,118,8,.3); }
.results .profile-fx-note, .results .clarification-error { font-size: 11px; line-height: 1.5; }
.results .clarification-actions > small { font-size: 12px; line-height: 1.6; }
.results .profile-input { padding: 10px 12px; }
.results .journey-step-list { gap: 24px; }
.results .journey-step { grid-template-columns: 48px minmax(0,1fr); gap: 20px; }
.results .journey-step-number { width: 48px; height: 48px; border-radius: 16px; font-size: 14px; font-weight: 700; }
.results .journey-step:not(:last-child)::before { left: 23px; top: 48px; bottom: -24px; }
.results .journey-step-content { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 20px; }
.results .journey-step-content h3 { grid-column: 1 / -1; margin: 0 0 4px; font-size: 16px; line-height: 1.5; }
.results .journey-field { margin: 0; background: var(--glass-well); }
.results .journey-field p { color: var(--ink); font-size: 12px; }
.results .product-roadmap-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.results .product-roadmap-item { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.results .roadmap-content { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.results .roadmap-stage { font-size: 11px; letter-spacing: .08em; }
.results .roadmap-heading { flex-wrap: wrap; }
.results .roadmap-heading h3 { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.results .category-role { max-width: 100%; font-size: 10px; padding: 6px 10px; white-space: normal; }
.results .roadmap-field { padding: 14px; background: rgba(246,248,247,.65); border: 1px solid var(--line); border-radius: 16px; }
.results .roadmap-content > p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.results .roadmap-view-products { min-height: 44px; border-radius: 16px; background: var(--mint); color: var(--green); border-color: rgba(52,184,138,.4); font-size: 12px; font-weight: 700; }
.results .product-list { gap: 16px; }
.results .product-top { gap: 12px; }
.results .product-icon { width: 48px; height: 48px; flex-basis: 48px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.results .product-top h3 { font-size: 16px; line-height: 1.5; }
.results .product-top p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.results .product-fields { gap: 12px; }
.results .product-field { padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.6); min-width: 0; }
.results .product-side { gap: 12px; }
.results .product-side .score { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid rgba(52,184,138,.4); border-radius: 50%; background: var(--mint); font-size: 20px; }
.results .product-side small, .results .source-link { font-size: 11px; line-height: 1.5; }
.results .evidence-points li { font-size: 12px; line-height: 1.6; }
.results .signal-list .list-row, .results .risk-list .list-row { font-size: 13px; line-height: 1.6; gap: 16px; }
.results .signal-list .list-row > span { color: var(--muted); }
.results .signal-value small { font-size: 11px; }
.results .goal-overview > h2 { margin: 28px 0 16px; font-size: 20px; }
.results .goal-overview .universal-table-scroll { border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.6); }
.results .goal-overview .universal-table { font-size: 13px; }
.results .goal-overview-scenario { padding: 20px; border-radius: 24px; }
.results .goal-overview-scenario h3 { font-size: 16px; }

@media (max-width: 1000px) {
  .results .journey-step-content { grid-template-columns: 1fr; }
}
@media (max-width: 1279px) {
  .results .tab-ribbon { position: relative; top: auto; }
}
@media (max-width: 700px) {
  body:has(#results:not(.hidden)) .app-header { position: relative; top: auto; width: calc(100% - 24px); margin: 12px auto 0; padding: 12px; }
  .results { padding: 20px 12px 64px; }
  .workspace-overview { padding: 20px; }
  .workspace-overview .result-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .workspace-overview .confidence-ring { align-self: center; width: 112px; height: 112px; margin: 12px 0 24px; }
  .workspace-overview .cred-grid { gap: 8px; }
  .workspace-overview .cred-grid > div { padding: 12px; }
  .results .cred-title { align-items: flex-start; gap: 10px; }
  .results .profile-list { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .results .product-roadmap-list { grid-template-columns: 1fr; gap: 16px; }
  .results .journey-step { grid-template-columns: 36px minmax(0,1fr); gap: 10px; }
  .results .journey-step-number { width: 36px; height: 36px; border-radius: 12px; }
  .results .journey-step:not(:last-child)::before { left: 17px; top: 36px; }
  .results .journey-step-content { padding: 16px; }
  .results .section-intro { flex-direction: column; align-items: flex-start; }
  .results .section-intro h2 { font-size: 23px; }
  .results .goal-overview { padding: 16px; }
  .results .goal-overview .universal-table th, .results .goal-overview .universal-table td { padding: 10px; }
  .results .goal-overview-scenario { padding: 14px; }
}

/* Full-width navigation; retain the existing content column. */
body:has(#results:not(.hidden)) .app-header {
  width:100%; max-width:none; margin:0; border-radius:0;
  box-sizing:border-box; padding:16px clamp(12px,2vw,32px);
}
.results .tab-ribbon {
  width:calc(100vw - 16px); margin-left:calc(50% - 50vw + 8px);
  box-sizing:border-box; min-width:0;
}
.results .tabs { min-width:0; }
@media (min-width:1280px) {
  .results .tabs { justify-content:space-between; }
  .results .tab-group { flex:1 0 auto; }
  .results .tab-group-items { justify-content:space-evenly; }
}
@media (max-width:700px) {
  body:has(#results:not(.hidden)) .app-header { width:100%; margin:0; padding:12px; flex-wrap:wrap; gap:12px; }
  body:has(#results:not(.hidden)) .app-header .header-meta { flex-wrap:wrap; min-width:0; max-width:100%; }
}
/* Progressive disclosure is scoped to goal overview alternatives. */
.results .goal-overview-scenario.liquid-card,
.goal-scenario-sheet.liquid-card {
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 32px;
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  backdrop-filter: blur(32px) saturate(180%);
  box-shadow: var(--liquid-shadow), var(--liquid-sheen);
  color: var(--ink);
}
.results .goal-overview-scenario.featured { border-color: var(--green-2); }
.goal-overview-scenario .goal-scenario-payment { font-size: clamp(24px,3vw,36px); font-weight: 700; margin: 16px 0; overflow-wrap: anywhere; }
.goal-scenario-payment small { font-size: 13px; font-weight: 400; color: var(--muted); }
.goal-scenario-status { display: inline-block; border-radius: 999px; padding: 6px 12px; background: var(--mint); color: var(--green); font-size: 13px; }
.goal-scenario-status.status-EXCEEDS_CAPACITY { background: #FFF0EF; color: #B24C45; }
.goal-scenario-status.status-NEEDS_CLARIFICATION,
.goal-scenario-status.status-NOT_CALCULABLE { background: #FFF6E5; color: #B77608; }
.goal-scenario-evidence { color: var(--muted); font-size: 12px; }
.goal-overview-scenario .diff-chips { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 16px 0; }
.goal-overview-scenario .diff-chips > div { min-width: 0; padding: 12px 8px; background: var(--glass-well); border: 1px solid rgba(255,255,255,.75); border-radius: 16px; box-shadow: inset 0 1px 2px rgba(17,22,21,.02); }
.goal-overview-scenario dt { color: var(--muted); font-size: 12px; }
.goal-overview-scenario dd { margin: 6px 0 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.goal-overview-scenario .liquid-btn-details { background: var(--mint); color: var(--green); border-radius: 999px; min-height: 44px; }
.goal-overview-scenario .liquid-btn-details:hover { background: var(--green); color: white; }
.goal-scenarios-more { margin-top: 16px; }
.goal-scenarios-more > summary { width: fit-content; padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); color: var(--green); cursor: pointer; }
.goal-scenarios-more .goal-overview-scenarios { margin-top: 16px; }
.goal-scenarios-more:not([open]) .goal-show-fewer,
.goal-scenarios-more[open] .goal-show-all { display: none; }
.goal-scenario-sheet { box-sizing: border-box; width: min(640px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 24px; overflow: auto; overscroll-behavior: contain; }
.goal-scenario-sheet::backdrop { background: rgba(17,22,21,.24); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.goal-scenario-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.goal-scenario-sheet > header h3 { margin: 0; }
.goal-scenario-sheet .liquid-btn-primary { background: linear-gradient(135deg,var(--green),#087451); color: white; border-radius: 999px; min-height: 44px; box-shadow: inset 0 1px 1px rgba(255,255,255,.5); }
.goal-scenario-sheet button:focus-visible,
.goal-overview-scenario button:focus-visible,
.goal-scenarios-more > summary:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
@media (max-width:700px) { .goal-scenario-sheet { padding: 16px; } }

/* Shared result layout is independent of prompt, market and response mode. */
.results .result-view { min-width: 0; line-height: 1.6; }
.results .result-view > h2, .results .result-view > section > h2 { font-size: 20px; margin: 0 0 20px; }
.results .result-view .goal-overview-explanation { white-space: pre-line; }
.results .result-view .account-product { margin: 16px 0; padding: 24px; }
.results .result-view .account-profile { min-width: 0; }
.results .result-view .account-guidance .summary-card { margin: 16px 0; padding: 24px; }
.results .result-view .universal-table td { overflow-wrap: anywhere; }
