:root {
  --ink: #172033;
  --muted: #647087;
  --faint: #8c96a8;
  --canvas: #f3f6fb;
  --paper: #f8faff;
  --card: rgba(255, 255, 255, .82);
  --card-solid: #ffffff;
  --line: #dce3ee;
  --line-soft: #e9eef5;
  --blue: #315ee8;
  --blue-dark: #2448b8;
  --blue-soft: #edf2ff;
  --green: #157f73;
  --green-dark: #0f675e;
  --green-soft: #e8f6f3;
  --navy: #38537d;
  --amber: #a86434;
  --purple: #7656a8;
  --danger: #b84455;
  --danger-soft: #fff0f2;
  --shadow-sm: 0 8px 24px rgba(32, 52, 84, .06);
  --shadow: 0 18px 50px rgba(32, 52, 84, .09);
  --shadow-lg: 0 30px 90px rgba(31, 51, 82, .16);
  --radius: 18px;
  --sidebar: 252px;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--canvas); }
body { position: relative; min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
p { line-height: 1.7; }
:focus-visible { outline: 3px solid rgba(49, 94, 232, .25); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: -60px; padding: 10px 14px; color: #fff; border-radius: 10px; background: var(--blue); transition: top .18s ease; }
.skip-link:focus { top: 14px; }
.ambient { position: fixed; z-index: -2; width: 34vw; height: 34vw; border-radius: 50%; filter: blur(95px); opacity: .26; pointer-events: none; }
.ambient-a { top: -21vw; right: -8vw; background: #b9c9ff; }
.ambient-b { bottom: -23vw; left: -11vw; background: #b9e6df; }
body.is-booting::after { content: "CDPA"; position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; color: var(--blue); background: var(--canvas); font-size: 12px; font-weight: 800; letter-spacing: .48em; animation: boot-pulse 1s ease-in-out infinite alternate; }
@keyframes boot-pulse { to { opacity: .45; letter-spacing: .7em; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.is-hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Authentication */
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 38px; }
.auth-stage { width: min(1150px, 100%); min-height: 680px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .82fr); overflow: hidden; border: 1px solid rgba(255,255,255,.88); border-radius: 32px; background: rgba(255,255,255,.74); box-shadow: var(--shadow-lg); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); }
.auth-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 54px 58px; background: #eef3ff; border-right: 1px solid #dbe4f8; }
.auth-story::before { content: ""; position: absolute; width: 410px; height: 410px; right: -175px; bottom: -190px; border: 1px solid rgba(49,94,232,.12); border-radius: 50%; box-shadow: 0 0 0 62px rgba(49,94,232,.035), 0 0 0 124px rgba(21,127,115,.025); }
.auth-story::after { content: ""; position: absolute; left: 48px; right: 48px; bottom: 137px; height: 1px; background: #dbe4f7; }
.auth-brand, .brand { display: flex; align-items: center; gap: 12px; }
.auth-brand { position: relative; z-index: 2; width: fit-content; }
.brand-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; color: #fff; border: 1px solid var(--blue); border-radius: 13px; background: var(--blue); font-size: 14px; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 8px 22px rgba(49,94,232,.2); }
.auth-brand b, .auth-brand small, .brand b, .brand small { display: block; }
.auth-brand b { font-size: 19px; letter-spacing: -.02em; }
.auth-brand small { margin-top: 4px; color: #7b88a2; font-size: 8px; letter-spacing: .13em; }
.auth-signal { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; margin-top: 92px; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .19em; }
.auth-signal i, .privacy-pill i { width: 7px; height: 7px; border-radius: 50%; background: #2aa98f; box-shadow: 0 0 0 5px rgba(42,169,143,.11); }
.auth-story h1 { position: relative; z-index: 2; max-width: 620px; margin: 24px 0 17px; color: #17213a; font-size: clamp(38px, 4.5vw, 60px); font-weight: 680; line-height: 1.16; letter-spacing: -.045em; }
.auth-story h1 em, .hero h2 em { color: var(--blue); font-style: normal; }
.auth-story > p { position: relative; z-index: 2; max-width: 590px; margin: 0; color: #66748d; font-size: 14px; line-height: 1.9; }
.auth-capabilities { position: relative; z-index: 2; display: flex; gap: 34px; margin-top: auto; padding-top: 35px; color: #77849a; font-size: 10px; }
.auth-capabilities span { display: grid; gap: 5px; }
.auth-capabilities i { color: #243250; font-size: 24px; font-style: normal; font-weight: 720; }
.auth-orbit { position: absolute; z-index: 1; right: 6%; bottom: 19%; width: 205px; height: 205px; border: 1px solid rgba(49,94,232,.12); border-radius: 50%; }
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; inset: 28px; border: 1px dashed rgba(21,127,115,.15); border-radius: 50%; }
.auth-orbit::after { inset: 68px; border-style: solid; background: rgba(255,255,255,.38); }
.auth-orbit span, .auth-orbit i, .auth-orbit b { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.auth-orbit span { top: 22px; left: 52px; }
.auth-orbit i { right: 19px; top: 90px; background: var(--green); }
.auth-orbit b { bottom: 25px; left: 72px; background: var(--purple); }
.auth-orbit em { position: absolute; inset: 0; display: grid; place-items: center; color: #6f7e98; font-size: 11px; font-style: normal; font-weight: 750; letter-spacing: .18em; }
.auth-panel { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 48px 52px; background: rgba(255,255,255,.72); }
.auth-tabs { display: flex; gap: 4px; width: fit-content; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #f5f7fb; }
.auth-tabs button { padding: 8px 15px; color: var(--muted); border: 0; border-radius: 9px; background: transparent; font-size: 11px; cursor: pointer; }
.auth-tabs button.is-active { color: var(--blue-dark); background: #fff; box-shadow: var(--shadow-sm); }
.auth-heading { margin: 39px 0 26px; }
.auth-heading > span { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .19em; }
.auth-heading h2 { margin: 9px 0 7px; font-size: 29px; letter-spacing: -.025em; }
.auth-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.auth-field { display: grid; gap: 8px; margin-top: 17px; color: #5f6b80; font-size: 11px; font-weight: 700; }
.auth-field input { width: 100%; height: 51px; padding: 0 15px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; outline: 0; background: rgba(255,255,255,.9); }
.auth-field input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(49,94,232,.09); }
.btn-auth { width: 100%; min-height: 52px; justify-content: space-between; margin-top: 25px; padding-inline: 18px; }
.auth-trust { display: flex; justify-content: space-between; gap: 10px; margin-top: 27px; padding-top: 21px; color: #7d899d; border-top: 1px solid var(--line-soft); font-size: 8px; }
.auth-trust span::before { content: "•"; margin-right: 5px; color: var(--green); }
.auth-deploy-link { width: fit-content; margin: 15px auto 0; color: var(--blue-dark); font-size: 9px; font-weight: 700; }
.auth-deploy-link:hover { text-decoration: underline; }

/* Shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 30; inset: 14px auto 14px 14px; width: var(--sidebar); display: flex; flex-direction: column; padding: 18px 14px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.brand { padding: 5px 7px 20px; border-bottom: 1px solid var(--line-soft); }
.brand b { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--faint); font-size: 9px; }
.main-nav { display: grid; gap: 5px; margin-top: 18px; }
.nav-group-label { margin: 6px 12px 5px; color: #a0a9b8; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.nav-group-secondary { margin-top: 18px; }
.nav-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: #68758b; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; font-size: 13px; font-weight: 600; cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
.nav-item span { width: 26px; height: 26px; display: grid; place-items: center; color: #73819a; border: 1px solid #e2e7ef; border-radius: 8px; background: rgba(247,249,252,.9); font-size: 13px; }
.nav-item:hover { color: var(--ink); border-color: #e6ebf3; background: rgba(248,250,253,.92); transform: translateX(2px); }
.nav-item.is-active { color: var(--blue-dark); border-color: #dbe4ff; background: var(--blue-soft); }
.nav-item.is-active span { color: #fff; border-color: var(--blue); background: var(--blue); }
.sidebar-bottom { margin-top: auto; }
.local-badge { display: flex; align-items: center; gap: 10px; margin-top: 13px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 13px; background: rgba(247,249,252,.82); }
.local-badge i { width: 8px; height: 8px; border-radius: 50%; background: #28a58b; box-shadow: 0 0 0 5px rgba(40,165,139,.1); }
.local-badge b, .local-badge small { display: block; }
.local-badge b { font-size: 11px; }
.local-badge small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.sidebar-scrim { display: none; position: fixed; z-index: 25; inset: 0; border: 0; background: rgba(19,29,48,.35); backdrop-filter: blur(3px); }
.main { min-height: 100vh; margin-left: calc(var(--sidebar) + 28px); }
.topbar { position: sticky; z-index: 20; top: 0; height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 34px; border-bottom: 1px solid rgba(220,227,238,.78); background: rgba(243,246,251,.8); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.topbar h1 { margin: 3px 0 0; font-size: 22px; font-weight: 720; letter-spacing: -.025em; }
.eyebrow { margin: 0; color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.privacy-pill, .tour-replay { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; color: #657187; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.72); font-size: 10px; }
.tour-replay { color: var(--blue-dark); cursor: pointer; }
.tour-replay:hover { border-color: #c4d0f5; background: #fff; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }
.user-chip { max-width: 180px; height: 38px; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; color: #59667c; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.74); }
.user-chip span { width: 28px; height: 28px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--blue); font-size: 11px; font-weight: 800; }
.user-chip b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.logout-button { width: 36px; height: 36px; border: 1px solid var(--line) !important; border-radius: 10px !important; background: rgba(255,255,255,.72) !important; }
.content { max-width: 1480px; margin: 0 auto; padding: 32px 34px 74px; }
.view { display: none; animation: fade-in .22s ease; }
.view.is-active { display: block; }

/* Controls and surfaces */
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 16px; border: 1px solid transparent; border-radius: 11px; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn-primary { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 8px 22px rgba(49,94,232,.2); }
.btn-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); box-shadow: 0 11px 28px rgba(49,94,232,.25); }
.btn-secondary { color: #38455a; border-color: var(--line); background: rgba(255,255,255,.82); }
.btn-secondary:hover { border-color: #bdc8d8; background: #fff; }
.btn-danger { color: var(--danger); border-color: #f0cbd2; background: var(--danger-soft); }
.btn-large { min-height: 47px; padding-inline: 21px; }
.text-btn { padding: 4px 0; color: var(--blue); border: 0; background: transparent; font-weight: 700; cursor: pointer; }
.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 21px; cursor: pointer; }
.icon-btn:hover { background: #f0f3f8; }
.card, .bank-tile, .recent-card, .mode-card, .form-section, .model-card, .review-main, .review-aside, .quality-card, .profile-bank, .stability-card, .insight-card, .project-table-wrap, .help-steps article, .progress-card, .model-progress-card { border: 1px solid rgba(255,255,255,.9); background: var(--card); box-shadow: var(--shadow-sm); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }

/* Dashboard */
.hero { position: relative; min-height: 380px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 48px; align-items: center; overflow: hidden; padding: 48px 50px; color: var(--ink); border: 1px solid rgba(255,255,255,.95); border-radius: 26px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.hero::before { content: ""; position: absolute; top: 0; left: 0; width: 7px; height: 100%; background: var(--blue); }
.hero::after { content: ""; position: absolute; width: 290px; height: 290px; right: -150px; top: -150px; border: 1px solid #e3e9f5; border-radius: 50%; box-shadow: 0 0 0 56px rgba(49,94,232,.025), 0 0 0 112px rgba(21,127,115,.018); }
.hero-copy, .hero-visual { position: relative; z-index: 1; }
.kicker { width: fit-content; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 11px; color: var(--green-dark); border: 1px solid #cfe8e2; border-radius: 99px; background: var(--green-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.kicker i { width: 6px; height: 6px; border-radius: 50%; background: #27a58b; box-shadow: 0 0 0 4px rgba(39,165,139,.1); }
.hero h2 { max-width: 720px; margin: 0; font-size: clamp(34px, 3.4vw, 50px); font-weight: 730; line-height: 1.18; letter-spacing: -.045em; }
.hero-copy > p { max-width: 680px; margin: 19px 0 25px; color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; color: #647087; font-size: 10px; }
.hero-notes span { padding: 7px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: rgba(247,249,253,.82); }
.hero-visual { display: grid; align-content: center; padding: 24px; border: 1px solid #e2e8f2; border-radius: 19px; background: rgba(247,249,253,.8); }
.flow-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.flow-heading span { color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.flow-heading b { font-size: 15px; }
.flow-card { display: flex; align-items: center; gap: 13px; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: rgba(255,255,255,.64); }
.flow-card.accent { color: var(--blue-dark); border-color: #dbe4ff; background: var(--blue-soft); }
.flow-num { width: 32px; height: 32px; display: grid; place-items: center; flex: none; color: var(--blue); border: 1px solid #cfd9f5; border-radius: 10px; background: #fff; font-size: 11px; font-weight: 800; }
.flow-card b, .flow-card small { display: block; }
.flow-card b { font-size: 12px; }
.flow-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.flow-line { width: 1px; height: 13px; margin: 1px 0 1px 28px; background: #dce3ee; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 42px 0 17px; }
.section-head > div { display: flex; align-items: center; gap: 12px; }
.section-head h2 { margin: 0; font-size: 22px; font-weight: 730; letter-spacing: -.025em; }
.section-head > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 12px; }
.section-index { color: var(--blue); font-size: 10px; font-weight: 800; }
.bank-preview, .bank-select-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.bank-tile { position: relative; min-height: 174px; overflow: hidden; padding: 21px; border-radius: 17px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.bank-tile:hover, .recent-card:hover { transform: translateY(-3px); border-color: #d6deea; box-shadow: var(--shadow); }
.bank-tile::after { content: attr(data-abbr); position: absolute; right: 10px; bottom: -18px; color: color-mix(in srgb, var(--bank-color) 7%, transparent); font-size: 76px; font-weight: 800; }
.bank-tile i { display: block; width: 28px; height: 4px; margin-bottom: 20px; border-radius: 4px; background: var(--bank-color); }
.bank-tile h3 { margin: 0 0 8px; font-size: 16px; }
.bank-tile p { margin: 0; color: var(--muted); font-size: 11px; }
.bank-tile strong { position: absolute; bottom: 20px; font-size: 21px; }
.bank-tile strong small { margin-left: 4px; color: var(--faint); font-size: 9px; font-weight: 500; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.recent-card { padding: 19px; border-radius: 16px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.recent-card .row { display: flex; justify-content: space-between; gap: 10px; }
.recent-card h3 { margin: 8px 0; font-size: 14px; }
.recent-card p { margin: 0; color: var(--muted); font-size: 10px; }
.empty-inline { grid-column: 1 / -1; padding: 28px; color: var(--muted); border: 1px dashed #ccd5e3; border-radius: 15px; text-align: center; background: rgba(255,255,255,.52); }

/* Measurement wizard */
.stepper { position: sticky; z-index: 9; top: 96px; max-width: 760px; display: flex; align-items: center; margin: 0 auto 28px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.9); border-radius: 16px; background: rgba(255,255,255,.82); box-shadow: var(--shadow-sm); backdrop-filter: blur(18px); }
.stepper i { flex: 1; height: 1px; background: #dbe2ec; }
.step { display: flex; align-items: center; gap: 8px; padding: 6px; color: var(--faint); border: 0; background: transparent; font-size: 11px; cursor: pointer; }
.step span { width: 28px; height: 28px; display: grid; place-items: center; color: #7a869a; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.step.is-active, .step.is-done { color: var(--blue); font-weight: 800; }
.step.is-active span { color: #fff; border-color: var(--blue); background: var(--blue); box-shadow: 0 6px 18px rgba(49,94,232,.2); }
.step.is-done span { color: var(--blue); border-color: #cfd9f5; background: var(--blue-soft); }
.wizard-panel { display: none; max-width: 1180px; margin: 0 auto; }
.wizard-panel.is-active { display: block; }
.panel-heading { margin-bottom: 22px; }
.panel-heading.split { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.panel-heading span { color: var(--blue); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.panel-heading h2 { margin: 7px 0; font-size: 29px; font-weight: 730; letter-spacing: -.035em; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.mode-card { position: relative; min-height: 205px; padding: 22px; border-radius: 18px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.mode-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mode-card:has(input:checked) { padding: 21px; border: 2px solid var(--blue); background: rgba(247,249,255,.9); box-shadow: 0 0 0 4px rgba(49,94,232,.07), var(--shadow-sm); }
.mode-card input { position: absolute; top: 19px; right: 19px; accent-color: var(--blue); }
.mode-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 17px; color: var(--blue); border: 1px solid #dbe4ff; border-radius: 12px; background: var(--blue-soft); font-size: 21px; }
.mode-card b { display: block; font-size: 16px; }
.mode-card p { margin: 8px 0; color: var(--muted); font-size: 11px; }
.mode-card em { color: var(--blue); font-size: 10px; font-style: normal; font-weight: 700; }
.recommend { position: absolute; top: -10px; left: 19px; padding: 4px 10px; color: #fff !important; border-radius: 99px; background: var(--blue); letter-spacing: 0 !important; }
.form-section { margin-top: 25px; padding: 23px; border-radius: 19px; }
.form-title { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 17px; }
.form-title h3 { margin: 0; font-size: 15px; }
.form-title p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.bank-option { position: relative; min-height: 118px; display: block; padding: 16px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(248,250,253,.66); cursor: pointer; }
.bank-option:has(input:checked) { border-color: color-mix(in srgb, var(--bank-color) 48%, #dce3ee); background: color-mix(in srgb, var(--bank-color) 6%, white); }
.bank-option input { position: absolute; top: 13px; right: 13px; accent-color: var(--bank-color); }
.bank-option i { display: block; width: 22px; height: 3px; margin-bottom: 13px; background: var(--bank-color); }
.bank-option b, .bank-option small { display: block; }
.bank-option small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.bank-option em { position: absolute; bottom: 13px; color: var(--faint); font-size: 9px; font-style: normal; }
.form-row { display: flex; gap: 13px; }
.compact-row { margin-top: 17px; }
.form-row.three > *, .form-row.four > * { flex: 1; }
.form-row .span-2 { flex: 2.1; }
.field { min-width: 180px; display: grid; align-content: start; gap: 7px; color: #606d82; font-size: 10px; font-weight: 700; }
.field input, .field select, .model-filter select { width: 100%; height: 43px; padding: 0 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; outline: 0; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 500; }
.field input:focus, .field select:focus, .model-filter select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(49,94,232,.08); }
input::placeholder { color: #a1aaba; }
.clean-input { height: 27px; padding: 0; color: var(--ink); border: 0; outline: 0; background: transparent; font-size: 15px; font-weight: 750; }
.call-estimate { display: flex; align-items: center; gap: 14px; margin-top: 17px; padding: 15px 17px; border: 1px solid #d6e1ff; border-radius: 13px; background: var(--blue-soft); }
.call-estimate span { font-size: 11px; }
.call-estimate strong { color: var(--blue-dark); font-size: 19px; }
.call-estimate small { margin-left: auto; color: var(--muted); font-size: 10px; }
.wizard-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; padding-top: 21px; border-top: 1px solid var(--line); }
.security-note { display: flex; gap: 13px; margin-bottom: 17px; padding: 15px 17px; border: 1px solid #cfe8e2; border-radius: 14px; background: var(--green-soft); }
.security-note > span { width: 36px; height: 36px; display: grid; place-items: center; flex: none; color: #fff; border-radius: 11px; background: var(--green); font-size: 9px; }
.security-note b { font-size: 12px; }
.security-note p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.model-list { display: grid; gap: 15px; }
.model-card { padding: 20px; border-radius: 17px; }
.model-head { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
.model-number { width: 40px; height: 40px; display: grid; place-items: center; color: var(--blue); border: 1px solid #d7e0fa; border-radius: 12px; background: var(--blue-soft); font-weight: 800; }
.model-note { margin: 2px 0 0; color: var(--faint); font-size: 9px; }
.connection-state, .status-chip { padding: 5px 9px; color: var(--muted); border-radius: 99px; background: #f0f3f8; font-size: 9px; }
.connection-state.ok, .status-chip.completed { color: var(--green); background: var(--green-soft); }
.connection-state.bad, .status-chip.failed, .status-chip.cancelled, .status-chip.interrupted { color: var(--danger); background: var(--danger-soft); }
.status-chip.running { color: var(--blue); background: var(--blue-soft); }
.key-field { position: relative; }
.key-field input { padding-right: 48px; }
.reveal-key { position: absolute; right: 6px; bottom: 6px; height: 30px; color: var(--blue); border: 0; background: transparent; font-size: 9px; cursor: pointer; }
.model-row-end { display: flex; justify-content: flex-end; gap: 18px; margin-top: 11px; }
.model-advanced { margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--line); }
.check-inline, .check-row label { color: var(--muted); font-size: 10px; }
.check-inline input, .check-row input { accent-color: var(--blue); }
.advanced-global { margin-top: 17px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.74); }
.advanced-global summary { color: var(--blue); font-size: 11px; font-weight: 800; cursor: pointer; }
.advanced-global .form-row { margin-top: 15px; }
.check-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 13px; }
.review-layout { display: grid; grid-template-columns: 1fr 330px; gap: 17px; }
.review-main, .review-aside { padding: 23px; border-radius: 17px; }
.review-block + .review-block { margin-top: 21px; padding-top: 19px; border-top: 1px solid var(--line-soft); }
.review-block h3, .review-aside h3 { margin: 0 0 12px; font-size: 13px; }
.review-line { display: flex; justify-content: space-between; gap: 28px; padding: 7px 0; font-size: 11px; }
.review-line span { color: var(--muted); }
.review-aside ul { display: grid; gap: 9px; padding-left: 19px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.review-total { margin-top: 23px; padding: 16px; border: 1px solid #dbe4ff; border-radius: 12px; background: var(--blue-soft); }
.review-total span, .review-total strong { display: block; }
.review-total span { color: var(--muted); font-size: 10px; }
.review-total strong { margin-top: 5px; color: var(--blue); font-size: 27px; }
.consent { display: flex; gap: 12px; margin-top: 17px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.78); cursor: pointer; }
.consent input { margin-top: 4px; accent-color: var(--blue); }
.consent b, .consent small { display: block; }
.consent small { margin-top: 4px; color: var(--muted); }

/* Run and report */
.empty-state { max-width: 620px; margin: 76px auto; padding: 43px; color: var(--ink); border: 1px dashed #cad4e3; border-radius: 20px; text-align: center; background: rgba(255,255,255,.58); }
.empty-state > div { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--blue); border-radius: 17px; background: var(--blue-soft); font-size: 22px; }
.empty-state h2 { margin: 0; font-size: 22px; }
.empty-state p { color: var(--muted); font-size: 12px; }
.project-banner, .report-cover, .help-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 30px; color: var(--ink); border: 1px solid #dfe6f1; border-radius: 20px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.project-banner { border-left: 6px solid var(--blue); }
.project-banner h2 { margin: 5px 0; font-size: 27px; }
.project-banner p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.status-dot { float: left; width: 9px; height: 9px; margin: 2px 10px 0 0; border-radius: 50%; background: #28a58b; box-shadow: 0 0 0 5px rgba(40,165,139,.11); }
.run-actions, .report-tools { display: flex; gap: 8px; }
.progress-card { margin-top: 15px; padding: 23px 27px; border-radius: 17px; }
.progress-top, .progress-meta { display: flex; justify-content: space-between; }
.progress-top b { color: var(--blue); font-size: 21px; }
.progress-track { position: relative; height: 8px; overflow: hidden; border-radius: 99px; background: #e7ebf2; }
.progress-track.large { height: 10px; margin: 13px 0 9px; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .35s ease; }
.progress-meta { color: var(--muted); font-size: 9px; }
.model-progress-list { display: grid; gap: 12px; margin-top: 15px; }
.model-progress-card { padding: 19px 22px; border-radius: 16px; }
.model-progress-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.model-progress-head h3 { margin: 0; font-size: 14px; }
.model-progress-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.model-progress-card .progress-track { margin: 14px 0 9px; }
.model-stats { display: flex; flex-wrap: wrap; gap: 17px; color: var(--muted); font-size: 9px; }
.model-stats b { color: var(--ink); }
.recent-mini { display: flex; gap: 7px; margin-top: 12px; overflow: hidden; }
.recent-mini span { padding: 4px 7px; color: var(--muted); border-radius: 6px; background: #f1f4f8; font: 9px ui-monospace, monospace; white-space: nowrap; }
.run-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 17px; padding: 16px 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.74); }
.run-foot p { margin: 0; color: var(--muted); font-size: 10px; }
.report-cover { border-top: 5px solid var(--blue); }
.report-label { color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.report-cover h2 { margin: 8px 0 6px; font-size: 29px; }
.report-cover p { margin: 0; color: var(--muted); font-size: 11px; }
.report-quality { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-top: 14px; }
.quality-card { padding: 16px 18px; border-radius: 14px; }
.quality-card span, .quality-card strong, .quality-card small { display: block; }
.quality-card span { color: var(--muted); font-size: 9px; }
.quality-card strong { margin: 5px 0 3px; font-size: 21px; }
.quality-card small { color: var(--faint); font-size: 8px; }
.report-notice { display: flex; gap: 17px; margin-top: 14px; padding: 13px 17px; border: 1px solid #dbe4ff; border-radius: 13px; background: var(--blue-soft); }
.report-notice span { flex: none; color: var(--blue); font-size: 10px; font-weight: 800; }
.report-notice p { margin: 0; color: var(--muted); font-size: 10px; }
.report-contents { position: sticky; top: 83px; z-index: 8; display: flex; gap: 6px; margin-top: 14px; padding: 8px; overflow-x: auto; border: 1px solid rgba(214,222,234,.9); border-radius: 14px; background: rgba(255,255,255,.82); box-shadow: 0 8px 26px rgba(24,43,72,.06); backdrop-filter: blur(18px); }
.report-contents a { flex: none; padding: 7px 10px; color: var(--muted); border-radius: 8px; font-size: 9px; text-decoration: none; white-space: nowrap; }
.report-contents a:hover, .report-contents a:focus-visible { color: var(--blue); background: var(--blue-soft); }
.report-section { margin-top: 39px; }
.report-section[id] { scroll-margin-top: 145px; }
.report-head { margin-top: 0; }
.model-filter { display: flex !important; align-items: center !important; gap: 9px !important; }
.model-filter label { color: var(--muted); font-size: 9px; }
.model-filter select { width: 190px; height: 36px; }
.profile-list { display: grid; gap: 12px; }
.profile-bank { padding: 22px; border-radius: 17px; }
.profile-bank-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 17px; }
.profile-bank-head div { padding-left: 12px; border-left: 3px solid var(--bank-color); }
.profile-bank-head h3 { margin: 0; font-size: 16px; }
.profile-bank-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.profile-bank-head span { color: var(--muted); font-size: 9px; }
.profile-rows { display: grid; gap: 13px; }
.profile-row { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(300px, 2fr) 78px; gap: 15px; align-items: center; }
.profile-label b, .profile-label small { display: block; }
.profile-label b { font-size: 11px; }
.profile-label small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.preference-scale { position: relative; height: 28px; }
.preference-scale::before { content: ""; position: absolute; top: 12px; inset-inline: 0; height: 4px; border-radius: 99px; background: #e3e8ef; }
.preference-scale::after { content: ""; position: absolute; top: 7px; left: 50%; width: 1px; height: 14px; background: #9ba5b4; }
.preference-dot { position: absolute; top: 6px; left: calc(var(--value) * 1%); width: 16px; height: 16px; transform: translateX(-50%); border: 3px solid #fff; border-radius: 50%; background: var(--bank-color); box-shadow: 0 0 0 1px var(--bank-color), 0 3px 8px rgba(0,0,0,.12); }
.preference-ends { position: absolute; inset: 22px 0 auto; display: flex; justify-content: space-between; color: var(--faint); font-size: 8px; }
.profile-score { text-align: right; }
.profile-score strong { display: block; font-size: 20px; }
.profile-score small { color: var(--faint); font-size: 8px; }
.chart-card { padding: 21px; }
.svg-chart { min-height: 180px; overflow-x: auto; }
.chart-empty { min-height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.chart-note { margin-top: 11px; color: var(--muted); font-size: 9px; }
.stability-grid, .insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.stability-card, .insight-card { padding: 19px; border-radius: 15px; }
.stability-card h3 { margin: 0 0 13px; font-size: 12px; }
.stability-ring { --pct: 0; width: 78px; height: 78px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--pct) * 1%), #e8ebf1 0); }
.stability-ring::before { content: attr(data-value); width: 59px; height: 59px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 17px; }
.stability-card p { margin: 0; color: var(--muted); font-size: 9px; text-align: center; }
.insight-card span { color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.insight-card h3 { margin: 7px 0; font-size: 13px; }
.insight-card p { margin: 0; color: var(--muted); font-size: 10px; }
.boundary-box { margin-top: 38px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.62); }
.boundary-box h3 { margin: 0; font-size: 14px; }
.boundary-box ul { display: grid; gap: 7px; padding-left: 19px; color: var(--muted); font-size: 10px; }
.svg-chart svg text { fill: #66738a !important; }
.finding-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.finding-card { min-height: 132px; padding: 18px; border: 1px solid #dfe6f1; border-radius: 16px; background: rgba(255,255,255,.82); box-shadow: 0 8px 24px rgba(28,46,78,.055); }
.finding-card span { display: block; color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.finding-card strong { display: block; margin: 12px 0 7px; font-size: 13px; line-height: 1.45; }
.finding-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.report-two-col { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: 12px; align-items: start; }
.report-two-col + .report-table-card, .stability-grid + .report-two-col { margin-top: 12px; }
.report-table-card { padding: 20px; overflow: hidden; }
.card-mini-head { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.card-mini-head h3 { margin: 0; font-size: 13px; }
.card-mini-head span { color: var(--faint); font-size: 8px; text-align: right; }
.report-table-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: 12px; }
.report-table-wrap.compact { max-height: 510px; }
.report-data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.report-table-wrap.compact .report-data-table { min-width: 620px; }
.report-data-table th, .report-data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 9px; text-align: left; vertical-align: middle; }
.report-data-table thead th { position: sticky; top: 0; z-index: 1; color: #536071; background: #f5f7fa; font-size: 8px; letter-spacing: .03em; white-space: nowrap; }
.report-data-table tbody th { color: var(--ink); font-weight: 700; }
.report-data-table tbody tr:last-child > * { border-bottom: 0; }
.report-data-table tbody tr:hover { background: #f8fafc; }
.report-data-table td b, .report-data-table td small, .report-data-table th b, .report-data-table th small { display: block; }
.report-data-table td small, .report-data-table th small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.matrix-chart { min-height: 330px; }
.range-arrow { display: inline-block; margin: 4px 6px; color: var(--blue); }
.readiness-pill { display: inline-flex; padding: 4px 7px; border-radius: 99px; font-size: 8px; font-weight: 700; }
.readiness-pill.ready { color: #17665a; background: #e2f4ee; }
.readiness-pill.limited { color: #8a5d1f; background: #fff2dc; }
.stacked-chart { min-height: 220px; }
.stacked-legend { display: flex; justify-content: flex-end; gap: 13px; margin: 2px 0 23px; color: var(--muted); font-size: 8px; }
.stacked-legend span { display: inline-flex; align-items: center; gap: 5px; }
.stacked-legend i { width: 9px; height: 9px; border-radius: 3px; }
.stacked-row { display: grid; grid-template-columns: 120px minmax(260px,1fr); gap: 12px; align-items: center; margin-bottom: 19px; }
.stacked-row > div:first-child b, .stacked-row > div:first-child small { display: block; }
.stacked-row > div:first-child b { font-size: 10px; }
.stacked-row > div:first-child small { margin-top: 3px; color: var(--faint); font-size: 8px; }
.stacked-track { display: flex; height: 28px; overflow: hidden; border-radius: 8px; background: #eef1f5; }
.stacked-track i { display: grid; place-items: center; height: 100%; font-style: normal; }
.stacked-track span { color: #fff; font-size: 8px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.l1 { background: #3d78c5; }
.l2 { background: #9a87c2; }
.l3 { background: #2c8b77; }
.summary-stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.summary-stat-list > div { padding: 15px; border: 1px solid var(--line-soft); border-radius: 12px; background: #f8fafc; }
.summary-stat-list span, .summary-stat-list strong, .summary-stat-list small { display: block; }
.summary-stat-list span { color: var(--muted); font-size: 8px; }
.summary-stat-list strong { margin: 7px 0 4px; font-size: 15px; }
.summary-stat-list small { color: var(--faint); font-size: 8px; line-height: 1.5; }
.method-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; margin-top: 12px; }
.method-grid article { padding: 15px; border: 1px solid #dfe5ed; border-radius: 13px; background: rgba(255,255,255,.72); }
.method-grid span { color: var(--blue); font-size: 8px; font-weight: 800; }
.method-grid p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

/* History and help */
.history-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.history-toolbar h2 { margin: 0; font-size: 27px; }
.history-toolbar p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.import-note { margin-top: 17px; padding: 13px 16px; color: var(--muted); border: 1px solid #d7e1fb; border-radius: 13px; background: var(--blue-soft); font-size: 10px; }
.project-table-wrap { margin-top: 17px; overflow: auto; border-radius: 16px; }
.project-table { width: 100%; border-collapse: collapse; }
.project-table th, .project-table td { padding: 15px 16px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; font-size: 10px; }
.project-table th { color: var(--muted); background: rgba(247,249,252,.86); font-size: 8px; letter-spacing: .08em; }
.project-table tbody tr:last-child td { border: 0; }
.project-table tbody tr:hover { background: rgba(247,249,253,.8); }
.project-name b, .project-name small { display: block; }
.project-name b { max-width: 300px; font-size: 11px; }
.project-name small { margin-top: 5px; color: var(--faint); }
.table-actions { display: flex; justify-content: flex-end; gap: 7px; }
.mini-btn { padding: 6px 9px; color: #4c596f; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 9px; cursor: pointer; }
.mini-btn:hover { color: var(--blue); border-color: #c4d0f5; }
.help-intro { border-left: 6px solid var(--blue); }
.help-intro > span { width: 55px; height: 55px; display: grid; place-items: center; flex: none; color: var(--blue); border: 1px solid #dbe4ff; border-radius: 16px; background: var(--blue-soft); font-size: 25px; }
.help-intro h2 { margin: 0; font-size: 21px; }
.help-intro p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.help-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.help-steps article { padding: 19px; border-radius: 15px; }
.help-steps article > b { color: var(--blue); font-size: 21px; }
.help-steps h3 { margin: 11px 0 6px; font-size: 13px; }
.help-steps p { margin: 0; color: var(--muted); font-size: 9px; }
.help-intro-actions { display: flex; gap: 8px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.help-grid .card { padding: 23px; }
.help-grid h3 { margin-top: 0; }
.help-grid dl { margin: 0; }
.help-grid dl div { display: grid; grid-template-columns: 90px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 10px; }
.help-grid dt { color: var(--muted); }
.help-grid dd { margin: 0; }
.help-grid details { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.help-grid summary { font-size: 11px; font-weight: 700; cursor: pointer; }
.help-grid details p { color: var(--muted); font-size: 9px; }
.warning-card { margin-top: 16px; padding: 20px 23px; border-left: 4px solid var(--amber); border-radius: 13px; background: #fff8f0; }
.warning-card h3 { margin: 0; color: #7c4d2b; font-size: 13px; }
.warning-card p { margin: 7px 0 0; color: #765f4e; font-size: 10px; }

/* Dialogs and feedback */
dialog { width: min(660px, calc(100% - 32px)); padding: 0; color: var(--ink); border: 1px solid rgba(255,255,255,.9); border-radius: 19px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-lg); backdrop-filter: blur(24px); }
dialog::backdrop { background: rgba(20,30,48,.42); backdrop-filter: blur(6px); }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--line-soft); }
.dialog-head span { color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.dialog-head h2 { margin: 6px 0; }
.dialog-head p { margin: 0; color: var(--muted); font-size: 10px; }
.resume-models { max-height: 50vh; display: grid; gap: 12px; overflow: auto; padding: 21px 24px; }
.resume-row { padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.resume-row b { display: block; margin-bottom: 10px; font-size: 11px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--line-soft); background: #fafbfd; }
.toast { position: fixed; z-index: 400; left: 50%; bottom: 28px; max-width: min(520px, calc(100% - 30px)); padding: 11px 17px; color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: #253149; box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #9f3547; }

/* Guided onboarding */
body.tour-open { overflow: hidden; }
.product-tour { position: fixed; z-index: 300; inset: 0; }
.tour-spotlight { position: fixed; z-index: 301; border: 3px solid #86a3ff; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(18, 27, 45, .55), 0 0 0 7px rgba(134,163,255,.24), 0 18px 60px rgba(22,35,62,.22); pointer-events: none; transition: left .24s ease, top .24s ease, width .24s ease, height .24s ease, border-radius .24s ease; }
.tour-bubble { position: fixed; z-index: 302; width: min(380px, calc(100vw - 28px)); padding: 22px; color: var(--ink); border: 1px solid rgba(255,255,255,.9); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 28px 80px rgba(13,28,56,.24); backdrop-filter: blur(22px); transition: left .24s ease, top .24s ease; }
.tour-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.tour-meta button { padding: 3px; color: var(--muted); border: 0; background: transparent; font-size: 10px; cursor: pointer; }
.tour-meta button:hover { color: var(--blue); }
.tour-icon { width: 42px; height: 42px; display: grid; place-items: center; margin: 18px 0 14px; color: #fff; border-radius: 13px; background: var(--blue); font-size: 11px; font-weight: 800; box-shadow: 0 8px 22px rgba(49,94,232,.2); }
.tour-bubble h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.tour-bubble > p { margin: 9px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.tour-progress { display: flex; gap: 6px; margin-bottom: 18px; }
.tour-progress i { width: 7px; height: 7px; border-radius: 99px; background: #dfe4ed; transition: width .18s ease, background .18s ease; }
.tour-progress i.is-active { width: 22px; background: var(--blue); }
.tour-progress i.is-done { background: #9eb2f4; }
.tour-actions { display: flex; justify-content: space-between; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

@media (max-width: 1180px) {
  .privacy-pill { display: none; }
  .hero { grid-template-columns: 1fr .8fr; gap: 28px; padding: 42px; }
  .bank-preview, .bank-select-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-grid, .insight-grid { grid-template-columns: repeat(2, 1fr); }
  .review-layout { grid-template-columns: 1fr; }
  .report-quality { grid-template-columns: repeat(2, 1fr); }
  .stability-grid { grid-template-columns: repeat(2, 1fr); }
  .finding-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .method-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 960px) {
  .auth-stage { grid-template-columns: 1fr; max-width: 620px; }
  .auth-story { min-height: 350px; padding: 40px; border-right: 0; border-bottom: 1px solid #dbe4f8; }
  .auth-signal { margin-top: 48px; }
  .auth-story h1 { font-size: 41px; }
  .auth-capabilities { margin-top: 28px; }
  .auth-panel { padding: 42px; }
  .sidebar { transform: translateX(calc(-100% - 28px)); transition: transform .22s ease; }
  .sidebar.is-open { transform: none; }
  .sidebar.is-open + .sidebar-scrim { display: block; }
  .main { margin-left: 0; }
  .mobile-menu { display: block; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .report-two-col { grid-template-columns: 1fr; }
  .finding-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .method-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .auth-gate { padding: 16px; }
  .auth-stage { min-height: 0; border-radius: 24px; }
  .auth-story { min-height: 300px; padding: 28px 25px; }
  .auth-signal { margin-top: 32px; }
  .auth-story h1 { font-size: 33px; }
  .auth-story > p { font-size: 12px; }
  .auth-capabilities { gap: 18px; }
  .auth-panel { padding: 32px 25px; }
  .auth-trust { flex-wrap: wrap; }
  .topbar { height: 74px; padding-inline: 17px; }
  .topbar h1 { font-size: 18px; }
  .user-chip, .top-create { display: none; }
  .tour-replay { width: 36px; justify-content: center; padding: 0; font-size: 0; }
  .tour-replay span { font-size: 14px; }
  .content { padding: 22px 15px 58px; }
  .hero { min-height: 0; padding: 34px 27px; border-radius: 21px; }
  .hero h2 { font-size: 31px; }
  .mode-grid, .help-steps { grid-template-columns: 1fr 1fr; }
  .form-row, .panel-heading.split, .report-cover, .history-toolbar, .help-intro { flex-direction: column; align-items: stretch; }
  .help-intro-actions { flex-wrap: wrap; }
  .field { min-width: 0; }
  .call-estimate { align-items: flex-start; flex-wrap: wrap; }
  .call-estimate small { width: 100%; margin-left: 0; }
  .report-tools, .run-actions { flex-wrap: wrap; }
  .profile-row { grid-template-columns: 1fr; }
  .preference-scale { margin-bottom: 10px; }
  .profile-score { text-align: left; }
  .help-grid { grid-template-columns: 1fr; }
  .summary-stat-list { grid-template-columns: 1fr 1fr; }
  .stacked-row { grid-template-columns: 95px minmax(220px,1fr); }
  .stepper { top: 82px; }
}

@media (max-width: 520px) {
  .logout-button { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .bank-preview, .bank-select-grid, .mode-grid, .recent-grid, .report-quality, .stability-grid, .insight-grid, .help-steps { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .stepper { justify-content: center; }
  .step { font-size: 0; }
  .step span { font-size: 11px; }
  .project-banner, .run-foot { align-items: stretch; flex-direction: column; }
  .report-cover { padding: 24px; }
  .report-tools > * { flex: 1; }
  .finding-grid, .method-grid, .summary-stat-list { grid-template-columns: 1fr; }
  .stacked-row { grid-template-columns: 1fr; gap: 7px; }
  .wizard-actions .btn { flex: 1; }
  .tour-bubble { padding: 19px; }
}

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

@media print {
  :root { --ink: #14202b; --muted: #566574; --faint: #7c8791; --card: #fff; --line: #d8e0e7; --line-soft: #e8edf1; }
  body { color: var(--ink); background: #fff; }
  .ambient, .auth-gate, .sidebar, .sidebar-scrim, .topbar, .report-tools, .model-filter, .product-tour, .report-contents { display: none !important; }
  .main { margin: 0; }
  .content { max-width: none; padding: 0; }
  .view { display: none !important; }
  #view-report.is-active, #reportContent { display: block !important; }
  .report-section { break-inside: auto; }
  .profile-bank, .finding-card, .stability-card, .insight-card, .method-grid article, .boundary-box { break-inside: avoid; box-shadow: none; }
  .card { box-shadow: none; }
  .report-table-wrap, .report-table-wrap.compact { max-height: none; overflow: visible; border: 0; }
  .report-data-table { min-width: 0; }
  .report-data-table thead { display: table-header-group; }
  .report-data-table tr { break-inside: avoid; }
}
