*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

.label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 4.8vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.018em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}

p {
  color: var(--ink-soft);
  line-height: 1.75;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}

.btn-primary {
  color: var(--white);
  background: var(--ink);
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  color: var(--ink);
  background: transparent;
  border: 1.75px solid var(--ink-soft);
}

.btn-outline:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1380px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

.nav-logo img {
  display: block;
  width: auto;
  height: 32px;
}

.nav-logo .nav-logo-text {
  color: var(--ink);
}

.nav-logo .nav-logo-dot {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  color: var(--white) !important;
  padding: 10px 20px !important;
  font-size: .9rem !important;
}

.nav-cta:hover {
  color: var(--white) !important;
}

#hero {
  position: relative;
  min-height: calc(68vh - 64px);
  overflow: hidden;
  padding: 58px 0 88px;
}

#hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--gold-light) 0%, transparent 70%);
  opacity: .45;
  pointer-events: none;
}

.hero-container {
  position: relative;
  max-width: 1380px;
}

.demo-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  gap: 48px;
  align-items: center;
}

.hero-text {
  max-width: 700px;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  border-radius: 100px;
  padding: 6px 14px;
  color: var(--teal);
  background: var(--teal-light);
  font-size: .8rem;
  font-weight: 600;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero-headline {
  max-width: 720px;
  margin-bottom: 26px;
  font-size: clamp(2.25rem, 4.4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}

.hero-sub {
  max-width: 640px;
  margin-bottom: 36px;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.demo-case-panel,
.run-panel,
.evidence-panel,
.rules-panel,
.timeline-panel,
.report-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.demo-case-panel {
  overflow: hidden;
}

.demo-case-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
}

.zoomable-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
}

.zoomable-image-button .zoomable-image {
  cursor: inherit;
}

.zoomable-image-button:focus-visible {
  outline: 3px solid rgba(200, 151, 58, .58);
  outline-offset: 4px;
}

.demo-case-copy {
  padding: 28px;
}

.demo-case-copy .label {
  display: block;
  margin-bottom: 12px;
}

.demo-case-copy h2 {
  margin-bottom: 22px;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
}

.demo-case-copy dl {
  display: grid;
  gap: 12px;
}

.demo-case-copy div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.demo-case-copy dt {
  color: var(--ink-faint);
}

.demo-case-copy dd {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.demo-section {
  border-top: 1px solid var(--border);
  background: var(--paper);
}

.result-section {
  background: var(--sand);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 36px;
}

.section-heading .label {
  display: block;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 16px;
}

.workflow-title {
  max-width: 100%;
}

@media (min-width: 900px) {
  .workflow-title {
    white-space: nowrap;
    font-size: clamp(1.8rem, 3.05vw, 2.45rem);
  }
}

.workflow-grid {
  display: grid;
  grid-template-columns: minmax(280px, .42fr) minmax(0, 1fr);
  gap: 20px;
}

.run-panel {
  display: grid;
  align-content: center;
  min-height: 320px;
  padding: 28px;
  scroll-margin-top: 88px;
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  margin-bottom: 22px;
  border: 14px solid var(--teal-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 700;
}

.run-panel p {
  min-height: 54px;
  margin: 10px 0 20px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 100px;
  background: var(--sand);
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ink), var(--gold));
  transition: width .26s ease;
}

.stage-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.stage-list li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .72);
}

.stage-list li.is-active {
  border-color: rgba(42, 122, 111, .34);
  background: var(--teal-light);
}

.stage-list span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--teal);
  background: var(--white);
  font-weight: 700;
}

.stage-list strong {
  align-self: end;
}

.stage-list small {
  color: var(--ink-soft);
  line-height: 1.45;
}

.is-hidden {
  display: none;
}

.review-output-stack,
.timeline-report-grid {
  display: grid;
  gap: 20px;
}

.timeline-report-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, .36fr);
  margin-top: 20px;
}

.evidence-panel,
.rules-panel,
.timeline-panel,
.report-panel {
  padding: 22px;
}

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

.rules-panel {
  scroll-margin-top: 88px;
}

.rule-count {
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  color: var(--ink-soft);
  background: var(--sand);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.evidence-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.evidence-tabs button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: var(--white);
  cursor: pointer;
}

.evidence-tabs button.is-active {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.evidence-panel img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.evidence-panel p {
  margin-top: 14px;
}

.rule-list {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.rule-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .72);
  animation: rule-reveal .24s ease both;
}

.rule-area {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rule-row p,
.rule-row small {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.review-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: start;
  width: 102px;
  min-height: 34px;
  border: 2px solid currentColor;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.status-pass {
  color: #23834e;
  background: #edf8f0;
  border-color: #cbe7d3;
}

.status-fail {
  color: #b13a50;
  background: #fff0f3;
  border-color: #f3cad2;
}

.status-review_required {
  color: #9b6d24;
  background: #fff8e8;
  border-color: #f0d9aa;
}

.timeline-panel ol {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  list-style: none;
}

.timeline-panel li {
  display: grid;
  gap: 5px;
  padding-left: 16px;
  border-left: 3px solid var(--gold);
}

.timeline-panel span,
.report-panel p {
  color: var(--ink-soft);
}

.report-panel {
  display: grid;
  align-content: center;
  gap: 12px;
}

.report-panel .btn {
  width: max-content;
}

.site-footer {
  padding: 32px 0 40px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-faint);
}

.footer-inner a {
  color: var(--ink);
  font-weight: 600;
}

.has-lightbox {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(12, 12, 12, .82);
}

.image-lightbox.is-hidden {
  display: none;
}

.image-lightbox img {
  display: block;
  max-width: min(96vw, 1440px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .38);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

@keyframes rule-reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  .demo-hero-grid,
  .workflow-grid,
  .timeline-report-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 18px;
  }
}

@media (max-width: 760px) {
  section {
    padding: 68px 0;
  }

  .nav-inner {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 24px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  #hero {
    padding: 42px 0 64px;
  }

  .hero-headline {
    white-space: normal;
  }

  .panel-heading,
  .footer-inner {
    display: grid;
  }

  .rule-row {
    grid-template-columns: 1fr;
  }

  .evidence-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .btn {
    width: 100%;
  }

  .report-panel .btn {
    width: 100%;
  }
}
