: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: #7f91a3;
  --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-height: 40px; 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; align-items: flex-start; gap: 10px; margin-bottom: 13px; color: #385776; font-size: .8rem; }
.check input { width: 17px; height: 17px; flex: 0 0 auto; margin: 2px 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; }
.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; margin-bottom: 24px; }
.offer-brand { max-width: 170px; color: var(--muted); font-size: .75rem; }
.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 { 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: 36px; padding: 7px 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: 34px; padding: 6px 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: anywhere; }
.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; }
.advisor-layout > .panel, .checkout-summary { position: sticky; top: 96px; }
.recommendations { min-width: 0; }
.recommendations .offer-card { margin-bottom: 18px; }
.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); }
.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; white-space: pre-wrap; }
.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 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; white-space: pre-wrap; }
.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; }
.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-card { 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-card h2 { margin-bottom: 11px; font-size: 1.85rem; font-weight: 600; letter-spacing: -.035em; }
.login-card > p:not(.eyebrow) { margin-bottom: 28px; color: var(--muted); font-size: .84rem; }
.login-card 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; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); 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; }
  .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%; }
  .state-list > div:not(.empty) { grid-template-columns: 108px 1fr 22px; }
  .dialog-header, .dialog-body { padding: 18px 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-card { padding: 25px 20px; }
}

@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; }
}
