:root {
  --background: #080b10;
  --background-deep: #05070a;
  --background-soft: #0d1218;

  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);

  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.065);

  --text: #f4f4ef;
  --muted: rgba(244, 244, 239, 0.64);
  --faint: rgba(244, 244, 239, 0.4);

  --accent: #b9ff66;
  --blue: #70d9ff;
  --success: #77e7aa;
  --warning: #ffc86b;
  --danger: #ff8b96;

  --content-width: 1280px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}

::selection {
  background: var(--accent);
  color: var(--background);
}

.container {
  width: min(
    calc(100% - 40px),
    var(--content-width)
  );
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: -999px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--background);
}

.skip-link:focus {
  left: 16px;
}

/* Header */

.site-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;

  display: flex;
  width: min(
    calc(100% - 48px),
    var(--content-width)
  );
  min-height: 82px;
  margin-inline: auto;

  align-items: center;
  justify-content: space-between;
  gap: 30px;

  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;

  font-size: 0.9rem;
  font-weight: 700;
}

.brand > span:last-child > span {
  color: var(--accent);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;

  border: 1px solid rgba(185, 255, 102, 0.3);
  border-radius: 10px;

  background: rgba(185, 255, 102, 0.07);
  color: var(--accent);

  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 22px;

  color: var(--muted);
  font-size: 0.7rem;
}

.header-links > span {
  padding: 7px 11px;

  border: 1px solid var(--line);
  border-radius: 999px;
}

.header-links a:hover {
  color: var(--accent);
}

/* Hero */

.hero {
  position: relative;

  display: flex;
  min-height: 780px;
  overflow: hidden;

  padding: 130px 0 80px;
  align-items: center;

  border-bottom: 1px solid var(--line-soft);
}

.background-grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      rgba(255, 255, 255, 0.026) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.026) 1px,
      transparent 1px
    );

  background-size: 54px 54px;

  mask-image: linear-gradient(
    to bottom,
    black,
    transparent 94%
  );
}

.background-glow {
  position: absolute;
  top: -200px;
  right: -180px;

  width: 620px;
  height: 620px;

  border-radius: 50%;
  background: var(--blue);

  filter: blur(155px);
  opacity: 0.13;
}

.hero-layout {
  position: relative;
  z-index: 2;

  display: grid;
  grid-template-columns: 0.88fr 1.12fr;

  align-items: center;
  gap: 74px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 24px;

  align-items: center;
  gap: 10px;

  color: var(--accent);

  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: var(--accent);

  box-shadow: 0 0 14px var(--accent);
}

.hero-copy h1 {
  max-width: 740px;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.6rem, 6.3vw, 6.6rem);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-description {
  max-width: 640px;
  margin-top: 27px;

  color: var(--muted);

  font-size: 1.03rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  margin-top: 32px;

  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  padding: 0 20px;

  align-items: center;
  justify-content: center;

  cursor: pointer;

  border: 1px solid transparent;
  border-radius: 999px;

  font-size: 0.78rem;
  font-weight: 700;

  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--text);
  color: var(--background);
}

.button-primary:hover {
  background: var(--accent);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.privacy-note {
  margin-top: 17px;

  color: var(--faint);

  font-size: 0.65rem;
}

/* Workflow card */

.workflow-card {
  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 28px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.055),
      rgba(255, 255, 255, 0.014)
    );

  box-shadow: 0 45px 110px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.workflow-header {
  display: flex;
  min-height: 76px;
  padding: 0 22px;

  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--line-soft);
}

.workflow-header > div {
  display: flex;
  flex-direction: column;
}

.workflow-header > div > span {
  color: var(--accent);

  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.workflow-header strong {
  margin-top: 4px;
  font-size: 0.82rem;
}

.workflow-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: var(--muted);
  font-size: 0.63rem;
}

.workflow-state i {
  width: 6px;
  height: 6px;

  border-radius: 50%;
  background: var(--success);

  box-shadow: 0 0 13px var(--success);
}

.workflow-steps {
  padding: 21px;
}

.workflow-step {
  display: grid;
  min-height: 65px;
  padding: 13px;

  align-items: center;
  grid-template-columns: 35px 1fr auto;
  gap: 12px;

  border: 1px solid var(--line-soft);
  border-radius: 15px;

  background: rgba(255, 255, 255, 0.018);

  transition:
    border-color 280ms ease,
    background 280ms ease,
    transform 280ms ease;
}

.step-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;

  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);

  color: var(--faint);
  font-family: monospace;
  font-size: 0.62rem;
}

.workflow-step > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.workflow-step strong {
  font-size: 0.72rem;
}

.workflow-step small {
  margin-top: 3px;

  overflow: hidden;

  color: var(--faint);
  font-size: 0.6rem;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-status {
  color: var(--faint);
  font-size: 0.57rem;
}

.workflow-step.active {
  border-color: rgba(185, 255, 102, 0.28);
  background: rgba(185, 255, 102, 0.06);
  transform: translateX(3px);
}

.workflow-step.active .step-number,
.workflow-step.active .step-status {
  color: var(--accent);
}

.workflow-step.complete {
  border-color: rgba(119, 231, 170, 0.14);
}

.workflow-step.complete .step-number {
  background: rgba(119, 231, 170, 0.1);
  color: var(--success);
}

.workflow-step.complete .step-status {
  color: var(--success);
}

.step-connector {
  width: 1px;
  height: 9px;
  margin-left: 29px;

  background: linear-gradient(
    var(--line),
    transparent
  );
}

/* Workspace */

.workspace-section {
  padding: 90px 0 110px;
}

.workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;

  align-items: start;
}

.control-column {
  position: sticky;
  top: 24px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-label {
  margin-bottom: 11px;

  color: var(--accent);

  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.section-heading h2,
.results-header h2,
.schema-layout h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: 2rem;
}

.controls {
  display: grid;
  gap: 10px;
}

.control-button {
  display: grid;
  width: 100%;
  min-height: 76px;
  padding: 14px;

  cursor: pointer;

  align-items: center;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;

  border: 1px solid var(--line-soft);
  border-radius: 16px;

  background: var(--surface);

  text-align: left;

  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.control-button:hover:not(:disabled) {
  border-color: rgba(185, 255, 102, 0.28);
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.control-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.control-button > span {
  color: var(--accent);
  font-family: monospace;
  font-size: 0.62rem;
}

.control-button > div {
  display: flex;
  flex-direction: column;
}

.control-button strong {
  font-size: 0.72rem;
}

.control-button small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 0.58rem;
}

.control-button i {
  color: var(--accent);
  font-style: normal;
}

.reset-button {
  opacity: 0.72;
}

/* Activity */

.activity-card {
  margin-top: 18px;
  overflow: hidden;

  border: 1px solid var(--line-soft);
  border-radius: 17px;

  background: var(--surface);
}

.activity-card header {
  display: flex;
  min-height: 45px;
  padding: 0 14px;

  align-items: center;
  justify-content: space-between;

  border-bottom: 1px solid var(--line-soft);

  color: var(--faint);

  font-size: 0.56rem;
  letter-spacing: 0.11em;
}

.activity-card button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.58rem;
}

.activity-list {
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
}

.activity-list li {
  display: grid;
  padding: 10px 14px;

  grid-template-columns: 58px 1fr;
  gap: 9px;

  border-bottom: 1px solid var(--line-soft);

  color: var(--muted);

  font-size: 0.6rem;
  line-height: 1.5;
}

.activity-list li:last-child {
  border-bottom: 0;
}

.activity-list time {
  color: var(--faint);
  font-family: monospace;
}

/* Results */

.results-column {
  min-width: 0;
}

.results-header {
  display: flex;
  margin-bottom: 23px;

  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.results-header h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.05;
}

.results-header > div > p:last-child {
  margin-top: 9px;

  color: var(--muted);
  font-size: 0.78rem;
}

.report-status {
  flex: 0 0 auto;

  padding: 8px 11px;

  border: 1px solid var(--line);
  border-radius: 999px;

  color: var(--faint);
  font-size: 0.61rem;
}

.report-status.approval {
  border-color: rgba(255, 200, 107, 0.3);
  background: rgba(255, 200, 107, 0.07);
  color: var(--warning);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.kpi-card {
  padding: 17px;

  border: 1px solid var(--line-soft);
  border-radius: 15px;

  background: var(--surface);
}

.kpi-card > span {
  display: block;

  color: var(--faint);
  font-size: 0.57rem;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.kpi-card small {
  display: block;
  margin-top: 4px;

  color: var(--faint);
  font-size: 0.52rem;
}

.success-text {
  color: var(--success);
}

.warning-text {
  color: var(--warning);
}

/* Table */

.table-card {
  margin-top: 14px;
  overflow: hidden;

  border: 1px solid var(--line-soft);
  border-radius: 18px;

  background: var(--surface);
}

.table-header {
  display: flex;
  min-height: 62px;
  padding: 0 16px;

  align-items: center;
  justify-content: space-between;
  gap: 20px;

  border-bottom: 1px solid var(--line-soft);
}

.table-header > div:first-child {
  display: flex;
  flex-direction: column;
}

.table-header strong {
  font-size: 0.72rem;
}

.table-header > div:first-child span {
  margin-top: 3px;

  color: var(--faint);
  font-size: 0.56rem;
}

.legend {
  display: flex;
  gap: 15px;

  color: var(--faint);
  font-size: 0.54rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.legend-success {
  background: var(--success);
}

.legend-failure {
  background: var(--danger);
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;

  border-bottom: 1px solid var(--line-soft);

  font-size: 0.62rem;
  text-align: left;
  white-space: nowrap;
}

th {
  background: rgba(255, 255, 255, 0.025);
  color: var(--faint);
  font-weight: 700;
}

td {
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}

.empty-row td {
  height: 180px;

  color: var(--faint);
  text-align: center;
}

.status-pill {
  display: inline-flex;
  padding: 5px 8px;

  border-radius: 999px;

  font-size: 0.54rem;
  font-weight: 700;
}

.status-pass {
  background: rgba(119, 231, 170, 0.09);
  color: var(--success);
}

.status-fail {
  background: rgba(255, 139, 150, 0.09);
  color: var(--danger);
}

/* Schema */

.schema-section {
  padding: 90px 0;

  border-top: 1px solid var(--line-soft);

  background: var(--background-deep);
}

.schema-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;

  align-items: center;
  gap: 70px;
}

.schema-layout h2 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
}

.schema-layout p:not(.section-label) {
  margin-top: 20px;

  color: var(--muted);

  font-size: 0.85rem;
  line-height: 1.8;
}

.schema-layout p code {
  padding: 2px 5px;

  border: 1px solid var(--line-soft);
  border-radius: 5px;

  background: var(--surface);
  color: var(--accent);
}

.schema-layout pre {
  overflow-x: auto;

  padding: 24px;

  border: 1px solid var(--line);
  border-radius: 18px;

  background: #06090d;
  color: rgba(244, 244, 239, 0.78);

  font-size: 0.69rem;
  line-height: 1.8;
}

/* Toast */

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;

  max-width: min(360px, calc(100% - 44px));
  padding: 13px 16px;

  pointer-events: none;

  border: 1px solid var(--line);
  border-radius: 13px;

  background: rgba(8, 11, 16, 0.94);
  color: var(--text);

  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);

  font-size: 0.7rem;

  opacity: 0;
  transform: translateY(12px);

  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(255, 139, 150, 0.3);
  color: var(--danger);
}

.print-report {
  display: none;
}

/* Responsive */

@media (max-width: 1050px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 55px;
  }

  .workflow-card {
    max-width: 720px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .control-column {
    position: static;
  }

  .controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .activity-card {
    max-width: 720px;
  }

  .schema-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: min(
      calc(100% - 28px),
      var(--content-width)
    );

    min-height: 74px;
  }

  .header-links > span {
    display: none;
  }

  .container {
    width: min(
      calc(100% - 28px),
      var(--content-width)
    );
  }

  .hero {
    min-height: auto;
    padding: 115px 0 75px;
  }

  .hero-copy h1 {
    font-size: clamp(3.1rem, 15vw, 5rem);
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .workflow-step {
    grid-template-columns: 32px 1fr;
  }

  .step-status {
    display: none;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .results-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-header {
    padding: 14px;
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Print/PDF report */

@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }

  body {
    background: white;
    color: #111;
  }

  body > *:not(.print-report) {
    display: none !important;
  }

  .print-report {
    display: block !important;

    color: #111;
    font-family: Arial, sans-serif;
  }

  .print-report-header {
    display: flex;
    padding-bottom: 15px;

    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #d6d6d6;
  }

  .print-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .print-brand > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;

    border-radius: 7px;

    background: #111;
    color: white;

    font-weight: 700;
  }

  .print-brand > div,
  .print-report-id {
    display: flex;
    flex-direction: column;
  }

  .print-report-id {
    align-items: flex-end;
  }

  .print-brand small,
  .print-report-id span {
    color: #666;
    font-size: 9px;
  }

  .print-title {
    display: flex;
    margin-top: 22px;

    align-items: flex-end;
    justify-content: space-between;
  }

  .print-title p {
    color: #666;
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .print-title h1 {
    margin-top: 5px;
    font-size: 25px;
  }

  .print-title > span {
    padding: 6px 9px;

    border: 1px solid #bbb;
    border-radius: 999px;

    font-size: 9px;
  }

  .print-summary {
    display: grid;
    margin-top: 18px;

    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .print-summary div {
    padding: 10px;

    border: 1px solid #ddd;
    border-radius: 7px;
  }

  .print-summary span {
    display: block;
    color: #666;
    font-size: 8px;
  }

  .print-summary strong {
    display: block;
    margin-top: 4px;
    font-size: 17px;
  }

  .print-table {
    width: 100%;
    min-width: 0;
    margin-top: 15px;

    border-collapse: collapse;
  }

  .print-table th,
  .print-table td {
    padding: 7px;

    border: 1px solid #ddd;

    color: #111;
    font-size: 8px;
  }

  .print-table th {
    background: #f1f1f1;
  }

  .print-footer {
    display: grid;
    margin-top: 17px;
    padding-top: 13px;

    grid-template-columns: auto auto 1fr;
    gap: 20px;

    border-top: 1px solid #ddd;
  }

  .print-footer div {
    display: flex;
    flex-direction: column;
  }

  .print-footer span {
    color: #666;
    font-size: 8px;
  }

  .print-footer strong {
    margin-top: 3px;
    font-size: 9px;
  }

  .print-footer p {
    max-width: 330px;
    justify-self: end;

    color: #777;

    font-size: 8px;
    line-height: 1.5;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}