* {
  box-sizing: border-box;
}

:root {
  --ink: #092f3b;
  --ink-2: #123f4a;
  --teal: #0d8d82;
  --teal-dark: #08776e;
  --mint: #71dacf;
  --soft: #f2f7f7;
  --line: #d8e4e6;
  --muted: #64777d;
  --white: #ffffff;
  --amber: #c9842f;
}

html {
  min-height: 100%;
  background: #eef4f4;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef4f4;
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.demo-shell {
  width: min(100%, 1600px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 50px rgba(9,47,59,.08);
}

.topbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  padding: 12px clamp(20px,4vw,58px);
  background: var(--white);
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.aegeantek-logo {
  display: block;
  width: clamp(218px,19.5vw,278px);
  height: auto;
}

.brand > span {
  display: grid;
  gap: 2px;
  padding-left: 22px;
  border-left: 1px solid rgba(9,47,59,.18);
}

.brand b {
  font-size: .88rem;
}

.brand small {
  color: rgba(9,47,59,.62);
  font-size: .72rem;
}

.restart-button {
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(9,47,59,.2);
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  font-size: 1.5rem;
}

.screen {
  min-height: calc(100vh - 124px);
}

.landing {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.landing-copy,
.landing-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px,6vw,88px);
}

.product-mark {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 8px 15px 8px 9px;
  border: 1px solid #d5e7e5;
  border-radius: 14px;
  background: #f3f9f8;
}

.product-mark strong {
  display: grid;
  min-width: 62px;
  min-height: 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  letter-spacing: .1em;
}

.product-mark span {
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
}

.eyebrow.light {
  color: var(--mint);
}

.landing h1,
.workspace-heading h1,
.results-heading h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.8rem,5vw,5.3rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.landing h1 span {
  display: block;
  color: var(--teal);
}

.lead,
.workspace-heading > p:last-child,
.results-heading > p:last-child {
  max-width: 690px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: clamp(1rem,1.35vw,1.2rem);
  line-height: 1.65;
}

.primary-button {
  display: inline-flex;
  width: fit-content;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 30px;
  padding: 0 25px;
  border: 0;
  border-radius: 12px;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.primary-button:hover {
  background: var(--teal-dark);
}

.demo-note {
  margin: 13px 0 0;
  color: #829095;
  font-size: .76rem;
}

.landing-visual {
  gap: clamp(14px,1.7vw,22px);
  color: white;
  background:
    radial-gradient(circle at 80% 20%, rgba(13,141,130,.28), transparent 32%),
    #082d39;
}

.incoming-preview,
.preview-engine,
.preview-result {
  border: 1px solid rgba(113,218,207,.34);
  border-radius: 16px;
  background: rgba(255,255,255,.065);
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
}

.incoming-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(16px,2vw,22px);
}

.incoming-preview > div:last-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.incoming-preview span,
.result-row span,
.result-split span {
  color: var(--mint);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.incoming-preview strong {
  overflow-wrap: anywhere;
  font-size: clamp(.92rem,1.3vw,1.1rem);
}

.incoming-preview small,
.preview-engine small {
  color: rgba(255,255,255,.54);
}

.file-icon {
  display: grid;
  width: 54px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--teal);
  color: white;
  font-size: .7rem;
  font-weight: 900;
}

.file-icon.large {
  width: 68px;
}

.flow-arrow {
  text-align: center;
  color: var(--mint);
  font-size: 1.3rem;
}

.preview-engine {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 16px;
  background: rgba(13,141,130,.15);
}

.preview-engine > div:last-child {
  display: grid;
  gap: 4px;
}

.engine-mark {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 12px;
  background: var(--mint);
  color: #082d39;
  font-weight: 900;
  letter-spacing: .08em;
}

.preview-result {
  display: grid;
  gap: 14px;
  padding: clamp(18px,2vw,24px);
}

.result-row {
  display: grid;
  gap: 5px;
}

.result-row strong {
  font-size: 1rem;
}

.result-split {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 12px;
}

.result-split > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}

.result-split strong {
  font-size: .78rem;
  line-height: 1.35;
}

.preview-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preview-proof span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.76);
  font-size: .68rem;
  font-weight: 700;
}

.workspace,
.results {
  padding: clamp(28px,4vw,56px);
  background: #f7fafa;
}

.workspace-heading,
.results-heading {
  margin-bottom: clamp(28px,4vw,46px);
}

.workspace-heading h1,
.results-heading h1 {
  max-width: 900px;
  font-size: clamp(2.3rem,4vw,4.2rem);
}

/* Simulated document intake */
.intake-intro {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(340px,.85fr);
  gap: clamp(18px,3vw,40px);
  align-items: center;
  margin-bottom: 18px;
}

.intake-intro .workspace-heading {
  margin-bottom: 0;
}

.intake-intro .workspace-heading h1 {
  max-width: 760px;
  font-size: clamp(2rem,3.1vw,3.35rem);
}

.intake-intro .workspace-heading > p:last-child {
  max-width: 650px;
  margin-top: 14px;
}

.upload-demo {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 30px rgba(9,47,59,.05);
}

.upload-demo-copy {
  display: grid;
  gap: 4px;
}

.upload-label {
  color: var(--teal);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.upload-demo-copy > strong {
  font-size: 1.2rem;
}

.upload-demo-copy small,
.upload-file-row small {
  color: var(--muted);
}

.upload-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: var(--teal);
  color: white;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.upload-button:hover {
  background: var(--teal-dark);
}

.upload-button b {
  font-size: 1.15rem;
}

.upload-progress {
  margin-top: 13px;
}

.upload-file-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
}

.upload-file-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.upload-file-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
}

.upload-file-row b {
  color: var(--teal-dark);
  font-size: .76rem;
}

.upload-pdf {
  display: grid;
  width: 36px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-size: .62rem;
  font-weight: 900;
}

.upload-track {
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3eded;
}

.upload-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width .16s ease;
}

.workspace.awaiting-upload .document-card,
.workspace.awaiting-upload .pipeline,
.workspace.awaiting-upload .analysis-layout,
.workspace.awaiting-upload .continue-button {
  display: none;
}

@media (max-width: 900px) {
  .intake-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .intake-intro {
    gap: 16px;
    margin-bottom: 16px;
  }

  .upload-demo {
    padding: 15px;
  }
}

.document-action-row {
  display: grid;
  grid-template-columns: minmax(0,78fr) minmax(210px,22fr);
  gap: 14px;
  align-items: stretch;
}

.document-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 30px rgba(9,47,59,.05);
}

.document-meta {
  min-width: 0;
  flex: 1;
}

.document-meta > span {
  color: var(--teal);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.document-meta h2 {
  margin: 5px 0 7px;
  overflow-wrap: anywhere;
  font-size: clamp(1rem,1.7vw,1.35rem);
}

.document-meta p {
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.5;
}

.document-state,
.status-pill,
.verified-badge {
  padding: 8px 11px;
  border-radius: 999px;
  background: #e4f2f0;
  color: var(--teal-dark);
  font-size: .72rem;
  font-weight: 900;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(6,1fr);
  gap: 9px;
  margin: 22px 0;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  opacity: .52;
}

.pipeline-step.active,
.pipeline-step.complete {
  opacity: 1;
}

.pipeline-step.active {
  border-color: var(--teal);
  background: #f0f9f8;
}

.pipeline-step.complete .step-number {
  background: var(--teal);
  color: white;
}

.step-number {
  display: grid;
  width: 31px;
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #e7efef;
  font-size: .67rem;
  font-weight: 900;
}

.pipeline-step div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.pipeline-step b {
  font-size: .69rem;
}

.pipeline-step small {
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.3;
}

.analysis-layout {
  display: grid;
  grid-template-columns: minmax(0,1.55fr) minmax(260px,.65fr);
  gap: 20px;
}

.analysis-panel,
.evidence-panel,
.decision-card,
.evidence-distribution,
.output-card,
.security-note {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  box-shadow: 0 10px 30px rgba(9,47,59,.05);
}

.analysis-panel,
.evidence-panel {
  padding: clamp(20px,2.5vw,30px);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2,
.evidence-panel h3,
.output-card h2 {
  margin: 0;
}

.analysis-content {
  margin-top: 25px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 12px;
}

.analysis-item {
  padding: 17px;
  border-radius: 12px;
  background: var(--soft);
}

.analysis-item span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.analysis-item strong {
  line-height: 1.4;
}

.evidence-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.evidence-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: var(--soft);
}

.evidence-item span {
  color: var(--teal);
  font-size: .67rem;
  font-weight: 900;
}

.evidence-item p {
  margin: 0;
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.45;
}

.continue-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 30px rgba(9,47,59,.05);
}

.continue-card > span {
  color: var(--teal);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.continue-button {
  width: 100%;
  min-height: 48px;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0 12px;
  white-space: nowrap;
}

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

  .continue-card {
    padding: 14px;
  }
}

.decision-grid,
.output-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 20px;
}

.decision-card,
.output-card {
  padding: clamp(22px,3vw,34px);
}

.decision-card > span {
  color: var(--teal);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.decision-card h2 {
  margin: 9px 0 12px;
  font-size: clamp(1.4rem,2.3vw,2rem);
}

.decision-card p,
.output-card > p:not(.eyebrow),
.security-note p {
  color: var(--muted);
  line-height: 1.6;
}

.primary-decision {
  border-color: rgba(13,141,130,.42);
  background: #f4faf9;
}

.confidence-line {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.confidence-line > div,
.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1ecec;
}

.confidence-line i,
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.confidence-line i {
  width: 96%;
}

.evidence-distribution {
  margin: 20px 0;
  padding: clamp(22px,3vw,34px);
}

.evidence-distribution h2 {
  margin: 0;
}

.domain-bar {
  margin-top: 18px;
}

.domain-label {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 7px;
  font-size: .82rem;
}

.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.knowledge-tags span,
.destination-path span {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--soft);
  font-size: .73rem;
  font-weight: 700;
}

.destination-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 22px 0;
}

/* Final customer repository visualization */
.repository-map {
  margin: 18px 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfb;
}

.repository-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

.repository-map-head span {
  color: var(--teal);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .11em;
}

.repository-map-head small {
  color: var(--muted);
  font-size: .67rem;
}

.repository-tree {
  padding: 8px 10px 10px;
}

.repository-folder {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 6px;
  position: relative;
  color: var(--ink);
  font-size: .73rem;
}

.repository-folder:not(.level-0)::before,
.repository-file::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid #d7e4e5;
}

.repository-folder.level-1 {
  padding-left: 18px;
}

.repository-folder.level-2 {
  padding-left: 36px;
}

.repository-folder.level-3 {
  padding-left: 54px;
}

.repository-folder.level-1::before {
  left: 6px;
}

.repository-folder.level-2::before {
  left: 24px;
}

.repository-folder.level-3::before {
  left: 42px;
}

.tree-marker {
  color: var(--teal);
  font-size: .7rem;
}

.repository-file {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  position: relative;
  min-height: 36px;
  margin-top: 3px;
  margin-left: 72px;
  padding: 5px 7px;
  border: 1px solid rgba(13,141,130,.22);
  border-radius: 8px;
  background: white;
}

.repository-file::before {
  left: -12px;
}

.repository-pdf {
  display: grid;
  width: 28px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 6px;
  background: var(--teal);
  color: white;
  font-size: .52rem;
  font-weight: 900;
}

.repository-file strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .68rem;
}

.repository-file em {
  color: var(--teal-dark);
  font-size: .58rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.destination-path b {
  color: var(--teal);
}

.completion-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 13px;
  border-radius: 11px;
  background: #f0f9f8;
}

.completion-item > span {
  display: grid;
  width: 30px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-weight: 900;
}

.completion-item div {
  display: grid;
  gap: 3px;
}

.completion-item small {
  color: var(--muted);
}

.security-note {
  margin-top: 20px;
  padding: 20px 24px;
  border-color: rgba(13,141,130,.35);
}

.security-note strong {
  color: var(--teal);
  font-size: .72rem;
  letter-spacing: .12em;
}

.security-note p {
  margin: 7px 0 0;
}

footer {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(20px,4vw,58px);
  color: #73858a;
  background: white;
  border-top: 1px solid var(--line);
  font-size: .7rem;
}

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

  .landing-visual {
    min-height: 620px;
  }

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

  .analysis-layout,
  .decision-grid,
  .output-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .topbar {
    min-height: 66px;
    padding: 10px 16px;
  }

  .brand {
    gap: 10px;
  }

  .aegeantek-logo {
    width: clamp(145px,43vw,190px);
  }

  .brand > span {
    gap: 1px;
    padding-left: 10px;
  }

  .brand small {
    display: none;
  }

  .landing-copy,
  .landing-visual,
  .workspace,
  .results {
    padding: 28px 20px;
  }

  .landing h1 {
    font-size: clamp(2.45rem,12vw,4rem);
  }

  .landing-visual {
    min-height: auto;
  }

  .result-split,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .document-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .document-state {
    margin-left: 86px;
  }

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

  .panel-heading {
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* KnowledgeFlow pipeline history navigation */
.pipeline-step.available {
  cursor: pointer;
}

.pipeline-step.available:hover:not(.active) {
  border-color: rgba(13,141,130,.55);
  background: #f5fbfa;
  opacity: 1;
}

.pipeline-step.available:focus-visible {
  outline: 3px solid rgba(13,141,130,.22);
  outline-offset: 2px;
}

.pipeline-step.future {
  cursor: default;
}

.pipeline-step.complete {
  opacity: .82;
}

.pipeline-step.complete:hover {
  opacity: 1;
}

/* KnowledgeFlow topbar demo actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topbar-actions[hidden] {
  display: none;
}

.test-again-button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(9,47,59,.28);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.test-again-button:hover {
  background: rgba(9,47,59,.07);
}

@media (max-width: 650px) {
  .topbar-actions {
    gap: 7px;
  }

  .test-again-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: .72rem;
  }
}

@media (max-width: 650px) {
  .repository-map-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .repository-file {
    margin-left: 42px;
  }

  .repository-file strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* KnowledgeFlow bilingual language switch */
.language-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 8px;
  border: 1px solid rgba(9,47,59,.14);
  border-radius: 9px;
  background: rgba(9,47,59,.025);
  white-space: nowrap;
}

.language-switch > span {
  color: rgba(9,47,59,.28);
  font-size: .72rem;
}

.language-switch button {
  appearance: none;
  padding: 2px 3px;
  border: 0;
  background: transparent;
  color: rgba(9,47,59,.52);
  font: inherit;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  cursor: pointer;
}

.language-switch button:hover {
  color: var(--ink);
}

.language-switch button.is-active {
  color: var(--teal);
}

.topbar-actions {
  margin-left: 10px;
}

@media (max-width: 650px) {
  .language-switch {
    gap: 4px;
    margin-left: auto;
    padding: 4px 6px;
  }

  .language-switch button {
    padding: 2px;
    font-size: .66rem;
  }

  .topbar-actions {
    margin-left: 6px;
  }
}
