* {
  box-sizing: border-box;
}

:root {
  --bg: #000000;
  --panel: #0a0a0a;
  --panel-2: #101010;
  --border: rgba(255,255,255,0.10);
  --muted: rgba(255,255,255,0.60);
  --muted-2: rgba(255,255,255,0.42);
  --text: #ffffff;
  --shadow: 0 20px 70px rgba(0,0,0,0.45);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 0 34%),
    linear-gradient(180deg, #050505 0%, #000 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px 28px 48px;
}

.nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  margin: 0 auto 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10,10,10,0.68);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 28px;
  height: 28px;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(173, 89, 255, 0.24));
}

.nav-links {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

.nav-cta {
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 600;
}

.hero {
  text-align: center;
  padding: 72px 0 22px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(56px, 8vw, 102px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  font-weight: 600;
}

.hero-copy {
  max-width: 760px;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.demo-btn {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  cursor: pointer;
  transition: 180ms ease;
}

.primary-btn {
  background: #fff;
  color: #000;
  font-weight: 600;
}

.primary-btn:hover,
.nav-cta

.secondary-btn,
.demo-btn {
  background: rgba(255,255,255,0.03);
  color: #fff;
}

.hero-preview {
  padding: 34px 0 90px;
}

.preview-window,
.workspace-card,
.band-card,
.use-card,
.price-card,
.faq-list article {
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.preview-window {
  border-radius: 34px;
  overflow: hidden;
}

.window-top {
  display: flex;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.window-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}

.preview-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  min-height: 560px;
}

.doc-panel,
.analysis-panel {
  padding: 34px;
}

.doc-panel {
  border-right: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}

.doc-chip,
.workspace-pill,
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}

.doc-panel h3,
.analysis-panel h2,
.use-card h3,
.band-card h2,
.section-copy h2,
.workspace-header h3,
.price-card h3,
.faq-list h4 {
  letter-spacing: -0.03em;
}

.doc-panel h3 {
  margin: 18px 0 8px;
  font-size: 30px;
  line-height: 1.1;
}

.muted,
.panel-label {
  color: var(--muted-2);
}

.doc-lines {
  display: grid;
  gap: 12px;
  margin: 28px 0 26px;
}

.doc-lines div {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.doc-lines div:nth-child(1) { width: 92%; }
.doc-lines div:nth-child(2) { width: 74%; }
.doc-lines div:nth-child(3) { width: 88%; }
.doc-lines div:nth-child(4) { width: 60%; }
.doc-lines div:nth-child(5) { width: 84%; }

.mini-card,
.summary-box {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  padding: 18px;
}

.mini-card span,
.plan {
  color: var(--muted);
  font-size: 13px;
}

.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.mini-card p,
.issue p,
.use-card p,
.feature-item p,
.summary-box p,
.price-card li,
.faq-list p {
  color: var(--muted);
  line-height: 1.65;
}

.score-row,
.workspace-header,
.workspace-content,
.feature-columns,
.use-case-grid,
.pricing-grid {
  display: grid;
  gap: 20px;
}

.score-row {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.analysis-panel h2 {
  margin: 6px 0 0;
  font-size: 42px;
}

.score-badge {
  padding: 8px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  font-weight: 600;
}

.issue-list {
  display: grid;
  gap: 14px;
  margin: 28px 0;
}

.issue {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.issue-level {
  align-self: start;
  border-radius: 999px;
  padding: 8px 10px;
  text-align: center;
  font-size: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
}

.issue h4 {
  margin: 2px 0 6px;
  font-size: 18px;
}

.plain-english {
  margin-top: 18px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.section-copy {
  max-width: 880px;
  margin: 0 auto 30px;
  text-align: center;
}

.section-copy.narrow {
  max-width: 700px;
}

.section-copy h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
}

.use-cases,
.feature-band,
.analysis-demo,
.pricing,
.faq {
  padding: 48px 0 32px;
}

.use-case-grid,
.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.use-card,
.price-card,
.faq-list article {
  padding: 26px;
  border-radius: 28px;
}

.use-card h3 {
  margin: 18px 0 10px;
  font-size: 28px;
  line-height: 1.12;
}

.feature-band {
  display: grid;
  gap: 18px;
}

.band-card {
  padding: 30px;
  border-radius: 30px;
}

.band-card h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.05;
}

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

.feature-item {
  padding: 10px 8px;
}

.feature-item h4 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.demo-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.demo-btn.active {
  background: #fff;
  color: #000;
  font-weight: 600;
}

.workspace-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px;
  border-radius: 30px;
}

.workspace-header {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 18px;
}

.workspace-header h3 {
  margin: 4px 0 0;
  font-size: 34px;
}

.workspace-pill {
  background: rgba(255,255,255,0.06);
}

.workspace-content {
  grid-template-columns: 1fr 1fr;
}

.summary-box ul {
  margin: 10px 0 0 18px;
  padding: 0;
  color: var(--muted);
}

.price-card h3 {
  margin: 8px 0 18px;
  font-size: 40px;
}

.price-card h3 span {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
}

.price-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.price-card.featured {
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 34px 6px 10px;
  color: var(--muted-2);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .preview-grid,
  .use-case-grid,
  .feature-columns,
  .pricing-grid,
  .faq-list,
  .workspace-content {
    grid-template-columns: 1fr;
  }

  .doc-panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav-links {
    display: none;
  }

  .footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px 14px 40px;
  }

  .nav {
    padding: 14px 16px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .preview-grid,
  .analysis-panel,
  .doc-panel,
  .use-card,
  .price-card,
  .faq-list article,
  .workspace-card,
  .band-card {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .workspace-header {
    grid-template-columns: 1fr;
  }
}


.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-text-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 10px 6px;
}

.try-free {
  padding: 48px 0 40px;
}

.try-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-align: center;
}

.try-card h2 {
  margin: 0 auto 16px;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.try-card p:not(.eyebrow) {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.65;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(12px);
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(92vw, 520px);
  margin: 7vh auto 0;
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(20,20,20,0.96), rgba(10,10,10,0.96));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.close-auth {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: 42px;
  letter-spacing: -0.04em;
}

.auth-copy {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  text-align: left;
}

.auth-form span {
  color: var(--muted);
  font-size: 14px;
}

.auth-form input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font: inherit;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.05);
}

.auth-submit {
  width: 100%;
  justify-content: center;
}

.auth-switch {
  margin: 16px 0 0;
  color: var(--muted);
}

.auth-switch-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
}

.dashboard-body .page-shell {
  padding-bottom: 60px;
}

.dashboard-main {
  padding-top: 12px;
}

.dashboard-hero {
  padding: 40px 0 24px;
  text-align: center;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 18px;
  margin-top: 10px;
}

.dash-card {
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.upload-large {
  grid-column: span 4;
}

.window-top.compact {
  padding: 0 0 18px;
  border-bottom: 0;
  background: transparent;
}

.window-top.compact span {
  width: 8px;
  height: 8px;
}

.upload-large h3,
.recent-card h3,
.side-card h3 {
  margin: 8px 0 10px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-actions.left {
  justify-content: flex-start;
}

.stat-card h2 {
  margin: 8px 0 10px;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 18px;
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.review-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

.review-row strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.dash-side-stack {
  display: grid;
  gap: 18px;
}

.dashboard-user {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .upload-large {
    grid-column: span 1;
  }

  .dashboard-lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .auth-card,
  .try-card,
  .dash-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .review-row,
  .section-head {
    flex-direction: column;
  }

  .nav-auth {
    gap: 6px;
  }
}



/* Option 2 split dashboard with pink glass accents */
.dashboard-pinkglass {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 117, 175, 0.14), transparent 0 28%),
    radial-gradient(circle at 80% 12%, rgba(255, 185, 214, 0.10), transparent 0 24%),
    linear-gradient(180deg, #070507 0%, #030303 100%);
}

.split-hero {
  padding-bottom: 26px;
}

.split-hero h1 {
  margin: 0;
  font-size: clamp(46px, 6.8vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.split-workspace {
  padding: 8px 0 14px;
}

.split-shell {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
  align-items: stretch;
}

.document-side,
.analysis-side {
  min-height: 760px;
}

.document-side,
.analysis-card,
.dash-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 24px 80px rgba(0,0,0,0.40);
  backdrop-filter: blur(18px);
}

.document-side {
  border-radius: 34px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.analysis-stack {
  display: grid;
  gap: 16px;
  height: 100%;
}

.analysis-card {
  border-radius: 28px;
  padding: 22px;
}

.hero-analysis {
  min-height: 152px;
}

.split-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
}

.pink-pill,
.pink-badge {
  background: rgba(255, 170, 205, 0.10);
  border-color: rgba(255, 170, 205, 0.24);
  color: #ffd8e8;
}

.upload-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  text-align: left;
}

.upload-stage h2 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.upload-dropzone {
  display: block;
  margin-top: 22px;
  border-radius: 30px;
  border: 1px dashed rgba(255, 184, 214, 0.30);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255, 175, 210, 0.04));
  padding: 22px;
  cursor: pointer;
}

.upload-dropzone input {
  display: none;
}

.drop-inner {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 24px;
  background: rgba(255,255,255,0.025);
}

.upload-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin: 0 auto 14px;
  font-size: 34px;
  font-weight: 300;
  background: rgba(255, 170, 205, 0.12);
  border: 1px solid rgba(255, 170, 205, 0.22);
}

.drop-inner strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.drop-inner span {
  margin-top: 6px;
  color: var(--muted);
}

.sample-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.sample-chip {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.04);
  color: #fff;
  border-radius: 999px;
  padding: 11px 14px;
  font: inherit;
  cursor: pointer;
}

.doc-canvas {
  display: block;
}

.doc-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 18px;
}

.doc-meta h3 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.doc-page {
  min-height: 560px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.03)),
    rgba(10,10,10,0.45);
  padding: 28px;
}

.doc-line {
  height: 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 14px;
}
.doc-line.xl { width: 92%; }
.doc-line.lg { width: 85%; }
.doc-line.md { width: 64%; }
.doc-line.sm { width: 49%; }

.doc-highlight {
  margin: 18px 0 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 170, 205, 0.22);
  background: rgba(255, 170, 205, 0.08);
}

.doc-highlight span {
  display: block;
  color: #ffd2e4;
  font-size: 13px;
  margin-bottom: 8px;
}

.doc-highlight strong {
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.analysis-head h3 {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.analysis-copy {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.issue-stack {
  display: grid;
  gap: 12px;
}

.mini-issue {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 14px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

.issue-tag {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 170, 205, 0.22);
  background: rgba(255, 170, 205, 0.10);
  color: #ffd8e8;
  align-self: start;
}

.mini-issue strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.mini-issue p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.split-lower {
  margin-top: 20px;
}

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

  .document-side,
  .analysis-side {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .document-side,
  .analysis-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .analysis-head,
  .doc-meta,
  .split-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .mini-issue {
    grid-template-columns: 1fr;
  }

  .drop-inner {
    min-height: 180px;
  }
}



/* Injected: distinct app-style dashboard refresh */
.dashboard-app-view {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 153, 205, 0.16), transparent 0 24%),
    radial-gradient(circle at bottom right, rgba(255, 153, 205, 0.10), transparent 0 22%),
    linear-gradient(180deg, #050405 0%, #020202 100%);
}

.dashboard-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.app-sidebar {
  padding: 24px 18px;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: rgba(8,8,8,0.82);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-brand {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
  padding: 8px 10px;
}

.sidebar-group {
  display: grid;
  gap: 10px;
}

.sidebar-label {
  margin: 0;
  padding: 0 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-link,
.sidebar-chip,
.sidebar-logout {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #fff;
  border-radius: 16px;
  padding: 14px 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sidebar-link.active {
  background: rgba(255, 153, 205, 0.10);
  border-color: rgba(255, 153, 205, 0.18);
}

.sidebar-chip {
  border-radius: 999px;
  padding: 11px 14px;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.workspace-user {
  color: rgba(255,255,255,0.60);
  font-size: 14px;
  padding: 0 10px;
  word-break: break-word;
}

.app-main {
  padding: 28px;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-label,
.pane-label {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.42);
}

.app-topbar h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.topbar-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(255, 153, 205, 0.12);
  border: 1px solid rgba(255, 153, 205, 0.18);
  cursor: pointer;
  color: #ffd8ea;
  font-weight: 500;
}

.topbar-upload input {
  display: none;
}

.app-split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
}

.app-document-pane,
.app-analysis-pane,
.app-bottom-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 24px 80px rgba(0,0,0,0.40);
  backdrop-filter: blur(18px);
}

.app-document-pane,
.app-analysis-pane {
  border-radius: 28px;
}

.app-document-pane {
  padding: 22px;
  min-height: 720px;
}

.app-analysis-pane {
  padding: 18px;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 18px;
}

.pane-header h2,
.pane-header h3,
.analysis-pane-head h3,
.upload-stage-card h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.pane-header h2 {
  font-size: 28px;
  line-height: 1.08;
  margin-top: 4px;
}

.pane-status,
.analysis-score {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 153, 205, 0.10);
  border: 1px solid rgba(255, 153, 205, 0.20);
  color: #ffd8ea;
  font-size: 13px;
  white-space: nowrap;
}

.pane-status.subtle {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.62);
}

.document-stage {
  height: calc(100% - 84px);
  display: grid;
  place-items: center;
}

.upload-stage-card {
  width: min(100%, 520px);
  text-align: center;
  padding: 34px 26px;
  border-radius: 28px;
  border: 1px dashed rgba(255, 153, 205, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255, 153, 205, 0.04));
}

.upload-stage-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  background: rgba(255, 153, 205, 0.12);
  border: 1px solid rgba(255, 153, 205, 0.20);
  color: #ffd8ea;
}

.upload-stage-card h3 {
  font-size: 34px;
  line-height: 1.06;
}

.upload-stage-card p,
.analysis-pane-copy {
  color: rgba(255,255,255,0.62);
  line-height: 1.68;
}

.document-dropzone {
  display: inline-flex;
  margin-top: 16px;
  padding: 13px 18px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  cursor: pointer;
}

.document-dropzone input {
  display: none;
}

.document-canvas-wrap {
  display: block;
}

.document-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.document-toolbar-left {
  display: flex;
  gap: 8px;
}

.doc-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}

.document-pages {
  color: rgba(255,255,255,0.50);
  font-size: 13px;
}

.document-sheet {
  min-height: 560px;
  border-radius: 24px;
  padding: 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.sheet-line {
  height: 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 14px;
}
.w-92 { width: 92%; }
.w-70 { width: 70%; }
.w-88 { width: 88%; }
.w-54 { width: 54%; }
.w-94 { width: 94%; }
.w-67 { width: 67%; }
.w-86 { width: 86%; }
.w-58 { width: 58%; }
.w-76 { width: 76%; }

.sheet-clause {
  margin: 18px 0;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 153, 205, 0.08);
  border: 1px solid rgba(255, 153, 205, 0.18);
}

.sheet-clause span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: #ffd8ea;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sheet-clause strong {
  line-height: 1.6;
}

.app-analysis-pane {
  display: grid;
  gap: 14px;
  align-content: start;
}

.analysis-pane-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.analysis-pane-card.highlight {
  background: linear-gradient(180deg, rgba(255, 153, 205, 0.10), rgba(255,255,255,0.03));
}

.analysis-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.analysis-pane-head h3 {
  font-size: 28px;
  line-height: 1.06;
}

.issue-stack {
  display: grid;
  gap: 12px;
}

.mini-issue {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.issue-tag {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  align-self: start;
  background: rgba(255, 153, 205, 0.10);
  border: 1px solid rgba(255, 153, 205, 0.18);
  color: #ffd8ea;
}

.mini-issue strong {
  display: block;
  margin-bottom: 4px;
}

.mini-issue p {
  margin: 0;
  color: rgba(255,255,255,0.60);
  line-height: 1.65;
}

.app-bottom-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  margin-top: 18px;
}

.app-bottom-card {
  border-radius: 24px;
  padding: 20px;
}

.compact-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

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

  .app-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

@media (max-width: 980px) {
  .app-split-layout,
  .app-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-main {
    padding: 10px;
  }

  .app-topbar,
  .pane-header,
  .analysis-pane-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .mini-issue {
    grid-template-columns: 1fr;
  }

  .upload-stage-card h3 {
    font-size: 28px;
  }
}



/* Injected fix: auth modal must stay closed until clicked */
.auth-modal.hidden {
  display: none !important;
}
.auth-modal {
  display: block;
}
.hidden {
  display: none !important;
}


/* Injected: staged upload and storage UI */
.queued-docs-card {
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.queued-docs-list,
.stored-docs-list {
  display: grid;
  gap: 10px;
}

.empty-queue {
  padding: 10px;
  border-radius: 16px;
  color: rgba(255,255,255,0.52);
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.10);
}

.doc-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.doc-item.compact {
  grid-template-columns: 1fr auto;
}

.doc-item.selected {
  border-color: rgba(255, 153, 205, 0.28);
  background: rgba(255, 153, 205, 0.06);
}

.doc-item-main {
  cursor: pointer;
}

.doc-item-main strong {
  display: block;
  margin-bottom: 4px;
}

.doc-item-main p {
  margin: 0;
  color: rgba(255,255,255,0.56);
  line-height: 1.5;
}

.doc-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.doc-action {
  appearance: none;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.10);
}

.doc-action.primary {
  background: rgba(255, 153, 205, 0.12);
  color: #ffd8ea;
  border-color: rgba(255, 153, 205, 0.18);
}

.doc-action.subtle {
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.doc-action:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 720px) {
  .doc-item {
    grid-template-columns: 1fr;
  }

  .doc-item-actions {
    justify-content: flex-start;
  }
}


/* Injected: full workspace management additions */
.library-search-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font: inherit;
}

.ocr-note {
  margin: 12px 0 0;
  color: rgba(255,255,255,0.42);
  font-size: 13px;
  line-height: 1.5;
}

.notes-card {
  margin-top: 18px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.notes-input {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: #fff;
  padding: 14px;
  font: inherit;
}

.notes-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.62);
  font-size: 13px;
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255,153,205,0.65), rgba(255,208,230,0.95));
  transition: width 220ms ease;
}

.ai-response-card {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.ai-response-text {
  white-space: pre-wrap;
  line-height: 1.7;
  color: rgba(255,255,255,0.68);
  max-height: 220px;
  overflow: auto;
}

.issue-detail {
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.issue-summary {
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  padding: 14px;
}

.issue-summary::-webkit-details-marker {
  display: none;
}

.issue-title {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.issue-body {
  padding: 0 14px 14px 14px;
  color: rgba(255,255,255,0.62);
  line-height: 1.65;
}

.history-timestamp {
  margin: 8px 0 0;
  color: rgba(255,255,255,0.42);
  font-size: 12px;
}

.history-open {
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: capitalize;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
}

.status-pending {
  color: #ffe7b0;
  border-color: rgba(255, 211, 122, 0.18);
  background: rgba(255, 211, 122, 0.08);
}

.status-running {
  color: #ffd8ea;
  border-color: rgba(255,153,205,0.18);
  background: rgba(255,153,205,0.08);
}

.status-complete {
  color: #c9ffd8;
  border-color: rgba(120,255,170,0.18);
  background: rgba(120,255,170,0.08);
}

.doc-action.danger {
  background: rgba(255, 120, 120, 0.09);
  color: #ffd4d4;
  border-color: rgba(255, 120, 120, 0.16);
}

.security-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 720px) {
  .issue-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .notes-actions {
    justify-content: flex-start;
  }
}


/* Injected: advanced library, drag drop, export/share, OCR helpers */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.pagination-label {
  color: rgba(255,255,255,0.55);
  font-size: 13px;
}

.drop-target.drag-active .upload-stage-card {
  border-color: rgba(255,153,205,0.45);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255, 153, 205, 0.10));
  transform: translateY(-2px);
}

.document-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.meta-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.meta-input {
  width: 100%;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: #fff;
  font: inherit;
}

.analysis-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.doc-meta-line {
  margin-top: 6px !important;
  color: rgba(255,255,255,0.42) !important;
  font-size: 12px;
}

@media (max-width: 980px) {
  .document-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .pagination-bar,
  .analysis-actions,
  .inline-form {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }
}


.auth-storage-status {
  margin: 0 0 18px;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.72);
}
.auth-storage-status[data-kind="success"] {
  background: rgba(120,255,170,0.08);
  border-color: rgba(120,255,170,0.18);
  color: #c9ffd8;
}
.auth-storage-status[data-kind="warning"] {
  background: rgba(255,211,122,0.08);
  border-color: rgba(255,211,122,0.18);
  color: #ffe7b0;
}
.disabled-upload {
  opacity: 0.5;
  pointer-events: none;
}


/* Injected fix: keep upload buttons visibly active */
.topbar-upload,
.document-dropzone {
  opacity: 1 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  filter: none !important;
}

.topbar-upload span,
.document-dropzone span {
  opacity: 1 !important;
}

input[disabled] + span,
label.disabled-upload,
.disabled-upload {
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* Hard fix: upload triggers are real buttons */
.topbar-upload,
.document-dropzone {
  appearance: none;
  border: none;
}


/* Direct picker fix */
.topbar-upload,
.document-dropzone {
  appearance: none;
  border: none;
  pointer-events: auto !important;
  cursor: pointer !important;
}

#dashboardFileInput,
#dashboardFileInputSecondary {
  display: none !important;
}


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

.metric-card,
.clause-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  padding: 10px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.clause-card-grid,
.negotiation-list {
  display: grid;
  gap: 12px;
}

.clause-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.extracted-text-panel {
  min-height: 260px;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  padding: 10px;
  color: var(--muted);
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.text-highlight {
  background: rgba(255, 230, 0, 0.25);
  color: #fff;
  padding: 0 2px;
  border-radius: 4px;
}

.record-item {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  background: rgba(255,255,255,0.02);
}

.record-item

@media (max-width: 760px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }
}

/* DASHBOARD LEGAL INSPECT */
:root {
  --legal-bg-1: #070510;
  --legal-bg-2: #0d0a18;
  --legal-panel: rgba(14, 12, 28, 0.72);
  --legal-panel-strong: rgba(19, 16, 36, 0.9);
  --legal-border: rgba(255, 255, 255, 0.08);
  --legal-text: #fbf8ff;
  --legal-muted: rgba(245, 237, 255, 0.68);
  --legal-muted-2: rgba(245, 237, 255, 0.5);
  --legal-pink: #ff4fd8;
  --legal-purple: #8f5bff;
  --legal-magenta: #c14cff;
  --legal-glow: 0 0 0 1px rgba(255,255,255,0.04), 0 24px 60px rgba(7, 4, 18, 0.55);
}

.dashboard-legalinspect {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,79,216,0.18), transparent 0 24%),
    radial-gradient(circle at 82% 10%, rgba(143,91,255,0.22), transparent 0 30%),
    radial-gradient(circle at 70% 78%, rgba(193,76,255,0.12), transparent 0 22%),
    linear-gradient(135deg, #06040d 0%, #090713 34%, #0d0b18 60%, #05040b 100%);
  color: var(--legal-text);
  overflow-x: hidden;
}

.dashboard-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.03) 0.6px, transparent 0.6px);
  background-size: 18px 18px;
  opacity: 0.12;
}

.dashboard-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
}

.legal-sidebar {
  padding: 28px 20px;
  border-right: 1px solid rgba(255,255,255,0.05);
  background: linear-gradient(180deg, rgba(15,12,28,0.95), rgba(10,8,20,0.88));
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-main {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.glass-card,
.glass-subcard,
.topbar-badge,
.sidebar-panel,
.sidebar-user-card,
.document-sheet,
.mini-issue,
.clause-card,
.metric-card,
.hero-metric,
.meta-card,
.notes-input,
.extracted-text-panel,
.record-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  border: 1px solid var(--legal-border);
  box-shadow: var(--legal-glow);
  backdrop-filter: blur(28px);
}

.legal-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 18px;
}

.legal-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 32px rgba(193,76,255,0.18);
  overflow: hidden;
}

.legal-brand-mark img {
  width: 36px;
  height: 36px;
  display: block;
}

.sidebar-kicker,
.sidebar-label,
.pane-label,
.eyebrow-gradient {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: var(--legal-muted-2);
}

.legal-brand-name,
.topbar-title,
.hero-review-card h3,
.summary-glow-card h3,
.document-stage-card h3,
.issues-card h3,
.library-card h3,
.history-card h3,
.text-panel-card h3,
.notes-card h3,
.clause-card-shell h3,
.negotiation-card-shell h3 {
  margin: 4px 0 0;
  letter-spacing: -0.04em;
}

.legal-brand-name { font-size: 20px; }
.legal-nav { display: grid; gap: 8px; }

.legal-nav-item {
  appearance: none;
  border: 1px solid transparent;
  color: var(--legal-muted);
  background: transparent;
  padding: 13px 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  cursor: pointer;
  transition: 180ms ease;
}

.legal-nav-item:hover,
.legal-nav-item.active {
  color: white;
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(90deg, rgba(255,79,216,0.14), rgba(143,91,255,0.12));
}

.nav-bullet {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--legal-pink), var(--legal-purple));
  box-shadow: 0 0 18px rgba(255,79,216,0.6);
}

.sidebar-panel,
.sidebar-user-card {
  border-radius: 22px;
  padding: 10px;
}

.sidebar-panel.compact { gap: 12px; display: grid; }
.sidebar-panel-head, .panel-head-spread, .hero-review-head, .progress-row, .pagination-bar, .document-toolbar, .analysis-actions, .topbar-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-mini {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  color: white;
  background: rgba(255,255,255,0.08);
}

.sample-chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sidebar-chip {
  appearance: none; border: 1px solid rgba(255,255,255,0.08); color: white; cursor: pointer;
  padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,0.04);
}
.sidebar-chip.pink { box-shadow: inset 0 0 0 1px rgba(255,79,216,0.22); }
.sidebar-chip.purple { box-shadow: inset 0 0 0 1px rgba(143,91,255,0.22); }
.sidebar-chip.magenta { box-shadow: inset 0 0 0 1px rgba(193,76,255,0.22); }

.library-search-input,
.meta-input,
.notes-input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: white;
  padding: 13px 14px;
  font: inherit;
}
.library-search-input::placeholder,
.meta-input::placeholder,
.notes-input::placeholder { color: var(--legal-muted-2); }

.sidebar-spacer { flex: 1; }
.sidebar-user-card { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.sidebar-logout,
.doc-action,
.gradient-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 8px 16px;
  color: white;
  background: rgba(255,255,255,0.04);
  font: inherit;
  cursor: pointer;
}

.gradient-btn {
  background: linear-gradient(135deg, rgba(255,79,216,0.95), rgba(143,91,255,0.96));
  border: 0;
  box-shadow: 0 18px 40px rgba(188,78,255,0.35);
  font-weight: 700;
}

.doc-action.subtle:hover,
.sidebar-logout:hover,
.gradient-btn:hover,
.record-item:hover,
.sidebar-chip

.legal-topbar,
.hero-review-card,
.summary-glow-card,
.document-stage-card,
.issues-card,
.clause-card-shell,
.negotiation-card-shell,
.text-panel-card,
.library-card,
.history-card,
.notes-card,
.action-card-shell,
.rewrite-card-shell,
.chat-card-shell,
.compare-card {
  border-radius: 28px;
  padding: 20px;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-badge {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--legal-muted);
  font-size: 13px;
}

.topbar-badge.subtle { background: rgba(255,255,255,0.03); }
.eyebrow-gradient {
  background: linear-gradient(90deg, #ffc7f0, #d7ccff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topbar-title { font-size: 30px; }
.hero-analysis-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 22px; }
.hero-risk-cluster { display: grid; gap: 12px; justify-items: end; }
.risk-orb {
  width: 126px; height: 126px; border-radius: 32px;
  display: grid; place-items: center;
  text-align: center;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.14), transparent 0 45%), linear-gradient(145deg, rgba(255,79,216,0.28), rgba(143,91,255,0.14));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 20px 50px rgba(188,78,255,0.18);
}
.risk-orb span { color: var(--legal-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; }
.risk-orb strong { font-size: 34px; letter-spacing: -0.04em; }
.analysis-score-pill {
  padding: 10px 14px; border-radius: 999px; font-weight: 700;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.08);
}
.hero-copy-legal,
.analysis-pane-copy,
.ai-response-text,
.mini-issue p,
.clause-card p,
.negotiation-list p,
.security-note p { color: var(--legal-muted); line-height: 1.68; }
.hero-metrics-row,
.document-meta-grid,
.bottom-library-grid,
.workspace-grid { display: grid; gap: 18px; }
.hero-metrics-row { grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.hero-metric { border-radius: 22px; padding: 10px; }
.hero-metric span { display:block; color: var(--legal-muted-2); font-size: 12px; margin-bottom: 8px; }
.hero-metric strong { font-size: 18px; }
.progress-wrap { margin-top: 18px; }
.progress-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow:hidden; }
.progress-fill { height:100%; width:0; border-radius:999px; background: linear-gradient(90deg, var(--legal-pink), var(--legal-purple)); }
.summary-glow-card { min-height: 170px; }
.summary-mode-toggle {
  display: inline-flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.summary-mode-toggle .doc-action.is-active {
  background: linear-gradient(135deg, rgba(255,79,216,0.18), rgba(143,91,255,0.16));
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 14px 28px rgba(160, 77, 255, 0.14);
}
.summary-helper-text {
  margin-top: 12px;
  color: var(--legal-muted-2);
  font-size: 13px;
}
.comparison-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  margin-top: 16px;
}
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.comparison-metric {
  padding: 10px;
  border-radius: 20px;
}
.comparison-metric span {
  display: block;
  color: var(--legal-muted-2);
  font-size: 12px;
  margin-bottom: 8px;
}
.comparison-metric strong {
  font-size: 18px;
}
.comparison-output {
  margin-top: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 10px;
  color: var(--legal-muted);
  line-height: 1.7;
  white-space: pre-wrap;
}
.workspace-grid { grid-template-columns: 1.5fr 0.85fr; align-items: start; }

.workspace-section-tabs {
  display: inline-flex;
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.workspace-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--legal-muted);
  padding: 10px 14px;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}
.workspace-tab.is-active {
  color: white;
  background: linear-gradient(135deg, rgba(255,79,216,0.18), rgba(143,91,255,0.16));
  box-shadow: 0 12px 24px rgba(160,77,255,0.12);
}
.workspace-tab-pane { display: none; gap: 18px; }
.workspace-tab-pane.is-active { display: grid; }
.compact-chat-card .chat-thread { min-height: 220px; max-height: 260px; }
.compact-chat-card .chat-suggestions { margin-bottom: 8px; }
.action-card-shell, .issues-card, .chat-card-shell, .rewrite-card-shell, .negotiation-card-shell, .clause-card-shell, .notes-card { min-height: 0; }
.hero-analysis-grid { grid-template-columns: 1.35fr 0.75fr; }
.workspace-grid { grid-template-columns: 1.5fr 0.85fr; align-items: start; }
.bottom-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bottom-library-grid .compare-card,
.bottom-library-grid .history-card { grid-column: span 1; }
.legal-main { gap: 18px; }

.workspace-left-column, .workspace-right-column, .hero-summary-stack { display: grid; gap: 18px; }
.document-stage, .document-canvas-wrap { margin-top: 18px; }
.legal-dropzone {
  min-height: 340px; border-radius: 28px; display:grid; place-items:center; text-align:center;
  background: radial-gradient(circle at top, rgba(255,79,216,0.12), transparent 0 50%), rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.14);
}
.upload-stage-icon {
  width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 16px;
  display:grid; place-items:center; font-size: 30px; font-weight:700;
  background: linear-gradient(135deg, rgba(255,79,216,0.18), rgba(143,91,255,0.18));
}
.document-canvas-wrap { display:grid; gap:16px; }
.document-toolbar { padding: 10px 4px 2px; }
.document-toolbar-left { display:flex; gap:8px; }
.doc-dot { width:10px; height:10px; border-radius:50%; background: rgba(255,255,255,0.18); }
.document-pages { color: var(--legal-muted-2); font-size: 13px; }
.document-meta-grid { grid-template-columns: repeat(2, 1fr); }
.meta-card { border-radius: 22px; padding: 10px; }
.inline-form { display:flex; gap:10px; align-items:center; }
.legal-preview-sheet {
  min-height: 560px;
  border-radius: 26px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(9,9,20,0.88), rgba(16,12,30,0.72));
}
.sheet-clause {
  padding: 18px; border-radius: 20px; color: white; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255,79,216,0.18), rgba(143,91,255,0.14));
  border: 1px solid rgba(255,255,255,0.08);
}
.sheet-clause span { display:block; color: #f0d7ff; font-size: 12px; margin-bottom: 6px; text-transform: uppercase; letter-spacing:0.12em; }
.extracted-text-panel {
  border-radius: 24px; min-height: 220px; max-height: 320px; padding: 18px; overflow: auto; white-space: pre-wrap; color: #efeaff;
}
.issue-stack,
.clause-card-grid,
.negotiation-list,
.review-list,
.queued-docs-list,
.stored-docs-list { display: grid; gap: 12px; margin-top: 16px; }
.mini-issue,
.clause-card,
.record-item {
  border-radius: 22px;
  padding: 10px;
}
.mini-issue,
.record-item { display:grid; grid-template-columns: auto 1fr; gap:14px; align-items:start; }
.issue-tag,
.record-status {
  display:inline-flex; align-items:center; justify-content:center;
  min-width:78px; padding:8px 10px; border-radius:999px; font-size:12px; font-weight:700;
  background: linear-gradient(90deg, rgba(255,79,216,0.2), rgba(143,91,255,0.18));
  color:white; border: 1px solid rgba(255,255,255,0.08);
}
.clause-card { padding: 18px; }
.clause-card-head,
.record-row-top,
.record-actions { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.clause-card-grid { grid-template-columns: 1fr; }
.notes-input { min-height: 150px; resize: vertical; }
.bottom-library-grid { grid-template-columns: repeat(2, 1fr); }
.pagination-bar { margin-top: 14px; }
.pagination-label { color: var(--legal-muted); font-size: 13px; }
.empty-queue { color: var(--legal-muted); padding: 8px 2px; }
.record-item {
  appearance:none; text-align:left; width:100%; cursor:pointer;
  grid-template-columns: 1fr auto;
}
.record-main { display:grid; gap:8px; }
.record-main p, .record-main .record-meta { color: var(--legal-muted); font-size: 13px; }
.record-actions { align-items:center; }
.record-delete {
  appearance:none; border:1px solid rgba(255,255,255,0.08); cursor:pointer;
  background: rgba(255,255,255,0.04); color:#ffd5f2; border-radius:12px; padding:10px 12px;
}
.text-highlight { background: rgba(255,79,216,0.35); color: white; padding: 0 2px; border-radius: 4px; }
.hidden { display:none !important; }

@media (max-width: 1280px) {
  .hero-analysis-grid,
  .workspace-grid,
  .bottom-library-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .legal-sidebar { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
}

@media (max-width: 720px) {
  .legal-main { padding: 18px; }
  .legal-topbar, .hero-review-head, .panel-head-spread, .pagination-bar, .topbar-right, .inline-form { flex-direction: column; align-items: stretch; }
  .document-meta-grid, .hero-metrics-row, .comparison-grid, .comparison-controls { grid-template-columns: 1fr; }
}

:root {
  --bg: #05010b;
  --panel: #0e0914;
  --panel-2: #161020;
  --border: rgba(255,255,255,0.08);
  --muted: rgba(241,231,255,0.72);
  --muted-2: rgba(223,210,255,0.52);
  --text: #fff7ff;
  --pink: #ff4fd8;
  --purple: #9f5cff;
  --violet: #6b4dff;
  --glow: 0 0 0 1px rgba(255,255,255,0.05), 0 30px 80px rgba(122, 52, 255, 0.28), 0 12px 40px rgba(255, 79, 216, 0.18);
}

body {
  background:
    radial-gradient(circle at 14% 10%, rgba(255,79,216,0.18), transparent 0 28%),
    radial-gradient(circle at 82% 12%, rgba(125,92,255,0.22), transparent 0 28%),
    radial-gradient(circle at 50% 30%, rgba(255,255,255,0.05), transparent 0 34%),
    linear-gradient(180deg, #08040f 0%, #030106 100%);
  overflow-x: hidden;
}

.page-shell {
  position: relative;
}

.nav {
  background: rgba(15, 10, 24, 0.6);
  border-color: rgba(255,255,255,0.08);
  box-shadow: 0 10px 35px rgba(0,0,0,0.25);
}

.nav-cta,
.primary-btn {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  border: 0;
  box-shadow: 0 16px 34px rgba(187, 68, 255, 0.32);
}

.secondary-btn,
.demo-btn,
.status-chip,
.metric-card,
.signal-item {
  border-color: rgba(255,255,255,0.08);
}

.hero-upgraded {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 78px 0 28px;
}

.hero-copy-wrap {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
}

.hero-upgraded h1 {
  background: linear-gradient(180deg, #ffffff 0%, #f6d7ff 55%, #d8c8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb,
.grid-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
}

.orb-1 {
  width: 280px;
  height: 280px;
  left: 4%;
  top: 6%;
  background: rgba(255,79,216,0.18);
  animation: floatGlow 9s ease-in-out infinite;
}

.orb-2 {
  width: 340px;
  height: 340px;
  right: 0;
  top: 0;
  background: rgba(159,92,255,0.18);
  animation: floatGlow 12s ease-in-out infinite reverse;
}

.orb-3 {
  width: 240px;
  height: 240px;
  left: 50%;
  bottom: -40px;
  background: rgba(107,77,255,0.18);
  animation: floatGlow 11s ease-in-out infinite;
}

.grid-glow {
  inset: 18% 15% auto;
  height: 300px;
  border-radius: 36px;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.6), transparent 85%);
  opacity: 0.22;
  filter: none;
}

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

.metric-card {
  text-align: left;
  padding: 18px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(12px);
}

.metric-card span {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  margin-bottom: 8px;
}

.metric-card strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.metric-glow {
  box-shadow: var(--glow);
}

.hero-preview-upgraded {
  padding: 8px 0 48px;
}

.preview-stage {
  position: relative;
  perspective: 1200px;
}

.premium-window {
  overflow: visible;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(22,16,35,0.96), rgba(10,7,18,0.96));
  box-shadow: var(--glow);
}

.window-label {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 12px;
}

.hero-dashboard-shell {
  display: grid;
  grid-template-columns: 82px 1fr;
  min-height: 620px;
}

.hero-side-rail {
  border-right: 1px solid rgba(255,255,255,0.07);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
}

.rail-logo,
.rail-avatar,
.rail-icon {
  border-radius: 18px;
}

.rail-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(187,68,255,0.18);
  overflow: hidden;
}

.rail-logo img {
  width: 28px;
  height: 28px;
  display: block;
}

.rail-stack {
  display: grid;
  gap: 14px;
}

.rail-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.rail-icon.active {
  background: linear-gradient(135deg, rgba(255,79,216,0.32), rgba(159,92,255,0.24));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.rail-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06));
}

.hero-dashboard-body {
  padding: 26px;
}

.hero-dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.hero-dashboard-header h3 {
  margin: 4px 0 0;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-chip {
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  color: var(--muted);
}

.status-chip.highlight {
  background: linear-gradient(135deg, rgba(255,79,216,0.24), rgba(159,92,255,0.22));
  color: white;
}

.hero-dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
}

.glass-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(20px);
}

.upload-visual,
.issue-deck {
  min-height: 290px;
}

.live-summary,
.spotlight-card {
  min-height: 210px;
}

.scan-beam {
  position: absolute;
  inset: 0 auto 0 -30%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), rgba(255,79,216,0.16), transparent);
  transform: skewX(-16deg);
  animation: scanSweep 4.2s linear infinite;
}

.strong-lines div {
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04));
}

.contract-callout {
  background: linear-gradient(180deg, rgba(255,79,216,0.12), rgba(159,92,255,0.08));
}

.spotlight-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.spotlight-card h2 {
  margin: 8px 0 0;
  font-size: 42px;
}

.severity-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 60deg, var(--pink), var(--purple), rgba(255,255,255,0.12), var(--pink));
  animation: spinSlow 7s linear infinite;
}

.severity-ring span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(11,8,18,0.96);
}

.insight-bars {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.insight-bars div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.insight-bars span {
  color: var(--muted);
}

.issue-deck .issue {
  background: rgba(255,255,255,0.035);
}

.issue-stack-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.issue-stack-title span {
  color: var(--muted-2);
  font-size: 13px;
}

.live-summary p:last-child {
  font-size: 16px;
}

.floating-pill {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15,11,24,0.72);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(16px);
  box-shadow: var(--glow);
  color: #fff;
  font-size: 13px;
}

.pill-left { left: -8px; top: 108px; animation: bob 5s ease-in-out infinite; }
.pill-right { right: -10px; top: 72px; animation: bob 6s ease-in-out infinite reverse; }
.pill-bottom { left: 80px; bottom: -12px; animation: bob 7s ease-in-out infinite; }

.pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 16px rgba(255,79,216,0.6);
}

.pill-dot.live {
  background: #9affc9;
  box-shadow: 0 0 16px rgba(154,255,201,0.65);
}

.signal-band {
  padding: 10px 0 28px;
}

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.signal-item {
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
}

.signal-number {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.signal-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.signal-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.glow-btn {
  position: relative;
}

.glow-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,79,216,0.36), rgba(159,92,255,0.22));
  z-index: -1;
  filter: blur(14px);
}

@keyframes floatGlow {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(0,-18px,0) scale(1.08); }
}

@keyframes scanSweep {
  0% { transform: translateX(0) skewX(-16deg); opacity: 0; }
  10% { opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translateX(340%) skewX(-16deg); opacity: 0; }
}

@keyframes bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1080px) {
  .hero-metrics,
  .signal-row,
  .hero-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .hero-dashboard-shell {
    grid-template-columns: 1fr;
  }

  .hero-side-rail {
    display: none;
  }

  .floating-pill {
    position: static;
    margin: 0 0 12px;
  }
}

@media (max-width: 720px) {
  .hero-upgraded {
    padding-top: 52px;
  }

  .hero-dashboard-body {
    padding: 18px;
  }

  .hero-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-stage {
    perspective: none;
  }
}

.profile-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.86);
  font-size: 12px;
  font-weight: 600;
}

.profile-pill.accent {
  background: linear-gradient(135deg, rgba(255,79,216,0.18), rgba(154,92,255,0.18));
  border-color: rgba(220,118,255,0.35);
  box-shadow: 0 0 20px rgba(179,84,255,0.16);
}

.meta-helper {
  margin: 10px 0 0;
  color: rgba(255,255,255,0.62);
  font-size: 13px;
  line-height: 1.5;
}

.action-list {
  display: grid;
  gap: 12px;
}

.action-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.action-item strong {
  display: block;
  margin-bottom: 6px;
}

.action-item p {
  margin: 0;
  color: rgba(255,255,255,0.68);
  line-height: 1.55;
}

.action-priority {
  align-self: start;
  text-align: center;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

.action-high .action-priority {
  background: rgba(255,92,169,0.18);
  border-color: rgba(255,92,169,0.34);
}

.action-medium .action-priority {
  background: rgba(170,94,255,0.18);
  border-color: rgba(170,94,255,0.34);
}

.action-low .action-priority {
  background: rgba(255,255,255,0.08);
}

.rewrite-card-shell,
.chat-card-shell,
.action-card-shell {
  display: grid;
  gap: 14px;
}

.compact-gap {
  gap: 10px;
  display: flex;
  flex-wrap: wrap;
}

.rewrite-output {
  min-height: 132px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  white-space: pre-wrap;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-thread {
  min-height: 260px;
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
}

.chat-empty {
  padding: 14px;
  border-radius: 16px;
  color: rgba(255,255,255,0.62);
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
}

.chat-message {
  max-width: 92%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.chat-message.user {
  justify-self: end;
  background: linear-gradient(135deg, rgba(255,79,216,0.14), rgba(154,92,255,0.14));
  border-color: rgba(214,97,255,0.26);
}

.chat-message.assistant {
  justify-self: start;
}

.chat-role {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.54);
}

.chat-message p {
  margin: 0;
  color: rgba(255,255,255,0.84);
  line-height: 1.6;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

@media (max-width: 900px) {
  .chat-compose,
  .compact-gap,
  .profile-pill-row {
    grid-template-columns: 1fr;
  }

  .action-item {
    grid-template-columns: 1fr;
  }
}


.sidebar-history-list {
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 10px;
}


.sidebar-user-email {
  margin: 6px 0 0;
  color: var(--legal-muted-2);
  font-size: 12px;
}

.sidebar-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-dashboard-view {
  margin-top: 22px;
}

.history-dashboard-shell {
  display: grid;
  gap: 20px;
}

.history-dashboard-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
}

.history-dashboard-list-card,
.history-dashboard-detail-card {
  border-radius: 22px;
  padding: 18px;
}

.history-dashboard-item {
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.history-dashboard-item.active {
  border-color: rgba(255,79,216,0.35);
  background: linear-gradient(135deg, rgba(255,79,216,0.12), rgba(143,91,255,0.09));
}

.history-detail-head,
.history-detail-badges,
.profile-grid {
  display: grid;
  gap: 14px;
}

.history-detail-head {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.history-detail-badges {
  justify-items: end;
}

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

.history-detail-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.history-bullet-list {
  margin: 0;
  padding-left: 20px;
  color: var(--legal-muted);
  display: grid;
  gap: 10px;
}

.profile-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 15, 0.68);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 24px;
}

.profile-modal.hidden {
  display: none;
}

.profile-modal-card {
  width: min(720px, 100%);
  display: grid;
  gap: 18px;
}

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

.profile-field {
  display: grid;
  gap: 10px;
  color: var(--legal-muted);
}

.profile-field span {
  font-size: 13px;
}

@media (max-width: 980px) {
  .history-dashboard-grid,
  .profile-grid,
  .history-detail-head,
  .sidebar-user-card {
    grid-template-columns: 1fr;
  }

  .sidebar-user-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
  }
}


/* profile card button containment fix */
.sidebar-user-card {
  align-items: flex-start;
}

.sidebar-user-actions {
  flex-direction: column;
  align-items: stretch;
  width: 112px;
  flex: 0 0 112px;
}

.sidebar-user-actions .doc-action,
.sidebar-user-actions .sidebar-logout {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* theme support */
.dashboard-theme-light {
  --legal-bg-1: #f7f4ff;
  --legal-bg-2: #ece6fb;
  --legal-panel: rgba(255, 255, 255, 0.86);
  --legal-panel-strong: rgba(255, 255, 255, 0.96);
  --legal-border: rgba(88, 74, 132, 0.14);
  --legal-text: #201833;
  --legal-muted: rgba(32, 24, 51, 0.72);
  --legal-muted-2: rgba(32, 24, 51, 0.52);
  --legal-glow: 0 0 0 1px rgba(88, 74, 132, 0.06), 0 18px 40px rgba(116, 96, 169, 0.12);
}

.dashboard-theme-light.dashboard-legalinspect {
  background:
    radial-gradient(circle at 12% 18%, rgba(255,79,216,0.08), transparent 0 26%),
    radial-gradient(circle at 82% 10%, rgba(143,91,255,0.10), transparent 0 32%),
    linear-gradient(135deg, #faf7ff 0%, #f1ebff 45%, #ebe4fb 100%);
  color: var(--legal-text);
}

.dashboard-theme-light .dashboard-noise {
  background-image: radial-gradient(rgba(32,24,51,0.06) 0.6px, transparent 0.6px);
  opacity: 0.08;
}

.dashboard-theme-light .legal-sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(243,237,255,0.92));
  border-right: 1px solid rgba(88, 74, 132, 0.10);
}

.dashboard-theme-light .glass-card,
.dashboard-theme-light .glass-subcard,
.dashboard-theme-light .topbar-badge,
.dashboard-theme-light .sidebar-panel,
.dashboard-theme-light .sidebar-user-card,
.dashboard-theme-light .document-sheet,
.dashboard-theme-light .mini-issue,
.dashboard-theme-light .clause-card,
.dashboard-theme-light .metric-card,
.dashboard-theme-light .hero-metric,
.dashboard-theme-light .meta-card,
.dashboard-theme-light .notes-input,
.dashboard-theme-light .extracted-text-panel,
.dashboard-theme-light .record-item {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(246,241,255,0.82));
  box-shadow: var(--legal-glow);
}

.dashboard-theme-light .library-search-input,
.dashboard-theme-light .meta-input,
.dashboard-theme-light .notes-input,
.dashboard-theme-light .record-delete,
.dashboard-theme-light .sidebar-chip,
.dashboard-theme-light .doc-action,
.dashboard-theme-light .sidebar-logout {
  background: rgba(95, 74, 145, 0.06);
  color: var(--legal-text);
  border-color: rgba(88, 74, 132, 0.14);
}

.dashboard-theme-light .library-search-input::placeholder,
.dashboard-theme-light .meta-input::placeholder,
.dashboard-theme-light .notes-input::placeholder {
  color: var(--legal-muted-2);
}

.dashboard-theme-light .topbar-badge.subtle,
.dashboard-theme-light .comparison-output,
.dashboard-theme-light .legal-preview-sheet {
  background: rgba(95, 74, 145, 0.05);
}

.dashboard-theme-light .document-pages,
.dashboard-theme-light .pagination-label,
.dashboard-theme-light .record-main p,
.dashboard-theme-light .record-main .record-meta,
.dashboard-theme-light .hero-copy-legal,
.dashboard-theme-light .analysis-pane-copy,
.dashboard-theme-light .ai-response-text,
.dashboard-theme-light .mini-issue p,
.dashboard-theme-light .clause-card p,
.dashboard-theme-light .negotiation-list p,
.dashboard-theme-light .security-note p,
.dashboard-theme-light .empty-queue {
  color: var(--legal-muted);
}

.dashboard-theme-light .eyebrow-gradient {
  background: linear-gradient(90deg, #8e4fff, #ff4fd8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dashboard-theme-light .legal-nav-item {
  color: var(--legal-muted);
}

.dashboard-theme-light .legal-nav-item:hover,
.dashboard-theme-light .legal-nav-item.active {
  color: var(--legal-text);
  border-color: rgba(88,74,132,0.12);
  background: linear-gradient(90deg, rgba(255,79,216,0.10), rgba(143,91,255,0.08));
}

.enriched-issue {
  align-items: flex-start;
}

.issue-context-block,
.clause-card-meta,
.clause-library-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.issue-context-block p,
.clause-card-meta p,
.clause-library-item p {
  margin: 8px 0 0;
}

.issue-context-block span,
.clause-card-meta span,
.clause-library-item span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--legal-muted-2, rgba(255,255,255,0.55));
}

.clause-library-list {
  display: grid;
  gap: 14px;
}

.clause-library-item {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 10px;
}

.clause-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-theme-light .issue-context-block,
.dashboard-theme-light .clause-card-meta,
.dashboard-theme-light .clause-library-item {
  border-top-color: rgba(88, 74, 132, 0.10);
}

.dashboard-theme-light .clause-library-item {
  background: rgba(95, 74, 145, 0.04);
}


/* Simplified dashboard layout */
.simplified-hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: stretch;
}

.simplified-review-card .simplified-hero-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.simplified-review-card .hero-metric {
  padding: 10px;
}

.primary-summary-card {
  min-height: 100%;
}

.simplified-workspace-grid {
  grid-template-columns: 1.25fr 0.9fr;
}

.simplified-right-column {
  align-content: start;
}

.advanced-sections {
  display: grid;
  gap: 16px;
}

.advanced-disclosure {
  padding: 0;
  overflow: hidden;
}

.advanced-disclosure summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 600;
}

.advanced-disclosure summary::-webkit-details-marker {
  display: none;
}

.advanced-disclosure summary::after {
  content: '+';
  float: right;
  color: var(--legal-muted);
}

.advanced-disclosure[open] summary::after {
  content: '–';
}

.advanced-disclosure-content {
  display: grid;
  gap: 16px;
  padding: 0 20px 20px;
}

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

@media (max-width: 1280px) {
  .simplified-hero-grid,
  .simplified-workspace-grid,
  .advanced-tool-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .simplified-review-card .simplified-hero-meta {
    grid-template-columns: 1fr;
  }
}

/* review flow + balance refinements */
.review-flow-card {
  padding: 18px 20px;
}

.review-flow-head {
  margin-bottom: 14px;
}

.review-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.review-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
}

.review-step-index {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: var(--legal-muted);
}

.review-step strong {
  display: block;
  margin-bottom: 3px;
}

.review-step p {
  margin: 0;
  color: var(--legal-muted);
  font-size: 13px;
}

.review-step.is-active {
  border-color: rgba(255,79,216,0.22);
  background: linear-gradient(135deg, rgba(255,79,216,0.10), rgba(143,91,255,0.08));
}

.review-step.is-active .review-step-index,
.review-step.is-complete .review-step-index {
  background: linear-gradient(135deg, rgba(255,79,216,0.92), rgba(143,91,255,0.92));
  color: #fff;
}

.review-step.is-complete {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
}

.dashboard-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

.legal-main {
  padding: 32px;
  gap: 24px;
}

.legal-sidebar {
  gap: 14px;
}

.legal-topbar,
.review-flow-card,
.hero-review-card,
.summary-glow-card,
.document-stage-card,
.issues-card,
.action-card-shell,
.advanced-disclosure {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 12px 28px rgba(18, 14, 34, 0.10);
}

.simplified-hero-grid {
  grid-template-columns: 1.16fr 0.84fr;
  gap: 24px;
}

.simplified-workspace-grid {
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.82fr);
  gap: 24px;
  align-items: start;
}

.workspace-left-column,
.workspace-right-column,
.hero-summary-stack,
.advanced-sections {
  gap: 20px;
}

.document-meta-grid {
  gap: 14px;
}

.issue-stack,
.action-list,
.clause-card-grid,
.negotiation-list,
.review-list,
.queued-docs-list,
.stored-docs-list {
  gap: 10px;
}

.mini-issue,
.record-item,
.action-item,
.clause-library-item {
  box-shadow: none;
}

.advanced-disclosure {
  border: 1px solid rgba(255,255,255,0.06);
}

.advanced-disclosure summary {
  padding: 10px 18px;
}

.advanced-disclosure-content {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 10px 18px 18px;
}

.dashboard-theme-light .review-step {
  border-color: rgba(88, 74, 132, 0.10);
  background: rgba(95, 74, 145, 0.035);
}

.dashboard-theme-light .review-step-index {
  background: rgba(95, 74, 145, 0.08);
  color: var(--legal-muted);
}

.dashboard-theme-light .legal-topbar,
.dashboard-theme-light .review-flow-card,
.dashboard-theme-light .hero-review-card,
.dashboard-theme-light .summary-glow-card,
.dashboard-theme-light .document-stage-card,
.dashboard-theme-light .issues-card,
.dashboard-theme-light .action-card-shell,
.dashboard-theme-light .advanced-disclosure {
  box-shadow: 0 0 0 1px rgba(88,74,132,0.05), 0 14px 30px rgba(116, 96, 169, 0.09);
}

.dashboard-theme-light .advanced-disclosure {
  border-color: rgba(88, 74, 132, 0.10);
}

.dashboard-theme-light .advanced-disclosure-content {
  border-top-color: rgba(88, 74, 132, 0.08);
}

@media (max-width: 1280px) {
  .review-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .review-steps {
    grid-template-columns: 1fr;
  }
}



/* Embedded quick take inside Review Desk */
.review-quick-take {
  margin-top: 18px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.08);
}

.review-quick-take-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.quick-take-tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.quick-take-copy {
  margin: 0;
  max-width: 72ch;
}

.simplified-hero-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.simplified-review-card {
  max-width: none;
}


/* PDF risk highlighting */
.pdf-preview-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  overflow: auto;
  max-height: 640px;
  background: rgba(9, 12, 20, 0.88);
}

.pdf-page-wrap {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.pdf-page-badge {
  margin: 0 0 8px 2px;
  font-size: 12px;
  color: var(--muted);
}

.pdf-page-stage {
  position: relative;
  box-shadow: 0 10px 34px rgba(0,0,0,0.35);
  border-radius: 10px;
  overflow: hidden;
}

.pdf-preview-canvas {
  display: block;
  background: #fff;
}

.pdf-text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.pdf-text-span {
  position: absolute;
  color: transparent;
  white-space: pre;
  line-height: 1;
  padding: 1px 2px;
  border-radius: 4px;
}

.pdf-risk-highlight {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.pdf-risk-highlight.is-high {
  background: rgba(255, 74, 74, 0.36);
}

.pdf-risk-highlight.is-medium {
  background: rgba(255, 200, 77, 0.32);
}

.pdf-risk-highlight.is-low {
  background: rgba(82, 167, 255, 0.28);
}

.pdf-risk-highlight.is-active {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.92), inset 0 0 0 1px rgba(255,255,255,0.16);
}

.issue-link-card {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
}

.issue-link-card

.issue-link-card.is-focused {
  border-color: rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.04);
}

.issue-tag.is-high {
  background: rgba(255, 74, 74, 0.16);
}

.issue-tag.is-medium {
  background: rgba(255, 200, 77, 0.16);
}

.issue-tag.is-low {
  background: rgba(82, 167, 255, 0.16);
}

.issue-jump-hint {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}


/* Clause accordion cleanup */
.clause-card.accordion-card {
  padding: 0;
  overflow: hidden;
}

.clause-card-toggle {
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 18px;
}

.clause-card-toggle:hover {
  background: rgba(255,255,255,0.03);
}

.clause-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clause-expand-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

.accordion-card.is-open .clause-expand-indicator {
  content: "−";
}

.accordion-card.is-open .clause-expand-indicator::before {
  content: "−";
}

.accordion-card .clause-expand-indicator::before {
  content: "+";
}

.accordion-card .clause-expand-indicator {
  font-size: 0;
}

.clause-card-body {
  padding: 0 18px 18px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.accordion-card.is-open {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.035);
}


/* Responsive legal dashboard fix */
#reviewDeskView,
.legal-main,
.workspace-grid,
.hero-analysis-grid,
.bottom-library-grid,
.review-flow-card,
.hero-review-card,
.document-sheet,
.document-stage-card,
.clause-card-shell,
.issues-card,
.action-card-shell {
  min-width: 0;
}

.document-stage-card,
.document-sheet,
#activeDocumentPreview,
.pdf-preview-shell,
.pdf-page-wrap,
.pdf-page-stage {
  max-width: 100%;
}

@media (max-width: 1380px) {
  .dashboard-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .legal-main {
    padding: 22px;
  }

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

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

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

  .legal-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 18px;
  }

  .legal-main {
    padding: 18px;
  }

  .topbar-right,
  .panel-head-spread,
  .hero-review-head,
  .document-toolbar {
    flex-wrap: wrap;
  }

  .bottom-library-grid,
  .hero-metrics-row,
  .document-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .review-steps,
  .comparison-controls,
  .comparison-grid,
  .workspace-grid,
  .bottom-library-grid,
  .hero-analysis-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-title {
    font-size: 24px;
  }

  .document-sheet {
    padding: 10px;
    min-height: 0;
  }

  .risk-orb {
    width: 112px;
    height: 112px;
  }
}

.homepage-disclaimer {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  padding: 8px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(8, 10, 18, 0.88);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.86);
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}

@media (max-width: 640px) {
  .homepage-disclaimer {
    left: 10px;
    right: 10px;
    bottom: 10px;
    font-size: 12px;
    padding: 10px 12px;
  }
}


.trust-inline-note {
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.trust-strip {
  margin: 20px 0 8px;
}

.trust-strip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.trust-strip-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

@media (max-width: 860px) {
  .trust-strip-card {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* compact dashboard simplification */
.compact-flow-disclosure {
  padding: 0;
  overflow: hidden;
}

.compact-flow-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  margin: 0;
}
.compact-flow-summary::-webkit-details-marker { display: none; }
.compact-flow-disclosure .review-steps { padding: 0 18px 18px; }
.compact-flow-disclosure:not([open]) .review-steps { display: none; }
.compact-flow-disclosure .review-flow-head h3 { margin: 0; }

.compact-disclosure {
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.compact-disclosure summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 14px;
  font-weight: 600;
}
.compact-disclosure summary::-webkit-details-marker { display:none; }
.compact-disclosure .document-meta-grid { padding: 0 14px 14px; }

.focus-card-shell {
  padding: 18px;
}
.focus-tabbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 16px;
}
.focus-tab {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: inherit;
  border-radius: 14px;
  padding: 8px 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.focus-tab span {
  color: var(--legal-muted);
  font-size: 12px;
}
.focus-tab.is-active {
  border-color: rgba(255,79,216,0.24);
  background: linear-gradient(135deg, rgba(255,79,216,0.12), rgba(143,91,255,0.09));
}
.focus-panel { min-height: 180px; }

.compact-issue-stack { gap: 12px; }
.issue-accordion {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  background: rgba(255,255,255,0.025);
  overflow: hidden;
}
.issue-accordion.is-open {
  border-color: rgba(255,79,216,0.18);
  background: rgba(255,255,255,0.04);
}
.issue-accordion.is-focused {
  box-shadow: 0 0 0 1px rgba(255,79,216,0.14);
}
.issue-accordion-toggle {
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}
.issue-accordion-toggle .issue-jump-hint {
  margin-top: 8px;
  display: inline-block;
}
.issue-accordion-body {
  padding: 0 16px 16px 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.issue-accordion-body p {
  margin: 12px 0 0;
  color: var(--legal-muted);
}
.issue-accordion-body p span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}
.issue-expand-indicator {
  font-size: 20px;
  line-height: 1;
  color: var(--legal-muted);
}
.compact-issue-summary {
  margin-top: 6px;
}

@media (max-width: 720px) {
  .focus-tabbar { grid-template-columns: 1fr; }
}


.sidebar-saved-disclosure {
  padding: 0;
  overflow: hidden;
}

.sidebar-summary-toggle {
  list-style: none;
  cursor: pointer;
}

.sidebar-summary-toggle::-webkit-details-marker {
  display: none;
}

.sidebar-summary-toggle::after {
  content: '+';
  margin-left: auto;
  color: var(--legal-muted);
  font-size: 18px;
}

.sidebar-saved-disclosure[open] .sidebar-summary-toggle::after {
  content: '–';
}

.sidebar-saved-content {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.sidebar-stored-docs-list {
  margin-top: 0;
  max-height: 320px;
  overflow: auto;
}

.sidebar-pagination-bar {
  padding-top: 4px;
}


.saved-nav-summary {
  width: 100%;
  justify-content: flex-start;
  padding: 13px 14px;
  border-radius: 16px;
}

.saved-nav-summary .saved-nav-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.saved-nav-summary .sidebar-label {
  margin: 0;
}

.saved-nav-summary strong {
  color: white;
  line-height: 1.1;
}

.saved-nav-summary .sidebar-mini {
  margin-left: auto;
}

.sidebar-saved-disclosure {
  padding: 0;
  overflow: visible;
}

.sidebar-saved-content {
  padding: 8px 6px 0;
}

.topbar-icon-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: white;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: 180ms ease;
}

.topbar-icon-btn:hover {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
}

.topbar-icon-glyph {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,79,216,0.24), rgba(143,91,255,0.22));
  color: white;
  font-size: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.topbar-logout-btn .topbar-icon-glyph {
  background: linear-gradient(135deg, rgba(143,91,255,0.22), rgba(255,79,216,0.18));
}

@media (max-width: 720px) {
  .topbar-icon-btn {
    justify-content: center;
  }
}


.history-nav-button {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
}

.history-nav-button:hover {
  border-color: rgba(255,255,255,0.14);
}

.history-dashboard-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-dashboard-toolbar {
  margin-top: 8px;
  margin-bottom: 2px;
}

.history-search-input {
  max-width: 420px;
}

@media (max-width: 900px) {
  .history-search-input {
    max-width: 100%;
  }
}


/* Saved documents library layout */
.history-library-shell {
  display: grid;
  gap: 18px;
  padding: 24px;
}
.history-library-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.history-library-toolbar {
  display: flex;
  gap: 12px;
}
.document-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.document-library-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(25,19,48,0.92), rgba(14,10,28,0.96));
  padding: 18px;
  display: grid;
  gap: 12px;
  color: #f7f4ff;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.document-library-card
.document-library-top,
.document-library-meta,
.document-library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.document-library-name {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}
.document-library-summary {
  margin: 0;
  color: rgba(235,230,255,0.72);
  font-size: 0.92rem;
  line-height: 1.55;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.library-file-type,
.document-library-date {
  color: rgba(235,230,255,0.58);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.document-library-meta {
  color: rgba(235,230,255,0.66);
  font-size: 0.85rem;
}
.library-risk-block {
  display: grid;
  gap: 3px;
}
.library-risk-block span {
  color: rgba(235,230,255,0.58);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.library-risk-block strong {
  font-size: 0.95rem;
}
.library-open-cta {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(196, 128, 255, 0.14);
  border: 1px solid rgba(214, 168, 255, 0.22);
  color: #f7eaff;
  font-weight: 600;
}
.history-library-pagination {
  justify-content: center;
}
@media (max-width: 800px) {
  .history-library-shell { padding: 18px; }
  .history-library-head { flex-direction: column; }
  .document-library-grid { grid-template-columns: 1fr; }
}


/* ChatGPT-style dashboard pass */
.chatgpt-right-column {
  align-content: stretch;
}

.chatgpt-main-chat-card {
  min-height: 780px;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  align-content: start;
}

.chatgpt-chat-copy {
  margin: 0;
}

.chatgpt-main-chat-card > * { min-width: 0; }


.chatgpt-chat-thread {
  min-height: 520px;
  max-height: none;
  padding: 8px 4px 8px 0;
}

.chatgpt-chat-compose {
  margin-top: 4px;
}

.chatgpt-chat-thread .chat-message.assistant {
  max-width: 100%;
}

.chatgpt-chat-thread .chat-message p {
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .chatgpt-main-chat-card {
    min-height: 620px;
  }

  .chatgpt-chat-thread {
    min-height: 380px;
  }
}

/* Chat-first dashboard layout */
.dashboard-chat-layout .review-flow-card,
.dashboard-chat-layout .hero-analysis-grid {
  display: none !important;
}

.chat-first-workspace {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.9fr) !important;
  align-items: stretch;
}

.main-chat-column {
  order: 1;
}

.document-viewer-column {
  order: 2;
}

.main-chat-column .chatgpt-main-chat-card {
  min-height: calc(100vh - 170px);
  position: sticky;
  top: 24px;
}

.document-viewer-column .document-stage-card {
  min-height: calc(100vh - 170px);
}

.document-viewer-column .document-canvas-wrap,
.document-viewer-column .document-stage,
.document-viewer-column .pdf-preview-shell {
  min-height: 620px;
}

.chatgpt-chat-thread {
  min-height: 0;
  max-height: none;
  padding: 4px 4px 4px 0;
}

.chat-compose.chatgpt-chat-compose {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chat-compose-input {
  min-height: 52px;
}

.chat-upload-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.chat-upload-btn:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
}

.chat-meta {
  margin: -2px 0 8px;
  color: rgba(255,255,255,0.56);
  font-size: 12px;
}

.chat-upload-message {
  max-width: 75%;
}

.chat-summary-message {
  max-width: 100%;
}

.chat-clause-message {
  max-width: 100%;
  padding: 8px 14px;
}

.chat-clause-message.is-open,
.chat-clause-message.is-active {
  border-color: rgba(255,79,216,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
}

.chat-clause-toggle {
  width: 100%;
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.chat-clause-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-clause-head strong,
.chat-fallback-issue strong {
  display: block;
  color: rgba(255,255,255,0.94);
  margin-bottom: 4px;
}

.chat-clause-subhead,
.chat-clause-hint {
  color: rgba(255,255,255,0.62);
  font-size: 13px;
  line-height: 1.5;
}

.chat-clause-hint {
  display: block;
  margin-top: 10px;
}

.chat-clause-indicator {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.72);
}

.chat-clause-message.is-open .chat-clause-indicator {
  font-size: 0;
}

.chat-clause-message.is-open .chat-clause-indicator::before {
  content: '–';
  font-size: 18px;
}

.chat-clause-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chat-clause-body p,
.chat-fallback-issue p {
  margin: 0;
  color: rgba(255,255,255,0.82);
  line-height: 1.65;
  white-space: pre-wrap;
}

@media (max-width: 1180px) {
  .chat-first-workspace {
    grid-template-columns: 1fr !important;
  }

  .main-chat-column .chatgpt-main-chat-card,
  .document-viewer-column .document-stage-card {
    min-height: 0;
    position: static;
  }
}


.full-chat-workspace {
  display: block;
}

.full-chat-workspace .main-chat-column {
  width: 100%;
  max-width: none;
}

.full-chat-workspace .chatgpt-main-chat-card {
  min-height: calc(100vh - 210px);
}

.chat-layout-hidden {
  display: none !important;
}

.dashboard-chat-layout {
  width: 100%;
}

.chatgpt-main-chat-card {
  width: 100%;
}

.chatgpt-chat-thread {
  min-height: calc(100vh - 390px);
}

.chat-clause-hint {
  opacity: 0.78;
}


.chatgpt-main-chat-card {
  position: relative;
}

.chat-dropzone {
  position: absolute;
  inset: 74px 18px 88px 18px;
  border-radius: 24px;
  border: 1.5px dashed rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(18,18,30,0.9), rgba(11,11,22,0.92));
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 8;
  pointer-events: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.34);
}

.chatgpt-main-chat-card.is-dragging .chat-dropzone {
  display: flex;
}

.chatgpt-main-chat-card.is-dragging .chat-thread,
.chatgpt-main-chat-card.is-dragging .chat-compose,
.chatgpt-main-chat-card.is-dragging .chat-suggestions,
.chatgpt-main-chat-card.is-dragging .chatgpt-chat-copy {
  opacity: 0.35;
}

.chat-dropzone-copy {
  display: grid;
  gap: 8px;
}

.chat-dropzone-copy strong {
  font-size: 20px;
  line-height: 1.2;
}

.chat-dropzone-copy span {
  color: var(--legal-muted, rgba(255,255,255,0.72));
  font-size: 14px;
}


.chat-document-preview-message { max-width: 560px; }
.chat-document-preview-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 8px;
  color: #fff;
  cursor: pointer;
}
.chat-document-preview-thumb {
  width: 88px;
  min-width: 88px;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-document-preview-thumb.large,
.chat-document-preview-placeholder.large,
.chat-document-live-shell {
  width: 100%;
  min-width: 100%;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-document-live-shell.pdf {
  background: rgba(10,12,18,0.92);
}
.chat-document-live-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  pointer-events: none;
}
.chat-document-live-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.chat-document-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chat-document-preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
}
.chat-document-preview-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 2px 0;
}
.chat-document-preview-copy strong { font-size: 15px; }
.chat-document-preview-copy span,
.chat-clause-evidence span { color: rgba(255,255,255,0.68); font-size: 12px; }
.chat-clause-evidence {
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.chat-clause-evidence blockquote {
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 2px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.88);
}
.document-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
}
.document-preview-modal.hidden { display: none; }
.document-preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}
.document-preview-modal-card {
  position: relative;
  width: min(96vw, 1280px);
  height: min(92vh, 960px);
  padding: 18px;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.document-preview-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}
.document-preview-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}
.document-preview-modal-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.document-preview-full-image {
  width: 100%;
  height: auto;
  display: block;
}
.document-preview-generic,
.document-preview-empty {
  padding: 28px;
}
body.document-preview-open { overflow: hidden; }


.chat-document-preview-status-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;}
.chat-document-page-count{font-size:12px;color:var(--muted);}
.chat-document-preview-card{cursor:pointer;}
.chat-document-preview-card:focus{outline:2px solid rgba(255,255,255,0.45);outline-offset:2px;}
.document-preview-modal-card{max-width:min(1200px,94vw);max-height:92vh;width:100%;}
.document-preview-modal-body{max-height:calc(92vh - 84px);overflow:auto;}
.document-preview-full-image{display:block;max-width:100%;height:auto;margin:0 auto;}
.chat-clause-evidence{margin-top:12px;padding: 8px 14px;border:1px solid rgba(255,255,255,0.08);border-radius:14px;background:rgba(255,255,255,0.03);}
.chat-clause-evidence span{display:block;font-size:12px;color:var(--muted);margin-bottom:6px;}
.chat-clause-evidence blockquote{margin:0;font-size:14px;line-height:1.5;color:var(--text);}

.chat-summary-block {
  display: grid;
  gap: 12px;
}

.chat-summary-lead,
.chat-summary-score,
.chat-summary-next {
  margin: 0;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

.chat-summary-lead {
  font-size: 16px;
  font-weight: 600;
}

.chat-summary-bullets {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.84);
}

.chat-summary-bullets li {
  line-height: 1.55;
}


.chat-summary-decision,
.chat-summary-missing {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.chat-summary-decision span,
.chat-summary-missing span {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  margin-bottom: 6px;
}

.chat-summary-decision strong {
  display: block;
  color: rgba(255,255,255,0.96);
  font-size: 15px;
  line-height: 1.5;
}

.chat-summary-missing ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.84);
}

.chat-summary-consequence {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.chat-summary-consequence span,
.chat-clause-insight span {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  margin-bottom: 6px;
}

.chat-summary-consequence p,
.chat-clause-insight p {
  margin: 0;
  color: rgba(255,255,255,0.86);
  line-height: 1.6;
}

.chat-summary-score {
  font-weight: 600;
}

.chat-summary-next {
  color: rgba(255,255,255,0.76);
}

.chat-clause-insight-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.chat-clause-insight {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.chat-summary-drivers,
.chat-clause-standard {
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.chat-summary-drivers span,
.chat-clause-standard span {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  margin-bottom: 6px;
}

.chat-summary-drivers ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.84);
}

.chat-clause-standard p {
  margin: 0;
  color: rgba(255,255,255,0.86);
  line-height: 1.6;
}

.chat-clause-standard p + p {
  margin-top: 6px;
}

.chat-clause-standard-quantified {
  font-weight: 600;
  color: rgba(255,255,255,0.96);
}

.chat-clause-confidence {
  margin-top: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}

.chat-clause-confidence-reason {
  margin-top: 4px;
  color: rgba(255,255,255,0.68);
  font-size: 13px;
  line-height: 1.5;
}


.chat-clause-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.severity-pill{display:inline-flex;align-items:center;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.02em;border:1px solid rgba(255,255,255,0.08);}
.severity-pill.is-high,.chat-clause-decision.is-high,.clause-card-toggle.is-high{border-color:rgba(255,94,94,0.24);}
.severity-pill.is-medium,.chat-clause-decision.is-medium,.clause-card-toggle.is-medium{border-color:rgba(255,200,77,0.22);}
.severity-pill.is-low,.chat-clause-decision.is-low,.clause-card-toggle.is-low{border-color:rgba(82,167,255,0.22);}
.severity-pill.is-high{background:rgba(255,94,94,0.14);color:#ffd2d2;}
.severity-pill.is-medium{background:rgba(255,200,77,0.14);color:#ffe4a8;}
.severity-pill.is-low{background:rgba(82,167,255,0.14);color:#d4e9ff;}
.chat-clause-decision,.chat-clause-rewrite{margin-top:12px;padding: 8px 14px;border:1px solid rgba(255,255,255,0.08);border-radius:14px;background:rgba(255,255,255,0.03);}
.chat-clause-decision span,.chat-clause-rewrite span{display:block;font-size:12px;color:rgba(255,255,255,0.62);margin-bottom:6px;}
.chat-clause-decision strong{display:block;font-size:15px;line-height:1.35;margin-bottom:6px;}
.chat-clause-decision p,.chat-clause-rewrite p{margin:0;color:rgba(255,255,255,0.86);line-height:1.6;}
.chat-clause-message.is-open.is-high,.clause-card.accordion-card.is-high{border-color:rgba(255,94,94,0.2);}
.chat-clause-message.is-open.is-medium,.clause-card.accordion-card.is-medium{border-color:rgba(255,200,77,0.18);}
.chat-clause-message.is-open.is-low,.clause-card.accordion-card.is-low{border-color:rgba(82,167,255,0.18);}
.clause-card-head-copy{display:flex;flex-direction:column;gap:6px;min-width:0;}
.clause-card-summary{font-size:13px;line-height:1.5;color:rgba(255,255,255,0.66);}


.chat-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-delete-btn {
  min-height: 36px;
}

.dashboard-shell {
  height: 100vh;
  overflow: hidden;
}

.legal-sidebar {
  min-height: 0;
  overflow: auto;
}

.legal-main {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-chat-layout {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.full-chat-workspace {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.main-chat-column {
  min-height: 0;
  display: flex;
}

.full-chat-workspace .chatgpt-main-chat-card,
.main-chat-column .chatgpt-main-chat-card {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  top: auto;
}

.chatgpt-chat-thread,
.chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.chatgpt-chat-compose,
.chat-suggestions,
.chatgpt-chat-copy,
.chatgpt-chat-head {
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  .dashboard-shell,
  .legal-main {
    height: auto;
    overflow: visible;
    display: block;
  }

  .dashboard-chat-layout,
  .full-chat-workspace,
  .main-chat-column {
    height: auto;
    overflow: visible;
  }

  .full-chat-workspace .chatgpt-main-chat-card,
  .main-chat-column .chatgpt-main-chat-card {
    height: auto;
    min-height: calc(100vh - 170px);
    max-height: none;
  }
}


/* ChatGPT-style chat scroll fix */
html, body {
  height: 100%;
}

body.dashboard-body {
  min-height: 100vh;
}

body.dashboard-body .dashboard-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.dashboard-body .legal-main {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dashboard-body .legal-topbar {
  flex: 0 0 auto;
}

body.dashboard-body .dashboard-chat-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dashboard-body .full-chat-workspace {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

body.dashboard-body .main-chat-column,
body.dashboard-body .workspace-right-column {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

body.dashboard-body .chatgpt-main-chat-card {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.dashboard-body .chatgpt-chat-head,
body.dashboard-body .chatgpt-chat-copy,
body.dashboard-body .chat-suggestions,
body.dashboard-body .chat-dropzone,
body.dashboard-body .chatgpt-chat-compose {
  flex: 0 0 auto;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}

body.dashboard-body .chatgpt-chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(10,10,18,0.82), rgba(10,10,18,0.96));
  backdrop-filter: blur(18px);
}

@media (max-width: 1100px) {
  html, body, body.dashboard-body, body.dashboard-body .dashboard-shell,
  body.dashboard-body .legal-main {
    height: auto;
    min-height: 100vh;
  }

  body.dashboard-body .dashboard-shell,
  body.dashboard-body .legal-main,
  body.dashboard-body .dashboard-chat-layout {
    overflow: visible;
  }

  body.dashboard-body .full-chat-workspace,
  body.dashboard-body .main-chat-column,
  body.dashboard-body .workspace-right-column,
  body.dashboard-body .chatgpt-main-chat-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  body.dashboard-body .chatgpt-chat-thread,
  body.dashboard-body .chat-thread {
    height: auto;
    min-height: 360px;
  }

  body.dashboard-body .chatgpt-chat-compose {
    position: static;
  }
}


/* ChatGPT-style internal scroll with original dashboard scale */
.sidebar-section-title { display:block; font-size:14px; color:var(--text); font-weight:700; }
.chat-sidebar-panel { display:grid; gap:12px; margin-top:18px; }
.chat-history-list .record-item { width:100%; text-align:left; align-items:flex-start; }
.chat-history-list .record-item.active-chat { border-color: rgba(255,255,255,0.24); background: rgba(255,255,255,0.08); }
.chat-history-list .record-item p { margin:4px 0 0; font-size:12px; color:rgba(255,255,255,0.62); }
body.dashboard-body .legal-main { min-width:0; }
body.dashboard-body .dashboard-chat-layout { flex:1 1 auto; min-height:0; }
body.dashboard-body .full-chat-workspace { display:grid; grid-template-columns:minmax(0, 1fr); flex:1 1 auto; min-height:0; }
body.dashboard-body .main-chat-column, body.dashboard-body .workspace-right-column { min-height:0; min-width:0; }
body.dashboard-body .chatgpt-main-chat-card { min-height:calc(100vh - 170px); height:auto; max-height:none; overflow:hidden; }
body.dashboard-body .chatgpt-chat-thread, body.dashboard-body .chat-thread { flex:1 1 auto; min-height:0; height:0; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
@media (max-width:1100px){ body.dashboard-body .chatgpt-main-chat-card { min-height:calc(100vh - 140px); } }


/* Final chat layout fix: full-size ChatGPT-style center thread, wheel scroll only */
body.dashboard-body #reviewDeskView > .review-flow-card,
body.dashboard-body #reviewDeskView > .hero-analysis-grid,
body.dashboard-body #reviewDeskView > .chat-layout-hidden {
  display: none !important;
}

body.dashboard-body .dashboard-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.dashboard-body .legal-sidebar {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.dashboard-body .legal-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.dashboard-body .legal-main {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

body.dashboard-body .dashboard-chat-layout {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.dashboard-body .full-chat-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

body.dashboard-body .workspace-right-column.main-chat-column {
  min-width: 0;
  min-height: 0;
  display: flex;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 146px);
  height: auto;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

body.dashboard-body .chatgpt-chat-head,
body.dashboard-body .chatgpt-chat-copy,
body.dashboard-body .chat-suggestions,
body.dashboard-body .chatgpt-chat-compose,
body.dashboard-body .chat-dropzone {
  flex: 0 0 auto;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-right: 2px;
}

body.dashboard-body .chatgpt-chat-thread::-webkit-scrollbar,
body.dashboard-body .chat-thread::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.dashboard-body .chatgpt-chat-compose {
  margin-top: auto;
  position: relative;
  bottom: auto;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10,10,18,0.78), rgba(10,10,18,0.96));
  backdrop-filter: blur(18px);
}

@media (max-width: 1100px) {
  body.dashboard-body .dashboard-shell,
  body.dashboard-body .legal-main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body.dashboard-body .dashboard-chat-layout,
  body.dashboard-body .full-chat-workspace,
  body.dashboard-body .workspace-right-column.main-chat-column {
    overflow: visible;
  }

  body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card {
    min-height: calc(100vh - 120px);
  }

  body.dashboard-body .chatgpt-chat-thread,
  body.dashboard-body .chat-thread {
    min-height: 360px;
  }
}


/* Final override: full-height ChatGPT-style main chat + clean sidebar list */
body.dashboard-body .dashboard-shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 0;
}

body.dashboard-body .legal-sidebar {
  padding: 8px 10px 14px;
  overflow-y: auto;
  overflow-x: hidden;
}

body.dashboard-body .legal-brand-wrap {
  margin-bottom: 14px;
}

body.dashboard-body .legal-nav {
  margin-bottom: 14px;
}

body.dashboard-body .chat-sidebar-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 10px;
}

body.dashboard-body .sidebar-panel-head {
  padding: 0 6px;
  align-items: flex-end;
}

body.dashboard-body .sidebar-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
}

body.dashboard-body .sidebar-section-title {
  font-size: 14px;
  line-height: 1.2;
  color: rgba(255,255,255,0.9);
}

body.dashboard-body .sidebar-mini {
  font-size: 11px;
  color: rgba(255,255,255,0.48);
  background: transparent;
  border: 0;
  padding: 0;
}

body.dashboard-body .chat-history-list {
  display: grid;
  gap: 2px;
  max-height: none;
  overflow: visible;
  padding: 0;
}

body.dashboard-body .chat-history-list .empty-queue {
  margin: 0 6px;
  padding: 8px 10px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 12px;
}

body.dashboard-body .chat-history-item {
  width: 100%;
  display: grid;
  gap: 4px;
  align-items: start;
  justify-items: start;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: none;
}

body.dashboard-body .chat-history-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.06);
}

body.dashboard-body .chat-history-item.active-chat {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

body.dashboard-body .chat-history-item-title {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.25;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
}

body.dashboard-body .chat-history-item-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

body.dashboard-body .legal-main {
  padding: 10px 14px 14px;
}

body.dashboard-body .legal-topbar {
  margin-bottom: 10px;
}

body.dashboard-body .dashboard-chat-layout,
body.dashboard-body .full-chat-workspace,
body.dashboard-body .workspace-right-column.main-chat-column {
  min-height: 0;
  height: 100%;
  width: 100%;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border-radius: 28px;
}

body.dashboard-body .chatgpt-main-chat-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  min-height: 0;
  height: 100%;
  padding: 4px 8px 6px 0;
}

body.dashboard-body .chatgpt-chat-copy {
  max-width: 84ch;
}

@media (max-width: 1100px) {
  body.dashboard-body .dashboard-shell {
    grid-template-columns: 1fr;
  }

  body.dashboard-body .legal-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 8px 14px;
  }

  body.dashboard-body .legal-main {
    padding: 8px 14px 14px;
  }
}


/* Final fix: no card, full-height chat, cleaner ChatGPT-like sidebar */
body.dashboard-body #reviewDeskView > *:not(.full-chat-workspace) {
  display: none !important;
}

body.dashboard-body .dashboard-shell {
  grid-template-columns: 252px minmax(0, 1fr) !important;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.dashboard-body .legal-sidebar {
  padding: 14px 10px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.dashboard-body .legal-nav {
  margin-bottom: 6px;
}

body.dashboard-body .chat-sidebar-panel {
  flex: 1 1 auto;
  min-height: 0;
  gap: 8px;
}

body.dashboard-body .sidebar-panel-head {
  padding: 0 8px;
  align-items: center;
}

body.dashboard-body .sidebar-label {
  font-size: 10px;
  letter-spacing: .16em;
}

body.dashboard-body .sidebar-section-title {
  font-size: 15px;
  line-height: 1.2;
}

body.dashboard-body .chat-history-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 4px 8px;
  gap: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.dashboard-body .chat-history-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.dashboard-body .chat-history-item {
  border-radius: 12px;
  padding: 10px 12px;
  gap: 3px;
}

body.dashboard-body .chat-history-item-title {
  font-size: 13px;
  font-weight: 500;
}

body.dashboard-body .chat-history-item-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.42);
}

body.dashboard-body .chat-history-item.active-chat {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.16);
}

body.dashboard-body .legal-main {
  padding: 10px 18px 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

body.dashboard-body .legal-topbar {
  margin-bottom: 14px;
}

body.dashboard-body .dashboard-chat-layout,
body.dashboard-body .full-chat-workspace,
body.dashboard-body .workspace-right-column.main-chat-column {
  width: 100%;
  height: 100%;
  min-height: 0;
}

body.dashboard-body .workspace-right-column.main-chat-column {
  display: flex;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
}

body.dashboard-body .chatgpt-chat-head {
  padding: 4px 2px 0;
}

body.dashboard-body .chatgpt-chat-copy,
body.dashboard-body .chat-suggestions,
body.dashboard-body .chat-dropzone {
  max-width: 920px;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 10px 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.dashboard-body .chatgpt-chat-thread::-webkit-scrollbar,
body.dashboard-body .chat-thread::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.dashboard-body .chat-message {
  max-width: min(920px, 92%);
}

body.dashboard-body .chatgpt-chat-compose {
  position: sticky;
  bottom: 0;
  padding: 8px 0 2px;
  background: linear-gradient(180deg, rgba(5,4,16,0.0), rgba(5,4,16,0.92) 24%, rgba(5,4,16,0.98));
  backdrop-filter: blur(16px);
}

@media (max-width: 1100px) {
  body.dashboard-body .dashboard-shell {
    grid-template-columns: 1fr !important;
    height: auto;
    min-height: 100vh;
  }

  body.dashboard-body .legal-sidebar,
  body.dashboard-body .legal-main {
    overflow: visible;
  }

  body.dashboard-body .chatgpt-main-chat-card {
    height: auto;
  }

  body.dashboard-body .chatgpt-chat-thread,
  body.dashboard-body .chat-thread {
    min-height: 50vh;
  }
}


/* Final fix 2: true chat-first layout */
body.dashboard-body #reviewDeskView {
  display: flex !important;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

body.dashboard-body .review-flow-card,
body.dashboard-body .hero-analysis-grid,
body.dashboard-body .workspace-left-column,
body.dashboard-body .advanced-sections,
body.dashboard-body .document-viewer-column,
body.dashboard-body .chat-layout-hidden,
body.dashboard-body .simplified-hero-grid {
  display: none !important;
}

body.dashboard-body .legal-main {
  padding: 10px 18px 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

body.dashboard-body .full-chat-workspace,
body.dashboard-body .workspace-right-column.main-chat-column {
  display: flex !important;
  flex: 1 1 auto;
  min-height: 0;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.dashboard-body .chatgpt-chat-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
}

body.dashboard-body .chatgpt-chat-head > div:first-child,
body.dashboard-body .chatgpt-chat-copy,
body.dashboard-body .chat-suggestions {
  display: none !important;
}

body.dashboard-body .chat-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.dashboard-body .chat-dropzone {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: 24px;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 0 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-content: start;
}

body.dashboard-body .chatgpt-chat-thread::-webkit-scrollbar,
body.dashboard-body .chat-thread::-webkit-scrollbar,
body.dashboard-body .chat-history-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.dashboard-body .chat-empty {
  margin-top: 0;
  min-height: auto;
}

body.dashboard-body .chat-message {
  max-width: min(920px, 92%);
}

body.dashboard-body .chatgpt-chat-compose {
  position: sticky;
  bottom: 0;
  padding: 8px 0 2px;
  background: linear-gradient(180deg, rgba(5,4,16,0.02), rgba(5,4,16,0.88) 22%, rgba(5,4,16,0.98));
  backdrop-filter: blur(16px);
}

body.dashboard-body .chat-compose {
  border-radius: 20px;
}

body.dashboard-body .legal-sidebar {
  padding: 14px 12px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dashboard-body .chat-sidebar-panel {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.dashboard-body .sidebar-panel-head {
  padding: 0 4px 8px;
  align-items: end;
}

body.dashboard-body .sidebar-section-title {
  font-size: 14px;
  line-height: 1.25;
}

body.dashboard-body .sidebar-mini {
  font-size: 12px;
  color: rgba(255,255,255,0.42);
}

body.dashboard-body .chat-history-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  gap: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.dashboard-body .chat-history-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
}

body.dashboard-body .chat-history-item:hover {
  background: rgba(255,255,255,0.06);
}

body.dashboard-body .chat-history-item.active-chat {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.16);
}

body.dashboard-body .chat-history-item-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.94);
}

body.dashboard-body .chat-history-item-meta {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.42);
}

@media (max-width: 1100px) {
  body.dashboard-body .dashboard-shell {
    grid-template-columns: 1fr !important;
    height: auto;
    min-height: 100vh;
  }

  body.dashboard-body .legal-sidebar {
    overflow: visible;
  }

  body.dashboard-body .legal-main {
    overflow: visible;
  }

  body.dashboard-body .chatgpt-main-chat-card {
    height: auto;
  }

  body.dashboard-body .chatgpt-chat-thread,
  body.dashboard-body .chat-thread {
    min-height: 52vh;
  }
}


.review-top-docbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 18px;
}

.review-top-docbar .hero-metric {
  min-width: 220px;
}

@media (max-width: 900px) {
  .review-top-docbar {
    flex-direction: column;
    align-items: stretch;
  }

  .review-top-docbar .hero-metric {
    min-width: 0;
  }
}


/* AI response feed flattening + clause eye action */
body.dashboard-body .chat-message.assistant,
.chatgpt-chat-thread .chat-message.assistant {
  max-width: 100% !important;
  width: 100%;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-body .chat-message.assistant + .chat-message.assistant {
  margin-top: 18px;
  padding-top: 18px !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
}

body.dashboard-body .chat-message.assistant .chat-role,
body.dashboard-body .chat-message.assistant .chat-meta {
  margin-bottom: 10px;
}

body.dashboard-body .chat-summary-message,
body.dashboard-body .chat-clause-message {
  max-width: 100% !important;
}

body.dashboard-body .chat-clause-message {
  padding: 0 !important;
}

body.dashboard-body .chat-clause-toggle {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

body.dashboard-body .chat-clause-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.dashboard-body .chat-clause-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

body.dashboard-body .chat-clause-eye {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

body.dashboard-body .chat-clause-eye:hover,
body.dashboard-body .chat-clause-eye:focus-visible {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
  outline: none;
  transform: translateY(-1px);
}

body.dashboard-body .chat-clause-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
}

body.dashboard-body .chat-summary-block,
body.dashboard-body .chat-clause-body,
body.dashboard-body .chat-fallback-issue {
  border-radius: 0 !important;
}



body.dashboard-body .chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

body.dashboard-body .chat-quick-action {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

body.dashboard-body .chat-quick-action:hover,
body.dashboard-body .chat-quick-action:focus-visible {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  outline: none;
  transform: translateY(-1px);
}

body.dashboard-body .chat-quick-action.subtle {
  color: rgba(255,255,255,0.74);
}

/* Fixes: flatten summary sections, strengthen PDF viewer affordance, improve sidebar active state */
body.dashboard-body .chat-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.dashboard-body .open-pdf-viewer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}


body.dashboard-body .chat-summary-decision,
body.dashboard-body .chat-summary-missing,
body.dashboard-body .chat-summary-consequence,
body.dashboard-body .chat-summary-drivers {
  padding: 8px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-body .chat-summary-decision + .chat-summary-missing,
body.dashboard-body .chat-summary-missing + .chat-summary-consequence,
body.dashboard-body .chat-summary-consequence + .chat-summary-next,
body.dashboard-body .chat-summary-drivers + .chat-summary-missing {
  margin-top: 8px;
}

body.dashboard-body .chat-summary-drivers ul,
body.dashboard-body .chat-summary-missing ul {
  gap: 6px;
  padding-left: 20px;
}

body.dashboard-body .chat-summary-decision span,
body.dashboard-body .chat-summary-missing span,
body.dashboard-body .chat-summary-consequence span,
body.dashboard-body .chat-summary-drivers span {
  margin-bottom: 4px;
  color: rgba(255,255,255,0.56);
  letter-spacing: 0.02em;
}

body.dashboard-body .chat-summary-next {
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

body.dashboard-body .chat-history-list {
  gap: 4px;
}

body.dashboard-body .chat-history-item {
  position: relative;
  padding: 11px 12px 11px 16px;
  border-radius: 10px;
}

body.dashboard-body .chat-history-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  transition: background 140ms ease, opacity 140ms ease;
  opacity: 0;
}

body.dashboard-body .chat-history-item:hover {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.08);
}

body.dashboard-body .chat-history-item.active-chat {
  background: rgba(196,128,255,0.14) !important;
  border-color: rgba(214,168,255,0.22) !important;
}

body.dashboard-body .chat-history-item.active-chat::before {
  background: linear-gradient(180deg, rgba(240,196,255,0.96), rgba(201,121,255,0.88));
  opacity: 1;
}

body.dashboard-body .chat-history-item-title {
  font-weight: 600;
}

body.dashboard-body .chat-history-item.active-chat .chat-history-item-title {
  color: #fff;
}

body.dashboard-body .chat-history-item-meta {
  font-size: 10.5px;
  color: rgba(255,255,255,0.46);
}

body.dashboard-body .chat-history-item.active-chat .chat-history-item-meta {
  color: rgba(255,255,255,0.7);
}


/* Sidebar sizing + Open PDF text cleanup override */
body.dashboard-body .open-pdf-viewer-btn::before {
  content: none !important;
  display: none !important;
}

body.dashboard-body .chat-history-list {
  gap: 6px !important;
}

body.dashboard-body .chat-history-item {
  min-height: 64px !important;
  height: 64px !important;
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 6px !important;
  overflow: hidden !important;
}

body.dashboard-body .chat-history-item-title,
body.dashboard-body .chat-history-item-meta {
  display: block !important;
  width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.dashboard-body .chat-history-item-title {
  line-height: 1.2 !important;
}

body.dashboard-body .chat-history-item-meta {
  font-size: 11px !important;
  line-height: 1.2 !important;
}


/* Phase 4: streaming + chat polish */
.typing-message {
  opacity: 0.96;
}
.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 2px;
}
.typing-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  animation: clauseaiTypingPulse 1.1s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes clauseaiTypingPulse {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-2px); opacity: 1; }
}
.chat-message.is-streaming p::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: currentColor;
  animation: clauseaiCaretBlink 0.95s steps(1) infinite;
}
@keyframes clauseaiCaretBlink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}
#chatInput {
  resize: vertical;
}


/* Phase 5: trust signals + decision chips */
body.dashboard-body .chat-summary-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

body.dashboard-body .chat-trust-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

body.dashboard-body .chat-trust-chip.risk {
  background: rgba(196,128,255,0.14);
  border-color: rgba(214,168,255,0.22);
  color: #fff;
}

body.dashboard-body .chat-meta {
  color: rgba(255,255,255,0.56);
}


/* Understanding rail + instant decision layer */
.workspace-understanding-rail {
  display: grid;
  gap: 12px;
  max-width: 920px;
}

.understanding-decision-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,79,216,0.10), rgba(143,91,255,0.08), rgba(255,255,255,0.02));
}

.understanding-decision-banner strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.understanding-decision-banner p {
  margin: 0;
  color: var(--legal-muted);
}

.understanding-decision-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

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

.understanding-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.understanding-card span {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--legal-muted);
}

.understanding-card strong {
  font-size: 14px;
  line-height: 1.45;
}

.top-findings-strip {
  display: grid;
  gap: 10px;
}

.top-finding-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.top-finding-item.high {
  border-color: rgba(255, 110, 110, 0.28);
  background: linear-gradient(135deg, rgba(255, 110, 110, 0.10), rgba(255,255,255,0.03));
}

.top-finding-item.medium {
  border-color: rgba(255, 202, 87, 0.24);
  background: linear-gradient(135deg, rgba(255, 202, 87, 0.10), rgba(255,255,255,0.03));
}

.top-finding-item.low {
  border-color: rgba(111, 233, 186, 0.18);
}

.top-finding-copy {
  display: grid;
  gap: 6px;
}

.top-finding-label,
.top-finding-source,
.top-findings-empty {
  font-size: 12px;
  color: var(--legal-muted);
}

.top-finding-copy strong {
  font-size: 15px;
  line-height: 1.35;
}

.top-finding-copy p {
  margin: 0;
  line-height: 1.5;
}

.top-finding-actions {
  display: flex;
  align-items: center;
}

@media (max-width: 1100px) {
  .understanding-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .understanding-decision-banner,
  .top-finding-item {
    grid-template-columns: 1fr;
  }

  .understanding-decision-meta {
    justify-items: start;
  }

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


/* Always-on PDF sidecar: keep document visible next to chat */
body.dashboard-body .full-chat-workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 0.82fr) !important;
  align-items: stretch;
  gap: 18px;
}

body.dashboard-body .document-viewer-column,
body.dashboard-body .document-viewer-live {
  display: block !important;
  min-width: 0;
  order: 2;
}

body.dashboard-body .workspace-right-column.main-chat-column {
  order: 1;
  min-width: 0;
}

body.dashboard-body .document-viewer-column .document-stage-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100%;
  min-height: 0;
  max-height: calc(100vh - 122px);
  padding: 18px;
  border-radius: 28px;
}

body.dashboard-body .document-viewer-column .document-stage,
body.dashboard-body .document-viewer-column .document-canvas-wrap,
body.dashboard-body .document-viewer-column .pdf-preview-shell {
  display: block;
  min-height: 0;
  height: 100%;
}

body.dashboard-body .document-viewer-column .document-stage {
  overflow: auto;
  border-radius: 22px;
}

body.dashboard-body .document-viewer-column .document-canvas-wrap {
  overflow: hidden;
}

body.dashboard-body .document-viewer-column .pdf-preview-shell {
  overflow: auto;
  padding-right: 6px;
}

body.dashboard-body .document-live-copy {
  margin: 6px 0 0;
  color: rgba(255,255,255,0.64);
  font-size: 13px;
  line-height: 1.5;
}

body.dashboard-body .document-viewer-column .upload-stage-card {
  min-height: min(560px, calc(100vh - 220px));
  justify-content: center;
}

@media (max-width: 1280px) {
  body.dashboard-body .full-chat-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.74fr) !important;
  }
}

@media (max-width: 1100px) {
  body.dashboard-body .full-chat-workspace {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  body.dashboard-body .document-viewer-column,
  body.dashboard-body .document-viewer-live {
    order: 2;
  }

  body.dashboard-body .document-viewer-column .document-stage-card {
    position: static;
    max-height: none;
    min-height: 420px;
  }
}

.workspace-understanding-rail {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.chatgpt-chat-thread,
.chat-thread {
  position: relative;
  z-index: 0;
}


/* Clean rewrite: isolate decision rail from chat thread */
body.dashboard-body .chatgpt-main-chat-card { display:flex; flex-direction:column; gap:14px; }
body.dashboard-body .workspace-understanding-rail { flex:0 0 auto; margin-bottom:4px; }
body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread { flex:1 1 auto; min-height:320px; height:auto; margin-top:6px; padding-top:14px; border-top:1px solid rgba(255,255,255,0.06); overflow-y:auto; overflow-x:hidden; }
body.dashboard-body .chat-thread .chat-empty { position:relative; }
body.dashboard-body .understanding-grid,
body.dashboard-body .top-findings-strip { position:relative; z-index:1; }


.pdf-page-wrap {
  position: relative;
}

.pdf-page-focus .pdf-page-stage {
  box-shadow: 0 0 0 2px rgba(214,112,255,0.55), 0 14px 42px rgba(0,0,0,0.42);
}

.pdf-page-heat {
  position: absolute;
  top: 38px;
  right: 12px;
  z-index: 4;
  min-width: 110px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(9,12,20,0.88);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0,0,0,0.28);
}

.pdf-page-heat-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 2px;
}

.pdf-page-heat strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.pdf-page-heat-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.pdf-page-heat-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(214,112,255,0.95), rgba(255,104,180,0.95));
}

.pdf-page-heat.high,
.pdf-page-heat.is-high {
  border-color: rgba(255, 74, 74, 0.35);
}

.pdf-page-heat.medium,
.pdf-page-heat.is-medium {
  border-color: rgba(255, 200, 77, 0.35);
}

.pdf-page-heat.low,
.pdf-page-heat.is-low {
  border-color: rgba(82, 167, 255, 0.35);
}

.clause-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.clause-rewrite-textarea {
  width: 100%;
  min-height: 140px;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(10, 12, 22, 0.92);
  color: var(--text);
  resize: vertical;
  line-height: 1.55;
  font: inherit;
}

.clause-rewrite-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Scroll fix: make the full chat workspace column scroll as one surface */
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.dashboard-body .chatgpt-main-chat-thread,
body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 0 0 auto !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body.dashboard-body .workspace-understanding-rail,
body.dashboard-body .top-findings-strip {
  flex: 0 0 auto;
}

body.dashboard-body .chatgpt-chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 3;
}


/* Premium interaction polish */
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card {
  scrollbar-width: none !important;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
body.dashboard-body .chatgpt-chat-compose {
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(8,10,20,0.18) 0%, rgba(8,10,20,0.92) 18%, rgba(8,10,20,0.98) 100%);
  border-top: 1px solid rgba(255,255,255,0.08);
}
body.dashboard-body .chat-thread {
  padding-bottom: 112px;
}
.show-pdf-premium {
  border-color: rgba(214,157,255,0.28) !important;
  background: linear-gradient(180deg, rgba(133,66,214,0.22), rgba(68,38,120,0.24)) !important;
  color: #f6ecff !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 10px 24px rgba(80,35,125,0.16);
}
.show-pdf-premium
.clause-card {
  overflow: hidden;
}
.clause-card p,
.clause-card blockquote,
.understanding-card strong {
  word-break: break-word;
  line-height: 1.45;
}
.clause-card.is-jumping {
  box-shadow: 0 0 0 1px rgba(225,179,255,0.28), 0 0 0 8px rgba(138,74,226,0.08);
  transform: translateY(-1px);
}
.pdf-page-wrap {
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.pdf-page-wrap.pdf-page-focus {
  box-shadow: 0 0 0 1px rgba(225,179,255,0.22), 0 22px 48px rgba(122,58,212,0.26);
  transform: translateY(-2px) scale(1.003);
}
.pdf-text-span.pdf-risk-highlight {
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.pdf-text-span.pdf-risk-highlight.is-active {
  animation: pdfPulseHighlight 1.4s ease-out 1;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.08), 0 0 0 8px rgba(171,103,255,0.14);
  transform: translateZ(0) scale(1.02);
}
@keyframes pdfPulseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(171,103,255,0.38); }
  45% { box-shadow: 0 0 0 8px rgba(171,103,255,0.16); }
  100% { box-shadow: 0 0 0 0 rgba(171,103,255,0); }
}
.interaction-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 14px);
  z-index: 1200;
  padding: 10px 14px;
  border-radius: 999px;
  color: #f7efff;
  background: rgba(18, 13, 33, 0.92);
  border: 1px solid rgba(227, 185, 255, 0.24);
  box-shadow: 0 18px 44px rgba(8, 6, 18, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(14px);
}
.interaction-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* Elite interaction finish */
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card {
  padding-bottom: 18px !important;
  scroll-padding-bottom: 160px;
}
body.dashboard-body .chatgpt-chat-compose {
  margin-top: 10px;
  padding: 14px 0 10px;
  background: linear-gradient(180deg, rgba(5,7,16,0.08) 0%, rgba(5,7,16,0.96) 16%, rgba(5,7,16,1) 100%);
  box-shadow: 0 -14px 32px rgba(5,7,16,0.46);
}
body.dashboard-body .chat-thread {
  padding-bottom: 148px !important;
}
body.dashboard-body #clauseCardsWrap > .clause-card:last-child {
  margin-bottom: 24px;
}
body.dashboard-body .chat-empty.is-silent {
  display: none !important;
}
body.dashboard-body .clause-card,
body.dashboard-body .chat-clause-message {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
  cursor: default;
}
body.dashboard-body .clause-card:hover,
body.dashboard-body .clause-card:focus-within,
body.dashboard-body .chat-clause-message:hover,
body.dashboard-body .chat-clause-message:focus-within {
  transform: translateY(-2px);
  border-color: rgba(218, 163, 255, 0.26);
  box-shadow: 0 18px 34px rgba(70, 29, 120, 0.18);
}
body.dashboard-body .clause-card [data-clause-show-pdf],
body.dashboard-body .clause-card [data-clause-toggle],
body.dashboard-body .chat-clause-message [data-chat-action="show_pdf"] {
  cursor: pointer;
}
body.dashboard-body .document-stage-card .topbar-badge.subtle {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dashboard-body .document-preview-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.62);
}
body.dashboard-body .pdf-page-badge {
  box-shadow: 0 10px 24px rgba(8, 6, 18, 0.28);
}


/* Chat-first workspace: remove the side live preview panel and keep preview inline in chat */
body.dashboard-body .full-chat-workspace {
  display: block !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

body.dashboard-body .document-viewer-column,
body.dashboard-body .document-viewer-live {
  display: none !important;
}

body.dashboard-body .workspace-right-column.main-chat-column {
  order: initial;
  width: 100%;
  max-width: 100%;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  width: 100%;
  max-width: 100%;
}

body.dashboard-body .chatgpt-main-chat-card {
  min-height: calc(100vh - 170px);
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  padding-left: 8px;
  padding-right: 8px;
}

.chat-document-preview-message {
  max-width: 440px;
}

.chat-document-preview-card.compact {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
}

.chat-document-preview-thumb.compact,
.chat-document-preview-placeholder.compact {
  width: 104px;
  min-width: 104px;
  height: 136px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-document-preview-card.compact .chat-document-preview-copy {
  gap: 5px;
  min-width: 0;
  padding: 0;
}

.chat-document-preview-card.compact .chat-document-preview-copy strong {
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.chat-document-preview-card.compact .chat-document-preview-copy span {
  font-size: 12px;
}

.chat-document-preview-card.compact .chat-document-preview-status-row {
  margin: 0 0 2px;
}

.chat-document-preview-card.compact .chat-document-page-count {
  white-space: nowrap;
}

@media (max-width: 760px) {
  .chat-document-preview-message {
    max-width: 100%;
  }

  .chat-document-preview-card.compact {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .chat-document-preview-thumb.compact,
  .chat-document-preview-placeholder.compact {
    width: 88px;
    min-width: 88px;
    height: 116px;
  }
}


body.document-preview-open .document-preview-modal {
  padding: 0;
}

body.document-preview-open .document-preview-modal-card,
.document-preview-modal-card {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
}

.document-preview-modal-body {
  max-height: none;
}


/* Patch: make the full chat card scroll, not just the inner thread */
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.dashboard-body .workspace-understanding-rail {
  flex: 0 0 auto;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

body.dashboard-body .chatgpt-chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 3;
}


/* Patch: keep chat thread in normal flow and stop preview/messages from overlapping the summary rail */
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

body.dashboard-body .workspace-understanding-rail {
  position: relative !important;
  z-index: 2 !important;
  flex: 0 0 auto !important;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  align-content: start !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: none !important;
  margin-top: 10px !important;
  padding-top: 14px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.dashboard-body .chat-message,
body.dashboard-body .chat-upload-message,
body.dashboard-body .chat-document-preview-message {
  position: relative !important;
  z-index: 1 !important;
}

body.dashboard-body.has-active-document .workspace-understanding-rail {
  display: none !important;
}

body.dashboard-body.has-active-document .chatgpt-chat-copy,
body.dashboard-body.has-active-document .chat-suggestions {
  display: none !important;
}

.doc-action.is-disabled,
.doc-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.document-preview-generic-rich {
  background: linear-gradient(180deg, rgba(18,16,33,0.96), rgba(10,9,20,0.98));
}

.document-preview-generic-head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.document-preview-file-icon {
  width: 96px;
  height: 118px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(180deg, rgba(205,110,255,0.24), rgba(110,74,255,0.18));
  border: 1px solid rgba(255,255,255,0.12);
}

.document-preview-file-meta h3 {
  margin: 6px 0 8px;
  font-size: clamp(24px, 2vw, 32px);
}

.document-preview-file-size {
  margin-top: 10px;
  color: rgba(255,255,255,0.62);
  font-size: 13px;
}

.document-preview-text-block {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 18px;
}

.document-preview-text-block span {
  display: block;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-preview-text-block pre,
.document-preview-text-block p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  color: rgba(255,255,255,0.9);
  line-height: 1.65;
}

.document-preview-text-block.empty {
  display: block;
}


/* Final fix: true chat column, no floating upload card, no top progress rail */
body.dashboard-body .workspace-left-column.document-viewer-column { display:none !important; }
body.dashboard-body .full-chat-workspace { grid-template-columns:minmax(0, 1fr) !important; }
body.dashboard-body .main-chat-column { width:100%; max-width:none; }
body.dashboard-body .main-chat-column .chatgpt-main-chat-card { width:min(980px, calc(100vw - 320px)); margin:0 auto; }
body.dashboard-body .chatgpt-chat-head { padding-bottom:14px; border-bottom:1px solid rgba(255,255,255,0.08); }
body.dashboard-body .chat-head-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
body.dashboard-body #progressWrap { display:none !important; }
body.dashboard-body .chat-thread { display:flex; flex-direction:column; gap:14px; padding:18px 0 24px; }
body.dashboard-body .chat-message { max-width:min(720px, 100%); width:fit-content; }
body.dashboard-body .chat-message.user { align-self:flex-end; margin-left:auto; }
body.dashboard-body .chat-message.assistant { align-self:flex-start; margin-right:auto; }
body.dashboard-body .chat-upload-message { display:none !important; }
body.dashboard-body .chat-document-preview-message { max-width:420px; }
body.dashboard-body .chat-document-preview-card { flex-direction:row; align-items:center; gap:14px; }
body.dashboard-body .chat-document-preview-copy { min-width:0; }
body.dashboard-body .chat-document-preview-copy strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.dashboard-body .chat-progress-message { min-width:min(520px, 100%); }
body.dashboard-body .chat-progress-copy { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:10px; }
body.dashboard-body .chat-progress-copy strong { font-size:14px; color:rgba(255,255,255,0.94); }
body.dashboard-body .chat-progress-copy span { font-size:12px; color:rgba(255,255,255,0.62); }
body.dashboard-body .chat-progress-bar { height:8px; border-radius:999px; background:rgba(255,255,255,0.08); overflow:hidden; }
body.dashboard-body .chat-progress-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg, rgba(255,79,216,0.95), rgba(154,92,255,0.95)); }
body.dashboard-body .chat-clause-message { max-width:min(760px, 100%); }
body.dashboard-body .chatgpt-chat-compose { margin-top:0; padding-top:14px; }
@media (max-width: 1100px) {
  body.dashboard-body .main-chat-column .chatgpt-main-chat-card { width:100%; }
}


/* Lock-in fix: restore true chat mechanics and remove conflicting card-level scrolling */
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  min-height:calc(100vh - 160px) !important;
  height:calc(100vh - 160px) !important;
  max-height:none !important;
}
body.dashboard-body .chatgpt-chat-head {
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:16px !important;
  padding:0 0 14px !important;
  margin:0 !important;
  border-bottom:1px solid rgba(255,255,255,0.08) !important;
}
body.dashboard-body .chatgpt-chat-head > div:first-child {
  display:block !important;
}
body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread,
body.dashboard-body .chatgpt-main-chat-thread {
  display:flex !important;
  flex-direction:column !important;
  justify-content:flex-start !important;
  align-items:stretch !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:18px 8px 120px !important;
  margin:0 !important;
  gap:14px !important;
  align-content:initial !important;
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}
body.dashboard-body .chatgpt-chat-thread::-webkit-scrollbar,
body.dashboard-body .chat-thread::-webkit-scrollbar {
  width:0 !important;
  height:0 !important;
}
body.dashboard-body .chat-message,
body.dashboard-body .chat-upload-message,
body.dashboard-body .chat-document-preview-message,
body.dashboard-body .chat-progress-message {
  margin:0 !important;
}
body.dashboard-body .chat-message.user,
body.dashboard-body .chat-document-preview-message {
  align-self:flex-end !important;
  margin-left:auto !important;
}
body.dashboard-body .chat-message.assistant,
body.dashboard-body .chat-progress-message,
body.dashboard-body .chat-summary-message,
body.dashboard-body .chat-clause-message {
  align-self:flex-start !important;
  margin-right:auto !important;
}
body.dashboard-body .chat-document-preview-message {
  max-width:400px !important;
}
body.dashboard-body .chat-progress-message {
  min-width:min(560px, 100%) !important;
}
body.dashboard-body .chatgpt-chat-compose {
  position:sticky !important;
  bottom:0 !important;
  z-index:6 !important;
  margin-top:0 !important;
  padding-top:14px !important;
  background:linear-gradient(180deg, rgba(8,6,20,0), rgba(8,6,20,0.82) 18%, rgba(8,6,20,0.96) 100%) !important;
}
@media (max-width: 1100px) {
  body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
  body.dashboard-body .chatgpt-main-chat-card {
    min-height:calc(100vh - 120px) !important;
    height:calc(100vh - 120px) !important;
  }
  body.dashboard-body .chat-progress-message {
    min-width:0 !important;
    width:min(100%, 640px) !important;
  }
}


.docx-preview-shell {
  display: flex;
  justify-content: center;
  padding: 28px;
}
.docx-preview-page {
  width: min(880px, 100%);
  min-height: 100%;
  padding: 56px 64px;
  border-radius: 18px;
  background: #ffffff;
  color: #1b1b1f;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.docx-preview-content {
  font-size: 15px;
  line-height: 1.7;
}
.docx-preview-content p,
.docx-preview-content li,
.docx-preview-content td,
.docx-preview-content th,
.docx-preview-content blockquote,
.docx-preview-content h1,
.docx-preview-content h2,
.docx-preview-content h3,
.docx-preview-content h4,
.docx-preview-content h5,
.docx-preview-content h6 {
  color: inherit;
}
.docx-preview-match {
  position: relative;
  border-radius: 10px;
  background: rgba(174, 77, 255, 0.14);
  box-shadow: 0 0 0 2px rgba(174, 77, 255, 0.45), 0 0 0 10px rgba(174, 77, 255, 0.08);
  transition: box-shadow 180ms ease, background 180ms ease;
}
.docx-preview-match.is-active {
  background: rgba(255, 222, 89, 0.24);
  box-shadow: 0 0 0 2px rgba(255, 199, 0, 0.65), 0 0 0 12px rgba(255, 199, 0, 0.12);
}


body.dashboard-body .chat-summary-message {
  padding: 10px 12px;
}
body.dashboard-body .chat-summary-toggle {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
body.dashboard-body .chat-summary-toggle-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
body.dashboard-body .chat-summary-preview {
  font-size: 12.5px;
  line-height: 1.35;
  color: rgba(255,255,255,0.74);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dashboard-body .chat-summary-body {
  margin-top: 10px;
}
body.dashboard-body .chat-summary-indicator {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.78);
  flex: 0 0 auto;
}
body.dashboard-body .chat-summary-message.is-open .chat-summary-indicator {
  background: rgba(255,255,255,0.08);
}
body.dashboard-body .chat-clause-subhead {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dashboard-body .chat-clause-hint {
  font-size: 11px;
  line-height: 1.3;
}
body.dashboard-body .chat-clause-toggle {
  padding: 10px 12px;
}
body.dashboard-body .chat-clause-body {
  padding-top: 10px;
}
body.dashboard-body .chat-clause-message:hover,
body.dashboard-body .chat-clause-message:focus-within,
body.dashboard-body .chat-summary-message:hover,
body.dashboard-body .chat-summary-message:focus-within {
  transform: none;
}


body.dashboard-body .chat-clause-body,
body.dashboard-body .clause-card-body {
  overflow: hidden;
}
body.dashboard-body .chat-clause-message:hover,
body.dashboard-body .chat-clause-message:focus-within,
body.dashboard-body .chat-summary-message:hover,
body.dashboard-body .chat-summary-message:focus-within,
body.dashboard-body .accordion-card:hover,
body.dashboard-body .clause-card-toggle:hover {
  transform: none;
}


/* Elite analysis + calmer interactions */
body.dashboard-body .chat-clause-message,
body.dashboard-body .chat-summary-message,
body.dashboard-body .accordion-card,
body.dashboard-body .clause-card {
  transform: none !important;
}
body.dashboard-body .chat-clause-message:hover,
body.dashboard-body .chat-clause-message:focus-within,
body.dashboard-body .chat-summary-message:hover,
body.dashboard-body .chat-summary-message:focus-within,
body.dashboard-body .accordion-card:hover,
body.dashboard-body .clause-card:hover,
body.dashboard-body .clause-card-toggle:hover,
body.dashboard-body .chat-clause-toggle:hover {
  transform: none !important;
  box-shadow: none !important;
}
body.dashboard-body .priority-pill,
body.dashboard-body .summary-priority-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.86);
}
body.dashboard-body .summary-priority-pill.is-critical,
body.dashboard-body .priority-pill.is-critical,
body.dashboard-body .priority-pill.is-high {
  background:rgba(255,94,94,.12);
  border-color:rgba(255,94,94,.28);
  color:#ffd2d2;
}
body.dashboard-body .summary-priority-pill.is-important,
body.dashboard-body .priority-pill.is-important,
body.dashboard-body .priority-pill.is-medium {
  background:rgba(255,200,77,.12);
  border-color:rgba(255,200,77,.24);
  color:#ffe7ad;
}
body.dashboard-body .summary-priority-pill.is-standard,
body.dashboard-body .priority-pill.is-standard,
body.dashboard-body .priority-pill.is-low {
  background:rgba(82,167,255,.12);
  border-color:rgba(82,167,255,.22);
  color:#d4e8ff;
}
body.dashboard-body .chat-summary-block { display:grid; gap:12px; }
body.dashboard-body .chat-summary-decision { display:grid; gap:6px; }
body.dashboard-body .chat-summary-decision strong { font-size:18px; line-height:1.2; }
body.dashboard-body .chat-summary-riskbar { display:grid; gap:6px; }
body.dashboard-body .chat-summary-riskbar-track { height:10px; border-radius:999px; background:rgba(255,255,255,.08); overflow:hidden; }
body.dashboard-body .chat-summary-riskbar-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg, rgba(82,167,255,.95), rgba(255,200,77,.95), rgba(255,94,94,.95)); }
body.dashboard-body .chat-summary-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
body.dashboard-body .chat-summary-card,
body.dashboard-body .chat-summary-consequence,
body.dashboard-body .chat-summary-missing {
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  border-radius:14px;
  padding:12px;
}
body.dashboard-body .chat-summary-card span,
body.dashboard-body .chat-summary-consequence span,
body.dashboard-body .chat-summary-missing span,
body.dashboard-body .chat-summary-issues span,
body.dashboard-body .chat-summary-nextsteps span {
  display:block; margin-bottom:6px; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:rgba(255,255,255,.62);
}
body.dashboard-body .chat-summary-card p,
body.dashboard-body .chat-summary-consequence p { margin:0; }
body.dashboard-body .chat-summary-issues,
body.dashboard-body .chat-summary-nextsteps { display:grid; gap:8px; }
body.dashboard-body .chat-summary-issues ul,
body.dashboard-body .chat-summary-nextsteps ol,
body.dashboard-body .chat-summary-missing ul { margin:0; padding-left:18px; color:rgba(255,255,255,.88); }
body.dashboard-body .chat-summary-evidence { font-size:12px; color:rgba(255,255,255,.64); }
body.dashboard-body .chat-summary-actions,
body.dashboard-body .clause-inline-actions { display:flex; flex-wrap:wrap; gap:8px; }
body.dashboard-body .chat-summary-action {
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:#fff;
  border-radius:12px;
  padding:8px 12px;
  font:inherit;
  font-size:12px;
  cursor:pointer;
}
body.dashboard-body .chat-summary-action.primary,
body.dashboard-body [data-chat-rewrite-toggle] { background:linear-gradient(135deg, rgba(255,79,216,.16), rgba(154,92,255,.16)); border-color:rgba(255,79,216,.26); }
body.dashboard-body .chat-clause-priority { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
body.dashboard-body .chat-clause-riskbar { margin:10px 0 12px; }
body.dashboard-body .chat-clause-riskbar-track { height:8px; border-radius:999px; background:rgba(255,255,255,.07); overflow:hidden; }
body.dashboard-body .chat-clause-riskbar-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg, rgba(82,167,255,.92), rgba(255,200,77,.92), rgba(255,94,94,.92)); }
body.dashboard-body .chat-clause-scoreline { margin-top:6px; font-size:12px; color:rgba(255,255,255,.68); }
body.dashboard-body .pdf-risk-highlight.is-active { animation: clausePulse 1.35s ease-out 1; }
body.dashboard-body .pdf-page-wrap.pdf-page-focus::after {
  content:""; position:absolute; inset:8px; border-radius:18px;
  box-shadow:0 0 0 1px rgba(255,255,255,.08), 0 0 0 9999px rgba(5,6,12,.22) inset; pointer-events:none;
}
@keyframes clausePulse {
  0% { box-shadow:0 0 0 0 rgba(255,214,102,.55); }
  100% { box-shadow:0 0 0 16px rgba(255,214,102,0); }
}
@media (max-width: 820px) {
  body.dashboard-body .chat-summary-grid { grid-template-columns:1fr; }
}


.nav-link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.upgrade-link-btn {
  text-decoration: none;
}

.pricing-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 79, 216, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(143, 91, 255, 0.15), transparent 30%),
    linear-gradient(180deg, #09080f 0%, #0f0c18 48%, #0b0912 100%);
}

.pricing-shell {
  min-height: 100vh;
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.pricing-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 0 72px;
}

.pricing-hero {
  padding: 34px;
  margin-bottom: 22px;
  text-align: center;
}

.pricing-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.pricing-copy {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.7;
}

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

.pricing-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 420px;
}

.pricing-card.featured {
  position: relative;
  border-color: rgba(255, 115, 212, 0.28);
  box-shadow: 0 30px 100px rgba(188, 78, 255, 0.18);
}

.pricing-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pricing-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: #f6b7e0;
}

.pricing-card h2 {
  margin: 0;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.pricing-card h2 span {
  font-size: 18px;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0;
}

.pricing-subcopy {
  margin: 12px 0 0;
  color: var(--muted);
}

.pricing-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pricing-feature-list li {
  position: relative;
  padding-left: 22px;
  color: #f7eef9;
  line-height: 1.55;
}

.pricing-feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,79,216,0.98), rgba(143,91,255,0.98));
}

.pricing-muted-line {
  color: var(--muted) !important;
}

.pricing-card-actions {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.pricing-checkout-btn,
.pricing-auth-btn {
  width: 100%;
  justify-content: center;
}

.pricing-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.pricing-footnote.is-error {
  color: #ffb6d2;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}


/* ChatGPT-style sidebar list cleanup */
body.dashboard-body .chat-history-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

body.dashboard-body .chat-history-list .empty-queue {
  display: none !important;
}

body.dashboard-body .chat-history-item {
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 8px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  display: block !important;
  text-align: left !important;
  overflow: hidden !important;
}

body.dashboard-body .chat-history-item::before {
  display: none !important;
}

body.dashboard-body .chat-history-item:hover {
  background: rgba(255,255,255,0.06) !important;
  border-color: transparent !important;
}

body.dashboard-body .chat-history-item.active-chat {
  background: rgba(255,255,255,0.09) !important;
  border-color: transparent !important;
}

body.dashboard-body .chat-history-item-title {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
  color: rgba(255,255,255,0.9) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.dashboard-body .chat-history-item-meta {
  display: none !important;
}


.analysis-activity-stream {
  display: grid;
  gap: 10px;
  margin: 16px 0 18px;
}

.analysis-activity-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-template-areas:
    'dot title'
    'dot meta';
  gap: 2px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.025);
}

.analysis-activity-row strong {
  grid-area: title;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.analysis-activity-row span:last-child {
  grid-area: meta;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
}

.analysis-activity-dot {
  grid-area: dot;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  align-self: center;
  margin-top: 4px;
}

.analysis-activity-row.is-active {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
}

.analysis-activity-row.is-active .analysis-activity-dot {
  background: #ffffff;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.08);
}


.analysis-utility-stack{display:grid;gap:14px;margin-top:16px}
.missing-insights-strip{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.missing-insight-chip{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);font-size:13px;color:rgba(255,255,255,.86)}
.missing-insight-chip strong{font-size:12px;letter-spacing:.04em;text-transform:uppercase;color:rgba(255,255,255,.55)}
.document-risk-heatmap{display:grid;gap:10px;margin:16px 0 0;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.03)}
.document-risk-heatmap-empty{font-size:13px;color:rgba(255,255,255,.6)}
.document-risk-heatmap-header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.document-risk-heatmap-title{display:grid;gap:2px}
.document-risk-heatmap-title strong{font-size:14px}
.document-risk-heatmap-title span{font-size:12px;color:rgba(255,255,255,.58)}
.document-risk-heatmap-legend{display:flex;gap:8px;flex-wrap:wrap}
.document-risk-heatmap-legend span{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:rgba(255,255,255,.7)}
.document-risk-heatmap-legend i{display:inline-block;width:10px;height:10px;border-radius:999px}
.document-risk-heatmap-legend .high{background:#ff5f7a}
.document-risk-heatmap-legend .medium{background:#ffc857}
.document-risk-heatmap-legend .low{background:#63d297}
.document-risk-heatmap-list{display:grid;gap:8px}
.document-risk-heatmap-row{display:grid;grid-template-columns:minmax(0,1fr) 92px;gap:12px;align-items:center;padding:10px 12px;border-radius:14px;background:rgba(10,12,24,.72);border:1px solid rgba(255,255,255,.06)}
.document-risk-heatmap-row strong{display:block;font-size:13px}
.document-risk-heatmap-row span{display:block;font-size:12px;color:rgba(255,255,255,.6);margin-top:3px}
.document-risk-heatmap-bar{height:8px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}
.document-risk-heatmap-bar i{display:block;height:100%;border-radius:inherit}
.document-risk-heatmap-row.high .document-risk-heatmap-bar i{background:#ff5f7a}
.document-risk-heatmap-row.medium .document-risk-heatmap-bar i{background:#ffc857}
.document-risk-heatmap-row.low .document-risk-heatmap-bar i{background:#63d297}
.topbar-badge.mode-legal,.profile-pill.mode-legal{border-color:rgba(255,95,122,.35);color:#ffd7df;background:rgba(255,95,122,.12)}
.topbar-badge.mode-financial,.profile-pill.mode-financial{border-color:rgba(255,200,87,.35);color:#ffe8aa;background:rgba(255,200,87,.12)}
.topbar-badge.mode-resume,.profile-pill.mode-resume{border-color:rgba(99,210,151,.35);color:#cff5df;background:rgba(99,210,151,.12)}
.topbar-badge.mode-medical,.profile-pill.mode-medical{border-color:rgba(120,184,255,.35);color:#d8eaff;background:rgba(120,184,255,.12)}
.topbar-badge.mode-general,.profile-pill.mode-general{border-color:rgba(214,164,255,.35);color:#ecd9ff;background:rgba(214,164,255,.12)}
.progress-wrap:not(.hidden){display:grid;margin-top:14px}


.sign-impact-strip {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.sign-impact-chip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}
.sign-impact-chip strong {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-bottom: 3px;
}
.sign-impact-chip span {
  display: block;
  line-height: 1.4;
}
.sign-impact-pill {
  flex: 0 0 auto;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: rgba(255,255,255,0.08);
}
.sign-impact-chip.high .sign-impact-pill { background: rgba(255, 86, 120, 0.18); }
.sign-impact-chip.medium .sign-impact-pill { background: rgba(255, 189, 89, 0.18); }
.sign-impact-chip.low .sign-impact-pill { background: rgba(88, 214, 141, 0.18); }
.chat-summary-grid.triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.chat-summary-consequence ul {
  margin: 8px 0 0;
  padding-left: 18px;
}
.chat-clause-standard-note {
  margin-top: 8px;
  opacity: 0.82;
  font-size: 13px;
}
@media (max-width: 900px) {
  .chat-summary-grid.triple {
    grid-template-columns: 1fr;
  }
}



/* targeted recovery: keep chat composer visible and chat thread scrollable */
body.dashboard-body .chat-thread,
body.dashboard-body .chatgpt-chat-thread {
  flex: 1 1 auto !important;
  min-height: 240px !important;
  max-height: calc(100vh - 430px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

body.dashboard-body .chat-compose,
body.dashboard-body .chatgpt-chat-compose {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 8 !important;
  margin-top: auto !important;
  background: linear-gradient(180deg, rgba(7,5,24,0.0) 0%, rgba(7,5,24,0.92) 22%, rgba(7,5,24,0.98) 100%) !important;
  padding-bottom: 16px !important;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  min-height: calc(100vh - 160px) !important;
}


/* scoped patch: full-width chat workspace, actions in composer, no separate AI summary card */
body.dashboard-body .main-chat-column .chatgpt-main-chat-card { width:100% !important; max-width:none !important; margin:0 !important; }
body.dashboard-body .workspace-right-column.main-chat-column { width:100% !important; max-width:none !important; }
body.dashboard-body .analysis-utility-stack .analysis-actions.legal-actions { display:none !important; }
body.dashboard-body #aiResponseCard { display:none !important; }
body.dashboard-body .chatgpt-chat-head { margin-bottom:8px; }
body.dashboard-body .chatgpt-chat-copy { margin-bottom:10px; }
body.dashboard-body .chat-compose.chatgpt-chat-compose { display:grid !important; grid-template-columns:auto auto minmax(0,1fr) auto; align-items:center; gap:12px; }
body.dashboard-body .chat-compose-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
body.dashboard-body .chat-compose-actions .doc-action { white-space:nowrap; }
body.dashboard-body .chat-compose-input { min-width:0; width:100%; }
@media (max-width: 980px) {
  body.dashboard-body .chat-compose.chatgpt-chat-compose { grid-template-columns:auto 1fr auto; }
  body.dashboard-body .chat-compose-actions { grid-column:1 / -1; order:2; }
  body.dashboard-body .chat-compose-input { order:3; }
}


/* user-requested fix: pure full-height chat column with composer actions visible */
body.dashboard-body .workspace-right-column.main-chat-column {
  width: 100% !important;
  max-width: none !important;
}
body.dashboard-body .main-chat-column .chatgpt-main-chat-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  min-height: calc(100vh - 150px) !important;
  height: calc(100vh - 150px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
body.dashboard-body .chatgpt-chat-head {
  padding-bottom: 12px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}
body.dashboard-body .chatgpt-chat-copy,
body.dashboard-body .chat-suggestions,
body.dashboard-body .chat-dropzone,
body.dashboard-body .workspace-understanding-rail {
  display: none !important;
}
body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px 0 16px !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
body.dashboard-body .chatgpt-chat-thread::-webkit-scrollbar,
body.dashboard-body .chat-thread::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}
body.dashboard-body .chat-message,
body.dashboard-body .chat-summary-message,
body.dashboard-body .chat-clause-message,
body.dashboard-body .chat-progress-message,
body.dashboard-body .chat-document-preview-message {
  max-width: min(860px, 100%) !important;
}
body.dashboard-body .chat-compose.chatgpt-chat-compose {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 5 !important;
  display: grid !important;
  grid-template-columns: auto auto minmax(0,1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 0 0 !important;
  margin-top: 8px !important;
  background: linear-gradient(180deg, rgba(7,4,22,0), rgba(7,4,22,0.92) 18%, rgba(7,4,22,0.98) 100%) !important;
}
body.dashboard-body .chat-compose-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}
body.dashboard-body .chat-compose-actions .doc-action {
  white-space: nowrap !important;
}
body.dashboard-body .chat-compose-input {
  min-width: 0 !important;
  width: 100% !important;
}
@media (max-width: 1100px) {
  body.dashboard-body .chat-compose.chatgpt-chat-compose {
    grid-template-columns: auto 1fr auto !important;
  }
  body.dashboard-body .chat-compose-actions {
    grid-column: 1 / -1 !important;
    order: 2 !important;
    flex-wrap: wrap !important;
  }
  body.dashboard-body .chat-compose-input {
    order: 3 !important;
  }
}


/* Chat-only workspace override */
body.dashboard-body #reviewDeskView {
  display: flex !important;
  flex-direction: column;
  min-height: calc(100vh - 140px);
  gap: 0 !important;
}
body.dashboard-body #reviewDeskView > *:not(.workspace-grid.full-chat-workspace) {
  display: none !important;
}
body.dashboard-body .document-viewer-column,
body.dashboard-body .workspace-left-column,
body.dashboard-body .advanced-sections,
body.dashboard-body .chat-layout-hidden {
  display: none !important;
}
body.dashboard-body .full-chat-workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: calc(100vh - 160px);
  flex: 1 1 auto;
}
body.dashboard-body .workspace-right-column.main-chat-column,
body.dashboard-body .main-chat-column {
  grid-column: 1 / -1;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .main-chat-column .chatgpt-main-chat-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  min-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
}
body.dashboard-body .chatgpt-chat-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 1 1 auto;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 18px 0 26px !important;
  margin: 0 !important;
}
body.dashboard-body .chatgpt-chat-thread::-webkit-scrollbar,
body.dashboard-body .chat-thread::-webkit-scrollbar {
  width: 0;
  height: 0;
}
body.dashboard-body .chat-compose.chatgpt-chat-compose,
body.dashboard-body .chatgpt-chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: auto;
  padding: 14px 0 0 !important;
  background: linear-gradient(180deg, rgba(4,4,18,0), rgba(4,4,18,0.94) 18%, rgba(4,4,18,0.98) 100%);
  display: grid !important;
  grid-template-columns: auto auto auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
body.dashboard-body .chat-upload-btn,
body.dashboard-body .chat-compose-actions,
body.dashboard-body .chat-compose-input,
body.dashboard-body #sendChatBtn {
  min-width: 0;
}
body.dashboard-body .chat-compose-actions {
  display: contents;
}
body.dashboard-body .chat-compose-actions .doc-action {
  white-space: nowrap;
}
body.dashboard-body .chat-compose-input {
  width: 100%;
}
@media (max-width: 1200px) {
  body.dashboard-body .chat-compose.chatgpt-chat-compose,
  body.dashboard-body .chatgpt-chat-compose {
    grid-template-columns: auto repeat(3, auto) minmax(0, 1fr) auto;
  }
}
@media (max-width: 900px) {
  body.dashboard-body .chat-compose.chatgpt-chat-compose,
  body.dashboard-body .chatgpt-chat-compose {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  body.dashboard-body .chat-compose-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 10px;
    flex-wrap: wrap;
  }
}

/* user-requested fix: remove confidence/OCR metric row and pull conversation up */
body.dashboard-body .analysis-utility-stack,
body.dashboard-body .hero-metrics-row { display:none !important; }
body.dashboard-body .chatgpt-main-chat-card { margin-top:0 !important; }
body.dashboard-body .full-chat-workspace { margin-top:0 !important; }


.state-law-response { display: grid; gap: 14px; }
.state-law-sources > span,
.state-law-practical > span { display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.state-law-sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.state-law-source-item { padding: 12px 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.03); }
.state-law-source-link { color: #d7b7ff; text-decoration: underline; font-weight: 600; }
.state-law-source-link:hover { opacity: .92; }
.state-law-source-locator, .state-law-source-support { margin-top: 6px; font-size: 13px; line-height: 1.55; color: rgba(255,255,255,.82); }


/* user-requested layout patch: extend chat upward, remove conversation header, anchor composer to bottom */
body.dashboard-body .legal-main {
  padding: 8px 18px 0 !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
}

body.dashboard-body #reviewDeskView {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
}

body.dashboard-body .full-chat-workspace,
body.dashboard-body .workspace-right-column.main-chat-column,
body.dashboard-body .main-chat-column {
  min-height: 0 !important;
  height: 100% !important;
}

body.dashboard-body .chatgpt-chat-head {
  display: none !important;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .main-chat-column .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 0 !important;
  min-height: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 10px 18px 0 !important;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 0 12px !important;
  margin: 0 !important;
}

body.dashboard-body .chat-compose.chatgpt-chat-compose,
body.dashboard-body .chatgpt-chat-compose {
  position: sticky !important;
  bottom: 0 !important;
  margin-top: 0 !important;
  padding: 10px 0 12px !important;
}


/* Final scoped patch: true full-height chat + tighter pressed button bubbles */
body.dashboard-body .legal-main {
  min-height: 0 !important;
}

body.dashboard-body #reviewDeskView {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

body.dashboard-body #reviewDeskView > *:not(.workspace-grid.full-chat-workspace) {
  display: none !important;
}

body.dashboard-body .full-chat-workspace,
body.dashboard-body .workspace-right-column.main-chat-column,
body.dashboard-body .main-chat-column,
body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .main-chat-column .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: none !important;
}

body.dashboard-body .workspace-right-column.main-chat-column > .chatgpt-main-chat-card,
body.dashboard-body .main-chat-column .chatgpt-main-chat-card,
body.dashboard-body .chatgpt-main-chat-card {
  padding: 0 18px 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
}

body.dashboard-body .chatgpt-chat-thread,
body.dashboard-body .chat-thread {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 0 0 16px !important;
  margin: 0 !important;
  border-top: 0 !important;
  scroll-padding-bottom: 140px !important;
}

body.dashboard-body .chat-empty,
body.dashboard-body .chat-empty.is-silent {
  display: none !important;
}

body.dashboard-body .chat-compose.chatgpt-chat-compose,
body.dashboard-body .chatgpt-chat-compose {
  position: sticky !important;
  bottom: 0 !important;
  margin-top: 0 !important;
  padding: 10px 0 12px !important;
  z-index: 8 !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  background: linear-gradient(180deg, rgba(6,7,18,0.04) 0%, rgba(6,7,18,0.92) 22%, rgba(6,7,18,0.98) 100%) !important;
  backdrop-filter: blur(18px) !important;
}

body.dashboard-body .chat-upload-btn,
body.dashboard-body .doc-action,
body.dashboard-body .gradient-btn,
body.dashboard-body .topbar-upload,
body.dashboard-body .topbar-icon-btn,
body.dashboard-body .legal-nav-item {
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease !important;
  transform: none !important;
  will-change: auto !important;
}

body.dashboard-body .chat-upload-btn:hover,
body.dashboard-body .doc-action:hover,
body.dashboard-body .gradient-btn:hover,
body.dashboard-body .topbar-upload:hover,
body.dashboard-body .topbar-icon-btn:hover,
body.dashboard-body .legal-nav-item:hover {
  transform: translateY(-1px) !important;
}

body.dashboard-body .chat-upload-btn:active,
body.dashboard-body .doc-action:active,
body.dashboard-body .gradient-btn:active,
body.dashboard-body .topbar-upload:active,
body.dashboard-body .topbar-icon-btn:active,
body.dashboard-body .legal-nav-item:active,
body.dashboard-body .chat-upload-btn:focus-visible,
body.dashboard-body .doc-action:focus-visible,
body.dashboard-body .gradient-btn:focus-visible,
body.dashboard-body .topbar-upload:focus-visible,
body.dashboard-body .topbar-icon-btn:focus-visible,
body.dashboard-body .legal-nav-item:focus-visible {
  transform: translateY(0) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 8px 18px rgba(12,10,26,0.22) !important;
  outline: none !important;
}

body.dashboard-body .chat-upload-btn {
  width: 52px !important;
  height: 52px !important;
  border-radius: 18px !important;
}

body.dashboard-body .topbar-upload,
body.dashboard-body .topbar-icon-btn,
body.dashboard-body .doc-action,
body.dashboard-body .gradient-btn {
  border-radius: 18px !important;
}


/* Responsive minimize fix */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
canvas,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

.page-shell,
.dashboard-shell,
.dashboard-app-shell,
.legal-main,
.legal-topbar,
.topbar-right,
.hero-analysis-grid,
.workspace-grid,
.bottom-library-grid,
.split-workspace,
.simplified-workspace-grid,
.preview-grid,
.document-meta-grid,
.comparison-grid,
.comparison-controls,
.review-steps,
.chat-compose,
.document-toolbar,
.sidebar-user-card,
.sidebar-user-actions {
  min-width: 0;
}

.document-stage-card,
.document-sheet,
.document-canvas-wrap,
.pdf-preview-shell,
.pdf-page-wrap,
.pdf-page-stage,
.chat-thread,
.chat-compose textarea,
.chat-compose input,
.topbar-upload,
.document-dropzone,
.sidebar-panel,
.sidebar-user-card,
.document-library-card {
  max-width: 100%;
}

.chat-compose textarea,
.chat-compose input,
.topbar-upload,
.document-dropzone,
.doc-action,
.sidebar-logout,
.topbar-icon-btn,
.primary-btn,
.secondary-btn,
.demo-btn,
.nav-cta {
  min-width: 0;
}

@media (max-width: 1280px) {
  .dashboard-shell,
  .dashboard-app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .preview-grid,
  .hero-analysis-grid,
  .workspace-grid,
  .simplified-workspace-grid,
  .split-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1024px) {
  .page-shell {
    padding: 16px 18px 32px;
  }

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

  .app-sidebar,
  .legal-sidebar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .legal-main,
  .app-main,
  .dashboard-main {
    min-width: 0;
    width: 100%;
  }

  .preview-grid,
  .hero-analysis-grid,
  .workspace-grid,
  .bottom-library-grid,
  .simplified-workspace-grid,
  .split-workspace,
  .comparison-grid,
  .comparison-controls,
  .review-steps,
  .document-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-right,
  .panel-head-spread,
  .hero-review-head,
  .document-toolbar,
  .sidebar-user-card,
  .sidebar-user-actions,
  .app-topbar,
  .legal-topbar,
  .chat-compose {
    flex-wrap: wrap;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 10px 14px;
    border-radius: 22px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 40px;
  }

  .hero h1,
  .topbar-title {
    font-size: clamp(30px, 8vw, 48px);
    line-height: 1.04;
  }

  .hero-copy,
  .section-copy,
  .document-library-summary {
    max-width: 100%;
  }

  .hero-actions,
  .topbar-right,
  .panel-head-spread,
  .hero-review-head,
  .document-toolbar,
  .sidebar-user-card,
  .sidebar-user-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .document-sheet,
  .document-stage-card,
  .sidebar-panel,
  .sidebar-user-card,
  .chat-card-shell,
  .issues-card,
  .action-card-shell,
  .rewrite-card-shell,
  .negotiation-card-shell,
  .clause-card-shell,
  .notes-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .document-pages,
  .topbar-badge,
  .workspace-pill,
  .doc-chip,
  .tag {
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .page-shell,
  .legal-main {
    padding: 12px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero h1,
  .topbar-title {
    font-size: 28px;
  }

  .nav,
  .preview-window,
  .document-stage-card,
  .document-sheet,
  .sidebar-panel,
  .sidebar-user-card,
  .workspace-card,
  .band-card,
  .use-card,
  .price-card {
    border-radius: 18px;
  }

  .primary-btn,
  .secondary-btn,
  .demo-btn,
  .nav-cta,
  .doc-action,
  .sidebar-logout,
  .topbar-icon-btn {
    width: 100%;
    justify-content: center;
  }

  .chat-thread {
    max-height: none;
  }
}

@media (max-height: 820px) {
  .hero {
    padding-top: 32px;
    padding-bottom: 12px;
  }

  .hero-preview {
    padding-bottom: 36px;
  }

  .document-stage,
  .document-canvas-wrap,
  .chat-thread {
    min-height: 0;
  }
}


/* Profile modal upgrades */
.profile-modal-card {
  width: min(720px, calc(100vw - 32px));
}

.profile-identity-card,
.profile-usage-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.08);
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff5fb;
  background: radial-gradient(circle at 30% 30%, rgba(255,173,219,0.95), rgba(165,98,255,0.78));
  box-shadow: 0 10px 30px rgba(177, 104, 255, 0.18);
}

.profile-identity-copy,
.profile-plan-card,
.profile-usage-stats {
  min-width: 0;
}

.profile-identity-name,
.profile-usage-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,255,255,0.96);
}

.profile-identity-meta,
.profile-plan-copy,
.profile-usage-copy,
.profile-usage-caption {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.62);
}

.profile-plan-card {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.profile-plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #ffd7ec;
  background: rgba(255, 151, 206, 0.08);
  border: 1px solid rgba(255, 151, 206, 0.18);
}

.profile-upgrade-btn {
  min-width: 108px;
  text-align: center;
  text-decoration: none;
}

.profile-usage-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.profile-section-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.42);
}

.profile-usage-stats {
  text-align: right;
}

.profile-usage-count {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: rgba(255,255,255,0.97);
}

.profile-grid {
  margin-top: 18px;
}

.profile-section-divider {
  grid-column: 1 / -1;
  margin: 4px 0 -2px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.profile-grid .profile-section-divider:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.profile-field span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.44);
}

.dashboard-theme-light .profile-identity-card,
.dashboard-theme-light .profile-usage-card {
  background: linear-gradient(180deg, rgba(11,17,37,0.05), rgba(11,17,37,0.025));
  border-color: rgba(11,17,37,0.1);
}

.dashboard-theme-light .profile-section-divider {
  border-top-color: rgba(11,17,37,0.1);
  color: rgba(11,17,37,0.45);
}

.dashboard-theme-light .profile-identity-name,
.dashboard-theme-light .profile-usage-title,
.dashboard-theme-light .profile-usage-count {
  color: rgba(11,17,37,0.92);
}

.dashboard-theme-light .profile-identity-meta,
.dashboard-theme-light .profile-plan-copy,
.dashboard-theme-light .profile-usage-copy,
.dashboard-theme-light .profile-usage-caption,
.dashboard-theme-light .profile-section-kicker,
.dashboard-theme-light .profile-field-hint {
  color: rgba(11,17,37,0.58);
}

@media (max-width: 640px) {
  .profile-identity-card,
  .profile-usage-card {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }

  .profile-plan-card,
  .profile-usage-stats {
    align-items: flex-start;
    text-align: left;
  }

  .profile-usage-count {
    font-size: 24px;
  }
}


/* Custom profile dropdowns */
.profile-field .meta-input.meta-select-native,
.profile-settings-grid .meta-input.meta-select-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select.is-open {
  z-index: 40;
}

.custom-select-trigger {
  width: 100%;
  min-height: 54px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  color: #fff;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: rgba(205, 132, 255, 0.34);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: 0 0 0 3px rgba(209, 96, 255, 0.08);
}

.custom-select-trigger:focus-visible {
  outline: none;
  border-color: rgba(205, 132, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(209, 96, 255, 0.12);
}

.custom-select-value {
  flex: 1;
  text-align: left;
}

.custom-select-caret {
  width: 10px;
  height: 10px;
  border-right: 1.5px solid rgba(255,255,255,0.76);
  border-bottom: 1.5px solid rgba(255,255,255,0.76);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease;
  flex: 0 0 auto;
  margin-right: 4px;
}

.custom-select.is-open .custom-select-caret {
  transform: rotate(-135deg) translateY(-1px);
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(9, 10, 20, 0.98);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.42);
}

.custom-select-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.92);
  font: inherit;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  outline: none;
  background: rgba(192, 92, 255, 0.14);
  color: #fff;
}

.custom-select-option.is-selected {
  background: linear-gradient(90deg, rgba(222, 95, 255, 0.24), rgba(119, 67, 255, 0.16));
  color: #fff;
}

.custom-select-option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.custom-select-option-check {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.custom-select-option.is-selected .custom-select-option-check {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 560px) {
  .custom-select-trigger {
    min-height: 50px;
  }
}


/* Final polish for custom profile dropdowns */
.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  min-height: 56px;
}

.custom-select-menu {
  top: calc(100% + 4px);
  max-height: 220px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  z-index: 60;
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select.open-up .custom-select-menu {
  top: auto;
  bottom: calc(100% + 4px);
  transform: translateY(-6px);
}

.custom-select.open-up.is-open .custom-select-menu {
  transform: translateY(0);
}

.custom-select-option-label {
  justify-content: space-between;
  padding-right: 6px;
}

.custom-select-option-check {
  min-width: 16px;
  text-align: right;
}

.custom-select-menu::-webkit-scrollbar {
  width: 8px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
}

.custom-select-menu::-webkit-scrollbar-track {
  background: transparent;
}


/* Phase 2 adaptive dashboard */
.dashboard-top-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.dashboard-top-module {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 23, 42, 0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.dashboard-top-module span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(226,232,240,0.72);
  margin-bottom: 6px;
}
.dashboard-top-module strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: #f8fafc;
}
.dashboard-top-module p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(226,232,240,0.72);
}
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.chat-suggestion {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}
.chat-suggestion:hover {
  border-color: rgba(99,102,241,0.45);
}
.clause-card-family {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(226,232,240,0.72);
}
.clause-card-family::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(129,140,248,0.9);
}
.clause-card.adaptive-card .clause-card-body {
  display: grid;
  gap: 12px;
}
.clause-card.adaptive-card .adaptive-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.clause-card.adaptive-card .adaptive-card-meta {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.34);
  border-radius: 14px;
  padding: 12px 14px;
}
.clause-card.adaptive-card .adaptive-card-meta span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226,232,240,0.72);
  margin-bottom: 5px;
}
.clause-card.adaptive-card .adaptive-card-meta p,
.clause-card.adaptive-card .adaptive-card-copy p {
  margin: 0;
}
.context-item {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,23,42,0.32);
  border-radius: 16px;
  padding: 14px;
}
.context-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  background: rgba(99,102,241,0.18);
  margin-bottom: 10px;
}
.context-item p { margin: 8px 0 0; }


/* Elite reset password page */
.reset-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 102, 196, 0.16), transparent 0 30%),
    radial-gradient(circle at 82% 12%, rgba(127, 92, 255, 0.18), transparent 0 30%),
    linear-gradient(180deg, #07070b 0%, #050509 55%, #040407 100%);
}

.reset-shell {
  min-height: 100vh;
}

.reset-stage {
  position: relative;
  min-height: 100vh;
  padding: 36px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.reset-orb {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
  pointer-events: none;
}

.reset-orb-left {
  left: -120px;
  top: 100px;
  background: rgba(255, 90, 190, 0.48);
}

.reset-orb-right {
  right: -120px;
  bottom: 80px;
  background: rgba(111, 89, 255, 0.42);
}

.reset-card {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  padding: 28px;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(18,18,25,0.92), rgba(8,8,12,0.94));
  box-shadow: 0 40px 120px rgba(0,0,0,0.48);
  backdrop-filter: blur(18px);
}

.reset-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.reset-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.reset-brand-logo {
  width: 40px;
  height: 40px;
}

.reset-link {
  color: rgba(255,255,255,0.74);
  text-decoration: none;
  font-weight: 600;
}

.reset-link:hover {
  color: #fff;
}

.reset-hero {
  max-width: 720px;
  margin-bottom: 26px;
}

.reset-kicker {
  margin: 0 0 10px;
  color: #f2c8ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reset-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.reset-copy {
  margin: 0;
  max-width: 640px;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  font-size: 16px;
}

.reset-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.reset-side-panel,
.reset-main-panel {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  padding: 24px;
}

.reset-side-badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #f4d7ff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.reset-side-panel h2 {
  margin: 0 0 18px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.reset-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.reset-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
}

.reset-steps li > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 700;
}

.reset-steps strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.reset-steps p {
  margin: 0;
  color: rgba(255,255,255,0.68);
  line-height: 1.6;
}

.reset-main-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.reset-status-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.reset-status-chip.is-ready,
.reset-status-chip.is-success {
  background: rgba(88, 216, 165, 0.12);
  border-color: rgba(88, 216, 165, 0.3);
  color: #bff7d8;
}

.reset-status-chip.is-error {
  background: rgba(255, 105, 130, 0.12);
  border-color: rgba(255, 105, 130, 0.28);
  color: #ffd0d9;
}

.reset-feedback {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.035);
}

.reset-feedback-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 28px;
  font-weight: 800;
}

.reset-feedback-icon.is-ready,
.reset-feedback-icon.is-success {
  background: rgba(88, 216, 165, 0.14);
  border-color: rgba(88, 216, 165, 0.28);
  color: #bff7d8;
}

.reset-feedback-icon.is-error {
  background: rgba(255, 105, 130, 0.12);
  border-color: rgba(255, 105, 130, 0.24);
  color: #ffd0d9;
}

.reset-feedback h3 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.reset-feedback p {
  margin: 0;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
}

.reset-form {
  display: grid;
  gap: 14px;
}

.reset-form label {
  display: grid;
  gap: 8px;
}

.reset-form label span {
  color: rgba(255,255,255,0.72);
  font-size: 14px;
}

.reset-form input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.035);
  color: #fff;
  font: inherit;
}

.reset-form input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.04);
}

.reset-password-hints {
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}

.reset-submit,
.reset-action-btn {
  width: 100%;
  justify-content: center;
}

.reset-submit[disabled] {
  opacity: 0.75;
  cursor: wait;
}

.reset-actions {
  display: grid;
}

@media (max-width: 920px) {
  .reset-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .reset-stage {
    padding: 18px 12px;
  }

  .reset-card {
    padding: 18px;
    border-radius: 24px;
  }

  .reset-card-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .reset-side-panel,
  .reset-main-panel {
    padding: 18px;
  }

  .reset-feedback {
    grid-template-columns: 1fr;
  }

  .reset-feedback-icon {
    width: 52px;
    height: 52px;
  }
}


.auth-forgot-btn {
  align-self: flex-start;
  margin-top: -6px;
  margin-bottom: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: #c084fc;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-forgot-btn:hover {
  color: #e9d5ff;
}

.auth-forgot-btn:focus-visible {
  outline: 2px solid rgba(192, 132, 252, 0.9);
  outline-offset: 4px;
  border-radius: 8px;
}


.phase-f-library-toolbar {
  flex-wrap: wrap;
}

.history-filter-select {
  min-width: 180px;
}

.phase-f-library-card {
  gap: 14px;
}

.phase-f-library-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phase-f-library-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(245,240,255,0.88);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}


.hero-copy-list p {
  margin: 0;
}

.hero-copy-list ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 10px;
}

.hero-copy-list li {
  position: relative;
  padding-left: 18px;
}

.hero-copy-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(255,255,255,0.82);
}

.hero-trust-line {
  margin: 24px 0 0;
  color: var(--muted-2);
  font-size: 15px;
  letter-spacing: 0.01em;
}
