/* FixMyPassportPhoto — layout: single column, phone first; a two-column "original / fixed" preview on wide screens */
:root {
  --paper: #f7f5f0;
  --ink: #16213a;
  --ink-soft: #4a5570;
  --line: #d9d4c7;
  --card: #ffffff;
  --accent: #1f4e9c;      /* passport blue */
  --accent-ink: #ffffff;
  --pass: #1f7a4d;
  --pass-bg: #e6f4ec;
  --fix: #9a6200;
  --fix-bg: #fff4dc;
  --fail: #b3261e;
  --fail-bg: #fde8e6;
  --radius: 10px;
  --font: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
input[type=range] {width:100%;min-height:44px;margin-block:8px 16px;accent-color:var(--accent);}
input[type=range]:focus-visible {outline:3px solid #ffbf47;outline-offset:2px;}
.eyebrow {font-size:.8rem;letter-spacing:.12em;font-weight:700;color:var(--accent);}
.shell {max-width:880px;margin:0 auto;padding-inline:16px;}
.site-header {display:flex;justify-content:space-between;padding-block:20px;border-bottom:1px solid var(--line);}
.site-footer {border-top:1px solid var(--line);padding-block:24px;font-size:.9rem;}
.footer-grid {display:grid;grid-template-columns:2fr 1fr 1fr;gap:24px;}
.footer-grid a {display:block;overflow-wrap:anywhere;}
.footer-grid h2 {font-size:1rem;}
@media(max-width:600px){.footer-grid{grid-template-columns:1fr}.check{grid-template-columns:28px 1fr}.check .tag{grid-column:2;justify-self:start;}}
.drop:focus-visible {outline:3px solid #ffbf47;outline-offset:3px;}
#progress {overflow-wrap:anywhere;}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
img, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 2.2vw + 1.2rem, 2.6rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 880px; margin: 0 auto; padding-inline: 16px; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; letter-spacing: -.01em; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.brand span { color: var(--accent); }
.site-head nav { display:flex; flex-wrap:wrap; gap:8px 14px; }
.site-head nav a { font-size: .95rem; text-decoration: none; color: var(--ink-soft); padding-block:8px; }
@media(max-width:600px) { .site-head {align-items:flex-start;flex-direction:column;} }

/* hero */
.hero { padding-block: 36px 20px; }
.hero p.lead { font-size: 1.15rem; max-width: 60ch; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--radius); border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.05rem;
  background: var(--accent); color: var(--accent-ink);
  min-height: 48px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.hero .note { margin-top: 10px; }

/* steps */
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-block: 10px 26px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step b { display: block; margin-bottom: 4px; }

/* uploader */
.drop {
  border: 2px dashed var(--accent); border-radius: var(--radius); background: #eef3fb;
  padding: 26px 16px; text-align: center; cursor: pointer;
}
.drop.busy { opacity: .7; }
.drop.drag-active {background:#dce8fa;border-style:solid;box-shadow:0 0 0 3px #1f4e9c33;}
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.progress { margin-top: 12px; font-size: .95rem; color: var(--ink-soft); min-height: 1.4em; }

/* results */
.results { display: none; margin-top: 20px; }
.results.show { display: block; }
.checks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.check { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }
.check .mark { font-weight: 800; font-size: 1.1rem; width: 28px; text-align: center; }
.check.pass { border-color: #bfe3cf; } .check.pass .mark { color: var(--pass); }
.check.fix { background: var(--fix-bg); border-color: #f0d49a; } .check.fix .mark { color: var(--fix); }
.check.fail { background: var(--fail-bg); border-color: #f3b8b3; } .check.fail .mark { color: var(--fail); }
.check .tag { font-size: .8rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.check.fix .tag { background: #ffe3a8; color: var(--fix); }
.check.fail .tag { background: #f8cfcb; color: var(--fail); }
.check.pass .tag { background: #cdeedb; color: var(--pass); }
.check .why { font-size: .92rem; color: var(--ink-soft); margin-top: 2px; }
.verdict { padding: 14px 16px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 600; }
.verdict.ok { background: var(--pass-bg); color: var(--pass); }
.verdict.retake { background: var(--fail-bg); color: var(--fail); }

.compare { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; align-items: start; }
.compare figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.compare figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 6px; }
.compare canvas { width: 100%; aspect-ratio: 1 / 1; border-radius: 6px; background: #ddd; }
@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } }

.buy { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.buy .price { font-size: 1.5rem; font-weight: 800; }
.buy label { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: .97rem; }
.buy input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.switch { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; font-size: .97rem; }
.switch input { width: 20px; height: 20px; }
.paid { background: var(--pass-bg); border-color: #bfe3cf; }
.dl { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

/* sections */
section.block { padding-block: 26px; border-top: 1px solid var(--line); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 2px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 22px 40px; font-size: .9rem; color: var(--ink-soft); }
.site-foot a { color: var(--ink-soft); margin-right: 14px; }
.site-foot .copy { user-select: all; font-family: var(--mono); }

/* legal pages */
.legal h1 { margin-top: 30px; }
.legal h2 { margin-top: 24px; }
.legal { padding-bottom: 40px; max-width: 72ch; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
