:root {
  color-scheme: dark;
  --page: #0b0e14;
  --surface: #111722;
  --surface-raised: #151e2b;
  --line: #273244;
  --text: #f2f5fa;
  --muted: #9aa8ba;
  --accent: #8b9cff;
  --accent-strong: #6f83ff;
  --mint: #74e1c1;
  --danger: #ff8d9a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; color: var(--text); background: var(--page); }
body::before { position: fixed; z-index: -1; inset: 0; background: radial-gradient(ellipse at 50% -20%, rgba(82, 102, 180, .15), transparent 55%); content: ""; pointer-events: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: #c0caff; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, label:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.topbar { position: sticky; z-index: 10; top: 0; width: 100%; height: 76px; display: flex; align-items: center; gap: 32px; padding: 0 max(32px, calc((100% - 1200px) / 2)); border-bottom: 1px solid rgba(120, 139, 170, .16); background: rgba(11, 14, 20, .86); backdrop-filter: blur(18px); }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 10px; color: var(--text); font-size: 15px; font-weight: 750; letter-spacing: -.035em; white-space: nowrap; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand span { color: var(--accent); }
.topbar nav, footer nav { display: flex; align-items: center; gap: 28px; }
.topbar nav { margin-left: auto; }
.topbar nav a, footer nav a { color: var(--muted); font-size: 13px; transition: color .18s ease; }
.topbar nav a:hover, footer nav a:hover { color: var(--text); }
.account { display: flex; align-items: center; gap: 12px; }
.user-name { max-width: 180px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-menu { display: none; align-items: center; justify-content: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); cursor: pointer; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 17px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 680; line-height: 1.15; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { border-color: #8697ff; color: #101421; background: linear-gradient(135deg, #a7b2ff, #8191ff); box-shadow: 0 8px 28px rgba(111, 131, 255, .2); }
.button-primary:hover { color: #101421; background: #bdc5ff; }
.button-outline { border-color: var(--line); color: #e2e8f2; background: rgba(255, 255, 255, .025); }
.button-outline:hover { border-color: #66779a; color: #fff; background: rgba(255, 255, 255, .06); }

main { width: min(1120px, calc(100% - 64px)); margin: 0 auto; }
.hero { min-height: 590px; display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 68px; padding: 76px 0 86px; }
.hero-copy { max-width: 560px; }
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .16em; line-height: 1.5; }
.live-dot { width: 7px; height: 7px; display: inline-block; margin: 0 9px 1px 0; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px rgba(116, 225, 193, .8); }
h1, h2, h3, p { overflow-wrap: anywhere; }
.hero h1 { max-width: 600px; margin: 0; font-size: clamp(42px, 5.3vw, 68px); font-weight: 730; letter-spacing: -.065em; line-height: 1.04; }
.hero h1 span { color: var(--accent); }
.hero-text { max-width: 510px; margin: 23px 0 0; color: #aab6c7; font-size: 16px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 25px; margin-top: 30px; }
.hero-actions .button { min-height: 48px; padding: 14px 19px; }
.text-link { color: #d5dcf0; font-size: 13px; font-weight: 650; }
.trust-note { margin-top: 28px; color: #9aa8ba; font-size: 12px; }
.trust-note span { margin-right: 7px; color: var(--mint); }
.preview { padding: 1px; border: 1px solid #354257; border-radius: 18px; background: linear-gradient(145deg, rgba(153, 168, 255, .18), rgba(31, 43, 61, .32)); box-shadow: 0 32px 100px rgba(0, 0, 0, .32); transform: perspective(1200px) rotateY(-4deg) rotateX(1deg); }
.preview-bar { height: 48px; display: flex; align-items: center; gap: 7px; padding: 0 17px; border-bottom: 1px solid var(--line); border-radius: 17px 17px 0 0; background: #141b27; }
.preview-bar>span { width: 7px; height: 7px; border-radius: 50%; background: #566174; }
.preview-bar>span:first-child { background: #f08c8c; }
.preview-bar>span:nth-child(2) { background: #e9c77b; }
.preview-bar>span:nth-child(3) { background: #78d4ad; }
.preview-bar small { margin-left: auto; color: #8794a9; font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.preview-body { padding: 25px; border-radius: 0 0 17px 17px; background: rgba(17, 23, 34, .98); }
.preview-title, .dataset-heading, .workspace-heading, .panel-heading, .bottom-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mini-label { display: block; margin-bottom: 8px; color: #8e9bb0; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.preview-title h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.ready-tag, .private-badge { padding: 8px 10px; border: 1px solid rgba(116, 225, 193, .24); border-radius: 99px; color: var(--mint); background: rgba(116, 225, 193, .07); font-size: 9px; font-weight: 800; letter-spacing: .07em; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.stat-grid>div, .stat-grid>article { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .018); }
.stat-grid>div>span, .stat-grid>article>span { display: block; color: #8c9aaf; font-size: 9px; font-weight: 750; letter-spacing: .08em; }
.stat-grid strong { display: block; margin-top: 10px; color: #eef1fa; font-size: 24px; letter-spacing: -.04em; }
.stat-grid small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.chart { height: 152px; display: flex; gap: 13px; padding: 21px 0 10px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; color: #7f8ba0; font-size: 9px; }
.chart-bars { flex: 1; display: flex; align-items: stretch; justify-content: space-around; gap: 10px; border-bottom: 1px solid #3a4659; background: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(127, 145, 172, .11) 36px); }
.chart-bars i { width: 7%; height: var(--bar); align-self: flex-end; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #9cafff, #596ee2); }
.preview-foot { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); color: #96a4b8; font-size: 10px; }
.preview-foot span:last-child { color: var(--mint); }
.feature-section { padding: 52px 0 83px; border-top: 1px solid rgba(120, 139, 170, .14); }
.section-heading { max-width: 590px; margin-bottom: 29px; }
.section-heading h2, .bottom-cta h2 { margin: 0; font-size: clamp(27px, 3.5vw, 39px); letter-spacing: -.045em; }
.section-heading>p:last-child, .bottom-cta>div>p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.feature-grid article { min-height: 190px; padding: 23px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)); }
.feature-icon { color: var(--accent); font-size: 21px; }
.feature-grid h3 { margin: 18px 0 8px; font-size: 15px; }
.feature-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.bottom-cta { margin: 0 0 76px; padding: 34px 39px; border: 1px solid #303b51; border-radius: 16px; background: radial-gradient(ellipse at right, rgba(106, 126, 255, .13), transparent 55%), #111722; }
.bottom-cta .eyebrow { margin-bottom: 9px; }
.bottom-cta h2 { font-size: 27px; }
.bottom-cta>div>p:last-child { font-size: 13px; }

.workspace { flex: 1; padding: 54px 0 90px; }
.workspace-heading { align-items: flex-end; margin-bottom: 28px; }
.back-link { display: inline-block; margin-bottom: 23px; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--text); }
.workspace-heading .eyebrow { margin-bottom: 9px; }
.workspace-heading h1, .document-page h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.055em; }
.workspace-heading p:not(.eyebrow) { margin: 11px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.private-badge { margin-bottom: 7px; border-color: rgba(139, 156, 255, .26); color: #aebaff; background: rgba(139, 156, 255, .07); }
.drop-zone { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; border: 1px dashed #596984; border-radius: 17px; color: var(--muted); background: rgba(17, 23, 34, .66); text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.drop-zone:hover, .drop-zone.is-dragging { transform: translateY(-2px); border-color: var(--accent); background: rgba(85, 104, 193, .1); }
.drop-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.upload-icon { width: 47px; height: 47px; display: grid; place-items: center; border: 1px solid rgba(139, 156, 255, .32); border-radius: 14px; color: var(--accent); background: rgba(139, 156, 255, .08); font-size: 25px; }
.drop-zone strong { color: var(--text); font-size: 17px; }
.drop-zone>span:last-child { font-size: 12px; }
.alert { margin: 17px 0; padding: 13px 16px; border: 1px solid rgba(255, 141, 154, .38); border-radius: 10px; color: #ffc0c8; background: rgba(255, 141, 154, .08); font-size: 13px; }
#analysis-result { margin-top: 40px; scroll-margin-top: 100px; }
.dataset-heading { align-items: flex-end; margin-bottom: 20px; }
.dataset-heading h2 { max-width: 620px; margin: 0; overflow-wrap: anywhere; font-size: 22px; letter-spacing: -.03em; }
.dataset-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.dataset-actions { display: flex; gap: 9px; }
.dataset-actions .button { min-height: 38px; padding: 9px 12px; font-size: 11px; }
.result-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 18px; }
.result-stats>article { padding: 18px; }
.result-stats strong { font-size: 27px; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
.data-panel { min-width: 0; margin-top: 16px; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: rgba(17, 23, 34, .78); }
.panel-heading { align-items: flex-end; margin-bottom: 16px; }
.panel-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.panel-heading .mini-label { margin-bottom: 6px; }
.muted-label { color: var(--muted); font-size: 11px; }
.table-scroll { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; color: #dce4ef; font-size: 11px; text-align: left; }
th, td { max-width: 260px; padding: 10px 11px; border-bottom: 1px solid rgba(39, 50, 68, .8); overflow-wrap: anywhere; vertical-align: top; }
th { position: sticky; top: 0; color: #b6c1d2; background: #17202d; font-size: 9px; font-weight: 780; letter-spacing: .055em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .018); }
.distributions { margin-top: 17px; }
.distribution-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.distribution-column { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .015); }
.distribution-column h3 { margin: 0 0 13px; overflow-wrap: anywhere; font-size: 13px; }
.bar-list { display: grid; gap: 10px; }
.bar-item { display: grid; grid-template-columns: minmax(70px, .8fr) minmax(50px, 1fr) minmax(68px, auto); align-items: center; gap: 10px; }
.bar-label, .bar-count { overflow: hidden; color: #aab6c7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bar-count { color: #d1d9e6; text-align: right; }
.bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: #252f40; }
.bar-fill { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #7588ff, #9eacff); }
.empty-state { grid-column: 1 / -1; margin: 0; padding: 24px; color: var(--muted); font-size: 13px; text-align: center; }

.document-page { flex: 1; max-width: 790px; padding: 57px 0 82px; }
.document-page .back-link { margin-bottom: 33px; }
.document-page>.eyebrow { margin-bottom: 10px; }
.document-page h1 { font-size: clamp(36px, 5vw, 54px); }
.document-intro { margin: 16px 0 32px; color: #b2bdce; font-size: 16px; line-height: 1.8; }
.guide-content { padding: 28px 31px; border: 1px solid var(--line); border-radius: 15px; background: rgba(17, 23, 34, .74); }
.guide-content h2 { margin: 21px 0 8px; font-size: 16px; letter-spacing: -.015em; }
.guide-content h2:first-child { margin-top: 0; }
.guide-content p, .guide-content li { color: #aab6c7; font-size: 13px; line-height: 1.85; }
.guide-content p { margin: 0 0 17px; }
.guide-content p:last-child { margin-bottom: 0; }
.guide-content ul { padding-left: 21px; }
.guide-content li { padding-left: 3px; margin: 7px 0; }
.guide-content a { color: #b3beff; text-decoration: underline; text-underline-offset: 3px; }
.error-page { width: min(560px, calc(100% - 40px)); margin: auto; padding: 70px 0; text-align: center; }
.error-page h1 { margin: 0; font-size: clamp(34px, 7vw, 54px); letter-spacing: -.05em; }
.error-page p { margin: 14px 0 25px; color: var(--muted); font-size: 14px; line-height: 1.7; }

footer { width: 100%; min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: auto; padding: 18px max(32px, calc((100% - 1200px) / 2)); border-top: 1px solid rgba(120, 139, 170, .15); background: rgba(10, 13, 19, .54); }
.footer-brand { font-size: 12px; }
.footer-brand img { width: 25px; height: 25px; }
footer nav { gap: 21px; }
footer>span { color: #7f8ba0; font-size: 10px; }

@media (max-width: 1000px) {
  .topbar { gap: 20px; padding-right: 26px; padding-left: 26px; }
  .topbar nav { gap: 17px; }
  main { width: min(900px, calc(100% - 52px)); }
  .hero { gap: 34px; }
  .hero h1 { font-size: clamp(41px, 5.3vw, 58px); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { padding-right: 26px; padding-left: 26px; }
}

@media (max-width: 760px) {
  .topbar { height: 68px; gap: 12px; padding: 0 20px; }
  .topbar nav { gap: 12px; }
  .topbar nav a { font-size: 11px; }
  .brand { gap: 7px; font-size: 13px; }
  .brand img { width: 28px; height: 28px; }
  .account { gap: 7px; }
  .user-name { max-width: 90px; font-size: 11px; }
  .button { min-height: 38px; padding: 9px 12px; font-size: 11px; }
  main { width: calc(100% - 40px); }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 38px; padding: 66px 0 58px; }
  .hero-copy { max-width: 620px; }
  .hero h1 { max-width: 600px; font-size: clamp(44px, 8.5vw, 64px); }
  .hero-text { max-width: 600px; font-size: 14px; }
  .preview { max-width: 600px; width: 100%; justify-self: center; transform: none; }
  .feature-section { padding: 45px 0 58px; }
  .bottom-cta { margin-bottom: 55px; }
  .workspace { padding-top: 42px; }
  .analysis-grid { grid-template-columns: 1fr; gap: 0; }
  .result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { flex-wrap: wrap; padding: 17px 20px; }
  footer>span { margin-left: auto; }
}

@media (max-width: 560px) {
  .topbar { position: relative; height: 64px; padding: 0 16px; }
  .mobile-menu { display: inline-flex; margin-left: auto; }
  .topbar nav { position: absolute; z-index: 4; top: 63px; right: 0; left: 0; display: none; align-items: flex-start; flex-direction: column; gap: 0; padding: 9px 20px 14px; border-bottom: 1px solid var(--line); background: #111722; box-shadow: 0 14px 24px rgba(0, 0, 0, .28); }
  .topbar nav.is-open { display: flex; }
  .topbar nav a { width: 100%; padding: 12px 0; font-size: 13px; }
  .account { margin-left: 0; }
  .account .button { padding: 9px 10px; font-size: 10px; }
  main { width: calc(100% - 34px); }
  .hero { gap: 30px; padding: 51px 0 47px; }
  .hero h1 { font-size: clamp(39px, 11vw, 53px); }
  .hero-text { margin-top: 18px; font-size: 13px; line-height: 1.7; }
  .hero-actions { gap: 17px; margin-top: 22px; }
  .hero-actions .button { min-height: 43px; padding: 12px; font-size: 11px; }
  .trust-note { margin-top: 20px; font-size: 10px; }
  .preview-body { padding: 17px; }
  .preview-title h2 { font-size: 14px; }
  .ready-tag { padding: 7px; font-size: 8px; }
  .stat-grid { gap: 7px; margin-top: 15px; }
  .stat-grid>div, .stat-grid>article { padding: 12px 10px; }
  .stat-grid>div>span, .stat-grid>article>span { font-size: 8px; }
  .stat-grid strong { font-size: 19px; }
  .chart { height: 125px; }
  .feature-section { padding: 38px 0 48px; }
  .section-heading { margin-bottom: 21px; }
  .section-heading h2, .bottom-cta h2 { font-size: 27px; }
  .section-heading>p:last-child, .bottom-cta>div>p:last-child { font-size: 12px; }
  .feature-grid { grid-template-columns: 1fr; gap: 10px; }
  .feature-grid article { min-height: auto; padding: 18px; }
  .feature-grid h3 { margin-top: 12px; }
  .bottom-cta { align-items: flex-start; flex-direction: column; gap: 17px; margin-bottom: 42px; padding: 20px; }
  .workspace { padding-top: 31px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 21px; }
  .workspace-heading h1, .document-page h1 { font-size: 35px; }
  .private-badge { margin: 0; }
  .drop-zone { min-height: 208px; padding: 24px 17px; }
  .drop-zone strong { font-size: 15px; }
  .drop-zone>span:last-child { font-size: 10px; }
  .dataset-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .dataset-heading h2 { font-size: 19px; }
  .dataset-actions { flex-wrap: wrap; }
  .dataset-actions .button { min-height: 36px; font-size: 10px; }
  .result-stats { gap: 8px; }
  .result-stats>article { padding: 13px; }
  .result-stats strong { font-size: 23px; }
  .data-panel { padding: 14px; }
  .panel-heading h2 { font-size: 15px; }
  .distribution-list { grid-template-columns: 1fr; }
  .bar-item { grid-template-columns: minmax(58px, .8fr) minmax(36px, 1fr) minmax(58px, auto); gap: 7px; }
  .bar-label, .bar-count { font-size: 9px; }
  .document-page { padding-top: 34px; }
  .document-page .back-link { margin-bottom: 27px; }
  .document-intro { margin: 13px 0 23px; font-size: 14px; }
  .guide-content { padding: 20px; }
  .guide-content p, .guide-content li { font-size: 12px; }
  footer { align-items: flex-start; gap: 15px 22px; padding: 16px 17px; }
  footer nav { order: 3; width: 100%; flex-wrap: wrap; gap: 16px; }
  footer>span { margin: 0 0 0 auto; text-align: right; }
}
