:root {
  --bg: #F6F7FB; --surface: #FFFFFF; --surface-2: #F9FAFC; --ink: #0B1530; --ink-2: #273352; --muted: #5E6880; --faint: #8A93A8;
  --line: #E5E8F0; --line-2: #EEF0F5;
  --navy: #0F1E46; --navy-2: #1A2B5E; --ai: #5B4BFF; --ai-2: #7C5CFF; --ai-soft: #EFEDFF; --ai-ink: #3E2FD6;
  --ok: #0E9F6E; --ok-soft: #E7F7F0; --warn: #B7791F; --warn-soft: #FDF4E3; --bad: #D64550; --bad-soft: #FDECEE; --info-soft: #EAF1FF;
  --r: 14px; --r-sm: 10px; --r-lg: 20px;
  --sh: 0 1px 2px rgba(15, 30, 70, .04), 0 2px 12px rgba(15, 30, 70, .05);
  --sh-lg: 0 2px 4px rgba(15, 30, 70, .04), 0 18px 48px rgba(15, 30, 70, .10);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Plus Jakarta Sans', var(--font);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; line-height: 1.2; color: var(--ink); }
p { margin: 0; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--ai); outline-offset: 2px; }

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 1px 2px rgba(15,30,70,.2), inset 0 1px 0 rgba(255,255,255,.08); }
.btn-primary:hover { background: var(--navy-2); }
.btn-ai { background: linear-gradient(135deg, var(--ai), var(--ai-2)); color: #fff; box-shadow: 0 4px 14px rgba(91,75,255,.28); }
.btn-ai:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: #D7DBE6; }
.btn-text { background: none; color: var(--ink-2); padding: 0 10px; }
.btn-text:hover { background: var(--line-2); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; position: relative; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.pad { padding: 20px; }
.pad-lg { padding: 28px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.ai { background: var(--ai-soft); color: var(--ai-ink); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.navy { background: var(--navy); color: #fff; }
.badge.outline { background: none; border: 1px solid var(--line); }
.badge svg.i { width: 13px; height: 13px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .xs { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.stack, .stack-sm, .stack-lg { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); } .stack-sm { gap: 8px; } .stack-lg { gap: 28px; }
.grid { display: grid; gap: 16px; }
.grid > *, .split > *, .explorer > *, .detail > *, .hero-grid > *, .steps > * { min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ai-ink); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg.i { width: 36px; height: 36px; color: var(--faint); margin-bottom: 10px; }
.skeleton { background: linear-gradient(90deg, var(--line-2), #F7F8FB, var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); min-height: 120px; }
@keyframes sk { to { background-position: -200% 0; } }

/* forms */
label.f { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.f .hint { font-weight: 400; color: var(--faint); }
.input, select.input, textarea.input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; font-weight: 400; transition: border .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input:focus { outline: none; border-color: var(--ai); box-shadow: 0 0 0 3px rgba(91,75,255,.14); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); user-select: none; }
.chip:hover { border-color: #CDD2DE; }
.chip.on, .chip:has(input:checked) { background: var(--ai-soft); border-color: #CFC9FF; color: var(--ai-ink); }
.chip input { display: none; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ai); }
.form-error { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ---------- public layout ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line-2); }
.nav-in { max-width: 1200px; margin: 0 auto; height: 68px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--navy); }
.logo img { width: 30px; height: 30px; }
.logo span { color: var(--ai); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { white-space: nowrap; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-links a:hover, .nav-links a.on { color: var(--ink); background: var(--line-2); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; display: grid; gap: 12px; }
.section-head h2 { font-size: 36px; }

.hero { position: relative; overflow: hidden; padding: 84px 0 64px; background:
  radial-gradient(900px 420px at 85% -10%, rgba(124,92,255,.14), transparent 60%),
  radial-gradient(700px 380px at -5% 10%, rgba(15,30,70,.07), transparent 60%), var(--surface); border-bottom: 1px solid var(--line-2); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: 54px; line-height: 1.06; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--ai), #9B6BFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 560px; margin-top: 20px; }
.hero .ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.trust-line { display: flex; gap: 18px; margin-top: 28px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.trust-line span { display: inline-flex; gap: 6px; align-items: center; }
.trust-line svg.i { color: var(--ok); width: 16px; height: 16px; }
.hero-visual { position: relative; }
.hero-card { padding: 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-lg); border: 1px solid var(--line); }
.hero-float { position: absolute; right: -28px; bottom: -64px; width: 230px; padding: 14px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: var(--sh-lg); }
.hero-float .xs { color: #B9C2E0; }
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stats-band > div { padding: 22px 24px; border-right: 1px solid var(--line); }
.stats-band > div:last-child { border-right: 0; }
.stats-band b { display: block; font-family: var(--display); font-size: 28px; letter-spacing: -0.03em; color: var(--navy); }
.stats-band span { font-size: 13px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { padding: 28px; }
.step .num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ai-soft); color: var(--ai-ink); font-weight: 800; margin-bottom: 18px; font-family: var(--display); }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.feature { padding: 24px; }
.feature .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--navy); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 20px; justify-content: center; }
.plan { padding: 30px; display: grid; gap: 20px; align-content: start; }
.plan.pro { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: var(--sh-lg); position: relative; }
.plan.pro h3, .plan.pro .price b { color: #fff; }
.plan.pro .muted { color: #B9C2E0; }
.plan .price b { font-family: var(--display); font-size: 40px; letter-spacing: -0.03em; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg.i { color: var(--ok); margin-top: 2px; }
.plan.pro li svg.i { color: #A79BFF; }
.toggle { display: inline-flex; padding: 4px; background: var(--line-2); border-radius: 12px; gap: 4px; }
.toggle button { height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: none; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.toggle button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh); }
.disclaimer { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--r); background: var(--info-soft); color: var(--ink-2); font-size: 13px; line-height: 1.55; border: 1px solid #D9E4FB; }
.disclaimer svg.i { color: #3B6FD8; margin-top: 1px; }
.cta-band { background: linear-gradient(135deg, var(--navy), #24307A 60%, #3B2FA8); color: #fff; border-radius: var(--r-lg); padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2 { color: #fff; font-size: 30px; }
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; font-size: 14px; }
.footer-grid h4 { font-size: 13px; margin-bottom: 12px; font-family: var(--font); color: var(--ink); }
.footer-grid a { display: block; color: var(--muted); padding: 3px 0; }
.footer-grid a:hover { color: var(--ink); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(160deg, var(--navy), #222C70 55%, #3A2D9E); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .logo { color: #fff; }
.auth-side .logo span { color: #B7AEFF; }
.auth-side h2 { color: #fff; font-size: 32px; max-width: 420px; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 400px; display: grid; gap: 18px; }
.auth-box h1 { font-size: 28px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side .logo { padding: 4px 10px 18px; }
.side a.nav-i { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 500; }
.side a.nav-i:hover { background: var(--line-2); color: var(--ink); }
.side a.nav-i.on { background: var(--ai-soft); color: var(--ai-ink); font-weight: 600; }
.side .lbl { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; }
.side .upsell { margin-top: auto; padding: 16px; border-radius: 12px; background: linear-gradient(150deg, var(--navy), #2E2F8E); color: #fff; font-size: 13px; display: grid; gap: 10px; }
.side .upsell .muted { color: #B9C2E0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(246,247,251,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.search { flex: 1; max-width: 460px; position: relative; }
.search svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 38px; background: var(--surface); }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--navy), var(--ai)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; cursor: pointer; border: 0; }
.content { padding: 28px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-height: 480px; overflow: auto; z-index: 60; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 60; padding: 6px; }
.menu a, .menu button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; border: 0; background: none; font-size: 14px; cursor: pointer; text-align: left; color: var(--ink-2); }
.menu a:hover, .menu button:hover { background: var(--line-2); }
.rel { position: relative; }

/* stats */
.stat { padding: 18px 20px; display: grid; gap: 6px; }
.stat .k { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat .k svg.i { width: 16px; height: 16px; color: var(--faint); }
.stat .v { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--navy); }
.alert { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid #F3DFB5; color: #7A5212; font-size: 14px; }
.alert.ai { background: var(--ai-soft); border-color: #DCD7FF; color: var(--ai-ink); }

/* scholarship card */
.s-card, .k-card, .detail-hero, .sec, .plan, .filters, .calc-out { grid-template-columns: minmax(0, 1fr); }
.s-card { padding: 18px; display: grid; gap: 14px; transition: box-shadow .2s, border-color .2s, transform .2s; position: relative; }
.s-card:hover { box-shadow: var(--sh-lg); border-color: #D5DAE6; transform: translateY(-1px); }
.s-card h3 { font-size: 16px; line-height: 1.35; font-family: var(--font); font-weight: 650; letter-spacing: -0.01em; }
.s-card .prov { font-size: 13px; color: var(--muted); }
.s-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 13px; }
.s-meta div { display: flex; align-items: center; gap: 7px; color: var(--ink-2); min-width: 0; }
.s-meta svg.i { width: 15px; height: 15px; color: var(--faint); }
.s-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.amount { font-family: var(--display); font-weight: 700; color: var(--navy); font-size: 15px; }
.save-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--faint); }
.save-btn:hover { color: var(--ai); }
.save-btn.on { color: var(--ai); background: var(--ai-soft); border-color: #D7D1FF; }
.save-btn.on svg.i { fill: currentColor; }
.match { display: inline-flex; align-items: center; gap: 8px; }
.ring { --p: 0; --c: var(--ai); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line-2) 0); flex: none; }
.ring::before { content: attr(data-v); width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); }
.ring.lg { width: 92px; height: 92px; }
.ring.lg::before { width: 78px; height: 78px; font-size: 24px; font-family: var(--display); }
.m-excellent { --c: #0E9F6E; } .m-strong { --c: var(--ai); } .m-possible { --c: #D69E2E; } .m-low { --c: #C9CED9; }
.lbl-excellent { background: var(--ok-soft); color: var(--ok); } .lbl-strong { background: var(--ai-soft); color: var(--ai-ink); } .lbl-possible { background: var(--warn-soft); color: var(--warn); } .lbl-low { background: var(--line-2); color: var(--muted); }

/* explorer */
.explorer { display: grid; grid-template-columns: 264px 1fr; gap: 24px; align-items: start; }
.filters { padding: 18px; display: grid; gap: 18px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.filters h4 { font-size: 13px; font-family: var(--font); margin-bottom: 8px; color: var(--ink); }
.big-search { position: relative; }
.big-search svg.i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 20px; height: 20px; }
.big-search input { height: 52px; padding-left: 46px; font-size: 15px; border-radius: 14px; box-shadow: var(--sh); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }

/* detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.detail-hero { padding: 28px; display: grid; gap: 18px; }
.detail-hero h1 { font-size: 30px; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kv > div { background: var(--surface); padding: 14px 16px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-weight: 650; font-size: 14px; margin-top: 2px; }
.sec { padding: 24px 28px; display: grid; gap: 12px; }
.sec h2 { font-size: 18px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ok svg.i { color: var(--ok); } .ticks .warn svg.i { color: var(--warn); } .ticks .bad svg.i { color: var(--bad); }
.timeline { display: grid; gap: 0; }
.timeline > div { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline > div::before { content: ''; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline > div:last-child::before { display: none; }
.timeline .pt { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); margin-top: 1px; }
.timeline .pt.done { background: var(--ai); border-color: var(--ai); }
.sticky { position: sticky; top: 84px; }
.analysis { background: linear-gradient(180deg, #FBFAFF, var(--surface)); border-color: #E3DFFF; }

/* tracker */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #EEF0F6; border-radius: var(--r); padding: 10px; min-height: 200px; display: grid; gap: 10px; align-content: start; transition: background .15s; }
.col.over { background: var(--ai-soft); outline: 2px dashed #C9C1FF; }
.col-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; font-weight: 650; font-size: 13px; }
.col-h .badge { height: 20px; background: var(--surface); }
.k-card { padding: 14px; display: grid; gap: 10px; cursor: grab; }
.k-card:active { cursor: grabbing; }
.k-card.dragging { opacity: .5; }
.k-card h4 { font-size: 14px; font-family: var(--font); font-weight: 650; line-height: 1.35; }
.bar { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ai), var(--ai-2)); border-radius: 99px; }
.bar.ok > i { background: var(--ok); }
.stage-sel { height: 30px; font-size: 12px; padding: 0 8px; border-radius: 8px; }

/* chat */
.chat { display: grid; grid-template-rows: 1fr auto; height: calc(100vh - 64px - 56px - 80px); min-height: 520px; overflow: hidden; }
.msgs { overflow-y: auto; padding: 24px; display: grid; gap: 18px; align-content: start; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; max-width: 860px; }
.msg .who { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.msg.ai .who { background: linear-gradient(135deg, var(--ai), var(--ai-2)); color: #fff; }
.msg.me .who { background: var(--navy); color: #fff; }
.msg .body { font-size: 14.5px; line-height: 1.65; padding-top: 6px; }
.msg.me .body { font-weight: 500; }
.msg .body p + p, .msg .body ul { margin-top: 8px; }
.msg .body ul { padding-left: 18px; margin-bottom: 0; }
.msg .body li { margin: 4px 0; }
.msg .cards { margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }
.composer { border-top: 1px solid var(--line); padding: 14px; display: grid; gap: 10px; background: var(--surface); }
.composer form { display: flex; gap: 10px; }
.prompts { display: flex; gap: 8px; flex-wrap: wrap; }
.prompts button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 99px; padding: 7px 12px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); text-align: left; }
.prompts button:hover { border-color: #CFC9FF; background: var(--ai-soft); color: var(--ai-ink); }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); margin-right: 4px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* tabs / tables */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--ai); }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:hover td { background: #FBFCFE; }
table.t td:first-child { white-space: nowrap; }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(11,21,48,.45); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal { width: 100%; max-width: 620px; max-height: calc(100vh - 40px); overflow: auto; animation: pop .18s; }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-h h3 { font-size: 18px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 200; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--sh-lg); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: pop .2s; max-width: 380px; }
.toast.err { background: var(--bad); }

/* onboarding */
.onb { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 24px 0 28px; }
.progress div { display: grid; gap: 8px; font-size: 12px; font-weight: 600; color: var(--faint); }
.progress div::before { content: ''; height: 4px; border-radius: 99px; background: var(--line); }
.progress div.on { color: var(--ai-ink); } .progress div.on::before { background: linear-gradient(90deg, var(--ai), var(--ai-2)); }
.profile-card { background: linear-gradient(150deg, var(--navy), #24307A); color: #fff; border: 0; }
.profile-card .muted { color: #B9C2E0; }
.profile-card h3 { color: #fff; }
.mini-bars { display: grid; gap: 10px; }
.mini-bars .r { display: grid; grid-template-columns: 130px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; }
.calc-out { display: grid; gap: 14px; }
.calc-out .line { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.calc-out .big { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.stacked { height: 14px; border-radius: 99px; overflow: hidden; display: flex; background: var(--bad-soft); }
.stacked i { display: block; height: 100%; }
textarea.writer-out { min-height: 420px; font-size: 14.5px; line-height: 1.7; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; } .menu-btn { display: grid; }
  .nav.open .nav-links { display: grid; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); padding: 12px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--sh-lg); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-visual { display: none; }
  .detail { grid-template-columns: 1fr; } .sticky { position: static; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; left: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--sh-lg); }
  .shell.open .side { transform: none; }
  .shell.open::after { content: ''; position: fixed; inset: 0; background: rgba(11,21,48,.35); z-index: 80; }
  .explorer { grid-template-columns: minmax(0, 1fr); } .filters { position: static; max-height: none; }
  .filters.collapsed > :not(.filters-toggle) { display: none; }
  .steps, .g3, .split { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-side { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, 1fr); }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stats-band > div:nth-child(2) { border-right: 0; } .stats-band > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px; }
}
@media (min-width: 901px) { .filters-toggle, .side-toggle { display: none !important; } }
@media (max-width: 600px) {
  .wrap, .nav-in { padding: 0 16px; } .content { padding: 18px 16px; } .topbar { padding: 0 16px; }
  .hero { padding: 48px 0 40px; } .hero h1 { font-size: 36px; } .hero p.lead { font-size: 16px; }
  .section { padding: 56px 0; } .section-head h2 { font-size: 28px; }
  .nav-cta .btn-ghost { display: none; } .nav-in { gap: 10px; } .nav-cta .btn { padding: 0 12px; } .nav-cta .btn svg.i { display: none; }
  .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } .stat .v { font-size: 21px; }
  .cards { grid-template-columns: 1fr; }
  .detail-hero, .sec { padding: 20px; } .detail-hero h1 { font-size: 24px; }
  .dropdown { position: fixed; left: 12px; right: 12px; top: 70px; width: auto; }
  .chat { height: calc(100vh - 64px - 36px - 70px); }
  .msgs { padding: 16px; }
  .search { display: none; }
}
