/* PDFAccess UI
   ---------------------------------------------------------------------------
   Deliberately dependency-free: no CDN fonts, no external stylesheets, no web
   analytics. All visual assets are served with the app; document processing
   stays on the configured server. System fonts avoid third-party requests.

   The interface is also the product's own audience: real focus rings, state
   carried by words as well as colour, contrast held above 4.5:1, and every
   animation switched off under prefers-reduced-motion.
   --------------------------------------------------------------------------- */

:root {
  --bg: #10191c;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f6;
  --border: #e8e8e5;
  --border-strong: #d6d6d1;
  --text: #f1f4ef;
  --text-2: #d0ded9;
  --dim: #afbfba;
  --faint: #a3b5ae;

  --accent: #0b0b0d;
  --accent-soft: #b7e7cf;
  --accent-soft-bg: #e9f7f2;
  --accent-ink: #ffffff;

  --ok: #0f7a49;
  --ok-bg: #e7f6ee;
  --ok-border: #b6e2cc;
  --bad: #b42318;
  --bad-bg: #fdeceb;
  --bad-border: #f2c4c0;
  --warn: #8a5a00;
  --warn-bg: #fdf5e5;
  --warn-border: #ecd7a8;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont,
          Inter, Roboto, Helvetica, Arial, sans-serif;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-1: 0 1px 2px rgba(13, 13, 13, .04), 0 1px 3px rgba(13, 13, 13, .03);
  --shadow-2: 0 4px 12px rgba(13, 13, 13, .06), 0 1px 3px rgba(13, 13, 13, .04);
  --shadow-3: 0 12px 32px rgba(13, 13, 13, .10), 0 2px 8px rgba(13, 13, 13, .05);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --fast: 140ms;
  --med: 260ms;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono { font-family: var(--mono); font-size: .92em; }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.hidden { display: none !important; }

::selection { background: var(--accent-soft); color: #fff; }

/* ---------------------------------------------------------------- top bar */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.logo { font-weight: 650; font-size: 17px; letter-spacing: -.025em; }
.logo-accent { color: var(--accent-soft); }
.tagline { color: var(--dim); font-size: 13px; letter-spacing: -.01em; }
.env {
  color: var(--dim); font-size: 12px; font-family: var(--mono);
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); white-space: nowrap;
}

/* ----------------------------------------------------------------- layout */

.wrap {
  max-width: 980px; margin: 0 auto; padding: 40px 24px 72px;
  display: flex; flex-direction: column; gap: 26px;
  position: relative;
}
/* one soft light source behind the hero — the only decorative flourish */
.wrap::before {
  content: ""; position: absolute; inset: -80px -10% auto -10%; height: 460px;
  background:
    radial-gradient(60% 60% at 22% 0%, color-mix(in srgb, var(--accent-soft) 14%, transparent), transparent 70%),
    radial-gradient(45% 55% at 82% 8%, color-mix(in srgb, #6366f1 10%, transparent), transparent 72%);
  filter: blur(12px); pointer-events: none; z-index: -1;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--med) var(--ease), border-color var(--med) var(--ease);
}
#upload-card { box-shadow: var(--shadow-2); }

h1 { font-size: 30px; line-height: 1.18; margin: 0 0 10px; letter-spacing: -.035em; font-weight: 640; }
h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; font-weight: 620; }
h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--faint); margin: 0 0 12px; font-weight: 650;
}
h4 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.sub { color: var(--dim); margin: 0 0 22px; max-width: 64ch; font-size: 15px; }

/* -------------------------------------------------------------- dropzone */

.dropzone {
  display: block; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: var(--r);
  background: var(--surface-2);
  padding: 40px 24px; text-align: center;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.dropzone:hover { border-color: var(--accent-soft); background: var(--accent-soft-bg); }
.dropzone.dragover {
  border-color: var(--accent-soft); background: var(--accent-soft-bg);
  transform: scale(1.006);
}
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dz-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 19px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--accent-soft); box-shadow: var(--shadow-1);
}
.dz-text { font-size: 15px; }
.dz-hint { color: var(--faint); font-size: 13px; }

.fileinfo {
  margin-top: 18px; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2);
  animation: rise var(--med) var(--ease) both;
}
.fi-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.fi-name { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-size { color: var(--dim); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* -------------------------------------------------------------- controls */

button, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  font: inherit; font-weight: 560; letter-spacing: -.01em;
  border-radius: var(--r-sm); padding: 9px 16px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none; display: inline-block;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease),
              transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease),
              opacity var(--fast) var(--ease);
}
.btn-primary { background: var(--accent); color: var(--bg-elevated); box-shadow: var(--shadow-1); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: .38; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--dim); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--bad-border); }
.btn-danger:hover { background: var(--bad-bg); }

a { color: var(--text); text-underline-offset: 3px; }

/* Focus: always visible, never removed. */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-soft); outline-offset: 2px; border-radius: var(--r-sm);
}
.dropzone:focus-within { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

/* ---------------------------------------------------------------- result */

.work-card { animation: rise var(--med) var(--ease) both; }
.result-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 6px;
}
.result-head h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.outcome-line { color: var(--dim); margin: 0 0 22px; max-width: 76ch; }

.badge {
  font-size: 12px; font-weight: 600; letter-spacing: -.005em;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
}
.badge-pass { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge-fail { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-border); }
.badge-muted { background: var(--surface-2); color: var(--dim); border-color: var(--border); }
.badge-running { background: var(--accent-soft-bg); color: var(--accent-soft); border-color: var(--accent-soft); }
.badge-count {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 999px;
}
.count {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  background: var(--surface-2); padding: 1px 7px; border-radius: 999px; margin-left: 6px;
}

/* metrics */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.metric {
  border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px;
  background: var(--surface-2);
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.metric:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.metric.accent { background: var(--accent-soft-bg); border-color: var(--accent-soft); }
.m-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); font-weight: 620; margin-bottom: 6px;
}
.m-value { font-size: 22px; font-weight: 640; letter-spacing: -.03em; }
.m-value.ok { color: var(--ok); }
.m-value.bad { color: var(--bad); }

/* tag-tree chips */
.structure { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 24px; }
.s-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); font-weight: 620; margin-right: 4px;
}
.chip {
  font-size: 12px; color: var(--dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 11px;
  background: var(--surface);
}
.chip b { color: var(--text); font-weight: 600; font-family: var(--mono); }
.chip-bad { border-color: var(--bad-border); background: var(--bad-bg); color: var(--bad); }
.chip-bad b { color: var(--bad); }

/* ------------------------------------------------------------ progress */

.progress {
  height: 6px; border-radius: 999px; background: var(--surface-2);
  overflow: hidden; margin: 18px 0 12px; border: 1px solid var(--border);
}
.progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-soft), #6366f1);
  background-size: 200% 100%;
  transition: width 600ms var(--ease);
  animation: slide 1.6s linear infinite;
}
.prog-stage { display: flex; align-items: center; gap: 10px; font-weight: 540; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid var(--border-strong); border-top-color: var(--accent-soft);
  animation: spin .8s linear infinite;
}

/* ------------------------------------------------------- review section */

.review {
  margin: 26px 0 6px; padding-top: 24px;
  border-top: 1px solid var(--border);
}
.review-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.review-head h3 { margin: 0; }
.tallies { display: flex; gap: 7px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.tally {
  font-size: 12px; padding: 3px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--dim);
}
.tally b { color: var(--text); font-family: var(--mono); }
.tally.t-open { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.tally.t-open b { color: var(--warn); }
.tally.t-done { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.tally.t-done b { color: var(--ok); }
.tally.t-block { background: var(--bad-bg); border-color: var(--bad-border); color: var(--bad); }
.tally.t-block b { color: var(--bad); }

.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.task {
  border: 1px solid var(--border); border-left: 3px solid var(--border-strong);
  border-radius: var(--r); padding: 16px 18px; background: var(--surface);
  transition: box-shadow var(--med) var(--ease), border-color var(--med) var(--ease);
}
.task:hover { box-shadow: var(--shadow-2); }
.task-open { border-left-color: var(--warn); }
.task-resolved, .task-reviewed { border-left-color: var(--ok); background: var(--surface); }
.task-cannot_fix_from_pdf { border-left-color: var(--bad); }
.task-unknown { border-left-color: var(--faint); }

.task-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.task-title { flex: 1 1 auto; }
.state-tag {
  font-size: 10.5px; font-weight: 660; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: var(--r-sm); white-space: nowrap;
  background: var(--surface-2); color: var(--dim); border: 1px solid var(--border);
}
.state-open { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.state-resolved, .state-reviewed { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-border); }
.state-cannot_fix_from_pdf { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-border); }
.state-unknown { background: var(--surface-2); color: var(--dim); border-color: var(--border-strong); }
.rule-tag {
  font-size: 11px; color: var(--dim); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 2px 8px; background: var(--surface-2);
}
.task-detail { margin: 10px 0 0; color: var(--dim); max-width: 80ch; }
.evidence {
  margin: 10px 0 0; padding: 10px 13px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--dim); word-break: break-word; line-height: 1.5;
}
.blocked-note { margin: 12px 0 0; color: var(--bad); }
.resolved-note { margin: 12px 0 0; color: var(--ok); }
.resolved-note q { color: var(--text); font-style: italic; }

/* figure task */
.fig-task { display: grid; grid-template-columns: 210px 1fr; gap: 22px; margin-top: 14px; align-items: start; }
.fig-preview { margin: 0; }
.fig-preview img {
  width: 100%; max-height: 200px; object-fit: contain; display: block;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 6px; transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease);
}
.fig-preview img:hover { transform: scale(1.02); box-shadow: var(--shadow-2); }
.fig-preview figcaption { margin-top: 6px; color: var(--faint); }
.alt-form { display: flex; flex-direction: column; gap: 7px; }
.alt-label { font-weight: 600; font-size: 13.5px; }
.alt-form textarea {
  font: inherit; padding: 11px 13px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  resize: vertical; min-height: 62px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.alt-form textarea:hover { border-color: var(--dim); }
.alt-form textarea:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 18%, transparent);
  outline: none;
}
.alt-form .dim { margin: 0; }
.alt-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 5px; }
.redo { margin-top: 12px; }
.redo summary {
  cursor: pointer; color: var(--accent-soft); font-size: 13px; width: fit-content;
  list-style: none;
}
.redo summary::-webkit-details-marker { display: none; }
.redo summary::before { content: "＋ "; }
.redo[open] summary::before { content: "－ "; }

.inline-form { display: inline-block; margin-top: 12px; }
.review-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

/* ------------------------------------------------------------- two cols */

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 26px; }
.col { min-width: 0; }
.list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.list li { padding-left: 22px; position: relative; color: var(--text-2); }
.list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--ok); font-weight: 700; font-size: 13px;
}
.engine-line { margin: 14px 0 0; font-size: 11.5px; }

.issues { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.issues li {
  display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap;
  padding: 10px 13px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.issue-id { color: var(--bad); font-weight: 600; }
.issue-desc { color: var(--dim); flex: 1 1 200px; font-size: 13px; }

/* ------------------------------------------------------- notes & footer */

.downloads { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.note {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--dim); font-size: 13.5px;
}
.note.honesty { border-left: 3px solid var(--accent-soft); }
.note.honesty strong { color: var(--text); }
.legal-page > .note { color: #42554d; }
.legal-page > .note strong { color: #173e33; }
html[lang="fi"] h1, html[lang="fi"] h2, html[lang="fi"] h3 {
  hyphens: auto;
  overflow-wrap: anywhere;
}
.warn-note { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.warn-note strong { color: var(--warn); }
.error-banner {
  padding: 14px 16px; border-radius: var(--r);
  background: var(--bad-bg); border: 1px solid var(--bad-border); color: var(--bad);
}
.error-card { border-color: var(--bad-border); }
.messages { margin-top: 16px; font-size: 13px; }
.messages summary { cursor: pointer; color: var(--dim); }
.messages ul { margin: 10px 0 0; padding-left: 20px; color: var(--dim); }

.foot-actions {
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border);
}

/* how-it-works + scope */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.step {
  display: flex; gap: 13px; padding: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r); font-size: 13.5px;
  color: var(--dim);
  transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease);
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.step strong { color: var(--text); font-weight: 600; }
.step-n {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 650;
  background: var(--accent); color: var(--bg-elevated);
}
.scope { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.scope > div {
  padding: 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r);
}
.scope p { margin: 0; color: var(--dim); font-size: 13.5px; }
.foot {
  text-align: center; color: var(--faint); font-size: 12.5px;
  padding: 28px 24px 40px; max-width: 70ch; margin: 0 auto;
}

/* --------------------------------------------------------------- motion */

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { to { background-position: -200% 0; } }

/* HTMX swap transitions */
.htmx-swapping { opacity: 0; transition: opacity 90ms var(--ease); }
.htmx-added { animation: rise var(--med) var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .metric:hover, .step:hover, .btn-primary:hover, .fig-preview img:hover { transform: none; }
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .cols, .scope { grid-template-columns: 1fr; }
  .fig-task { grid-template-columns: 1fr; }
  .fig-preview img { max-height: 240px; }
}
@media (max-width: 620px) {
  .wrap { padding: 26px 16px 56px; }
  .card { padding: 20px; }
  h1 { font-size: 25px; }
  .topbar { padding: 12px 16px; }
  .tagline, .env { display: none; }
  .review-head, .result-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

.eyebrow {
  font-size: 12px; letter-spacing: .04em; color: var(--accent-soft);
  font-weight: 600; margin: 0 0 12px; font-family: var(--mono);
}

/* --- workflow polish --- */
.version-tag { margin-left: 10px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px; background: var(--warn-bg, #fdf5e6); color: var(--warn, #9a6700); vertical-align: middle; }
.env a { color: inherit; margin-right: 14px; text-decoration: underline; }
.structure-note { border-left: 3px solid var(--ok, #1a7f37); }
.guide { max-width: 760px; }
.guide h2 { font-size: 18px; margin: 28px 0 8px; }
.guide h3 { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 18px 0 6px; }
.guide p, .guide li { font-size: 14px; line-height: 1.6; }
.guide table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0 16px; }
.guide th, .guide td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.guide code { font-family: var(--mono); font-size: 12.5px; background: var(--muted-bg); padding: 1px 5px; border-radius: 4px; }
.guide .toc { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; list-style: none; font-size: 13px; }
.brand-link { text-decoration: none; }
.compare-card h1 { font-size: clamp(28px, 4vw, 42px); }
.compare-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.compare-selects label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0; }
.compare-selects select { width: 100%; min-height: 48px; padding: 10px; font: inherit; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; }
select:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; }
.comparison-scope { max-width: 85ch; color: var(--dim); }
.comparison-scope h2 { color: var(--text); }
.comparison-names { overflow-wrap: anywhere; color: var(--dim); margin-bottom: 24px; }
.compare-card h3 { margin-top: 28px; }
.comparison-pages, .comparison-rules { list-style: none; padding: 0; margin: 12px 0; }
.comparison-pages li { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comparison-pages li span { color: var(--dim); }
.comparison-rules li { padding: 18px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.comparison-rules li p { color: var(--dim); margin: 10px 0 0; }
.comparison-hashes dd { font: 12px var(--mono); overflow-wrap: anywhere; margin: 5px 0 15px; }
@media (max-width: 700px) { .compare-selects { grid-template-columns: 1fr; gap: 5px; } }

/* The workspace is paper-light; the surrounding canvas stays quiet and dark. */
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  background: radial-gradient(ellipse at 78% 12%, #253e3d 0, transparent 42%),
              radial-gradient(ellipse at 5% 38%, #1c2d34 0, transparent 38%), var(--bg);
  min-height: 100vh;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background-image: radial-gradient(#c3d9cf30 .7px, transparent .7px);
  background-size: 64px 64px;
  mask-image: linear-gradient(#000, transparent 78%);
}
.topbar { max-width: 1440px; margin: auto; padding: 23px 5%; background: #10191ce8; border-color: #ffffff12; }
.brand { align-items: center; gap: 10px; }
.logo { font-size: 21px; font-weight: 650; }
.logo::before { content: "◈"; color: #b7e7cf; margin-right: 10px; font-size: 25px; vertical-align: -1px; }
.logo-accent { color: inherit; font-weight: 400; }
.version-tag { margin-left: 2px; background: #ffffff09; border: 1px solid #ffffff24; color: #b9cdc4; font: 10px var(--mono); padding: 4px 8px; }
.env { display: flex; align-items: center; gap: 25px; padding: 0; border: 0; background: transparent; font: 13px var(--sans); }
.env a { margin: 0; text-decoration: none; padding: 8px 0; }
.env a:hover { color: #fff; }
.env .nav-start { padding: 9px 17px; border: 1px solid #b7e7cf55; border-radius: 999px; color: #d8f4e5; }
.wrap { max-width: 1180px; padding: 70px 30px 64px; gap: 32px; }
.wrap::before { display: none; }
.hero { display: grid; grid-template-columns: 1fr 1.03fr; align-items: center; gap: 75px; padding: 16px 0 36px; }
.hero-copy { min-width: 0; }
.hero .eyebrow { font: 12px var(--sans); letter-spacing: .01em; }
.signal-dot { display: inline-block; width: 7px; height: 7px; background: #b7e7cf; border-radius: 50%; margin-right: 7px; box-shadow: 0 0 16px #b7e7cf50; }
.hero h1 { font-size: clamp(46px, 5.8vw, 78px); line-height: 1.04; font-weight: 500; letter-spacing: -.065em; margin: 25px 0; }
.hero h1 span { color: #b7e7cf; }
.hero-description { font-size: 20px; line-height: 1.5; color: #dfebe5; margin: 0 0 16px; letter-spacing: -.02em; }
.hero-detail { max-width: 35ch; color: #afbfba; font-size: 14px; line-height: 1.8; margin: 0 0 25px; }
.text-link { color: #d0e6db; text-decoration: none; font-size: 13px; border-bottom: 1px solid #d0e6db50; padding-bottom: 6px; }
.text-link span { margin-left: 15px; }
.card {
  color-scheme: light;
  --text: #172c28; --text-2: #344d46; --dim: #556860; --faint: #596d65;
  --bg: #fff; --bg-elevated: #fff; --surface: #fff; --surface-2: #f3f6f3;
  --border: #dce5df; --border-strong: #8b9e94;
  --accent: #173e33; --accent-soft: #246650; --accent-soft-bg: #eaf4ee;
  --ok: #17613d; --ok-bg: #e9f5ec; --ok-border: #afcbb8;
  --warn: #815000; --warn-bg: #fff5e3; --warn-border: #dfc392;
  --bad: #b42318; --bad-bg: #fff0ed; --bad-border: #e5b9b2;
  color: var(--text); border: 1px solid #ffffff40; border-radius: 22px;
  box-shadow: 0 20px 65px #00000024;
}
#upload-card { padding: 30px; box-shadow: 0 25px 80px #00000030, 0 0 80px #b7e7cf08; position: relative; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.workspace-heading .eyebrow { font: 10px var(--mono); letter-spacing: .12em; margin: 0; color: #52695d; }
.workspace-step { color: #64756e; font: 11px var(--mono); }
#upload-title { font-size: 25px; font-weight: 600; letter-spacing: -.045em; margin-bottom: 5px; }
#upload-card .sub { font-size: 13px; margin-bottom: 22px; }
.dropzone { position: relative; padding: 24px 16px; border: 1.5px dashed #93aa9a; border-radius: 15px; background: #f4f8f4; overflow: hidden; }
.dropzone:hover, .dropzone.dragover { background: #eaf4ed; border-color: #246650; }
.dropzone.dragover { transform: translateY(-3px); box-shadow: 0 8px 25px #275c3620; }
.file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.dropzone:focus-within { outline: 3px solid #246650; outline-offset: 4px; }
.dz-inner { gap: 6px; pointer-events: none; }
.document-orbit { position: relative; width: 142px; height: 114px; display: grid; place-items: center; margin-bottom: 4px; }
.orbit-ring { position: absolute; width: 138px; height: 84px; border: 1px solid #a9bfaf80; border-radius: 50%; transform: rotate(-25deg); }
.orbit-ring::before { content: ""; position: absolute; width: 8px; height: 8px; background: #357b59; border: 2px solid #f4f8f4; border-radius: 50%; left: 7px; top: 16px; }
.document-icon { position: relative; filter: drop-shadow(0 7px 7px #173e3315); transition: transform 220ms ease; }
.document-icon path:first-child { fill: #fff; stroke: #9aae9c; stroke-width: 1.5; }
.document-icon path { stroke: #71927d; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.document-icon circle { fill: #173e33; stroke: #fff; stroke-width: 2; }
.document-icon path:last-child { stroke: #fff; }
.dropzone:hover .document-icon { transform: translateY(-4px) rotate(-3deg); }
.dropzone.has-file .document-icon { animation: document-arrive 650ms var(--ease) both; }
.dropzone.has-file { border-style: solid; background: #eef6ef; }
.dropzone.is-busy { cursor: wait; opacity: .65; }
.dz-text { font-size: 16px; letter-spacing: -.025em; }
.browse-label { color: #285d43; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.dz-hint { margin-top: 9px; font-size: 11px; color: #556860; }
.selection-message { font-size: 12px; margin: 12px 0 0; color: #285d43; min-height: 0; }
.selection-message:empty { display: none; }
.selection-message.is-error { color: #b42318; }
.fileinfo { padding: 14px; margin-top: 15px; background: #fff; border-color: #d5e1d9; }
.fi-row { align-items: center; gap: 10px; }
.file-badge { font: 9px var(--mono); padding: 6px; color: #285d43; background: #edf5ee; border: 1px solid #c6dacb; border-radius: 5px; }
.fi-name { flex: 1; min-width: 0; font-size: 13px; }
.fi-size { flex: none; font-size: 11px; }
.fileinfo .actions { flex-wrap: nowrap; }
button, .btn-primary, .btn-secondary, .btn-ghost, .btn-danger { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
#run-btn { flex: 1; font-size: 12px; }
#reset-btn { font-size: 11px; padding: 9px 10px; }
.btn-primary { background: #173e33; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #245743; box-shadow: 0 5px 12px #173e3320; }
.workspace-trust { display: flex; align-items: center; gap: 12px; padding-top: 20px; }
.workspace-trust > span { font-size: 27px; color: #3f6b51; }
.workspace-trust p { margin: 0; font-size: 11px; line-height: 1.7; color: #53695d; }
.workspace-caption { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0 20px; border-bottom: 1px solid #afbfba30; font: 10px var(--mono); letter-spacing: .09em; color: #b9cbc2; }
.workspace-caption span:last-child { text-transform: none; letter-spacing: 0; color: #adbbb5; }
.connection-message { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px 25px; }
.connection-message p { margin: 0; flex: 1 1 240px; }
#work:empty { display: none; }
.steps { gap: 24px; margin-top: -6px; }
.step { background: transparent; border: none; padding: 8px 0 20px; gap: 12px; color: #afbfba; box-shadow: none; }
.step:hover { transform: none; box-shadow: none; }
.step-n { border: 1px solid #718d7e; color: #d4ebdf; background: transparent; border-radius: 8px; width: 30px; height: 30px; font: 11px var(--mono); }
.step strong { display: block; font-size: 14px; color: #ecf2ee; margin-bottom: 3px; }
.step br { display: none; }
.scope { padding-top: 22px; border-top: 1px solid #afbfba30; gap: 60px; }
.scope > div { border: 0; background: transparent; padding: 0; }
.scope h3 { color: #d4e8dc; font-size: 11px; }
.scope p { font-size: 13px; line-height: 1.8; color: #afbfba; }
.foot { max-width: 850px; color: #adbbb5; font-size: 12px; padding-top: 0; }
.work-card { padding: 32px; scroll-margin-top: 105px; }
.work-card:focus { outline: 2px solid #92c3a2; outline-offset: 5px; }
.result-head { padding-bottom: 12px; }
.result-head h2 > span { overflow-wrap: anywhere; font-size: 12px; font-weight: 400; }
.result-shortcuts { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0 24px; }
.result-shortcuts a { background: #f0f5f1; border: 1px solid #bdcfc2; border-radius: 8px; padding: 10px 14px; font-size: 12px; text-decoration: none; color: #244e37; }
.result-shortcuts a:hover { background: #e2efe5; }
.review-head h3 { font-size: 18px; letter-spacing: -.025em; color: #173e33; text-transform: none; }
.task { box-shadow: none; }
.task:hover { box-shadow: none; }
.task-title { font-size: 16px; }
.downloads { padding: 22px 0; border-top: 1px solid #dce5df; border-bottom: 1px solid #dce5df; }
.upload-transfer { padding-top: 18px; font-size: 12px; color: #245743; }
progress { accent-color: #2a7654; }
.stage-progress, #transfer-progress { display: block; width: 100%; height: 7px; margin: 20px 0; border: 0; border-radius: 9px; overflow: hidden; background: #e5ece6; }
progress::-webkit-progress-bar { background: #e5ece6; border-radius: 9px; }
progress::-webkit-progress-value { background: #387b57; border-radius: 9px; transition: width 300ms ease; }
progress::-moz-progress-bar { background: #387b57; border-radius: 9px; }
.processing-stages { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: 25px 0; gap: 12px; }
.processing-stages li { color: #657369; font-size: 12px; padding-top: 12px; border-top: 2px solid #dce5df; }
.processing-stages li span { font: 10px var(--mono); display: block; margin-bottom: 5px; }
.processing-stages .stage-reached { border-color: #387b57; color: #234f36; }
.progress-card { animation: none; }
.spinner { animation-iteration-count: 4; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: #fff; color: #173e33; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.guide { max-width: none; padding: 40px; }
.guide > p, .guide > ul, .guide > ol { max-width: 85ch; }
.guide table { overflow-wrap: anywhere; }
.guide h1 { font-size: clamp(27px, 4vw, 42px); }
.guide h2 { scroll-margin-top: 100px; }
@keyframes document-arrive { 0% { transform: translateY(-8px) rotate(-8deg); } 55% { transform: translateY(3px) rotate(3deg); } 100% { transform: none; } }
@media (max-width: 960px) {
  .hero { gap: 35px; grid-template-columns: 1fr 1.1fr; }
  .hero h1 { font-size: 57px; }
  .env { gap: 16px; }
  .env .nav-start { display: none; }
  #upload-card { padding: 23px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .topbar { position: relative; padding: 18px 20px; flex-wrap: wrap; gap: 12px; }
  .env { display: flex; font-size: 12px; gap: 20px; white-space: normal; }
  .wrap { padding: 26px 20px 45px; gap: 24px; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding: 10px 0 14px; }
  .hero h1 { font-size: clamp(46px, 11vw, 65px); margin: 18px 0; }
  .hero h1 br:nth-of-type(2) { display: none; }
  .hero h1 span::before { content: " "; }
  .hero-description { font-size: 18px; }
  .hero-detail { max-width: 48ch; margin-bottom: 16px; }
  .hero-copy .hero-detail, .hero-copy .text-link { display: none; }
  .workspace-heading { margin-bottom: 18px; }
  .scope { gap: 26px; grid-template-columns: 1fr; }
  .work-card, .guide { padding: 23px; }
  .workspace-caption { font-size: 9px; letter-spacing: .02em; }
  .processing-stages { grid-template-columns: repeat(2, 1fr); }
  .result-head .badge { white-space: normal; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric.accent { grid-column: 1 / -1; }
  .downloads { align-items: stretch; flex-direction: column; }
}
@media (max-width: 380px) {
  .version-tag { display: none; }
  .steps { grid-template-columns: 1fr; }
  .fileinfo .actions { flex-wrap: wrap; }
  #run-btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .dropzone:hover .document-icon, .dropzone.dragover { transform: none; }
}
@media (forced-colors: active) {
  .card, .dropzone, .btn-primary, .btn-secondary, .task { border: 1px solid CanvasText; }
  .document-orbit { display: none; }
  a:focus-visible, button:focus-visible, .dropzone:focus-within { outline-color: Highlight; }
}
.task-technical { margin-top: 12px; font-size: .875rem; }
.task-technical summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.task-technical p, .file-hash { overflow-wrap: anywhere; }
.env { flex-wrap: wrap; }

/* Public Early Access funnel */
.marketing-nav .brand { color: inherit; text-decoration: none; }
.language-switch { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #ffffff24; border-radius: 7px; font: 11px var(--mono); }
.language-switch strong { color: #8ed3ad; }
.public-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr); gap: clamp(40px, 7vw, 110px); align-items: center; padding-top: clamp(62px, 9vw, 132px); padding-bottom: clamp(70px, 10vw, 145px); }
.public-hero .hero-copy { padding: 0; }
.public-hero h1 { max-width: 780px; margin: 20px 0 25px; font-size: clamp(52px, 6.2vw, 94px); line-height: .94; letter-spacing: -.065em; }
.public-hero h1 span { color: #8ed3ad; }
.public-hero .hero-description { font-size: clamp(20px, 2vw, 28px); line-height: 1.35; }
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.hero-actions a { display: inline-flex; text-decoration: none; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0; margin: 28px 0 0; list-style: none; color: #bed0c5; font-size: 12px; }
.trust-row li::before { content: "✓"; color: #8ed3ad; margin-right: 8px; }
.upload-card { width: 100%; min-width: 0; }
.public-section { padding-top: clamp(70px, 9vw, 130px); padding-bottom: clamp(70px, 9vw, 130px); }
.public-section > h2, .public-section .wrap > h2 { max-width: 820px; margin: 12px 0 40px; color: #f3f8f5; font-size: clamp(34px, 4.5vw, 62px); line-height: 1.04; letter-spacing: -.045em; }
.section-lead { max-width: 850px; color: #c9d7cf; font-size: 19px; line-height: 1.7; }
.tinted { background: #13251f; border-top: 1px solid #ffffff12; border-bottom: 1px solid #ffffff12; }
.three-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.three-steps article, .split-work article { padding: 30px; border: 1px solid #ffffff18; border-radius: 16px; background: #ffffff08; }
.three-steps span, .column-label { color: #8ed3ad; font: 11px var(--mono); letter-spacing: .12em; }
.three-steps h3, .split-work h3 { margin: 40px 0 12px; color: #f3f8f5; font-size: 22px; }
.three-steps p, .split-work li { color: #bdcbc3; line-height: 1.65; }
.split-work { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 44px; }
.split-work h3 { margin-top: 16px; }
.split-work ul { padding-left: 20px; }
.column-label.human { color: #e8c980; }
.value-card { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid #ffffff1c; border-radius: 18px; }
.value-card > div { display: flex; min-height: 190px; padding: 28px; border-right: 1px solid #ffffff1c; flex-direction: column; justify-content: flex-end; }
.value-card > div:last-child { border-right: 0; }
.value-card span, .value-card small { color: #afc0b6; }
.value-card strong { margin: 20px 0 4px; color: #f4f8f5; font-size: clamp(34px, 4vw, 58px); letter-spacing: -.05em; }
.benchmark-note { max-width: 90ch; color: #aebfb5; font-size: 12px; line-height: 1.6; }
.faq-section { background: #f6f8f6; color: #18372d; }
.faq-section .wrap { padding-top: 0; padding-bottom: 0; }
.faq-section .eyebrow { color: #387b57; }
.faq-section .wrap > h2 { color: #18372d; }
.narrow { max-width: 920px; }
.faq-section details { padding: 20px 0; border-top: 1px solid #cad7cf; }
.faq-section details:last-child { border-bottom: 1px solid #cad7cf; }
.faq-section summary { cursor: pointer; font-size: 18px; font-weight: 650; }
.faq-section details p { max-width: 75ch; color: #50665b; line-height: 1.65; }
.paywall-card { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 24px; margin: 30px 0; padding: 28px; border: 1px solid #acd5bd; border-radius: 14px; background: #eff8f2; overflow-wrap: anywhere; }
.paywall-card > *, .result-head > *, .metrics > * { min-width: 0; }
.unlock-price button { white-space: normal; overflow-wrap: anywhere; }
.paywall-card h3 { margin: 5px 0 8px; color: #163c2c; font-size: 24px; }
.preview-counts { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 22px 0 0; }
.preview-counts div { min-width: 120px; }
.preview-counts dt { color: #42554d; font-size: 11px; }
.preview-counts dd { margin: 3px 0; font: 21px var(--mono); color: #173e33; }
.unlock-price { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-left: 24px; border-left: 1px solid #bddac8; }
.unlock-price > strong { color: #173e33; font-size: 44px; letter-spacing: -.05em; }
.unlock-price .btn-primary { width: 100%; }
.unlock-price small { color: #42554d; }
.purchase-consent { display: flex; gap: 9px; align-items: flex-start; margin: 5px 0 12px; color: #334b40; font-size: 13px; line-height: 1.45; }
.purchase-consent input { flex: 0 0 auto; margin-top: 3px; }
.purchase-consent a { color: inherit; font-weight: 700; }
.legal-page { max-width: 900px; padding-top: 80px; }
.legal-page > h1 { color: #f3f8f5; font-size: clamp(38px, 6vw, 68px); letter-spacing: -.05em; }
.price-hero { margin: 30px 0; padding: 35px; border: 1px solid #ffffff20; border-radius: 18px; }
.price-hero strong { display: block; color: #8ed3ad; font-size: 72px; letter-spacing: -.06em; }
.price-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 30px; margin: 35px 0; padding-left: 20px; color: #c9d7cf; }
.legal-page table { width: 100%; margin: 30px 0; border-collapse: collapse; color: #e8f0eb; }
.legal-page caption { margin-bottom: 10px; text-align: left; font-weight: 650; }
.legal-page th, .legal-page td { padding: 13px; border-bottom: 1px solid #ffffff1c; text-align: left; }
.legal-page .card table { color: var(--text); }
.legal-page .card th, .legal-page .card td { border-color: var(--border); }
.foot nav { display: inline-flex; gap: 15px; margin: 0 18px; }
@media (max-width: 900px) {
  .public-hero { grid-template-columns: minmax(0, 1fr); }
  .public-hero .hero-copy { max-width: 760px; }
  .three-steps, .value-card { grid-template-columns: 1fr; }
  .value-card > div { min-height: 145px; border-right: 0; border-bottom: 1px solid #ffffff1c; }
  .value-card > div:last-child { border-bottom: 0; }
}
@media (max-width: 700px) {
  .public-hero { padding-top: 55px; }
  .public-hero h1 { font-size: clamp(48px, 14vw, 66px); }
  .public-hero .hero-detail { display: block; }
  .split-work, .paywall-card, .price-benefits { grid-template-columns: 1fr; }
  .unlock-price { padding: 20px 0 0; border-left: 0; border-top: 1px solid #bddac8; }
  .public-section { padding-left: 20px; padding-right: 20px; }
  .public-section.tinted, .public-section.faq-section { padding-left: 0; padding-right: 0; }
}
