/* Shared typography, article layouts, and photo-tool controls. */
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "League Spartan";
  src: url("/assets/fonts/league-spartan-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
}
:root {
  --paper: #f8fafb;
  --ink: #132f40;
  --ink-soft: #526572;
  --line: #d7e1e8;
  --card: #ffffff;
  --accent: #175bc0;
  --accent-ink: #ffffff;
  --pass: #1f7a4d;
  --pass-bg: #e6f4ec;
  --fix: #9a6200;
  --fix-bg: #fff4dc;
  --fail: #b3261e;
  --fail-bg: #fde8e6;
  --radius: 4px;
  --font: "Figtree", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-heading: "League Spartan", "Figtree", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--paper); }
img, canvas { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, .drop:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.08; text-wrap: balance; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.025em; }
h1 { font-size: clamp(2.5rem, 4.5vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 2.5vw, 2.25rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.wrap, .shell { max-width: 1200px; margin: 0 auto; padding-inline: 28px; }
.muted { color: var(--ink-soft); }
.small, .note, .updated { font-size: 14px; line-height: 1.6; }
.guide-context { font-size: 16px; font-weight: 600; color: var(--ink-soft); }

/* Shared navigation. */
.site-head, .site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-block: 24px; }
.brand { font-weight: 800; letter-spacing: -.035em; text-decoration: none; color: var(--ink); font-size: 20px; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-head nav, .site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.site-head nav a, .site-header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; text-decoration: none; color: var(--ink-soft); }
.site-head nav a:hover, .site-header nav a:hover { color: var(--accent); text-decoration: underline; }

/* Shared actions and consent. */
.hero { padding-block: 56px 32px; }
.hero p.lead { font-size: 20px; line-height: 1.6; max-width: 60ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 14px 24px; border: 0; border-radius: var(--radius); font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.btn:hover { background: #124b9f; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn.secondary:hover { background: #eaf1fa; }
.hero .note { margin-top: 16px; }
.note:has(#usageConsent) { margin-top: 24px; padding: 18px 20px; background: #edf2f5; border-radius: var(--radius); max-width: 72ch; }
.note:has(#usageConsent) label { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; }
#usageConsent { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.note:has(#usageConsent) > a { display: inline-block; padding-block: 8px; margin-left: 32px; }
#usageStatus { display: block; margin-left: 32px; color: var(--ink-soft); }
#usageStatus:empty { display: none; }

/* Photo-tool state and controls. */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-block: 16px 32px; }
.step { background: var(--card); border-radius: var(--radius); padding: 20px; }
.step b { display: block; margin-bottom: 4px; }
.drop { border: 2px dashed var(--accent); border-radius: var(--radius); background: #edf3fb; padding: 32px 20px; text-align: center; cursor: pointer; }
.drop.busy { opacity: .7; }
.drop.drag-active { background: #dce8fa; border-style: solid; outline: 3px solid #b9d2f3; outline-offset: 3px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.progress { margin-top: 12px; font-size: 16px; color: var(--ink-soft); min-height: 1.4em; }
#progress { overflow-wrap: anywhere; }
input[type=range] { width: 100%; min-height: 44px; margin-block: 8px 16px; accent-color: var(--accent); }
.results { display: none; margin-top: 24px; }
.results.show { display: block; }
.checks { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.check { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.check .mark { font-weight: 800; font-size: 18px; width: 28px; text-align: center; }
.check.pass { border-color: #bfe3cf; }
.check.pass .mark { color: var(--pass); }
.check.review, .check.fix { background: var(--fix-bg); border-color: #f0d49a; }
.check.review .mark, .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: 14px; font-weight: 700; padding: 3px 8px; border-radius: var(--radius); white-space: nowrap; }
.check.review .tag, .check.fix .tag { background: #ffe3a8; color: var(--fix); white-space: normal; }
.check.fail .tag { background: #f8cfcb; color: var(--fail); }
.check.pass .tag { background: #cdeedb; color: var(--pass); }
.check .why { font-size: 16px; color: var(--ink-soft); margin-top: 4px; }
.verdict { padding: 18px 20px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; }
.verdict.ok { background: var(--pass-bg); color: var(--pass); }
.verdict.review { background: var(--fix-bg); color: var(--fix); }
.verdict.retake { background: var(--fail-bg); color: var(--fail); }
.compare { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.compare figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.compare figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 8px; }
.compare canvas { width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius); background: #e8edf0; }
.buy { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.buy .price { font-size: 28px; font-weight: 800; }
.buy label { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; font-size: 16px; cursor: pointer; }
.buy input[type=checkbox] { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.switch { display: flex; align-items: center; gap: 12px; margin: 12px 0 20px; font-size: 16px; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }
.paid { background: var(--pass-bg); border-color: #bfe3cf; }
.dl { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.download-warning { padding: 20px; border: 1px solid #f0d49a; border-radius: var(--radius); background: var(--fix-bg); color: var(--ink); }

/* Articles and policy pages share a comfortable reading column. */
.guide-page, .policy-page, .error-page { background: var(--card); }
.legal { max-width: 816px; padding-bottom: 72px; }
.legal .hero { padding-block: 56px 32px; }
.legal h1 { max-width: 18ch; margin-bottom: 24px; }
.legal h2 { margin-top: 0; margin-bottom: 18px; }
.legal h3 { margin-top: 28px; }
.legal li { margin-bottom: 12px; padding-left: 4px; }
.legal ul, .legal ol { padding-left: 24px; }
.legal p, .legal li { overflow-wrap: break-word; }
section.block { padding-block: 32px; }
section.block > :last-child { margin-bottom: 0; }
.policy-page .legal { padding-top: 56px; }
.policy-page .legal h2 { margin-top: 40px; }
.policy-page .updated { color: var(--ink-soft); margin-bottom: 32px; }
.faq details { background: var(--paper); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 12px 0 2px; }
.sheet-example { max-width: 460px; margin: 28px 0; padding: 28px; border-radius: var(--radius); background: var(--paper); }
.sheet-example svg { display: block; width: 180px; max-width: 100%; height: auto; margin: 0 auto 20px; }
.sheet-example figcaption { font-size: 14px; color: var(--ink-soft); }
.requirements-table { width: 100%; margin-block: 24px; }
.requirements-table table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.requirements-table th, .requirements-table td { padding: 16px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.requirements-table th { background: var(--paper); font-weight: 700; }
.requirements-table caption { text-align: left; margin-bottom: 16px; }

/* A clear route back to making a photo. */
.site-foot { padding-block: 32px 48px; font-size: 14px; color: var(--ink-soft); }
.site-foot > div { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 20px; }
.site-foot a { color: var(--ink-soft); }
.site-foot .copy { user-select: all; font-family: var(--font); }
.site-foot .footer-action { margin-bottom: 32px; }
.site-foot .footer-action .btn { color: var(--accent-ink); }
.site-footer { background: var(--paper); padding-block: 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid a { display: block; overflow-wrap: anywhere; padding-block: 6px; }
.footer-grid h2 { font-family: var(--font); font-size: 16px; letter-spacing: 0; font-weight: 700; }
.footer-grid .footer-action { grid-column: 1 / -1; margin: 0; }
.footer-grid .footer-action .btn { display: inline-flex; padding: 14px 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px) {
  .wrap, .shell { padding-inline: 20px; }
  .site-head, .site-header { align-items: flex-start; flex-direction: column; gap: 8px; padding-block: 16px; }
  .site-head nav, .site-header nav { gap: 0 20px; }
  .hero, .legal .hero { padding-block: 36px 24px; }
  .hero p.lead { font-size: 18px; }
  .legal h1 { font-size: 40px; }
  .legal { padding-bottom: 40px; }
  .policy-page .legal { padding-top: 36px; }
  section.block { padding-block: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .check { grid-template-columns: 28px minmax(0, 1fr); }
  .check .tag { grid-column: 2; justify-self: start; }
  .requirements-table th, .requirements-table td { padding: 10px 8px; font-size: 16px; line-height: 1.5; }
  .note:has(#usageConsent) { padding: 16px; }
}
@media (max-width: 520px) { .compare { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
