:root {
  font-family: Montserrat, "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #102f4f;
  background: #f4f8fc;
  font-synthesis: none;
  --deep-navy: #07203f;
  --navy: #0a2c50;
  --blue: #1e6fd0;
  --blue-dark: #185cad;
  --teal: #008bbf;
  --cyan: #3fc6ff;
  --cyan-ink: #0d6f96;
  --ice: #eaf6ff;
  --white: #ffffff;
  --ink: #102f4f;
  --muted: #5b7087;
  --subtle: #61778d;
  --line: #d8e4ef;
  --line-strong: #c3d3e2;
  --surface: #ffffff;
  --surface-muted: #f7fafc;
  --success: #147a62;
  --success-bg: #e7f6f1;
  --warning: #956316;
  --warning-bg: #fff5dc;
  --danger: #a43e48;
  --danger-bg: #fff0f1;
  --shadow-sm: 0 1px 2px rgba(7, 32, 63, .04), 0 5px 18px rgba(7, 32, 63, .045);
  --shadow-md: 0 18px 48px rgba(7, 32, 63, .12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar: 288px;
  --header: 72px;
  --content: 1480px;
}

* { box-sizing: border-box; }
html { background: var(--deep-navy); }
body { margin: 0; min-height: 100vh; font-size: 15px; line-height: 1.55; background: #f4f8fc; }
body.nav-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: var(--cyan-ink); text-decoration: none; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
::selection { color: var(--deep-navy); background: rgba(63, 198, 255, .42); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, .table-wrap:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; color: var(--deep-navy); font-size: clamp(2rem, 3.2vw, 3rem); font-weight: 600; line-height: 1.14; letter-spacing: -.04em; }
h1:focus { outline: none; }
h2 { margin-bottom: 12px; color: var(--navy); font-size: 1.15rem; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
h3 { color: var(--navy); font-size: 1rem; font-weight: 600; }
small { font-size: .78rem; }
.muted, .helper { color: var(--muted); }
.helper { margin-top: 12px; font-size: .79rem; line-height: 1.65; }
.eyebrow { margin-bottom: 12px; color: var(--cyan-ink); font-size: .7rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 24px 20px;
  color: #d9e8f5;
  background: var(--deep-navy);
  border-right: 1px solid rgba(255,255,255,.08);
}
.brand { display: block; min-height: 116px; padding: 2px 0 20px; color: white; }
.brand:hover { color: white; text-decoration: none; }
.brand img { display: block; width: 240px; max-width: 100%; height: auto; }
.brand > span { display: block; margin: -10px 0 0 55px; color: #9fb7cd; font-size: .67rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { display: flex; flex: 1; flex-direction: column; gap: 22px; padding-top: 10px; }
.nav-section { display: flex; flex-direction: column; gap: 3px; }
.nav-label { margin: 0 12px 7px; color: #7793ae; font-size: .65rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.sidebar nav a { display: flex; min-height: 42px; align-items: center; gap: 12px; padding: 9px 12px; color: #c6d7e6; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 500; }
.sidebar nav a:hover { color: white; background: rgba(255,255,255,.055); text-decoration: none; }
.sidebar nav a[aria-current] { color: white; background: rgba(30,111,208,.3); border-color: rgba(63,198,255,.22); box-shadow: inset 3px 0 0 var(--cyan); }
.nav-indicator { width: 9px; height: 9px; flex: 0 0 auto; border: 1px solid #6886a1; border-radius: 50%; }
.sidebar nav a[aria-current] .nav-indicator { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(63,198,255,.12); }
.sidebar-bottom { display: grid; grid-template-columns: 38px minmax(0,1fr) 9px; align-items: center; gap: 11px; margin-top: 26px; padding: 20px 10px 4px; border-top: 1px solid rgba(255,255,255,.11); }
.avatar { display: grid; width: 38px; height: 38px; place-items: center; color: var(--deep-navy); background: var(--cyan); border-radius: 50%; font-size: .68rem; font-weight: 700; }
.identity { min-width: 0; }
.identity strong { display: block; overflow: hidden; color: white; font-size: .78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.identity small { display: block; overflow: hidden; color: #8fa9c0; text-overflow: ellipsis; white-space: nowrap; }
.session-dot { width: 8px; height: 8px; background: #5bd7aa; border: 2px solid rgba(91,215,170,.2); border-radius: 50%; box-shadow: 0 0 0 3px rgba(91,215,170,.1); }
.nav-backdrop { display: none; }

.workspace { width: calc(100% - var(--sidebar)); min-width: 0; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 25; display: flex; height: var(--header); align-items: center; justify-content: space-between; gap: 24px; padding: 0 40px; color: var(--muted); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.topbar-context { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar-context > span { color: var(--subtle); font-size: .66rem; font-weight: 700; letter-spacing: .13em; }
.topbar-context > span:after { content: "/"; margin-left: 11px; color: var(--line-strong); }
.topbar-context strong { overflow: hidden; color: var(--navy); font-size: .83rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.topbar-end { display: flex; align-items: center; gap: 20px; }
.text-button { min-width: 44px; min-height: 44px; padding: 8px 0; color: var(--cyan-ink); background: none; border: 0; font-size: .78rem; font-weight: 600; }
.text-button:hover { color: var(--blue); }
.environment { display: inline-flex; min-height: 30px; align-items: center; gap: 8px; padding: 5px 12px; color: var(--muted); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 999px; font-size: .7rem; font-weight: 600; }
.environment > span { width: 7px; height: 7px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 3px rgba(20,122,98,.1); }
.menu-toggle { display: none; min-height: 42px; align-items: center; gap: 9px; padding: 8px 12px; color: var(--navy); background: white; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: .76rem; font-weight: 600; }
.menu-toggle > span:first-child, .menu-toggle > span:first-child:before, .menu-toggle > span:first-child:after { display: block; width: 15px; height: 1.5px; background: currentColor; content: ""; }
.menu-toggle > span:first-child { position: relative; }
.menu-toggle > span:first-child:before { position: absolute; top: -5px; }
.menu-toggle > span:first-child:after { position: absolute; top: 5px; }
.sandbox-notice { display: flex; min-height: 42px; align-items: center; gap: 10px; padding: 9px 40px; color: #375a78; background: var(--ice); border-bottom: 1px solid #cfe8f8; font-size: .76rem; }
.sandbox-notice strong { color: var(--navy); font-weight: 600; }
.sandbox-notice > span:last-child { color: var(--muted); }
.notice-dot { width: 8px; height: 8px; flex: 0 0 auto; background: var(--cyan-ink); border-radius: 50%; }

.page { width: 100%; max-width: var(--content); min-height: calc(100vh - 156px); margin: 0 auto; padding: 48px 40px 56px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.page-heading-copy { max-width: 780px; }
.lead { max-width: 750px; margin-bottom: 0; color: var(--muted); font-size: .93rem; line-height: 1.72; }
.page-action { flex: 0 0 auto; padding-bottom: 2px; }
.page-action .btn { white-space: nowrap; }

.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; color: var(--navy); background: white; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 600; line-height: 1.2; text-align: center; transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.btn:hover { color: var(--navy); text-decoration: none; transform: translateY(-1px); }
.btn.primary { color: white; background: var(--blue); border-color: var(--blue); box-shadow: 0 6px 16px rgba(30,111,208,.16); }
.btn.primary:hover { color: white; background: var(--blue-dark); border-color: var(--blue-dark); }
.btn.secondary { color: var(--navy); background: white; border-color: var(--line-strong); }
.btn.secondary:hover { border-color: #8fb6d8; background: var(--ice); }
.btn.danger { color: white; background: var(--danger); border-color: var(--danger); }

.filter-bar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.filter-bar .field { min-width: 190px; margin-bottom: 0; }
.filter-bar .field:first-child { flex: 1 1 280px; }
.filter-bar .check { margin: 0; padding: 11px 4px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field > span { color: #385776; font-size: .76rem; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: white; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9ab7d1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,111,208,.1); }
.field textarea { min-height: 118px; resize: vertical; line-height: 1.55; }
.field input[type=file] { max-width: 100%; padding: 8px; font-size: .78rem; }
.check { display: flex; min-height: 44px; align-items: center; gap: 10px; margin-bottom: 13px; color: #385776; font-size: .8rem; }
.check input { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); }
.check span { line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; }
.form-grid .wide, .form-grid fieldset, .form-grid .form-actions { grid-column: 1/-1; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
fieldset { margin: 0 0 20px; padding: 18px 18px 5px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
legend { padding: 0 7px; color: #385776; font-size: .76rem; font-weight: 600; }
fieldset .check { display: inline-flex; margin-right: 18px; }

.section-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; color: var(--muted); font-size: .78rem; }
.section-line h2 { margin: 0; }
.comparison-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -8px 0 22px; padding: 15px 18px; color: #385776; background: var(--ice); border: 1px solid #cfe8f8; border-radius: var(--radius-sm); }
.comparison-summary strong { color: var(--navy); font-size: .82rem; }
.comparison-summary p { margin: 3px 0 0; font-size: .76rem; }
.btn:disabled { color: var(--subtle); background: var(--surface-muted); border-color: var(--line); box-shadow: none; cursor: not-allowed; transform: none; }
.offer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.offer-card { position: relative; display: flex; min-width: 0; flex-direction: column; padding: 25px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.offer-card:before { position: absolute; inset: 0 0 auto; height: 3px; background: var(--blue); content: ""; }
.offer-card:hover { border-color: #b8cfe3; box-shadow: 0 14px 32px rgba(7,32,63,.09); transform: translateY(-2px); }
.offer-top { display: flex; min-height: 45px; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.offer-brand { min-width: 0; flex: 1 1 150px; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.offer-category { margin-bottom: 9px; color: var(--cyan-ink); font-size: .65rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.offer-card h2 { margin-bottom: 14px; font-size: 1.38rem; line-height: 1.25; letter-spacing: -.025em; }
.offer-card > p { min-height: 70px; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.price { display: flex; align-items: baseline; gap: 7px; margin-top: 12px; }
.price strong { color: var(--deep-navy); font-size: 2rem; font-weight: 600; line-height: 1.1; letter-spacing: -.04em; }
.price span { color: var(--subtle); font-size: .72rem; }
.offer-card > p.renewal { min-height: 20px; margin: 5px 0 22px; color: var(--subtle); font-size: .72rem; }
.offer-card details { margin-bottom: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .78rem; }
.offer-card summary { display: flex; min-height: 44px; align-items: center; color: var(--cyan-ink); cursor: pointer; font-weight: 600; line-height: 1.6; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

.panel { min-width: 0; margin-bottom: 22px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 21px; }
.panel-heading h2 { margin-bottom: 0; }
.panel-action { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; }
.panel-action .btn { min-height: 44px; padding: 9px 12px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.metric { position: relative; min-width: 0; min-height: 142px; padding: 21px 22px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric:after { position: absolute; top: 20px; right: 20px; width: 9px; height: 9px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 0 5px rgba(63,198,255,.12); content: ""; }
.metric p { max-width: calc(100% - 28px); margin: 0 0 13px; color: var(--muted); font-size: .76rem; font-weight: 500; }
.metric strong { display: block; color: var(--deep-navy); font-size: 1.85rem; font-weight: 600; line-height: 1.15; letter-spacing: -.035em; }
.metric small { display: block; margin-top: 11px; color: var(--subtle); font-size: .7rem; line-height: 1.5; }
.metrics.compact { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 20px; }
.two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }

.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: #aac4dc transparent; scrollbar-width: thin; }
.table-wrap:focus-visible { border-radius: 4px; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: .8rem; text-align: left; }
th { padding: 0 13px 13px; color: var(--subtle); border-bottom: 1px solid var(--line-strong); font-size: .65rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
td { max-width: 320px; padding: 16px 13px; color: #2d4c69; border-bottom: 1px solid #e8eff5; overflow-wrap: anywhere; vertical-align: middle; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfe; }
td strong { color: var(--navy); font-weight: 600; }
td small { display: block; margin-top: 4px; color: var(--subtle); font-size: .68rem; }
.row-link { font-weight: 600; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .btn { min-height: 44px; padding: 8px 10px; font-size: .7rem; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: .72rem; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; color: #496078; background: #edf2f6; border-radius: 999px; font-size: .68rem; font-weight: 700; line-height: 1.25; overflow-wrap: normal; white-space: nowrap; }
.pill:before { width: 6px; height: 6px; flex: 0 0 auto; background: currentColor; border-radius: 50%; content: ""; opacity: .78; }
.pill.good { color: var(--success); background: var(--success-bg); }
.pill.warning { color: var(--warning); background: var(--warning-bg); }
.pill.danger { color: var(--danger); background: var(--danger-bg); }
.pill.neutral { color: #496078; background: #edf2f6; }
.details { margin: 0; }
.details > div { display: grid; grid-template-columns: minmax(130px,38%) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid #e8eff5; font-size: .8rem; }
.details > div:last-child { border: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--navy); font-weight: 500; overflow-wrap: anywhere; }

.empty { padding: 54px 24px; color: var(--muted); text-align: center; }
.empty h3 { margin: 12px 0 7px; }
.empty p { max-width: 430px; margin: 0 auto 22px; font-size: .8rem; }
.empty-symbol { position: relative; display: grid; width: 44px; height: 44px; place-items: center; margin: 0 auto; border: 1px solid #acd4ea; border-radius: 50%; }
.empty-symbol:before, .empty-symbol:after, .empty-symbol span { position: absolute; border: 1px solid #c7e3f2; border-radius: 50%; content: ""; }
.empty-symbol:before { width: 28px; height: 10px; transform: rotate(28deg); }
.empty-symbol:after { width: 10px; height: 28px; transform: rotate(28deg); }
.empty-symbol span { width: 5px; height: 5px; background: var(--cyan); border: 0; }

.advisor-layout { display: grid; grid-template-columns: minmax(310px,.8fr) minmax(360px,1.2fr); gap: 24px; align-items: start; container: advisor-layout / inline-size; }
.advisor-layout > .panel, .checkout-summary { position: sticky; top: 96px; }
.recommendations { min-width: 0; }
.recommendations .offer-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); }
.recommendations .offer-card { margin-bottom: 18px; }
.advisor-enrollment { grid-column: 1/-1; }
.match { margin-bottom: 20px; padding: 13px 16px; color: #345671; background: var(--ice); border-left: 3px solid var(--cyan-ink); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .8rem; }
.match strong { color: var(--navy); }
.match ul { margin: 8px 0 0; padding-left: 18px; font-size: .76rem; line-height: 1.8; }
.checkout-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.85fr); gap: 24px; align-items: start; }
.cart-price { margin-bottom: 16px; color: var(--navy); font-size: 1.3rem; font-weight: 600; }
.total { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0; padding: 19px 0; border-block: 1px solid var(--line); }
.total span { color: var(--muted); font-size: .78rem; }
.total strong { color: var(--deep-navy); font-size: 1.45rem; }
.status-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 23px; padding: 17px 20px; color: #375a78; background: var(--ice); border: 1px solid #cfe8f8; border-radius: var(--radius); }
.status-banner p { min-width: 220px; flex: 1; margin: 0; font-size: .8rem; }
.status-banner small { width: 100%; color: var(--muted); }
.mode-banner { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; padding: 17px 20px; color: #375a78; background: var(--ice); border: 1px solid #cfe8f8; border-radius: var(--radius); }
.mode-banner > div { flex: 1; }
.mode-banner strong { color: var(--navy); font-size: .82rem; }
.mode-banner p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.payment-mode > div { flex: 1 1 320px; }
.mode-note { min-height: auto !important; margin: -10px 0 18px !important; padding: 7px 9px; color: #48647e !important; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 6px; font-size: .7rem !important; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; gap: 17px; padding: 0 0 25px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child):before { position: absolute; top: 13px; bottom: 0; left: 5px; width: 1px; background: #cce0ef; content: ""; }
.timeline-dot { z-index: 1; width: 11px; height: 11px; flex: 0 0 auto; margin-top: 6px; background: var(--cyan-ink); border: 2px solid var(--ice); border-radius: 50%; box-shadow: 0 0 0 1px #83b9d6; }
.timeline strong { display: block; color: var(--navy); font-size: .8rem; font-weight: 600; }
.timeline small { display: block; margin: 4px 0; color: var(--subtle); font-size: .68rem; }
.timeline p { margin: 7px 0 0; color: var(--muted); font-size: .75rem; }
.notes article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.notes article:first-child { padding-top: 0; }
.notes article p { margin-bottom: 5px; font-size: .8rem; white-space: pre-wrap; }
.notes article small { color: var(--subtle); }
.notes + form { margin-top: 20px; }
.pagination { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.state-list > div:not(.empty) { display: grid; grid-template-columns: 150px 1fr 30px; align-items: center; gap: 16px; padding: 11px 0; }
.state-list strong { color: var(--navy); font-size: .78rem; text-align: right; }
meter { width: 100%; height: 12px; accent-color: var(--blue); }

.knowledge-query .panel { border-top: 3px solid var(--blue); }
.knowledge-query .field textarea { min-height: 92px; }
.answer { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }
.answer-text { font-size: .86rem; line-height: 1.85; }
.answer-text p, .document-text p { margin-bottom: 1em; }
.answer-text ul, .answer-text ol, .document-text ul, .document-text ol { padding-left: 24px; }
.answer-text code, .document-text code { padding: 1px 4px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 4px; }
.answer-unavailable { padding: 18px; background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.citations { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.citations article { padding: 17px; background: var(--ice); border: 1px solid #d7eaf6; border-radius: var(--radius-sm); }
.citations article > strong { display: block; margin-top: 8px; color: var(--navy); font-size: .76rem; }
.citations p { margin: 9px 0; color: var(--muted); font-size: .76rem; line-height: 1.75; }
.citations small { color: var(--subtle); font-size: .68rem; }
.document-text { font-size: .85rem; line-height: 1.8; }
.stale-notice, .governance-warning, .formula-note { margin-bottom: 18px; padding: 13px 15px; color: #6f4b11; background: var(--warning-bg); border: 1px solid #efd89c; border-radius: var(--radius-sm); font-size: .78rem; }
.stale { opacity: .86; }
.match.over-budget { background: var(--warning-bg); border-left-color: var(--warning); }
.budget-notice { margin-bottom: 18px; padding: 14px 16px; color: #6f4b11; background: var(--warning-bg); border: 1px solid #efd89c; border-radius: var(--radius-sm); }
.budget-notice strong { color: #70490d; font-size: .82rem; }
.budget-notice p { margin: 3px 0 0; font-size: .76rem; line-height: 1.55; }
.recommendation-group { margin-top: 18px; }
.ineligible-results { margin-top: 22px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ineligible-results > summary { display: flex; min-height: 44px; align-items: center; color: var(--cyan-ink); font-weight: 600; cursor: pointer; }
.ineligible-results .offer-grid { margin-top: 18px; }
.catalog-form > fieldset { margin-bottom: 22px; padding: 20px 20px 8px; }
.catalog-form > fieldset > legend { color: var(--navy); font-size: .85rem; }
.catalog-form > .form-actions { position: sticky; bottom: -25px; z-index: 2; margin: 0 -25px -25px; padding: 14px 25px; background: rgba(255,255,255,.98); border-top: 1px solid var(--line); }
.promotion-settings[hidden] { display: none; }
.copyable { user-select: all; font-family: "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.payments-table table { min-width: 900px; }
.payment-order-cell { width: 180px; min-width: 180px; overflow-wrap: normal; }
.payment-order-reference { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.payment-order-link { min-width: 0; overflow: hidden; font-family: "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.payment-order-reference .btn { min-height: 44px; flex: 0 0 auto; padding: 8px 10px; font-size: .67rem; }
.audit-filters .field { flex: 1 1 180px; }
.error { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; padding: 17px 18px; color: var(--danger); background: var(--danger-bg); border: 1px solid #f0cfd3; border-radius: var(--radius-sm); }
.error strong { font-size: .8rem; font-weight: 600; }
.error small { font-size: .68rem; overflow-wrap: anywhere; }
.loading { padding: 70px 20px; color: var(--muted); font-size: .83rem; text-align: center; }
.loading:before { display: block; width: 28px; height: 28px; margin: 0 auto 19px; border: 2px solid #cce6f6; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; content: ""; }
@keyframes spin { to { transform: rotate(360deg); } }

#toast { position: fixed; bottom: 24px; left: 50%; z-index: 100; max-width: min(90vw,560px); padding: 13px 22px; color: white; background: var(--deep-navy); border: 1px solid rgba(63,198,255,.25); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translate(-50%,18px); transition: .2s; font-size: .8rem; }
#toast.visible { opacity: 1; transform: translate(-50%,0); }
dialog { width: min(780px,calc(100vw - 30px)); max-height: 90vh; padding: 0; color: var(--ink); background: white; border: 0; border-radius: var(--radius-lg); box-shadow: 0 36px 110px rgba(7,32,63,.28); }
dialog::backdrop { background: rgba(7,32,63,.68); backdrop-filter: blur(3px); }
.dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 21px 24px; background: white; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; }
.dialog-body { padding: 25px; }
.dialog-body > p { color: var(--muted); font-size: .83rem; }
.dialog-body pre { padding: 18px; color: #d9e8f5; background: var(--deep-navy); border-radius: var(--radius-sm); font-size: .72rem; white-space: pre-wrap; word-break: break-all; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 40px; color: var(--subtle); border-top: 1px solid var(--line); font-size: .68rem; }
footer strong { color: #55718b; font-size: .66rem; letter-spacing: .11em; }
.build-details { position: relative; }
.build-details summary { display: flex; min-height: 44px; align-items: center; color: #55718b; cursor: pointer; font-weight: 600; }
.build-details dl { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; width: min(360px,calc(100vw - 32px)); padding: 13px 16px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.build-details dl div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 4px 0; }
.build-details dt { color: var(--muted); }
.build-details dd { margin: 0; overflow-wrap: anywhere; font-family: "SFMono-Regular", Consolas, monospace; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 200; padding: 11px 14px; color: white; background: var(--blue); border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

.login-page { display: grid; min-height: 100vh; grid-template-columns: minmax(0,1.05fr) minmax(460px,.95fr); }
.login-story { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 44px 56px 38px; color: white; background: var(--deep-navy); }
.login-story:after { position: absolute; right: -230px; bottom: -310px; width: 680px; height: 680px; border: 1px solid rgba(63,198,255,.16); border-radius: 50%; box-shadow: 0 0 0 70px rgba(63,198,255,.025), 0 0 0 140px rgba(63,198,255,.018); content: ""; pointer-events: none; }
.login-brand { position: relative; z-index: 1; display: inline-block; width: 280px; }
.login-brand img { display: block; width: 100%; height: auto; }
.login-story-copy { position: relative; z-index: 1; max-width: 650px; padding: 50px 0; }
.login-story .eyebrow { color: var(--cyan); }
.login-story h1 { max-width: 620px; color: white; font-size: clamp(2.6rem,5vw,4.9rem); font-weight: 500; line-height: 1.02; letter-spacing: -.055em; }
.login-story-copy > p { max-width: 610px; color: #b7cadd; font-size: 1rem; line-height: 1.8; }
.login-value-list { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; color: #d8e6f2; list-style: none; font-size: .83rem; }
.login-value-list li { display: flex; align-items: center; gap: 11px; }
.login-value-list li:before { width: 7px; height: 7px; flex: 0 0 auto; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 0 4px rgba(63,198,255,.1); content: ""; }
.login-story > small { position: relative; z-index: 1; color: #839eb7; font-size: .68rem; letter-spacing: .08em; }
.login-main { display: grid; place-items: center; padding: 46px 34px; background: #f6f9fc; }
.login-form-content { width: 100%; max-width: 400px; padding: 34px; background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.login-card-logo { display: none; width: 240px; height: auto; margin: 0 0 28px; }
.login-form-content h2 { margin-bottom: 11px; font-size: 1.85rem; font-weight: 600; letter-spacing: -.035em; }
.login-form-content > p:not(.eyebrow) { margin-bottom: 28px; color: var(--muted); font-size: .84rem; }
.login-form-content form > .btn { width: 100%; margin-top: 8px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }

.promotion-promise { margin: 16px 0; padding: 16px 18px; color: #375a78; background: var(--ice); border-left: 3px solid var(--cyan-ink); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.promotion-promise p { margin: 6px 0; font-size: .82rem; }
.promotion-ledger .form-actions { flex-wrap: wrap; }
.promotion-customer p { max-width: 80ch; line-height: 1.7; }
.promotion-ledger .helper { max-width: 85ch; }
.promotion-ledger h3 { margin-top: 24px; }

@media (min-width: 1600px) {
  .topbar, .sandbox-notice, footer { padding-inline: 54px; }
  .page { padding: 54px 54px 64px; }
  .offer-card { padding: 28px; }
}

@media (max-width: 1180px) {
  .offer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .advisor-layout, .checkout-layout { grid-template-columns: 1fr; }
  .advisor-layout > .panel, .checkout-summary { position: static; }
}

@container advisor-layout (max-width: 920px) {
  .advisor-layout > .panel, .advisor-layout > .recommendations { grid-column: 1/-1; }
  .advisor-layout > .panel { position: static; }
}

@media (max-width: 1024px) {
  .sidebar { visibility: hidden; transform: translateX(-100%); transition: transform .22s ease,visibility 0s linear .22s; }
  .sidebar.open { visibility: visible; transform: translateX(0); transition-delay: 0s; box-shadow: 24px 0 70px rgba(7,32,63,.28); }
  .sidebar.open + .nav-backdrop { display: block; position: fixed; inset: 0 0 0 var(--sidebar); z-index: 35; width: auto; height: 100%; padding: 0; background: rgba(7,32,63,.46); border: 0; }
  .workspace { width: 100%; margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding-inline: 24px; }
  .sandbox-notice { padding-inline: 24px; }
  .page { padding: 40px 24px 50px; }
  footer { padding-inline: 24px; }
}

@media (max-width: 760px) {
  .topbar { gap: 14px; height: 66px; }
  .topbar-context > span { display: none; }
  .topbar-context > span:after { display: none; }
  .topbar-end { gap: 13px; }
  .page { padding: 32px 18px 44px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; margin-bottom: 26px; padding-bottom: 22px; }
  .page-action { padding: 0; }
  .lead { font-size: .87rem; }
  .two-column { grid-template-columns: 1fr; gap: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: 1fr; gap: 16px; }
  .offer-card > p { min-height: 0; }
  .metrics { gap: 10px; }
  .metric { min-height: 130px; padding: 18px; }
  .metric strong { font-size: 1.65rem; }
  .filter-bar { gap: 12px; padding: 16px; }
  .filter-bar .field { min-width: 150px; flex: 1 1 150px; }
  .panel { padding: 20px; }
  .panel-heading { align-items: flex-start; }
  .panel-action { justify-content: flex-end; }
  .citations { grid-template-columns: 1fr; }
  .details > div { grid-template-columns: minmax(110px,38%) 1fr; gap: 12px; }
  .state-list > div:not(.empty) { grid-template-columns: 126px 1fr 24px; gap: 9px; }
  .login-page { grid-template-columns: 1fr; }
  .login-story { min-height: 390px; padding: 26px; }
  .login-brand { width: 240px; }
  .login-story-copy { padding: 35px 0 20px; }
  .login-story h1 { font-size: 2.55rem; }
  .login-story-copy > p { font-size: .88rem; }
  .login-main { padding: 34px 22px; }
}

@media (max-width: 520px) {
  h1 { font-size: 2rem; }
  .topbar { padding-inline: 14px; }
  .topbar-context { display: none; }
  .topbar-end { flex: 1; justify-content: flex-end; gap: 12px; }
  .environment { display: none; }
  .sandbox-notice { align-items: flex-start; flex-wrap: wrap; gap: 5px 8px; padding: 10px 16px; font-size: .72rem; }
  .sandbox-notice > span:last-child { width: calc(100% - 18px); margin-left: 18px; }
  .page { padding-inline: 14px; }
  .page-heading { margin-bottom: 22px; }
  .page-action, .page-action .btn { width: 100%; }
  .filter-bar .field { flex-basis: 100%; }
  .filter-bar .btn { flex: 1 1 auto; }
  .comparison-summary { align-items: stretch; flex-direction: column; }
  .comparison-summary .btn { width: 100%; }
  .section-line { align-items: flex-start; }
  .offer-card { padding: 21px 19px; }
  .offer-top { min-height: 0; margin-bottom: 20px; }
  .offer-card h2 { font-size: 1.3rem; }
  .card-actions .btn { flex: 1 1 120px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics.compact { grid-template-columns: 1fr; }
  .metric { min-height: 116px; }
  .panel { padding: 18px 16px; }
  .panel-heading { flex-direction: column; gap: 12px; }
  .panel-action { width: 100%; justify-content: flex-start; }
  .panel-action .btn { flex: 1 1 auto; }
  .details > div { grid-template-columns: 1fr; gap: 3px; }
  .form-actions .btn { flex: 1 1 130px; }
  .status-banner p { min-width: 100%; }
  .mode-banner { flex-wrap: wrap; padding: 15px; }
  .state-list > div:not(.empty) { grid-template-columns: 108px 1fr 22px; }
  .dialog-header, .dialog-body { padding: 18px 16px; }
  .catalog-form > .form-actions { bottom: -18px; margin: 0 -16px -18px; padding-inline: 16px; }
  footer { align-items: flex-start; flex-direction: column; padding: 18px 16px; }
  .login-story { min-height: 350px; padding: 22px; }
  .login-story h1 { font-size: 2.15rem; }
  .login-value-list { display: none; }
  .login-main { padding: 26px 14px; }
  .login-form-content { padding: 25px 20px; }
}

@media (max-height: 760px) and (min-width: 1025px) {
  .sidebar { padding-top: 14px; padding-bottom: 12px; }
  .brand { min-height: 82px; padding-bottom: 8px; }
  .brand img { width: 205px; }
  .brand > span { margin-top: -7px; }
  .sidebar nav { gap: 10px; padding-top: 4px; }
  .sidebar nav a { min-height: 36px; padding-block: 6px; }
  .nav-label { margin-bottom: 3px; }
  .sidebar-bottom { margin-top: 12px; padding-top: 12px; }
}

@media (max-width: 360px) {
  .sidebar { width: calc(100vw - 48px); padding-inline: 16px; }
  .sidebar.open + .nav-backdrop { left: calc(100vw - 48px); }
}

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

/* Stellar Universe UI Kit - Orbit implementation, September 2026. */
:root {
  color-scheme: dark;
  color: #f4f8ff;
  background: #060d19;
  --space: #060d19;
  --deep-navy: #07203f;
  --navy: #e7f2ff;
  --blue: #1e6fd0;
  --blue-dark: #175cae;
  --teal: #3fc6ff;
  --cyan: #3fc6ff;
  --cyan-ink: #66d2ff;
  --ice: #11283e;
  --white: #f4f8ff;
  --ink: #f4f8ff;
  --muted: #b8c9dc;
  --subtle: #9db3cd;
  --line: #293e57;
  --line-strong: #38536f;
  --surface: #101e31;
  --surface-muted: #15263c;
  --success: #70e1bc;
  --success-bg: #123a35;
  --warning: #ffcc80;
  --warning-bg: #3b2c1b;
  --danger: #ffadb3;
  --danger-bg: #3c2028;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.18), 0 10px 32px rgba(0,0,0,.16);
  --shadow-md: 0 30px 90px rgba(0,0,0,.42);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --sidebar: 264px;
  --header: 72px;
  --content: 1600px;
}

html, body { background: var(--space); }
body {
  color: var(--ink);
  font-size: 16px;
  background-color: var(--space);
  background-image: linear-gradient(rgba(6,13,25,.9),rgba(6,13,25,.96)),url('/brand/stellar-universe-stars.svg');
  background-attachment: fixed;
  background-size: auto,1100px auto;
}
h1, h2, h3 { color: var(--ink); }
h1 { font-size: clamp(2.2rem,3.1vw,3.3rem); letter-spacing: -.045em; }
h2 { font-size: 1.28rem; }
h3 { font-size: 1.04rem; }
a { color: var(--cyan); }
a:hover { color: #a7e5ff; }
.muted, .helper, .lead { color: var(--muted); }
.helper { font-size: .84rem; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--cyan); letter-spacing: .2em; }
.eyebrow:before { width: 30px; height: 2px; background: var(--cyan); content: ""; }

.app-shell { position: relative; min-height: 100vh; background: transparent; }
.sidebar {
  width: var(--sidebar);
  overflow: hidden;
  padding: 28px 16px 20px;
  color: var(--muted);
  background: rgba(7,20,36,.97);
  border-right-color: var(--line);
  scrollbar-width: thin;
  scrollbar-color: #38536f transparent;
}
.brand { min-height: 124px; padding: 0 14px 24px; }
.brand img { width: 224px; }
.brand > span { margin: -9px 0 0 52px; color: #8ea8c2; }
.sidebar nav { min-height: 0; gap: 18px; overflow-y: auto; overscroll-behavior: contain; padding: 6px 5px 4px 0; scrollbar-color: #365b7d transparent; scrollbar-width: thin; }
.nav-label { margin: 0 15px 8px; color: #7993ad; font-size: .64rem; letter-spacing: .19em; }
.sidebar nav a { min-height: 44px; gap: 13px; padding: 10px 14px; color: #aebfd2; border-radius: 11px; font-size: .84rem; }
.sidebar nav a:hover { color: var(--ink); background: rgba(63,198,255,.075); }
.sidebar nav a[aria-current] { color: var(--ink); background: #163b5b; border-color: #2d668d; box-shadow: inset 3px 0 0 var(--cyan),0 0 24px rgba(63,198,255,.05); }
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; color: #8fa7c0; }
.sidebar nav a[aria-current] .nav-icon { color: var(--cyan); }
.sidebar-account { flex: 0 0 auto; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-bottom { width: 100%; margin: 0; padding: 8px 9px; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 11px; text-align: left; cursor: pointer; }
.sidebar-bottom:hover { background: rgba(63,198,255,.075); border-color: rgba(63,198,255,.16); }
.sidebar-bottom:focus-visible, .sidebar-signout:focus-visible, .profile-trigger:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.avatar { color: #071423; background: var(--cyan); }
.identity strong { color: var(--ink); }
.identity small { color: var(--subtle); }
.session-dot { background: var(--success); }
.sidebar-signout { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 11px; margin-top: 3px; padding: 9px 12px; color: #aebfd2; background: transparent; border: 1px solid transparent; border-radius: 11px; font-size: .78rem; font-weight: 600; text-align: left; cursor: pointer; }
.sidebar-signout:hover { color: var(--ink); background: rgba(63,198,255,.075); border-color: rgba(63,198,255,.16); }
.sidebar-signout svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--cyan); }

.workspace { width: calc(100% - var(--sidebar)); margin-left: var(--sidebar); }
.topbar {
  height: var(--header);
  padding: 0 32px;
  color: var(--muted);
  background: rgba(7,20,36,.94);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px);
}
.topbar-context > span { color: #8ea8c2; }
.topbar-context > span:after { color: #526a82; }
.topbar-context strong { color: var(--ink); }
.topbar-end { gap: 18px; }
.text-button { min-height: 44px; color: var(--cyan); }
.text-button:hover { color: #a7e5ff; }
.profile-trigger { display: grid; min-width: 0; min-height: 48px; grid-template-columns: 32px minmax(0,auto) 8px; align-items: center; gap: 10px; padding: 6px 11px 6px 7px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.profile-trigger:hover { background: #162a42; border-color: #4a7398; }
.profile-trigger .avatar { width: 32px; height: 32px; font-size: .62rem; }
.profile-trigger-copy { min-width: 0; text-align: left; }
.profile-trigger-copy strong, .profile-trigger-copy small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-trigger-copy strong { color: var(--ink); font-size: .72rem; font-weight: 600; }
.profile-trigger-copy small { margin-top: 1px; color: var(--subtle); font-size: .62rem; }
.profile-chevron { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-2px); }
.environment { min-height: 32px; color: var(--muted); background: var(--surface); border-color: var(--line-strong); }
.environment > span { background: var(--cyan); box-shadow: 0 0 0 4px rgba(63,198,255,.09); }
.menu-toggle { min-height: 44px; color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.sandbox-notice { min-height: 44px; padding: 9px 32px; color: var(--muted); background: #0d2940; border-bottom-color: #214661; }
.sandbox-notice strong { color: var(--ink); }
.sandbox-notice > span:last-child { color: var(--muted); }
.notice-dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(63,198,255,.08); }

.page { max-width: var(--content); min-height: calc(100vh - 160px); padding: 42px 32px 64px; }
.page-heading { align-items: center; margin-bottom: 32px; padding: 6px 0 28px; border-bottom-color: var(--line); }
.page-heading-copy { position: relative; z-index: 2; max-width: 860px; }
.lead { max-width: 780px; font-size: .95rem; line-height: 1.75; }
.page-action { position: relative; z-index: 3; }

.app-shell[data-route="marketplace"] .page-heading,
.app-shell[data-route="dashboard"] .page-heading {
  position: relative;
  min-height: 272px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 36px 45% 36px 42px;
  background: linear-gradient(112deg,#0d2036 0%,#0d2e50 58%,#145687 100%);
  border: 1px solid #315778;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.16);
}
.app-shell[data-route="marketplace"] .page-heading:before,
.app-shell[data-route="dashboard"] .page-heading:before {
  position: absolute;
  width: 450px;
  height: 450px;
  top: -90px;
  right: -70px;
  background: url('/brand/stellar-universe-planet.svg') center/contain no-repeat;
  content: "";
  opacity: .92;
}
.app-shell[data-route="marketplace"] .page-heading:after,
.app-shell[data-route="dashboard"] .page-heading:after {
  position: absolute;
  width: 92px;
  height: 92px;
  top: 34px;
  right: 12%;
  background: url('/brand/stellar-universe-rocket.svg') center/contain no-repeat;
  content: "";
  transform: rotate(7deg);
}
.app-shell[data-route="marketplace"] .page-heading-copy,
.app-shell[data-route="dashboard"] .page-heading-copy { max-width: 690px; }
.app-shell[data-route="marketplace"] .page-heading h1,
.app-shell[data-route="dashboard"] .page-heading h1 { font-size: clamp(2.45rem,2.9vw,3rem); line-height: 1.06; }
.app-shell[data-route="marketplace"] .page-heading .lead,
.app-shell[data-route="dashboard"] .page-heading .lead { max-width: 620px; color: #c6d6e7; font-size: 1rem; }

.btn { min-height: 44px; color: var(--ink); background: #142a42; border-color: #36536f; border-radius: 10px; font-size: .84rem; transition: background 160ms ease,border-color 160ms ease,box-shadow 160ms ease,transform 160ms ease; }
.btn:hover { color: var(--ink); background: #1a3552; border-color: #4a7398; }
.btn.primary { color: #fff; background: var(--blue); border-color: #428be1; box-shadow: 0 8px 22px rgba(30,111,208,.22); }
.btn.primary:hover { color: #fff; background: #277bdc; border-color: #68a6ed; }
.btn.secondary { color: var(--ink); background: #142a42; border-color: #36536f; }
.btn.secondary:hover { color: #fff; background: #1b3856; border-color: #4f7da6; }
.btn.danger { color: #fff; background: #a43e48; border-color: #cc6670; }
.btn:disabled { color: #8197ad; background: #0c1827; border-color: #26394e; }

.filter-bar { margin-bottom: 26px; padding: 20px; background: rgba(16,30,49,.94); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.field > span, legend, .check { color: #c4d3e3; }
.field input, .field select, .field textarea { min-height: 46px; color: var(--ink); background: #0b1828; border-color: var(--line-strong); }
.field input::placeholder, .field textarea::placeholder { color: #7f95ab; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #527696; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(63,198,255,.12); }
.check input { accent-color: var(--blue); }
fieldset { border-color: var(--line); }

.section-line { color: var(--muted); }
.comparison-summary { color: var(--muted); background: #102b43; border-color: #2f5b7d; }
.comparison-summary strong { color: var(--ink); }
.offer-grid { gap: 20px; }
.offer-card { padding: 24px; overflow: hidden; color: var(--ink); background: var(--surface); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.offer-card:before { display: none; }
.offer-card:hover { border-color: #456a8b; box-shadow: 0 20px 44px rgba(0,0,0,.24); }
.offer-art { position: relative; height: 145px; overflow: hidden; margin: -24px -24px 22px; padding: 22px 24px; color: #d9e9fb; background: linear-gradient(118deg,#183354,#3b5f9c); border-bottom: 1px solid #426387; }
.offer-art.aqua { background: linear-gradient(118deg,#113451,#238d9f); }
.offer-art.live { background: linear-gradient(118deg,#153453,#1f7791); }
.offer-art.family { background: linear-gradient(118deg,#362c51,#8d6877); }
.offer-art > span:first-child { position: relative; z-index: 2; font-size: .66rem; font-weight: 700; letter-spacing: .15em; }
.offer-orbit-mark { position: absolute; width: 190px; height: 190px; top: -72px; right: -30px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.035),0 0 0 54px rgba(255,255,255,.025); }
.offer-orbit-mark:after { position: absolute; width: 9px; height: 9px; right: 12px; bottom: 42px; background: #dff7ff; border-radius: 50%; box-shadow: 0 0 12px rgba(223,247,255,.8); content: ""; }
.offer-top { min-height: 30px; margin-bottom: 18px; }
.offer-brand { color: var(--muted); }
.offer-category { color: var(--cyan); }
.offer-card h2 { color: var(--ink); }
.offer-card > p, .offer-card > p.renewal { color: var(--muted); }
.price strong { color: var(--ink); }
.price span { color: var(--subtle); }
.offer-card details { border-top-color: var(--line); }
.offer-card summary { color: var(--cyan); }

.panel { color: var(--ink); background: rgba(16,30,49,.96); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric { min-height: 144px; color: var(--ink); background: rgba(16,30,49,.96); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.metric:after { background: var(--cyan); box-shadow: 0 0 0 8px rgba(63,198,255,.08); }
.metric p { color: var(--muted); }
.metric strong { color: var(--ink); font-size: 2rem; }
.metric small { color: var(--subtle); }

.table-wrap { scrollbar-color: #4b7398 #0c1726; }
table { color: var(--ink); }
th { color: #9fb3c8; border-bottom-color: var(--line-strong); }
td { color: #d7e4f2; border-bottom-color: #22374d; }
tbody tr:hover { background: #13263b; }
td strong { color: var(--ink); }
td small { color: var(--subtle); }
.row-link { color: #73d6ff; }
.mono, .copyable { color: #c7daf0; }

.pill { color: #c8d7e7; background: #24364a; }
.pill.good { color: var(--success); background: var(--success-bg); }
.pill.warning { color: var(--warning); background: var(--warning-bg); }
.pill.danger { color: var(--danger); background: var(--danger-bg); }
.pill.neutral { color: #c4d2e0; background: #24364a; }
.details > div { border-bottom-color: #22374d; }
.details dt { color: var(--muted); }
.details dd { color: var(--ink); }
.empty { color: var(--muted); }
.empty-symbol { border-color: #3c6989; }
.empty-symbol:before, .empty-symbol:after, .empty-symbol span { border-color: #31536d; }

.match { color: #c7d7e6; background: #102b43; border-left-color: var(--cyan); }
.match strong { color: var(--ink); }
.match.over-budget, .budget-notice, .stale-notice, .governance-warning, .formula-note { color: #ffe0ad; background: var(--warning-bg); border-color: #6e5430; }
.budget-notice strong { color: #ffe3b8; }
.ineligible-results { background: var(--surface); border-color: var(--line); }
.ineligible-results > summary { color: var(--cyan); }
.mode-banner, .status-banner, .promotion-promise { color: var(--muted); background: #102b43; border-color: #2b5778; }
.mode-banner strong, .status-banner strong { color: var(--ink); }
.mode-banner p { color: var(--muted); }
.mode-note { color: #b9cee2 !important; background: #0c1a2b; border-color: var(--line); }
.timeline li:not(:last-child):before { background: #31526e; }
.timeline-dot { background: var(--cyan); border-color: #0f2033; box-shadow: 0 0 0 1px #62b9df; }
.timeline strong { color: var(--ink); }
.timeline small, .timeline p { color: var(--muted); }
.notes article { border-bottom-color: var(--line); }
.state-list strong { color: var(--ink); }
meter { accent-color: var(--cyan); }
.answer, .catalog-form > .form-actions { border-color: var(--line); }
.answer-unavailable { background: var(--surface-muted); border-color: var(--line); }
.answer-text code, .document-text code { background: #0b1828; border-color: var(--line); }
.citations article { background: #102b43; border-color: #294e6d; }
.citations article > strong { color: var(--ink); }
.citations p, .citations small { color: var(--muted); }
.catalog-form > .form-actions { background: rgba(16,30,49,.98); }
.error { color: var(--danger); background: var(--danger-bg); border-color: #70414a; }
.loading { color: var(--muted); }
.loading:before { border-color: #2a4862; border-top-color: var(--cyan); }

#toast { color: var(--ink); background: #142a42; border-color: #3b7094; box-shadow: var(--shadow-md); }
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-md); }
dialog::backdrop { background: rgba(0,6,14,.78); backdrop-filter: blur(5px); }
.dialog-header { background: #122339; border-bottom-color: var(--line); }
.dialog-body > p { color: var(--muted); }
.dialog-body pre { color: #d9e8f5; background: #071423; }
.profile-modal { width: min(620px,calc(100vw - 32px)); }
.profile-dialog { min-width: 0; }
.profile-dialog-heading { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 14px; margin-bottom: 22px; padding: 16px; background: #0d1d30; border: 1px solid var(--line); border-radius: 14px; }
.profile-dialog-heading .avatar { width: 52px; height: 52px; font-size: .78rem; }
.profile-dialog-heading strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 1rem; }
.profile-dialog-heading p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.session-badge { display: inline-flex; min-height: 30px; align-items: center; gap: 7px; padding: 5px 10px; color: #a8e9d0; background: var(--success-bg); border-radius: 999px; font-size: .68rem; font-weight: 600; white-space: nowrap; }
.session-badge > span { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }
.profile-guidance { margin-top: 20px; padding: 16px; color: var(--muted); background: #102b43; border: 1px solid #2b5778; border-radius: 12px; }
.profile-guidance strong { color: var(--ink); }
.profile-guidance p { margin: 6px 0 0; font-size: .82rem; line-height: 1.6; }
footer { color: var(--subtle); border-top-color: var(--line); }
footer strong, .build-details summary { color: #91a8bf; }
.build-details dl { color: var(--ink); background: var(--surface); border-color: var(--line); }
.build-details dt { color: var(--muted); }

.login-page { position: relative; isolation: isolate; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: linear-gradient(130deg,#071423 0%,#0c2948 68%,#145585 100%); }
.login-page::after { position: absolute; right: clamp(18px,3vw,56px); bottom: clamp(18px,2.5vh,28px); z-index: 0; width: clamp(360px,24vw,460px); aspect-ratio: 720 / 640; background: url('/brand/stellar-universe-planet.svg') center/contain no-repeat; content: ""; opacity: .7; pointer-events: none; }
.login-page > * { position: relative; z-index: 1; }
.login-story { height: 100%; min-height: 0; overflow: hidden; padding: clamp(32px,4.8vh,52px) clamp(38px,4.5vw,72px) clamp(30px,4vh,44px); color: var(--ink); background: transparent; }
.login-story:after { content: none; }
.login-brand { width: 300px; }
.login-story-copy { max-width: 720px; }
.login-story h1 { position: relative; z-index: 3; max-width: 690px; color: var(--ink); font-size: clamp(3rem,5vw,5.4rem); }
.login-story-copy > p { position: relative; z-index: 3; color: #c2d3e4; }
.login-value-list { position: relative; z-index: 3; color: #d8e6f2; }
.login-story > small { z-index: 3; color: #9bb0c5; }
.login-main { min-height: 0; overflow: hidden; padding: clamp(28px,5vh,56px) clamp(40px,4.5vw,72px); background: transparent; }
.login-form-content { max-width: 430px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.login-form-content h2 { color: var(--ink); }
.login-form-content > p:not(.eyebrow) { color: var(--muted); }
.login-divider { color: var(--muted); }
.login-divider::before, .login-divider::after { background: var(--line); }
.mobile-nav { display: none; }

@media (min-width: 1600px) {
  .topbar, .sandbox-notice, footer { padding-inline: 40px; }
  .page { padding: 48px 40px 72px; }
}

@media (max-width: 1180px) {
  .app-shell[data-route="marketplace"] .page-heading,
  .app-shell[data-route="dashboard"] .page-heading { padding-right: 41%; }
  .app-shell[data-route="marketplace"] .page-heading:before,
  .app-shell[data-route="dashboard"] .page-heading:before { right: -125px; }
}

@media (max-width: 1024px) {
  .workspace { width: 100%; margin-left: 0; }
  .sidebar { width: 264px; }
  .sidebar.open + .nav-backdrop { left: 264px; }
  .topbar, .sandbox-notice { padding-inline: 24px; }
  .page { padding: 32px 24px 60px; }
  .profile-trigger-copy { display: none; }
  .profile-trigger { grid-template-columns: 32px 7px; }
}

@media (max-width: 760px) {
  .app-shell[data-route="marketplace"] .page-heading,
  .app-shell[data-route="dashboard"] .page-heading { min-height: 390px; align-items: flex-start; padding: 35px 32px 190px; }
  .app-shell[data-route="marketplace"] .page-heading:before,
  .app-shell[data-route="dashboard"] .page-heading:before { width: 365px; height: 365px; top: 145px; right: -90px; }
  .app-shell[data-route="marketplace"] .page-heading:after,
  .app-shell[data-route="dashboard"] .page-heading:after { width: 78px; height: 78px; top: 195px; right: 12%; }
  .app-shell[data-route="marketplace"] .page-heading h1,
  .app-shell[data-route="dashboard"] .page-heading h1 { font-size: 2.5rem; }
  .offer-art { height: 132px; }
}

@media (max-width: 600px) {
  body { background-attachment: scroll; background-size: auto,760px auto; }
  .topbar { height: 76px; padding: 0 16px; gap: 10px; }
  .topbar:before { width: 176px; height: 58px; flex: 0 0 auto; margin-right: auto; background: url('/brand/stellar-orbit-full-color-transparent.svg') left center/contain no-repeat; content: ""; }
  .topbar-context { display: none; }
  .topbar-end { gap: 8px; }
  .topbar-end .text-button:first-child, .environment { display: none; }
  .profile-trigger { width: 44px; min-height: 44px; grid-template-columns: 1fr; padding: 5px; border-radius: 50%; }
  .profile-trigger .avatar { margin: auto; }
  .profile-chevron { display: none; }
  .menu-toggle { order: 3; width: 44px; padding: 0; }
  .menu-toggle > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sandbox-notice { align-items: flex-start; flex-wrap: wrap; padding: 11px 20px; font-size: .72rem; }
  .sandbox-notice > span:last-child { width: calc(100% - 18px); margin-left: 18px; }
  .page { padding: 24px 20px 106px; }
  .page-heading { margin-bottom: 24px; padding-bottom: 22px; }
  .page-heading h1 { font-size: 2.05rem; }
  .app-shell[data-route="marketplace"] .page-heading,
  .app-shell[data-route="dashboard"] .page-heading { min-height: 360px; margin-inline: 0; padding: 30px 24px 155px; border-radius: 22px; }
  .app-shell[data-route="marketplace"] .page-heading h1,
  .app-shell[data-route="dashboard"] .page-heading h1 { font-size: 2rem; }
  .app-shell[data-route="marketplace"] .page-heading .lead,
  .app-shell[data-route="dashboard"] .page-heading .lead { font-size: .86rem; }
  .app-shell[data-route="marketplace"] .page-heading:before,
  .app-shell[data-route="dashboard"] .page-heading:before { width: 285px; height: 285px; top: 150px; right: -78px; }
  .app-shell[data-route="marketplace"] .page-heading:after,
  .app-shell[data-route="dashboard"] .page-heading:after { width: 64px; height: 64px; top: 180px; right: 10%; }
  .filter-bar { padding: 16px; }
  .offer-card { padding: 20px; }
  .offer-art { height: 126px; margin: -20px -20px 20px; padding: 19px 20px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { min-height: 128px; }
  .panel { padding: 19px 17px; }
  .table-wrap { overflow: visible; }
  table { display: block; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { display: grid; gap: 14px; }
  tbody tr { display: grid; padding: 12px 16px; background: #0d1d30; border: 1px solid var(--line); border-radius: 14px; }
  tbody tr:hover { background: #10243a; }
  tbody th[scope="row"] { display: block; padding: 4px 0 10px; color: #9fb3c8; border-bottom: 1px solid #31506b; font-size: .65rem; line-height: 1.4; text-align: left; white-space: normal; }
  td, td:first-child, td:last-child { display: grid; max-width: none; grid-template-columns: minmax(108px,36%) minmax(0,1fr); gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid #22374d; overflow-wrap: anywhere; }
  td:last-child { border-bottom: 0; }
  td:before { color: #8fa6bd; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; content: attr(data-label); }
  td[data-label=""]:before { display: none; }
  .row-actions { justify-content: flex-start; }
  .payment-order-cell { width: auto; min-width: 0; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 34; display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; padding: 8px 8px max(9px,env(safe-area-inset-bottom)); background: rgba(10,25,44,.96); border-top: 1px solid var(--line-strong); backdrop-filter: blur(18px); }
  .mobile-nav a { display: flex; min-width: 0; min-height: 54px; align-items: center; justify-content: center; flex-direction: column; gap: 3px; padding: 5px 4px; color: #9eb1c6; border-radius: 10px; font-size: .64rem; line-height: 1.15; text-align: center; }
  .mobile-nav a:hover { color: var(--ink); text-decoration: none; }
  .mobile-nav a[aria-current] { color: var(--cyan); background: #153753; }
  .mobile-nav svg { width: 20px; height: 20px; }
  footer { padding-bottom: 86px; }
  .login-page { display: block; }
  .login-story { min-height: 315px; padding: 22px 20px 24px; }
  .login-brand { width: 240px; }
  .login-story-copy { padding: 24px 0 10px; }
  .login-story h1 { max-width: 300px; font-size: 2.35rem; }
  .login-story-copy > p { max-width: 285px; font-size: .82rem; }
  .login-value-list { display: none; }
  .login-story:after { width: 340px; height: 340px; right: -120px; bottom: -135px; }
  .login-main { padding: 28px 20px 42px; }
  .login-form-content { max-width: 500px; padding: 0; }
  .profile-dialog { min-width: 0; }
  .profile-dialog-heading { grid-template-columns: 44px minmax(0,1fr); padding: 13px; }
  .profile-dialog-heading .avatar { width: 44px; height: 44px; }
  .session-badge { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 390px) {
  .topbar:before { width: 148px; }
  .topbar-end .text-button { font-size: .72rem; }
  .app-shell[data-route="marketplace"] .page-heading,
  .app-shell[data-route="dashboard"] .page-heading { min-height: 370px; padding-inline: 22px; }
  .metrics { grid-template-columns: 1fr; }
  .mobile-nav a { font-size: .6rem; }
}

@media (max-width: 900px) {
  .login-page { display: block; height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; overflow-x: clip; }
  .login-page::after { top: 108px; right: 20px; bottom: auto; width: min(38vw,300px); opacity: .38; }
  .login-story, .login-main { height: auto; overflow: hidden; scrollbar-gutter: auto; }
}

@media (max-width: 520px) {
  .login-page::after { top: 112px; right: 12px; width: 180px; opacity: .3; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .login-story { min-height: 520px; padding: 30px 34px; }
  .login-story-copy { padding: 32px 0 22px; }
  .login-story h1 { max-width: 620px; font-size: clamp(2.7rem,7vw,4rem); }
  .login-main { padding: 38px 28px 48px; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .login-story, .login-main { overflow-y: auto; scrollbar-gutter: stable; }
}

@media (prefers-reduced-motion: reduce) {
  .offer-card:hover, .btn:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --muted:#e0ebf8; --subtle:#c5d9ef; --line:#7390ad; --line-strong:#91aac2; }
  .app-shell { background-image: none; }
  .btn, .panel, .metric, .offer-card, .filter-bar { border-width: 2px; }
}
