:root {
  --ink: #0A2540;
  --soft: #475569;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --line: #E2E8F0;
  --brand: #0A2540;
  --brand-hover: #071B30;
  --brand-ink: #FFFFFF;
  --accent: #175CD3;
  --pill-bg: #E6EFF8;
  --pill-ink: #0A2540;
  --hi: #DC2626;
  --med: #D97706;
  --ok: #16A34A;
  --pro: #4F46E5;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap.wide {
  max-width: 1280px;
}

/* ==================== HEADER ==================== */
header.site {
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand);
}

.brand-logo-img {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.brand-logo-text {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.pill-badge {
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-talk {
  background: var(--brand);
  color: #FFFFFF;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-talk:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.meity-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.04);
}

.meity-logo-img {
  height: 22px;
  width: auto;
  max-width: 42px;
  object-fit: contain;
}

.meity-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.meity-sub {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meity-main {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand);
}

/* ==================== FOOTER ==================== */
footer.site {
  border-top: 1px solid var(--line);
  margin-top: 50px;
  padding: 24px 0;
  font-size: 14px;
  color: var(--soft);
  background: #FFFFFF;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer a {
  color: var(--soft);
  text-decoration: underline;
}

footer a:hover {
  color: var(--brand);
}

/* ==================== STEPS CONTAINER ==================== */
.step {
  display: none;
  padding-bottom: 40px;
}

.step.on {
  display: block;
}

/* ==================== STEP 0: HERO ==================== */
.hero {
  padding: 56px 24px 36px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand);
  text-transform: uppercase;
  margin: 0 0 16px;
}

.hero-title {
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  line-height: 1.12;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 22ch;
}

.lead {
  font-size: 1.12rem;
  color: #334155;
  max-width: 620px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.scanbox {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 2px solid var(--brand);
  border-radius: 12px;
  padding: 5px 6px 5px 16px;
  max-width: 620px;
  margin-top: 22px;
  box-shadow: 0 3px 10px rgba(10, 37, 64, 0.08);
}

.scanbox input {
  flex: 1 1 200px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 1.1rem;
  padding: 10px 4px;
  outline: none;
  min-width: 0;
}

.scanbox input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

#scan-btn {
  background: var(--brand);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

#scan-btn:hover:not(:disabled) {
  background: var(--brand-hover);
}

#scan-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.fine {
  font-size: 13px;
  color: var(--soft);
  margin-top: 14px;
  max-width: 640px;
  line-height: 1.5;
}

.fine a {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
}

.sample-row {
  margin-top: 20px;
  font-size: 14.5px;
  color: #334155;
}

.sample-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.sample-link:hover {
  color: var(--brand-hover);
}

/* Three Cards at the bottom */
.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0;
  list-style: none;
  margin: 44px 0 0;
}

.how li {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(10, 37, 64, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.how li:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(10, 37, 64, 0.08);
}

.how-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.how-icon {
  font-size: 1.1rem;
}

.how-desc {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.5;
  margin: 0;
}

/* ==================== BUTTONS & UTILITIES ==================== */
.btn {
  background: var(--brand);
  color: var(--brand-ink);
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--line);
}

.btn.ghost:hover:not(:disabled) {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.btn.small {
  padding: 6px 12px;
  font-size: 14px;
}

.btn.block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.linkbtn {
  background: none;
  border: 0;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.linkbtn:hover {
  color: var(--brand-hover);
}

.muted {
  color: var(--soft);
}

.req {
  color: var(--hi);
  margin-left: 2px;
  font-weight: 700;
  border: 0;
  text-decoration: none;
}

.err {
  color: var(--hi);
  font-weight: 500;
  min-height: 1em;
  margin: 8px 0;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.scanning {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: var(--brand);
  font-weight: 500;
}

.spin {
  width: 18px;
  height: 18px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: s 1s linear infinite;
}

@keyframes s {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== STEP WORKFLOW (S1, S2, S3) ==================== */
.steps {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 28px 0 14px;
  font-size: 14px;
  flex-wrap: wrap;
}

.steps li {
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid var(--line);
  color: var(--soft);
  font-weight: 500;
}

.steps .cur {
  background: var(--brand);
  color: #FFFFFF;
  border-color: var(--brand);
  font-weight: 600;
}

.steps .done {
  color: var(--ok);
  border-color: var(--line);
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.summary div {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.04);
}

.summary strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand);
}

.card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.03);
}

.finding {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
}

.finding + .finding {
  border-top: 1px solid var(--line);
}

.sev {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  color: #FFFFFF;
  letter-spacing: 0.02em;
}

.sev.high {
  background: var(--hi);
}

.sev.medium {
  background: var(--med);
}

.sev.low {
  background: var(--soft);
}

.pro-card {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border: 2px dashed #3B82F6;
  background: #EFF6FF;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  flex-wrap: wrap;
  color: #1E40AF;
}

.pro-inline {
  display: block;
  font-size: 13px;
  color: #2563EB;
  margin-top: 4px;
}

.tw {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 12px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  background: #FFFFFF;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--soft);
  font-weight: 600;
  background: #F8FAFC;
}

tr.unc td {
  background: #FEF3C7;
}

select, input, textarea {
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

select:focus, input:focus, textarea:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 2px rgba(10, 37, 64, 0.15);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.full {
  grid-column: 1 / -1;
}

.f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  font-size: 14px;
  color: var(--brand);
}

.f span {
  font-weight: 400;
  color: var(--soft);
  font-size: 13px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 14px;
}

.checks {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-weight: 400;
  margin-top: 4px;
}

.purpose {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #FFFFFF;
}

.purpose .grid {
  margin-top: 12px;
}

.purpose[data-off] .grid {
  display: none;
}

.bar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
}

/* ==================== STEP 3: LIVE DEMO ==================== */
.demo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  margin-top: 18px;
}

#demo-frame {
  width: 100%;
  height: min(780px, calc(100vh - 32px));
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.05);
}

.upsell {
  background: #FFFFFF;
  border: 2px solid #3B82F6;
  border-radius: 14px;
  padding: 20px;
  align-self: start;
}

.upsell h3 {
  margin-top: 0;
  color: var(--brand);
}

.locks {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
  font-size: 14px;
}

.locks li {
  padding: 7px 0 7px 24px;
  position: relative;
  border-bottom: 1px solid var(--line);
  color: #334155;
}

.locks li:before {
  content: "🔒";
  position: absolute;
  left: 0;
  font-size: 13px;
}

/* ==================== LEAD MODAL ==================== */
dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  max-width: 620px;
  width: calc(100% - 24px);
  background: #FFFFFF;
  color: var(--brand);
  box-shadow: 0 24px 48px rgba(10, 37, 64, 0.25);
}

dialog::backdrop {
  background: rgba(10, 37, 64, 0.45);
  backdrop-filter: blur(4px);
}

dialog form {
  padding: 24px 26px;
}

.dh {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dh h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand);
}

.x {
  background: none;
  border: 0;
  font-size: 26px;
  cursor: pointer;
  color: var(--soft);
  line-height: 1;
  padding: 4px 8px;
}

.x:hover {
  color: var(--brand);
}

.turnstile {
  margin-top: 10px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .how {
    grid-template-columns: 1fr;
  }
  .demo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .scanbox {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
  }
  .scanbox input {
    padding: 8px;
  }
  #scan-btn {
    width: 100%;
  }
  .hero-title {
    font-size: 2.1rem;
  }
}
