/* Pixforma: security-paper white, passport ink, security-print teal for guides and the main action,
   stamp red only for errors and "not accepted", pass green for checks. One family: Atkinson Hyperlegible Next. */
:root {
  --paper: #f5f7f6; --sheet: #ffffff; --ink: #102a43; --muted: #52667a; --line: #d5dddb;
  --teal: #0e7c86; --teal-ink: #ffffff; --stamp: #b3261e; --pass: #1f7a4d; --amber: #9a5b00;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0c1a28; --sheet: #13263a; --ink: #e6eef5; --muted: #9fb3c6; --line: #2a4258;
          --teal: #3fb6c0; --teal-ink: #062a2e; --stamp: #f08a83; --pass: #6fd39f; --amber: #f2b45c; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.top, .foot, main { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 22px; height: 28px; border: 2px solid var(--ink); border-radius: 3px; position: relative; }
.mark::after { content: ""; position: absolute; left: 4px; right: 4px; top: 5px; height: 11px; border-radius: 50% 50% 45% 45%; border: 2px solid var(--teal); }
.lang { font-weight: 600; }

/* hero: words on the left, the measured frame on the right */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 40px; align-items: start; padding: 24px 0 40px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 20px; } }
h1 { font-size: clamp(30px, 5.2vw, 50px); line-height: 1.08; letter-spacing: -0.02em; margin: 6px 0 14px; font-weight: 800; max-width: 16ch; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 22px; max-width: 46ch; }
.field { display: block; font-weight: 600; margin-bottom: 14px; }
select { display: block; width: 100%; max-width: 420px; margin-top: 6px; padding: 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--sheet); color: var(--ink); font: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px; border-radius: 8px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 17px var(--font); cursor: pointer; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--teal-ink); }
.btn.wide { width: 100%; font-size: 18px; margin: 12px 0 4px; }
.promises { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 4px; }
.promises li { padding-left: 24px; position: relative; }
.promises li::before { content: ""; position: absolute; left: 2px; top: 0.45em; width: 11px; height: 6px; border-left: 2.5px solid var(--pass); border-bottom: 2.5px solid var(--pass); transform: rotate(-45deg); }
.keep { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; color: var(--muted); max-width: 46ch; }

/* the frame: a technical drawing of the document */
.bench { background: var(--sheet); border: 1.5px solid var(--line); border-radius: 14px; padding: 18px 18px 20px; }
.frame { position: relative; max-width: 340px; margin: 0 auto; }
.guides { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.guides .sheet { fill: var(--paper); stroke: var(--ink); stroke-width: 0.25; }
.guides .crop { stroke: var(--ink); stroke-width: 0.3; fill: none; }
.guides .dim path, .guides .head path { stroke: var(--teal); stroke-width: 0.35; fill: none; }
.guides .head .chin { stroke-dasharray: 1 1; }
.guides text { fill: var(--teal); font-size: 2.6px; font-weight: 600; text-anchor: middle; }
.guides .ghost * { fill: none; stroke: var(--muted); stroke-width: 0.35; stroke-dasharray: 1.2 1; }
.photo { position: absolute; display: block; image-rendering: auto; }
.spec-line { text-align: center; color: var(--muted); margin: 10px 0 0; }
.status { min-height: 26px; text-align: center; font-weight: 600; margin: 8px 0 0; }
.status.busy { color: var(--muted); } .status.ok { color: var(--pass); } .status.error { color: var(--stamp); }
.checks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; font-size: 16px; }
.checks li.ok { color: var(--pass); } .checks li.warn { color: var(--amber); } .checks li.error { color: var(--stamp); font-weight: 700; }
.paybox { margin-top: 10px; }

section { padding: 8px 0 18px; }
h2 { font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; margin: 18px 0 12px; }
.rules { width: 100%; border-collapse: collapse; background: var(--sheet); border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.rules th, .rules td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rules tr:last-child th, .rules tr:last-child td { border-bottom: 0; }
.rules th { width: 32%; color: var(--muted); font-weight: 600; }
.rules .self-yes { color: var(--pass); } .rules .self-check { color: var(--amber); }
.steps { padding-left: 22px; max-width: 70ch; } .steps li { margin: 0 0 10px; padding-left: 4px; }
.docs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); border-top: 1px solid var(--line); }
.docs li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.docs span { color: var(--muted); white-space: nowrap; }
details { border-bottom: 1px solid var(--line); padding: 14px 2px; max-width: 75ch; }
summary { font-weight: 600; cursor: pointer; }
details p { margin: 8px 0 0; color: var(--muted); }
.legal { max-width: 70ch; padding: 16px 0 40px; }
.muted { color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .photo:not([hidden]) { animation: develop 600ms ease-out; }
  @keyframes develop { from { opacity: 0; filter: saturate(0.2) brightness(1.15); } to { opacity: 1; filter: none; } }
}
