﻿@font-face {
  font-family: "InterLocal";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "InterLocal";
  src: url("/assets/fonts/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #03131d;
  --surface: rgba(26, 28, 32, .92);
  --surface-raised: rgba(35, 38, 45, .88);
  --surface-soft: rgba(0, 91, 114, .16);
  --text: #f5f7fb;
  --muted: #8f98a8;
  --muted-strong: #cbd3df;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --primary: #00a7b5;
  --primary-dark: #005b72;
  --primary-soft: rgba(0, 167, 181, .16);
  --amber: #d7ac50;
  --danger: #fb7185;
  --success: #34d399;
  --sidebar-bg: rgba(3, 19, 29, .96);
  --sidebar-active: rgba(0, 167, 181, .14);
  --shadow: 0 28px 80px rgba(0, 0, 0, .35);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, .22);
  --radius: 14px;
  --radius-sm: 10px;
  --font-main: "InterLocal", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 32px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --space-6: 32px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 42% 0%, rgba(0, 167, 181, .18), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(215, 172, 80, .08), transparent 30%),
    linear-gradient(135deg, #03131d 0%, #071e2b 48%, #005b72 100%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: var(--text-md);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.theme-light {
  --bg: #f6f8fb;
  --surface: rgba(255, 255, 255, .94);
  --surface-raised: rgba(255, 255, 255, .98);
  --surface-soft: rgba(0, 91, 114, .08);
  --text: #071e2b;
  --muted: #64748b;
  --muted-strong: #334155;
  --line: rgba(7, 30, 43, .12);
  --line-strong: rgba(7, 30, 43, .18);
  --primary-soft: rgba(0, 167, 181, .12);
  --sidebar-bg: rgba(255, 255, 255, .88);
  --sidebar-active: rgba(0, 167, 181, .12);
  --shadow: 0 22px 70px rgba(7, 30, 43, .10);
  --shadow-soft: 0 10px 28px rgba(7, 30, 43, .08);
  background:
    radial-gradient(circle at 42% 0%, rgba(0, 167, 181, .12), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(215, 172, 80, .12), transparent 30%),
    linear-gradient(135deg, #f8fbfc 0%, #eef6f8 48%, #e9f1f4 100%),
    var(--bg);
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(0, 167, 181, .48);
  outline-offset: 2px;
}

.nav-item:focus-visible {
  outline-color: rgba(255,255,255,.42);
}

body.theme-light .nav-item:focus-visible {
  outline-color: rgba(0, 91, 114, .32);
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

body.theme-light button:disabled {
  opacity: 1;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 12, 16, .72);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  min-height: 44px;
  box-shadow: var(--shadow-soft);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background: rgba(255, 255, 255, .88);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(0, 167, 181, .70);
  box-shadow: 0 0 0 3px rgba(0, 167, 181, .16);
}

.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 167, 181, .34);
  background: rgba(0, 167, 181, .12);
  color: var(--text);
  box-shadow: none;
  font-size: var(--text-sm);
  font-weight: 760;
}

.file-picker-button:hover {
  border-color: rgba(0, 167, 181, .58);
  background: rgba(0, 167, 181, .18);
}

.file-picker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.3;
}

textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

::placeholder {
  color: #687386;
}

label {
  display: block;
  color: var(--muted-strong);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0;
  margin: 14px 0 7px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  transition: grid-template-columns .22s ease;
}

body.public-home .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 78px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar-bg);
  color: #f8fafc;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(215, 172, 80, .12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 18px 0 60px rgba(0, 0, 0, .16);
  transition: width .22s ease, padding .22s ease, background .22s ease, box-shadow .22s ease;
}

.sidebar-collapse {
  position: absolute;
  top: 18px;
  right: -16px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.76);
  color: #071e2b;
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  transition: transform .18s ease, background .18s ease;
}

.sidebar-collapse:hover {
  background: #fff;
  transform: translateY(-1px);
}

.sidebar-collapse svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .22s ease;
}

body.sidebar-collapsed .sidebar-collapse svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar {
  padding-inline: 12px;
}

body.theme-light .sidebar {
  color: var(--text);
  border-right-color: rgba(7, 30, 43, .10);
  box-shadow: 16px 0 50px rgba(7, 30, 43, .06);
}

.brand {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

body.sidebar-collapsed .brand {
  align-items: center;
  padding-inline: 0;
}

body.theme-light .brand {
  border-bottom-color: rgba(7, 30, 43, .10);
}

.brand img {
  width: 172px;
  height: 62px;
  border-radius: 0;
  object-fit: contain;
  object-position: left center;
}

body.sidebar-collapsed .brand img {
  content: url("/assets/brand/openlai-logo-mark.png");
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

#brand-company {
  display: none;
}

body.sidebar-collapsed .brand div,
body.sidebar-collapsed .sidebar-note,
body.sidebar-collapsed .nav-item {
  overflow: hidden;
}

body.sidebar-collapsed .brand span,
body.sidebar-collapsed .sidebar-note {
  display: none;
}

.brand strong {
  display: none;
}

.brand span {
  color: rgba(215, 172, 80, .78);
  font-size: var(--text-xs);
  margin-top: 0;
  padding-left: 2px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  text-align: left;
  border-radius: var(--radius);
  padding: 11px 12px;
  color: #cbd5e1;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  font-weight: 650;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
  font-size: 0;
}

body.sidebar-collapsed .nav-item::before {
  width: 19px;
  height: 19px;
  flex-basis: 19px;
}

body.theme-light .nav-item {
  color: #334155;
}

.nav-item::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: .72;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.nav-item small {
  display: none;
}

.nav-item[data-view="dashboard"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 13h6V4H4v9Zm10 7h6V4h-6v16ZM4 20h6v-3H4v3Z'/%3E%3C/svg%3E"); }
.nav-item[data-view="sources"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 7h16M4 12h10M4 17h7m7-1 2 2m-6 0 6-6'/%3E%3C/svg%3E"); }
.nav-item[data-view="insights"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 19V5m4 14v-6m5 6V8m5 11v-9M4 19h16'/%3E%3C/svg%3E"); }
.nav-item[data-view="assets"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 7.5 12 3l8 4.5v9L12 21l-8-4.5v-9Zm8 4.5 8-4.5M12 12 4 7.5m8 4.5V21'/%3E%3C/svg%3E"); }
.nav-item[data-view="copy"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 4h9l5 5v11H5V4Zm9 0v5h5M8 13h8M8 17h6'/%3E%3C/svg%3E"); }
.nav-item[data-view="video"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M5 6h10a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H5V6Zm13 4 3-2v8l-3-2M9 10l4 2-4 2v-4Z'/%3E%3C/svg%3E"); }
.nav-item[data-view="publish"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M4 12 20 4l-5 16-3-7-8-1Zm8 1 8-9'/%3E%3C/svg%3E"); }
.nav-item[data-view="credits"] { --nav-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M6 4h12l3 5-9 11L3 9l3-5Zm-3 5h18M8 4l4 16 4-16'/%3E%3C/svg%3E"); }

.nav-item.active,
.nav-item:hover {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--primary);
}

body.theme-light .nav-item.active,
body.theme-light .nav-item:hover {
  color: #071e2b;
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid rgba(215, 172, 80, .16);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255,255,255,.04);
}

body.theme-light .sidebar-note {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(0, 91, 114, .16);
}

.sidebar-note span,
.sidebar-note strong {
  display: block;
}

.sidebar-note span {
  color: #a8c2bd;
  font-size: 12px;
  margin-bottom: 5px;
}

.workspace {
  min-height: 100vh;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body.public-home .sidebar,
body.public-home .stepper,
body.public-home .site-footer,
body.public-home .topbar > div:first-of-type {
  display: none;
}

body.public-home .workspace {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 44px);
}

body.public-home .topbar {
  justify-content: flex-end;
  min-height: 48px;
}

.mobile-overlay,
.mobile-menu-button {
  display: none;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: var(--radius);
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--muted-strong);
  box-shadow: var(--shadow-soft);
  display: inline-grid;
  place-items: center;
}

.theme-toggle:hover {
  border-color: rgba(0, 167, 181, .42);
  background: var(--primary-soft);
  color: var(--text);
}

body.theme-light .theme-toggle,
body.theme-light .ghost,
body.theme-light .download,
body.theme-light .quick-flow button,
body.theme-light .account-trigger {
  background: rgba(255, 255, 255, .78);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle svg circle,
.theme-toggle svg path:first-child {
  fill: currentColor;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

h1, h2, h3, p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 3vw, var(--text-2xl));
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: 0;
}

h2 {
  font-size: var(--text-xl);
  line-height: 1.2;
  font-weight: 720;
}

h3 {
  font-size: var(--text-md);
  line-height: 1.3;
  font-weight: 690;
}

p {
  color: var(--muted);
  line-height: 1.58;
}

.topbar-actions,
.inline,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary,
.ghost,
.download,
.quick-flow button {
  border-radius: var(--radius);
  padding: 10px 15px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: 0 16px 38px rgba(0, 167, 181, .26);
}

.primary:hover {
  background: linear-gradient(135deg, #00485c, var(--primary-dark));
  transform: translateY(-1px);
}

.ghost,
.download,
.quick-flow button {
  background: rgba(255,255,255,.06);
  color: var(--muted-strong);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost:hover,
.download:hover,
.quick-flow button:hover {
  border-color: rgba(0, 167, 181, .42);
  background: rgba(0, 167, 181, .12);
  color: #f4fbfb;
}

.action-cost.ghost {
  background: var(--primary-soft);
  color: #e8fbfd;
  border-color: rgba(0, 167, 181, .34);
  box-shadow: 0 12px 28px rgba(0, 167, 181, .10);
}

.action-cost.ghost:hover {
  background: rgba(0, 167, 181, .20);
  border-color: rgba(0, 167, 181, .56);
}

.action-cost.primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

body.theme-light .action-cost.ghost {
  background: rgba(0, 167, 181, .08);
  color: #365066;
  border-color: rgba(0, 167, 181, .34);
  box-shadow: none;
}

body.theme-light .action-cost.ghost:disabled,
body.theme-light .action-cost.primary:disabled {
  background: rgba(0, 91, 114, .055);
  color: #5f7185;
  border: 1px solid rgba(0, 167, 181, .28);
  box-shadow: none;
}

body.theme-light .action-cost.ghost:disabled .cost-chip,
body.theme-light .action-cost.primary:disabled .cost-chip {
  color: #4f6578;
}

.cost-chip,
.gem-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  letter-spacing: 0;
}

.cost-chip {
  padding: 0;
  background: transparent;
  color: currentColor;
  font-weight: 760;
  line-height: 1.2;
}

.btn-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  grid-column: 1 / -1;
}

.flow-actions .primary {
  min-width: 112px;
  padding-inline: 24px;
}

.context-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
  padding: 12px 14px;
  margin: 12px 0;
  line-height: 1.5;
}

.context-box.compact,
.review-banner.compact,
.demo-capability-note.compact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
}

.context-box.compact {
  margin: 10px 0;
}

.context-box.ready {
  border-color: rgba(52, 211, 153, .35);
  background: rgba(52, 211, 153, .10);
  color: #bbf7d0;
}

.review-banner,
.connection-card {
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .10);
  padding: 14px;
  display: grid;
  gap: 5px;
  margin: 12px 0;
}

.review-banner strong,
.connection-card strong {
  color: var(--text);
}

.review-banner span,
.connection-card span,
.connection-card small {
  color: var(--muted);
  line-height: 1.45;
}

.review-banner.compact span,
.demo-capability-note.compact span {
  line-height: 1.25;
}

.review-checklist {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.review-checklist li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(255,255,255,.04);
}

.review-checklist li.ok {
  border-color: rgba(21, 128, 61, .24);
}

.review-checklist li.warn {
  border-color: rgba(199, 131, 24, .32);
  background: rgba(246, 199, 104, .10);
}

.account-menu {
  position: relative;
}

.account-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  color: var(--muted-strong);
  box-shadow: var(--shadow-soft);
  font-size: var(--text-sm);
  font-weight: 680;
}

.account-trigger:hover,
.account-trigger[aria-expanded="true"] {
  border-color: rgba(0, 167, 181, .42);
  background: rgba(0, 167, 181, .12);
  color: #f4fbfb;
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0,167,181,.95), rgba(0, 167, 181,.78));
  color: #fff;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.account-avatar.large {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.account-caret {
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.account-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(20, 23, 28, .96);
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
  backdrop-filter: blur(14px);
  padding: 14px;
}

.account-popover-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-popover-head strong,
.account-popover-head small {
  display: block;
}

.account-popover-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.account-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius-sm);
  background: rgba(0, 167, 181, .10);
}

.account-balance-row span {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 650;
}

.account-balance-row strong,
.mini-cost-table strong,
.account-history strong {
  color: var(--amber);
}

.account-details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.account-details summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 700;
}

.mini-cost-table,
.account-history {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
}

.mini-cost-table div,
.account-history .timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.045);
  padding: 9px 10px;
  color: var(--muted-strong);
}

.account-history .timeline-item {
  align-items: flex-start;
}

.account-history span {
  line-height: 1.35;
}

.account-logout {
  width: 100%;
  margin-top: 10px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 700;
}

.account-logout:hover {
  color: #fff;
  border-color: rgba(251, 113, 133, .34);
  background: rgba(251, 113, 133, .12);
}

.stepper {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  width: min(760px, 100%);
  margin: -10px auto 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
}

.step {
  display: flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  box-shadow: none;
  font-weight: 650;
  font-size: var(--text-xs);
}

.step b {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  color: var(--muted-strong);
  font-size: 11px;
}

.step.active {
  border-color: rgba(0, 167, 181,.42);
  background: rgba(0, 167, 181,.16);
  color: #f4fbfb;
  box-shadow: none;
}

.step.active b {
  background: var(--primary);
  color: #fff;
}

.view {
  display: none;
  gap: 18px;
}

.view.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  min-height: calc(100vh - 150px);
}

.metric-grid {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

body.theme-light .metric-card,
body.theme-light .panel,
body.theme-light .context-box,
body.theme-light .source-card,
body.theme-light .cost-table,
body.theme-light .modal-card,
body.theme-light .account-popover {
  background: var(--surface);
  color: var(--text);
}

.metric-card {
  padding: 18px;
  display: grid;
  gap: 4px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.05;
  margin: 6px 0;
  letter-spacing: 0;
}

.panel {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.grid {
  display: grid;
  gap: var(--space-5);
}

.grid.two {
  grid-template-columns: minmax(0, 1fr);
}

.view.active > .grid.two {
  display: contents;
}

.view.active > .grid.two > .panel:first-child,
.view.active > .panel:first-child {
  min-height: calc(100vh - 170px);
}

.view.active > .grid.two > .panel:nth-child(2),
.view.active > .panel:nth-child(2) {
  position: sticky;
  top: 22px;
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: rgba(26, 28, 32, .74);
}

body.theme-light .view.active > .grid.two > .panel:nth-child(2),
body.theme-light .view.active > .panel:nth-child(2) {
  background: rgba(255, 255, 255, .86);
}

#view-dashboard.active {
  grid-template-columns: minmax(0, 1fr);
}

#view-dashboard .metric-grid {
  display: none;
}

#view-dashboard > .grid.two {
  display: contents;
}

#view-dashboard .quick-flow {
  grid-template-columns: repeat(2, minmax(0, 220px));
  align-content: start;
  justify-content: center;
}

#view-dashboard .dashboard-side-panel {
  display: none;
}

#view-dashboard .panel:first-child {
  min-height: calc(100vh - 170px);
  display: grid;
  align-content: center;
  justify-content: center;
  text-align: center;
  isolation: isolate;
  background:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px),
    radial-gradient(circle at 78% 22%, rgba(0, 167, 181, .18), transparent 34%),
    rgba(26, 28, 32, .92);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

body.theme-light #view-dashboard .panel:first-child {
  background:
    linear-gradient(rgba(0,91,114,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,91,114,.045) 1px, transparent 1px),
    radial-gradient(circle at 78% 22%, rgba(0, 167, 181, .12), transparent 34%),
    rgba(255, 255, 255, .92);
}

#view-dashboard .panel:first-child .panel-head {
  justify-content: center;
  margin-bottom: 22px;
}

#view-dashboard .panel:first-child .panel-head > div {
  max-width: 560px;
}

.public-home-title,
.public-home-copy {
  display: none;
}

body.public-home .public-home-title,
body.public-home .public-home-copy {
  display: inline;
}

body.public-home .app-home-title,
body.public-home .app-home-copy {
  display: none;
}

body.public-home #view-dashboard.active {
  min-height: calc(100vh - 120px);
}

body.public-home #view-dashboard .panel:first-child {
  width: min(1040px, 100%);
  min-height: min(680px, calc(100vh - 150px));
  margin: 0 auto;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.theme-light.public-home #view-dashboard .panel:first-child {
  background: transparent;
}

body.public-home #view-dashboard .panel:first-child .panel-head > div {
  max-width: 720px;
}

body.public-home #view-dashboard h2 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

body.public-home #view-dashboard p {
  max-width: 620px;
  margin-inline: auto;
  font-size: clamp(15px, 1.6vw, 19px);
}

body.public-home #btn-start-now {
  min-width: 168px;
}

#view-dashboard .quick-flow .primary {
  background: linear-gradient(180deg, #00a7b5, var(--primary));
  color: #fff;
  border-color: rgba(215, 172, 80, .46);
  box-shadow: 0 16px 38px rgba(0, 167, 181, .24);
}

#view-dashboard .panel:first-child::after {
  content: none;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.quick-flow {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-flow button[data-jump="video"] {
  background: linear-gradient(180deg, #00a7b5, var(--primary));
  border-color: rgba(215, 172, 80, .46);
  color: #fff;
  box-shadow: 0 16px 38px rgba(0, 167, 181, .24);
}

.check-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.check-list li {
  padding-left: 24px;
  position: relative;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(0, 167, 181,.45);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 14px;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.055);
  color: var(--muted-strong);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: var(--text-sm);
  font-weight: 680;
  box-shadow: 0 6px 14px rgba(16, 33, 30, .04);
}

.tab:hover {
  border-color: rgba(0, 167, 181, .36);
  background: rgba(0, 167, 181, .12);
  color: #e8fbfd;
}

.tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(0, 167, 181, .22);
}

.tab.tab-disabled {
  color: #6b7280;
  background: rgba(255,255,255,.03);
  cursor: not-allowed;
  opacity: .78;
}

.tab.tab-disabled span {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(239, 68, 68, .16);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, .28);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.library-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.common-setup {
  margin: 18px 0 16px;
  border: 1px solid rgba(0, 167, 181, .22);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .08);
  padding: 15px;
  box-shadow: var(--shadow-soft);
}

.common-setup .form-grid {
  margin-bottom: 12px;
}

.asset-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.asset-guide-grid div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: 14px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-soft);
}

.asset-guide-grid strong {
  color: var(--text);
}

.asset-guide-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.status {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: 12px;
}

.helper-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.demo-shortcut {
  width: 100%;
  margin: 14px 0 12px;
}

.compact-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  padding: 11px 12px;
  display: grid;
  gap: 4px;
}

.compact-note strong {
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 680;
}

.compact-note span {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.demo-capability-note {
  margin-top: 14px;
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .08);
  padding: 14px 15px;
  display: grid;
  gap: 5px;
}

.demo-capability-note.compact details {
  margin-left: auto;
}

.demo-capability-note.compact summary {
  cursor: pointer;
  color: #66d9e0;
  font-size: var(--text-xs);
  font-weight: 650;
}

.demo-capability-note strong {
  color: #bfdbfe;
  font-size: var(--text-sm);
}

.demo-capability-note span,
.demo-capability-note small {
  color: var(--muted);
  line-height: 1.45;
}

.demo-capability-note small {
  font-size: 12px;
}

.error-card {
  border: 1px solid rgba(251, 113, 133, .35);
  border-radius: var(--radius);
  background: rgba(251, 113, 133, .10);
  color: #fecdd3;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  line-height: 1.45;
}

.error-card strong,
.error-card span,
.error-card small {
  display: block;
}

.error-card small {
  color: #fda4af;
}

.source-list,
.asset-list,
.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.source-card,
.asset-item,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.045);
  padding: 11px 12px;
  box-shadow: var(--shadow-soft);
}

.source-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.source-card:hover,
.source-card:focus-visible,
.source-card.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary), 0 18px 44px rgba(0, 167, 181,.14);
}

.source-card strong,
.source-card span,
.source-card small {
  display: block;
}

.source-card strong {
  font-size: var(--text-sm);
  line-height: 1.25;
  font-weight: 680;
}

.source-card span {
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.25;
  font-size: var(--text-xs);
}

.source-card small {
  color: #66d9e0;
  font-weight: 700;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.insight-summary-band,
.advanced-analysis {
  grid-column: 1 / -1;
}

.insight-summary-band {
  border: 1px solid rgba(0, 167, 181, .24);
  border-radius: var(--radius);
  background: rgba(0, 167, 181, .08);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.insight-summary-band strong {
  color: #bfdbfe;
}

.insight-summary-band span {
  color: var(--muted);
  line-height: 1.35;
  font-size: var(--text-sm);
}

.insight-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}

.compact-guide {
  padding: 18px;
}

.compact-guide .asset-guide-grid div {
  padding: 11px 12px;
}

.insight-card.wide {
  grid-column: 1 / -1;
}

.insight-card h3 {
  margin-bottom: 8px;
}

.insight-card div {
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

.advanced-analysis {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}

.advanced-analysis summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-weight: 680;
}

.advanced-analysis pre {
  margin: 12px 0 0;
  max-height: 320px;
  overflow: auto;
  color: var(--muted);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  white-space: pre-wrap;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.empty-state {
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  line-height: 1.5;
}

.copy-card {
  display: grid;
  gap: 14px;
}

.copy-card section {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.copy-card section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted-strong);
  font-size: var(--text-xs);
  font-weight: 760;
}

.asset-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.asset-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.asset-item.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary), 0 10px 24px rgba(0, 167, 181, .14);
}

.asset-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 7px;
  background: rgba(255,255,255,.06);
}

.asset-item span {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  overflow-wrap: anywhere;
  margin-top: 4px;
}

.delete-btn {
  justify-self: end;
  border: 1px solid rgba(251, 113, 133, .35);
  border-radius: 6px;
  background: rgba(251, 113, 133, .10);
  color: var(--danger);
  font-size: var(--text-xs);
  font-weight: 700;
  min-width: 64px;
  padding: 8px 10px;
}

.delete-btn:hover {
  background: rgba(251, 113, 133, .18);
}

.preview-img {
  width: min(100%, 280px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-top: 12px;
}

.video-wrap video {
  width: 100%;
  border-radius: var(--radius);
  background: #111;
}

.download {
  margin-top: 12px;
}

.checkbox-row label,
.check {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.checkbox-row input,
.check input {
  width: auto;
}

.cost-table {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.cost-table div,
.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.cost-table div {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.cost-table strong {
  color: var(--amber);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(2, 6, 12, .72);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-card {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: rgba(26, 28, 32, .94);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0,0,0,.46);
  padding: 22px;
  backdrop-filter: blur(10px);
}

.icon-btn {
  background: var(--primary-soft);
  color: #e8fbfd;
  border-radius: 6px;
  padding: 9px 11px;
  font-weight: 700;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
}

.password-toggle:hover,
.password-toggle.active {
  color: #e8fbfd;
  background: var(--primary-soft);
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-top: auto;
  padding: 72px 2px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
}

.site-footer p {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: var(--text-sm);
  line-height: 1.55;
}

.site-footer small {
  font-size: var(--text-xs);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 14px;
  min-width: 420px;
}

.site-footer a {
  color: #66d9e0;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(82vw, 286px);
    height: 100vh;
    transform: translateX(-104%);
    transition: transform .22s ease;
    box-shadow: 34px 0 80px rgba(0, 0, 0, .45);
  }

  .sidebar-collapse {
    display: none;
  }

  body.sidebar-collapsed .sidebar {
    padding: 22px 14px;
  }

  body.sidebar-collapsed .brand {
    align-items: flex-start;
  }

  body.sidebar-collapsed .brand img {
    width: 172px;
    height: 62px;
  }

  body.sidebar-collapsed .brand div,
  body.sidebar-collapsed .sidebar-note {
    display: block;
  }

  body.sidebar-collapsed .nav-item {
    justify-content: flex-start;
    padding: 11px 12px;
    gap: 10px;
    font-size: var(--text-sm);
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(0, 0, 0, .54);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: opacity .2s ease;
  }

  body.mobile-nav-open .mobile-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-button {
    display: inline-grid;
    place-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.06);
    box-shadow: var(--shadow-soft);
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
  }

  .view.active,
  #view-dashboard.active {
    grid-template-columns: 1fr;
  }

  .view.active > .grid.two > .panel:nth-child(2),
  .view.active > .panel:nth-child(2) {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .grid.two,
  .asset-columns,
  .insight-grid,
  .asset-guide-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }

  .site-footer nav {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 680px) {
  .workspace {
    padding: 12px;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .account-trigger {
    max-width: 100%;
  }

.account-popover {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .panel-head {
    display: grid;
  }

  .stepper,
  .quick-flow,
  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: var(--radius);
  }

  .step {
    justify-content: flex-start;
  }

  h1 {
    font-size: 22px;
  }

  #page-subtitle {
    display: none;
  }

  .panel {
    padding: 18px;
  }

  #view-dashboard .quick-flow {
    grid-template-columns: 1fr 1fr;
  }

  .brand img {
    width: 166px;
    height: 60px;
  }
}

body.theme-light .account-popover {
  box-shadow: 0 24px 70px rgba(7, 30, 43, .16);
}

