:root {
  --bg: #fbfbfc; --surface: #ffffff; --surface-2: #f4f5f7; --surface-3: #eceef1;
  --text: #0f1216; --text-2: #3b424d; --muted: #6b7380; --line: #e7e9ed; --line-2: #d9dce2;
  --accent: #0d7a63; --accent-2: #0a6552; --accent-soft: #e6f4f0; --ring: rgba(13,122,99,.28);
  --ok: #157f3c; --ok-soft: #e7f5ec; --warn: #9a5800; --warn-soft: #fdf3e2; --bad: #b42318; --bad-soft: #fdecea;
  --shadow-sm: 0 1px 2px rgba(15,18,22,.05);
  --shadow: 0 1px 2px rgba(15,18,22,.04), 0 8px 24px -8px rgba(15,18,22,.10);
  --shadow-lg: 0 1px 2px rgba(15,18,22,.04), 0 24px 48px -16px rgba(15,18,22,.16);
  --doc-filter: none;
  --grid: rgba(15,18,22,.045);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10; --surface: #121519; --surface-2: #181c21; --surface-3: #1f242a;
    --text: #eceef1; --text-2: #c3c8d0; --muted: #8b93a0; --line: #22272e; --line-2: #2e343c;
    --accent: #3fcca8; --accent-2: #5ad8b8; --accent-soft: #0f2a24; --ring: rgba(63,204,168,.35);
    --ok: #4ccb7a; --ok-soft: #0f2418; --warn: #f0b04a; --warn-soft: #2a2011; --bad: #f2776c; --bad-soft: #2b1512;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.5);
    --shadow-lg: 0 1px 2px rgba(0,0,0,.35), 0 24px 48px -16px rgba(0,0,0,.6);
    --doc-filter: brightness(.86) contrast(1.02);
    --grid: rgba(255,255,255,.035);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d10; --surface: #121519; --surface-2: #181c21; --surface-3: #1f242a;
  --text: #eceef1; --text-2: #c3c8d0; --muted: #8b93a0; --line: #22272e; --line-2: #2e343c;
  --accent: #3fcca8; --accent-2: #5ad8b8; --accent-soft: #0f2a24; --ring: rgba(63,204,168,.35);
  --ok: #4ccb7a; --ok-soft: #0f2418; --warn: #f0b04a; --warn-soft: #2a2011; --bad: #f2776c; --bad-soft: #2b1512;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -8px rgba(0,0,0,.5);
  --shadow-lg: 0 1px 2px rgba(0,0,0,.35), 0 24px 48px -16px rgba(0,0,0,.6);
  --doc-filter: brightness(.86) contrast(1.02);
  --grid: rgba(255,255,255,.035);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
code { font: 500 .86em "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--text); letter-spacing: -.011em; }
.brand:hover { color: var(--text); }
.logo { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(160deg, var(--accent) 0%, var(--accent-2) 100%); position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), var(--shadow-sm); }
.logo::after { content: ""; position: absolute; left: 7.5px; top: 4.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
nav a { color: var(--text-2); padding: 6px 10px; border-radius: 8px; font-weight: 500; transition: background .15s, color .15s; }
nav a:hover { color: var(--text); background: var(--surface-2); }
nav a.nav-cta { color: var(--surface); background: var(--text); }
nav a.nav-cta:hover { color: var(--surface); background: var(--text-2); }

/* Hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000 30%, transparent 75%);
}
.hero::after { content: ""; position: absolute; z-index: -1; width: 640px; height: 320px; left: 50%; top: -160px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--accent-soft), transparent); opacity: .9; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 5px 12px 5px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 500; color: var(--text-2); }
.eyebrow.plain { border: 0; background: none; box-shadow: none; padding: 0; margin: 0 0 8px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px transparent; opacity: .6; } }
h1 { font-size: clamp(36px, 6.4vw, 60px); line-height: 1.04; letter-spacing: -.035em; font-weight: 650; margin: 0 0 18px; }
.h1-soft { color: var(--muted); }
.lede { font-size: clamp(16px, 2.1vw, 18.5px); line-height: 1.55; color: var(--text-2); max-width: 600px; margin: 0; letter-spacing: -.006em; }
.pipeline { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 28px 0 0; font-size: 14px; color: var(--text-2); font-weight: 500; }
.pipeline li { display: flex; align-items: center; gap: 9px; }
.pn { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-variant-numeric: tabular-nums; }

h2 { font-size: 18px; font-weight: 600; letter-spacing: -.015em; margin: 0; }
.h2-lg { font-size: clamp(26px, 3.6vw, 34px); letter-spacing: -.03em; line-height: 1.15; }
h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 8px; }

/* Try */
.try { padding: 22px; scroll-margin-top: 76px; }
.try-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .18s, box-shadow .18s, transform .18s; min-width: 0; -webkit-tap-highlight-color: transparent; }
.tile:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.tile:focus-visible, .drop:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); outline: none; }
.tile:active { transform: translateY(0) scale(.99); }
.tile[aria-busy="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.thumb { display: block; height: 116px; border-radius: 7px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; filter: var(--doc-filter); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.tile:hover .thumb img { transform: scale(1.03); }
.t-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; min-width: 0; }
.t-name { font-weight: 600; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { flex: none; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.bad { background: var(--bad-soft); color: var(--bad); }
.drop { align-items: center; justify-content: center; text-align: center; border-style: dashed; border-color: var(--line-2); background: var(--surface-2); color: var(--muted); gap: 6px; min-height: 172px; }
.drop:hover { background: var(--surface); }
.drop .t-name { color: var(--text); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--accent); box-shadow: var(--shadow-sm); margin-bottom: 4px; }
.privacy { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.privacy svg { flex: none; margin-top: 2px; color: var(--accent); }
.privacy strong { color: var(--text); font-weight: 600; }
button:disabled, .tile[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* Result */
.result { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; margin-top: 20px; align-items: start; scroll-margin-top: 76px; }
.doc { padding: 10px; position: sticky; top: 76px; }
.doc img { width: 100%; display: block; border-radius: 8px; background: #fff; filter: var(--doc-filter); border: 1px solid var(--line); }
.verdict { padding: 22px; min-height: 260px; }
.verdict.is-error { min-height: 0; }
.reveal > * { animation: rise .32s cubic-bezier(.2,.7,.2,1) both; }
.reveal > *:nth-child(2) { animation-delay: .04s; } .reveal > *:nth-child(3) { animation-delay: .08s; }
.reveal > *:nth-child(4) { animation-delay: .12s; } .reveal > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.banner { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 12px; border: 1px solid transparent; }
.banner.pass { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 18%, transparent); }
.banner.review { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 18%, transparent); }
.banner.review.hard { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 18%, transparent); }
.b-icon { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: currentColor; }
.b-icon svg { color: var(--surface); }
.b-title { font-weight: 650; font-size: 17px; letter-spacing: -.015em; line-height: 1.3; }
.b-sub { color: var(--text-2); font-size: 14px; margin-top: 1px; }

.section-t { display: flex; align-items: baseline; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 22px 0 6px; }
.section-t .note { text-transform: none; letter-spacing: 0; font-weight: 500; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checks li:last-child { border-bottom: none; }
.checks b { font-weight: 600; display: block; letter-spacing: -.005em; }
.checks .r { color: var(--text-2); display: block; margin-top: 1px; }
.checks li.pass .r { color: var(--muted); }
.si { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; margin-top: 0; }
.si svg { width: 12px; height: 12px; }
.si.pass { background: var(--ok-soft); color: var(--ok); } .si.warn { background: var(--warn-soft); color: var(--warn); } .si.fail { background: var(--bad-soft); color: var(--bad); }
.checks.exceptions li, .checks.exceptions li:last-child { padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.checks.exceptions li.fail, .checks.exceptions li.fail:last-child { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }
.checks.exceptions li.warn, .checks.exceptions li.warn:last-child { border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); }

details.passed { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; }
details.passed > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 11px 14px; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); border-radius: 10px; }
details.passed > summary::-webkit-details-marker { display: none; }
details.passed > summary:hover { background: var(--surface-2); }
details.passed > summary .chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
details.passed[open] > summary .chev { transform: rotate(180deg); }
details.passed .checks { padding: 0 14px 4px; }

.fields { width: 100%; border-collapse: collapse; font-size: 14px; }
.fields td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.fields tr:last-child td { border-bottom: none; }
.fields td:first-child { color: var(--muted); width: 42%; padding-right: 12px; }
.fields td:last-child { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--text); overflow-wrap: break-word; }
.conf { font-size: 11.5px; font-weight: 600; margin-left: 6px; color: var(--warn); }

.hitl { margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn { font: inherit; font-size: 14px; font-weight: 500; min-height: 40px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--surface-2); }
.btn.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.done-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

details.raw { margin-top: 18px; font-size: 13px; }
details.raw > summary { cursor: pointer; color: var(--muted); font-weight: 500; padding: 10px 0; min-height: 44px; display: flex; align-items: center; }
details.raw > summary:hover { color: var(--text); }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow: auto; max-height: 340px; margin: 0; font: 12px/1.6 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); }
.meta { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta span + span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); margin-right: 10px; }

/* Loading */
.loading { display: grid; place-items: center; min-height: 260px; color: var(--muted); }
.loading-in { width: min(320px, 100%); }
.loading-title { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; margin-bottom: 12px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--muted); opacity: .55; transition: opacity .2s, color .2s; }
.steps li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.steps li.on { opacity: 1; color: var(--text); } .steps li.on::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.steps li.done { opacity: .9; } .steps li.done::before { border-color: var(--ok); background: var(--ok); }
.loading-hint { font-size: 12.5px; margin-top: 10px; }
.error { padding: 16px; border-radius: 12px; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 22%, transparent); }
.error b { display: block; color: var(--bad); font-weight: 600; margin-bottom: 2px; }
.error p { margin: 0; color: var(--text-2); font-size: 14px; }
.error a { font-weight: 600; }

/* How */
.how { margin: 88px 0 24px; scroll-margin-top: 76px; }
.flow { list-style: none; padding: 0; margin: 24px 0 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); counter-reset: s; overflow: hidden; }
.flow li { position: relative; padding: 16px 18px 16px; font-size: 13px; color: var(--muted); counter-increment: s; }
.flow li + li { border-left: 1px solid var(--line); }
.flow li::before { content: "0" counter(s); display: block; font: 500 11.5px "JetBrains Mono", ui-monospace, monospace; color: var(--accent); margin-bottom: 8px; letter-spacing: .02em; }
.flow li b { display: block; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 2px; }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -5px; top: 22px; width: 9px; height: 9px; background: var(--surface); border-top: 1px solid var(--line-2); border-right: 1px solid var(--line-2); transform: rotate(45deg); z-index: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow-sm); }
.grid2 p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.grid2 p.lead { color: var(--text-2); font-weight: 500; margin-bottom: 8px; }

.foot { border-top: 1px solid var(--line); padding: 24px 0 calc(32px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); margin-top: 56px; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result { grid-template-columns: 1fr; }
  .doc { position: static; }
  .doc img { max-height: 240px; object-fit: cover; object-position: top; }
  .flow { grid-template-columns: 1fr; }
  .flow li + li { border-left: 0; border-top: 1px solid var(--line); }
  .flow li::before { display: inline-block; margin: 0 10px 0 0; }
  .flow li b { display: inline; }
  .flow li span { display: block; margin-top: 2px; padding-left: 30px; }
  .flow li:not(:last-child)::after { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .how { margin-top: 64px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  nav a:not(.nav-cta) { display: none; }
  .hero { padding: 44px 0 28px; }
  .eyebrow { font-size: 12.5px; margin-bottom: 16px; }
  .pipeline { flex-direction: column; gap: 10px; margin-top: 22px; }
  .try { padding: 14px; }
  .thumb { height: 92px; }
  .t-row { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 2px; }
  .drop { min-height: 150px; }
  .verdict { padding: 16px; }
  .fields td:first-child { width: 38%; }
  .btn { min-height: 44px; flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
