:root {
  color-scheme: dark;
  --ui-line: rgba(175, 202, 233, .18);
  --ui-panel: linear-gradient(145deg, rgba(19, 37, 63, .86), rgba(8, 20, 38, .78));
  --ui-muted: #9aacc4;
}

html { overflow-x: hidden; }
body {
  overflow-x: hidden;
  color: #eff5ff;
  background: radial-gradient(ellipse at 80% 18%, #172443 0, transparent 37%),
              radial-gradient(ellipse at 10% 75%, #071b3a 0, transparent 39%),
              linear-gradient(145deg, #050a15 0%, #0a1427 54%, #050b18 100%);
}
.ambient-one { background: rgba(31, 105, 228, .13); }
.ambient-two { background: rgba(20, 76, 178, .1); }
.app-shell { max-width: 1480px; padding-inline: clamp(20px, 3.2vw, 44px); }
.site-header { height: 76px; border-color: var(--ui-line); }
.brand { color: #f2f7ff; letter-spacing: -.055em; }
.brand-mark { background: linear-gradient(145deg, #1a2a4f, #0b1b36); border-color: #4f74ca; box-shadow: 0 0 22px #176eff30; }
.brand-mark svg { stroke: #bdc4d5; }
.brand-plus, .hero-copy h1 span, .access h1 span, .deposit h1 span, .title-dot { color: #9ca7c0; }
.eyebrow-line, .step-line { background: #4f77d6; }
.header-right { gap: 12px; }
.header-actions { display: flex; align-items: center; gap: 5px; }
.header-actions button { height: 38px; padding-inline: 12px; color: #d7dadf; font-weight: 700; }
.header-actions button:hover { color: white; }
.header-actions .header-contact { height: 38px; padding-inline: 14px; color: #dfecff; border-color: var(--ui-line); background: #ffffff0a; }
.header-contact svg { width: 15px; }
.site-menu-toggle { border-color: var(--ui-line); background: #10233c; }
.site-menu-toggle span { background: #d4d6dc; }
.site-menu, .account-popover { border-color: var(--ui-line); background: #0e1d33f5; backdrop-filter: blur(22px); }
.account-summary, .account-chip { border-color: var(--ui-line); background: #11243b; }

.landing { padding-top: 0; }
.hero-grid { position: relative; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 12px; min-height: min(680px, calc(100dvh - 76px)); isolation: isolate; }
.hero-copy { position: relative; z-index: 2; padding-block: 18px 20px; transform: translateY(-14px); }
.hero-copy h1 { font-size: clamp(48px, 5vw, 68px); line-height: 1.04; letter-spacing: -.068em; margin: 19px 0; }
.hero-lead { max-width: 540px; font-size: 15px; line-height: 1.7; color: #aebdd2; }
.hero-art { position: absolute; inset: 0 -55px 0 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-trails { width: 100%; height: 100%; overflow: visible; }
.hero-trails path { fill: none; stroke: url(#hero-trail-ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1550; stroke-dashoffset: 1550; opacity: 0; animation: hero-reveal 2.4s ease-out forwards; }
.hero-trails path:nth-of-type(2) { stroke-width: 1.6; animation-delay: .16s; }
.hero-trails path:nth-of-type(3) { stroke-width: 1.35; animation-delay: .28s; }
.hero-trails path:nth-of-type(4) { stroke-width: 1.2; animation-delay: .4s; }
@keyframes hero-reveal { to { stroke-dashoffset: 0; opacity: .82; } }
.hero-visual { z-index: 1; min-height: 0; height: min(680px, calc(100dvh - 76px)); display: flex; justify-content: center; align-items: flex-end; overflow: hidden; }
.hero-visual::after { content: ""; position: absolute; inset: auto 6% 0; height: 75%; border-radius: 50%; background: radial-gradient(ellipse, #2766c522, transparent 70%); filter: blur(35px); z-index: -1; }
.hero-person { display: block; width: auto; max-width: 100%; height: 88%; max-height: 600px; object-fit: contain; object-position: center bottom; filter: drop-shadow(12px 0 27px #398bff4d); }
.hero-actions { display: block; margin-top: 22px; max-width: 432px; }
.hero-login-card { gap: 0; overflow: hidden; border: 1px solid rgba(169, 197, 231, .27); border-radius: 20px; background: linear-gradient(145deg, rgba(26, 48, 78, .69), rgba(9, 24, 47, .83)); box-shadow: 0 18px 60px #0006, inset 0 1px #ffffff15; backdrop-filter: blur(18px); color: #f3f7ff; }
.hero-login-card [data-slot="card-header"] { gap: 5px; padding: 20px 23px 8px; }
.hero-card-kicker { color: #a9b2c8; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.hero-login-card [data-slot="card-title"] { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.hero-login-card [data-slot="card-description"] { font-size: 12px; color: #aabbd1; }
.hero-login-card [data-slot="card-content"] { padding: 11px 23px 19px; }
.hero-login-card [data-slot="field-group"] { gap: 13px; }
.hero-login-card [data-slot="field"] { gap: 7px; }
.hero-login-card [data-slot="field-label"] { color: #e1e3e7; font-size: 12px; font-weight: 700; }
.hero-login-card input { height: 45px; border: 1px solid #a0aac25c; border-radius: 9px; background: #07162ba8; color: white; font-size: 15px; }
.hero-login-card input::placeholder { color: #748aa7; }
.hero-login-card input:focus-visible { border-color: #a0aac2; box-shadow: 0 0 0 3px #325fca28; outline: none; }
.hero-login-card .hero-submit { height: 47px; width: 100%; justify-content: space-between; padding-inline: 19px; border-radius: 10px; background: linear-gradient(105deg, #1264e9, #436ed3); box-shadow: 0 8px 23px #196eff59; color: white; font-size: 14px; font-weight: 800; }
.hero-login-card .hero-submit:hover { background: linear-gradient(105deg, #2678ff, #577ed8); }
.hero-login-card [data-slot="card-footer"] { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--ui-line); padding: 12px 23px; color: #a9bad0; font-size: 11px; }
.hero-register-link { display: inline-flex; gap: 3px; align-items: center; border: 0; background: none; color: #b8bfd1; font-weight: 800; white-space: nowrap; }
.hero-register-link svg { width: 14px; }
.hero-register-link:hover { color: #fff; }

.public-levels { max-width: 1220px; margin: 42px auto 60px; }
.public-levels h2 { letter-spacing: -.04em; }
.level-cards > *, .access-aside, .auth-surface, .deposit-card, .upload-column, .signal-panel, .workflow-aside,
.account-level, .account-info, .account-security, .owner-panel, .owner-users, .guide-dialog,
.owner-stat-grid > div, .mode-card { border-color: var(--ui-line); background: var(--ui-panel); box-shadow: inset 0 1px #ffffff0a; backdrop-filter: blur(13px); }
.button.primary { color: white; background: linear-gradient(105deg, #1264e9, #416dd3); box-shadow: 0 8px 25px #176cfb33; }
.button.primary:hover { background: linear-gradient(105deg, #2878fd, #587fd8); }
.button.secondary { color: #dceaff; background: #ffffff0b; border-color: var(--ui-line); }
.button.secondary:hover { border-color: #587fd8; }
.text-link { color: #b5bdd0; }
.input-wrap, .access-form input:not([type=checkbox]), .owner-password-reset input, .select-wrap select, .expiry-options, .owner-search input { border-color: #7686ab47; background: #08172bc9; color: #f5f5f6; }
.input-wrap:focus-within, .access-form input:focus, .owner-password-reset input:focus { border-color: #5a80d8; }
.access, .deposit, .dashboard, .account-page { padding-top: 42px; }
.access-grid { grid-template-columns: minmax(0, 570px) minmax(290px, 1fr); gap: 42px; }
.access-aside { min-height: 0; padding: 30px; }
.aside-lines { margin: 40px 0 15px; }
.round-step.active { background: #416dd3; border-color: #416dd3; color: white; }
.auth-surface { margin-top: 15px; }
.deposit-card { padding: 44px; }
.workspace-heading { margin-bottom: 23px; }
.workspace-heading h1 { font-size: clamp(33px, 3.5vw, 46px); }
.workspace-grid { gap: 18px; }
.upload-column, .signal-panel { padding: 24px; }
.dropzone { height: 250px; border-color: #5d74ac67; background: #07172bd1; }
.dropzone:hover, .dropzone.dragging { border-color: #9da7c0; background: #102641; }
.mode-options { gap: 8px; }
.mode-card { min-height: 112px; }
.mode-card.selected, .mode-choice .mode-card.selected { border-color: #5078d6; background: linear-gradient(155deg, #20335e, #102946); }
.signal-panel h2 { margin-block: 20px 24px; }
.signal-facts > div, .owner-detail-grid > div { border-color: var(--ui-line); background: #ffffff08; }
.signal-hero { border-color: #6279ac59; background: linear-gradient(105deg, #1a2a50, #0e263f); }
.signal-analysis dl > div, .account-info dl > div { border-color: var(--ui-line); }
.account-layout { gap: 18px; }
.account-info { margin-top: 18px; }
.owner-panel-top, .owner-users-top { gap: 16px; }
.owner-filters button { background: #102b49; }
.owner-table { display: block; overflow-x: auto; }
.owner-table tbody, .owner-table thead { display: table; width: 100%; }
.guide-dialog { color: #f7f8f9; }
.site-footer { border-color: var(--ui-line); }

@media (max-width: 900px) {
  .header-actions { display: none; }
  .hero-grid { min-height: 570px; }
  .hero-visual { height: 570px; }
  .hero-copy h1 { font-size: clamp(44px, 5.7vw, 60px); }
}
@media (max-width: 760px) {
  .app-shell { padding-inline: 18px; }
  .site-header { height: 65px; }
  .landing { padding-top: 28px; }
  .hero-grid { display: block; min-height: 0; }
  .hero-copy { padding: 0 0 42px; transform: none; }
  .hero-copy h1 { font-size: clamp(43px, 10vw, 58px); margin: 18px 0; }
  .hero-lead { font-size: 14px; line-height: 1.65; }
  .hero-actions { margin-top: 24px; max-width: none; }
  .hero-art, .hero-visual { display: none; }
  .hero-login-card [data-slot="card-header"] { padding: 19px 19px 8px; }
  .hero-login-card [data-slot="card-content"] { padding: 10px 19px 17px; }
  .hero-login-card [data-slot="card-footer"] { padding: 12px 19px; }
  .public-levels { margin-top: 20px; }
  .access, .deposit, .dashboard, .account-page { padding-top: 28px; }
  .access-grid, .account-layout, .workspace-grid { grid-template-columns: 1fr; }
  .access-grid { gap: 20px; }
  .access h1, .deposit h1 { font-size: clamp(31px, 8vw, 42px); overflow-wrap: anywhere; }
  .access-aside { margin-top: 0; padding: 23px; }
  .deposit-card { padding: 25px; }
  .workspace-heading { display: block; }
  .workspace-status { display: inline-flex; margin-top: 15px; }
  .upload-column, .signal-panel { padding: 18px; }
  .dropzone { height: 225px; }
  .mode-options { grid-template-columns: 1fr; }
  .mode-choice .mode-card { min-height: 76px; padding-right: 42px; }
  .owner-table, .owner-table tbody, .owner-table thead { display: block; }
}
@media (max-width: 390px) {
  .app-shell { padding-inline: 15px; }
  .hero-copy h1 { font-size: 39px; }
  .hero-login-card [data-slot="card-title"] { font-size: 17px; }
  .hero-login-card [data-slot="card-footer"] { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-trails path { animation: none; stroke-dashoffset: 0; opacity: .82; }
}

/* The header and workspace share one compact terminal width. */
.app-shell { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: clamp(18px, 2.5vw, 34px); }
.site-header { height: 68px; }
.header-right { gap: 8px; }
.header-actions { gap: 4px; }
.header-actions button { height: 36px; padding-inline: 10px; font-size: 12px; white-space: nowrap; }
.header-actions .header-upgrade { color: #f5b942; border-color: #f5b94266; background: #f5b9420d; }
.header-actions .header-upgrade:hover { color: #ffdc87; border-color: #f5b942aa; }
.header-actions .header-contact { height: 36px; padding-inline: 11px; font-size: 12px; }
.account-summary { max-width: none; min-height: 36px; gap: 7px; padding: 7px 10px; font-size: 11px; }
.account-summary #summary-tier { color: #f5b942; font-size: 12px; }
.account-summary #summary-credits,
.account-summary #summary-signals { display: inline; font-size: 11px; }
.account-summary #summary-next { display: none; }
.account-summary span + span::before { margin-right: 7px; }
.site-menu-wrap { display: none; }

.dashboard { padding: 24px 0 60px; }
.workspace-heading { align-items: end; margin-bottom: 18px; }
.workspace-heading h1 { margin: 7px 0 5px; font-size: clamp(33px, 3.2vw, 43px); }
.workspace-heading p { line-height: 1.45; }
.workspace-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 24px; align-items: start; }
.terminal-grid .upload-column, .signal-panel { min-width: 0; min-height: 0; padding: 20px; border-radius: 18px; }
.upload-title { margin-bottom: 10px; }
.dropzone { height: 225px; }
.dropzone #empty-upload small { margin-top: 8px; }
.mode-heading { margin: 17px 0 9px; gap: 14px; }
.mode-heading > span:last-child { max-width: none; font-size: 11px; line-height: 1.35; }
.mode-options { gap: 8px; }
.mode-choice .mode-card { min-height: 88px; padding: 10px 26px 10px 10px; }
.mode-card.selected, .mode-choice .mode-card.selected { box-shadow: 0 0 0 1px #5077d350, 0 0 16px #375aab1a; }
.analyze { height: 50px; min-height: 50px; margin-top: 15px; }
.terminal-grid .upload-column .fine-print { margin-top: 10px; }
.signal-panel h2 { margin: 13px 0 19px; }
.workflow-steps > div { gap: 13px; margin-bottom: 17px; }
.workflow-foot { margin-top: 18px; padding-top: 14px; }
.signal-hero { margin: 14px 0; padding: 14px 16px; }
.signal-hero strong { font-size: clamp(35px, 3.5vw, 48px); }
.signal-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.signal-facts > div { min-height: 72px; padding: 10px; }
.signal-facts strong { font-size: 15px; }
.signal-actions { margin-top: 16px; }
.signal-actions .button { min-height: 42px; height: 42px; }

/* Controls stay outside the chart image so labels and prices remain visible. */
#image-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 31px minmax(0, 1fr); gap: 7px; padding: 8px; }
#image-preview #preview-name { position: static; grid-column: 1; grid-row: 1; align-self: center; min-width: 0; max-width: 100%; padding: 0; background: none; }
#image-preview .preview-actions { position: static; grid-column: 2; grid-row: 1; gap: 6px; }
#image-preview .preview-actions .button { height: 29px; min-height: 29px; padding-inline: 9px; font-size: 11px; }
#image-preview .preview-actions #remove-file { width: 29px; height: 29px; font-size: 17px; }
#image-preview #preview-img { grid-column: 1 / -1; grid-row: 2; min-width: 0; min-height: 0; width: 100%; height: 100%; padding: 0; object-fit: contain; border-radius: 8px; background: #081324; }

.access { padding-top: 29px; }
.access .step-caption { margin-bottom: 22px; }
.access-grid { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 28px; }
.access-aside { min-height: 0; padding: 24px; align-self: start; }
.aside-lines { margin: 19px 0 0; }
.aside-lines > div { min-height: 61px; gap: 13px; }
.aside-lines > div:not(:last-child)::after { height: 35px; }
.access-divider { margin: 22px 0 11px; }
#register-login { display: block; margin-top: 15px; }
#go-to-verification { margin: 0; }

#analysis-error { margin-top: 12px; padding: 11px 13px; border-color: #a0636966; background: #34202a80; color: #f1d6dc; }
#analysis-error.analysis-error-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#analysis-error.analysis-error-card strong { color: #f3e4e8; font-size: 13px; }
#analysis-error.analysis-error-card span { color: #bfcbd7; font-size: 12px; }
#analysis-error.analysis-error-card .button { min-height: 34px; height: 34px; margin-top: 4px; font-size: 11px; }

@media (max-width: 1100px) {
  .header-actions { display: none; }
  .site-menu-wrap { display: block; }
}
@media (max-width: 900px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 16px; }
  .signal-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-options { grid-template-columns: 1fr; }
  .mode-choice .mode-card { min-height: 66px; }
}
@media (max-width: 760px) {
  .app-shell { padding-inline: 16px; }
  .site-header { height: 64px; }
  .account-summary { max-width: 164px; min-height: 34px; }
  .account-summary #summary-credits, .account-summary #summary-signals { display: none; }
  .workspace-grid, .access-grid { grid-template-columns: 1fr; }
  .dashboard { padding-top: 21px; }
  .workspace-heading { margin-bottom: 17px; }
  .workspace-status { margin-top: 11px; }
  .dropzone { height: 225px; }
  .mode-heading { align-items: start; flex-wrap: wrap; gap: 5px; }
  .mode-heading > span:last-child { width: 100%; text-align: left; }
  .signal-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-grid { gap: 20px; }
  .access-aside { padding: 20px; }
}
@media (max-width: 390px) {
  .app-shell { padding-inline: 14px; }
  .account-summary { max-width: 128px; }
  #image-preview #preview-name { font-size: 10px; }
}
