:root {
  color-scheme: dark;
  --ink: #f5f6f2;
  --muted: #9aa39b;
  --panel: #111713;
  --panel-2: #161e19;
  --line: #2a342d;
  --green: #a7f36b;
  --green-strong: #68db72;
  --amber: #ffca70;
  --red: #ff8a7a;
  --bg: #080c09;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 4%, rgba(95, 200, 111, 0.14), transparent 27rem),
    linear-gradient(180deg, #0b100c 0, var(--bg) 38rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
.benchmark-link { display: inline-block; margin-top: 12px; color: var(--green); }
.advanced-inputs { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; }
.advanced-inputs summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.advanced-inputs[open] summary { margin-bottom: 28px; }
.benchmark-section { padding: 72px 0; scroll-margin-top: 30px; }
.benchmark-intro { color: var(--muted); line-height: 1.7; max-width: 850px; }
.benchmark-subheading { margin-top: 44px; }
.adversarial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
#frozen-integrity { overflow-wrap: anywhere; }
button { cursor: pointer; }
input { color: var(--ink); }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #071007; background: var(--green); }
.provider-pill, .run-status { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px rgba(255,202,112,.7); }

.hero { padding: 92px 0 76px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 64px; align-items: end; }
.eyebrow, .card-label { margin: 0 0 12px; color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
h1 { margin: 0; max-width: 760px; font-size: clamp(48px, 7vw, 94px); line-height: .94; letter-spacing: -.065em; }
h1 span { color: var(--green); }
h2 { margin: 0; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.04; letter-spacing: -.045em; }
h3 { margin: 0; font-size: 18px; }
.hero-copy { max-width: 650px; margin: 30px 0 28px; color: #b8c0b9; font-size: 18px; line-height: 1.65; }
.primary-action { display: inline-flex; align-items: center; justify-content: center; gap: 30px; min-height: 56px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--green); color: #071007; font-weight: 800; transition: transform .2s, box-shadow .2s; }
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(127,227,104,.18); }
.primary-action:disabled { cursor: wait; opacity: .58; transform: none; box-shadow: none; }
.action-note { color: #758078; font-size: 12px; }
.principle-card { min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 26px; background: linear-gradient(145deg, rgba(24,34,27,.96), rgba(12,17,13,.96)); box-shadow: 0 24px 80px rgba(0,0,0,.24); }
.principle { margin: 0 0 26px; font-size: 23px; line-height: 1.38; letter-spacing: -.025em; }
.equation-preview { display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px 14px; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.equation-preview strong { color: var(--ink); }.yes { color: var(--green); }.warn { color: var(--amber); }

.input-section { padding: 18px 0 72px; }
.input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.input-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.input-card > div:first-child, .input-card > button { grid-column: 1 / -1; }
.input-card h3 { margin-bottom: 8px; }.input-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.input-card label { display: grid; gap: 7px; min-width: 0; color: #b8c0b9; font-size: 11px; }
.input-card input { width: 100%; min-height: 42px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #0c120e; font-size: 11px; }
.input-card input[type="file"] { color: var(--muted); }.input-card input::file-selector-button { margin-right: 8px; padding: 6px 8px; border: 0; border-radius: 6px; background: #253029; color: var(--ink); cursor: pointer; }
.period-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; grid-column: 1 / -1; }
.secondary-action { min-height: 44px; border: 1px solid rgba(167,243,107,.42); border-radius: 9px; background: rgba(167,243,107,.08); color: var(--green); font-weight: 750; }
.secondary-action:hover { background: rgba(167,243,107,.14); }.secondary-action:disabled { cursor: not-allowed; opacity: .42; }
.input-footnote { margin: 14px 0 0; color: #707a72; font-size: 11px; line-height: 1.5; }

.truth-section, .story-section, .run-section, .dashboard { padding: 72px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 30px; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.6; }
.section-heading.compact { margin-bottom: 22px; }
.source-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.source-card { min-width: 0; padding: 26px; background: rgba(17,23,19,.86); border-right: 1px solid var(--line); }
.source-card:last-child { border-right: 0; }
.source-card::before { content: ""; display: block; width: 34px; height: 3px; margin-bottom: 28px; background: var(--source-color, var(--green)); }
.source-card h3 { margin-bottom: 10px; }.source-card p { min-height: 70px; margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.source-card strong { font-size: 28px; }.source-card > span:last-child { color: var(--muted); font-size: 12px; }
.source-index { float: right; color: #566059; font-family: ui-monospace, monospace; font-size: 11px; }
.source-merchant { --source-color: #a7f36b; }.source-razorpay { --source-color: #7ad5ff; }.source-accounting { --source-color: #c7a6ff; }.source-bank { --source-color: #ffca70; }

.story-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.story-steps li { display: flex; gap: 14px; min-width: 0; padding: 22px 22px 22px 0; border-bottom: 1px solid var(--line); }
.story-steps li:nth-child(3n+2), .story-steps li:nth-child(3n+3) { padding-left: 22px; border-left: 1px solid var(--line); }
.story-steps span { color: var(--green); font-family: ui-monospace, monospace; }.story-steps p { margin: 0; color: var(--muted); line-height: 1.5; }.story-steps strong { color: var(--ink); }

.run-section { margin-top: 40px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.run-header, .run-meta { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.run-header h2 { font-size: 28px; }.run-status { font-weight: 800; letter-spacing: .1em; }
.status-ready { color: var(--muted); }.status-queued, .status-running { color: var(--amber); border-color: rgba(255,202,112,.35); }.status-completed { color: var(--green); border-color: rgba(167,243,107,.35); }.status-failed { color: var(--red); border-color: rgba(255,138,122,.35); }
.progress-track { height: 7px; margin: 24px 0 14px; overflow: hidden; border-radius: 99px; background: #242d26; }
.progress-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--green-strong), var(--green)); transition: width .35s ease; }
.run-meta { color: var(--muted); font-size: 12px; }.run-id { font-family: ui-monospace, monospace; }.run-error { color: var(--red); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.metric-card span { display: block; min-height: 34px; color: var(--muted); font-size: 12px; }.metric-card strong { display: block; margin: 4px 0 10px; font-size: 36px; letter-spacing: -.045em; }.metric-card small { color: #707a72; }.metric-card.accent { border-color: rgba(167,243,107,.28); }.metric-card.warning-card strong { color: var(--amber); }
.control-card { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 30px; margin: 14px 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(90deg, #121a14, #0d120e); }
.control-card h3 { font-size: 16px; }.control-equation { display: flex; gap: 12px; align-items: center; white-space: nowrap; }.control-equation span { color: var(--green); }.control-result { padding: 8px 11px; border-radius: 7px; color: #071007; background: var(--green); font-size: 11px; font-weight: 850; text-transform: uppercase; }

.evidence-grid { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(320px, .78fr); gap: 14px; }
.data-panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); }.panel-heading > span { color: var(--muted); font-size: 12px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; } th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid rgba(42,52,45,.65); } th { color: #707a72; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; } td { color: #bdc5be; } tbody tr { cursor: pointer; transition: background .15s; } tbody tr:hover { background: rgba(167,243,107,.05); } td code { color: var(--ink); font-size: 11px; }
.exception-list { display: grid; gap: 1px; background: var(--line); }.exception-item { width: 100%; padding: 18px 20px; border: 0; background: var(--panel); color: var(--ink); text-align: left; }.exception-item:hover { background: #172019; }.exception-item header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }.reason-tag { color: var(--amber); font-family: ui-monospace, monospace; font-size: 10px; text-transform: uppercase; }.exception-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.ai-section { margin-top: 72px; }.metric-definition { margin: -8px 0 22px; padding: 14px 16px; border-left: 3px solid var(--green); background: rgba(167,243,107,.055); color: var(--muted); font-size: 13px; line-height: 1.55; }.metric-definition strong { color: var(--ink); }
.comparison-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.comparison-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }.comparison-card.ai { border-color: rgba(167,243,107,.45); box-shadow: inset 0 3px var(--green); }.comparison-card.naive { box-shadow: inset 0 3px var(--red); }.comparison-card h3 { margin-bottom: 18px; text-transform: capitalize; }.comparison-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }.comparison-row strong { color: var(--ink); }.false-count { color: var(--red) !important; }.zero-count { color: var(--green) !important; }
.ai-callout { margin-top: 14px; padding: 18px 20px; border-radius: 12px; color: #d8f8c5; background: #18331b; line-height: 1.5; }.ai-cases { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }.case-chip { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 11px; }.case-chip:hover { border-color: var(--green); color: var(--ink); }

.detail-dialog { width: min(820px, calc(100% - 28px)); max-height: 88vh; padding: 0; border: 1px solid #3a473d; border-radius: 18px; background: #0d130f; color: var(--ink); box-shadow: 0 30px 120px #000; }.detail-dialog::backdrop { background: rgba(1,4,2,.78); backdrop-filter: blur(6px); }.dialog-header { position: sticky; top: 0; display: flex; justify-content: space-between; gap: 18px; padding: 24px; border-bottom: 1px solid var(--line); background: #0d130f; z-index: 1; }.dialog-header h2 { font-size: 27px; }.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font-size: 24px; }.detail-body { padding: 24px; }.detail-block { margin-bottom: 22px; }.detail-block h3 { margin-bottom: 10px; font-size: 13px; color: var(--green); text-transform: uppercase; letter-spacing: .08em; }.detail-block p { color: var(--muted); line-height: 1.55; }.financial-equation { padding: 18px; border: 1px solid rgba(167,243,107,.28); border-radius: 10px; background: rgba(167,243,107,.055); color: var(--green); font-family: ui-monospace, monospace; overflow-wrap: anywhere; }.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.record-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }.record-card code { display: block; margin-bottom: 10px; color: var(--ink); overflow-wrap: anywhere; }.record-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 11px; }.record-card dt { color: #6f7a71; }.record-card dd { min-width: 0; margin: 0; color: #c0c8c1; overflow-wrap: anywhere; }.evidence-list { margin: 0; padding-left: 18px; color: var(--muted); }.evidence-list li { margin: 8px 0; line-height: 1.5; }

footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 80px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; } footer span { color: var(--ink); font-weight: 800; } footer p { margin: 0; }

@media (max-width: 900px) {
  .hero-grid, .evidence-grid, .input-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }.principle-card { max-width: 620px; }
  .source-flow, .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.source-card:nth-child(2) { border-right: 0; }.source-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .story-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }.story-steps li:nth-child(n) { padding: 20px 18px 20px 0; border-left: 0; }.story-steps li:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
  .control-card { grid-template-columns: 1fr; gap: 16px; }.control-result { justify-self: start; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }.topbar { width: calc(100% - 24px); min-height: 62px; }.provider-pill { max-width: 58%; padding: 7px 9px; overflow: hidden; }.provider-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding: 54px 0 48px; }.hero-grid { gap: 36px; } h1 { font-size: clamp(46px, 15vw, 68px); }.hero-copy { font-size: 16px; }.primary-action { width: 100%; }
  .truth-section, .story-section, .dashboard { padding: 48px 0; }.input-section { padding-bottom: 48px; }.section-heading { display: block; }.section-heading > p { margin-top: 16px; }
  .source-flow, .metric-grid, .comparison-grid, .record-grid { grid-template-columns: 1fr; }.source-card { border-right: 0; border-bottom: 1px solid var(--line); }.source-card:last-child { border-bottom: 0; }.source-card p { min-height: 0; }
  .story-steps { grid-template-columns: 1fr; }.story-steps li:nth-child(n) { padding: 18px 0; border-left: 0; }
  .run-section { width: calc(100% - 24px); padding: 20px; }.run-header { align-items: flex-start; }.run-header h2 { font-size: 22px; }.run-meta { display: grid; }
  .control-equation { display: grid; grid-template-columns: 1fr auto; white-space: normal; }.control-equation strong { overflow-wrap: anywhere; }
  .panel-heading { align-items: flex-start; }.dialog-header { padding: 18px; }.detail-body { padding: 18px; }
  .input-card { grid-template-columns: 1fr; }.input-card > div:first-child, .input-card > button, .period-grid { grid-column: 1; }
  footer { display: block; } footer p { margin-top: 8px; }
}
