/* OnlinePassportSizePhoto.com */
:root {
  --ink: #14283B;
  --ink-2: #44566a;
  --muted: #5B6B77;
  --paper: #FAFBF8;
  --white: #ffffff;
  --line: #D7E3DD;
  --line-2: #c3d3cb;
  --seal: #1F5E8C;
  --seal-dark: #174a6f;
  --seal-tint: #e8f0f6;
  --stamp: #B23A2E;
  --ok: #2d6a4f;
  --warn: #8a5a00;
  --radius: 6px;
  --radius-lg: 10px;
  --wrap: 1120px;
  --measure: 68ch;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  font-feature-settings: "tnum" 1;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { max-width: 100%; }
a { color: var(--seal); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--seal-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #7fb0d8; outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.85rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.7rem); font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.12rem; font-weight: 650; margin-top: 1.6em; }
p, ul, ol, dl, table { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: .35em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--measure); }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header: the one place with a security-paper pattern */
.site-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.site-head::before {
  content: "";
  display: block;
  height: 6px;
  background:
    repeating-linear-gradient(115deg, transparent 0 7px, rgba(31,94,140,.18) 7px 8px),
    repeating-linear-gradient(65deg, transparent 0 7px, rgba(45,106,79,.16) 7px 8px),
    #eef4f1;
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand svg { flex: 0 0 auto; }
.brand span b { color: var(--seal); font-weight: 700; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--seal-tint); color: var(--seal-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 7px 10px; font: inherit; color: var(--ink); }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 70px; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px 12px 12px; flex-direction: column; z-index: 5; }
  .nav.is-open { display: flex; }
}

/* Breadcrumbs */
.crumbs { font-size: .85rem; color: var(--muted); margin: 18px 0 6px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li::after { content: "/"; margin-left: 6px; color: var(--line-2); }
.crumbs li:last-child::after { content: none; }
.crumbs a { color: var(--muted); }

/* Page intro */
.intro { padding: 14px 0 8px; }
.intro .lede { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 6px 0 0; padding: 0; list-style: none; font-size: .95rem; color: var(--ink-2); }
.facts li { margin: 0; }
.facts strong { color: var(--ink); font-weight: 650; }

/* Home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: end; padding: 34px 0 4px; }
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 52ch; margin-bottom: 0; }
.hero-points { list-style: none; padding: 0; margin: 0; }
.hero-points li { padding-left: 26px; position: relative; margin-bottom: .55em; }
.hero-points li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 22px; } }

/* Tool */
.tool { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 18px; margin: 18px 0 26px; }
.tool-top { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; margin-bottom: 14px; }
.tool-top label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.tool-doc, .tool-sheet, .field input, .field select {
  font: inherit; font-size: .98rem; color: var(--ink);
  padding: 9px 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--white); max-width: 100%;
}
.tool-doc { min-width: min(320px, 100%); }
.tool-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 28px; }
.tool-stage { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 0 22px; align-items: start; }
.tool-stage > .tool-frame { grid-row: span 3; }
.tool-stage > .tool-drop { margin-top: 0; }
@media (max-width: 1020px) { .tool-stage { grid-template-columns: 1fr; } .tool-stage > .tool-drop { margin-top: 12px; } }
@media (max-width: 760px) { .tool-body { grid-template-columns: 1fr; } }
.tool-stage { min-width: 0; }
.tool-frame { position: relative; display: flex; justify-content: center; padding: 14px; background: #eef2ef; border-radius: var(--radius); }
.tool-frame canvas { display: block; background: #fff; box-shadow: 0 0 0 1px rgba(20,40,59,.18); touch-action: none; cursor: grab; }
.tool-frame canvas:active { cursor: grabbing; }
.tool-drop { margin-top: 12px; border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 16px; text-align: center; background: #fbfcfb; transition: border-color .15s, background .15s; }
.tool-drop.is-over { border-color: var(--seal); background: var(--seal-tint); }
.has-photo .tool-drop { padding: 10px; }
.has-photo .tool-drop .drop-hint { display: none; }
.drop-hint { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .98rem; line-height: 1.2;
  padding: 11px 16px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--seal); color: #fff; }
.btn-primary:hover { background: var(--seal-dark); color: #fff; }
.btn-quiet { background: var(--white); color: var(--ink); border-color: var(--line-2); }
.btn-quiet:hover { border-color: var(--seal); color: var(--seal-dark); }
.btn-small { padding: 7px 11px; font-size: .9rem; font-weight: 550; }
.btn[hidden] { display: none; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.tool-editor { margin-top: 14px; }
.ctl-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-bottom: 12px; }
.ctl label { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.ctl input[type=range] { width: 100%; accent-color: var(--seal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.bg-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; border: 0; padding: 0; }
.bg-choices legend { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.swatch { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 10px 4px 5px; cursor: pointer; background: #fff; }
.swatch i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(20,40,59,.25); display: inline-block; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch:has(input:checked) { border-color: var(--seal); box-shadow: 0 0 0 2px var(--seal-tint); }
.swatch:has(input:focus-visible) { outline: 3px solid #7fb0d8; }
.tool-side { font-size: .95rem; }
.tool-side h3 { margin: 0 0 8px; font-size: 1rem; }
.tool-spec dl { margin: 0 0 16px; }
.tool-spec dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.tool-spec dt { color: var(--muted); }
.tool-spec dd { margin: 0; text-align: right; font-weight: 600; }
.tool-checks { list-style: none; padding: 0; margin: 0 0 16px; }
.chk { position: relative; padding-left: 26px; margin-bottom: 8px; line-height: 1.4; }
.chk-mark { position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%; border: 2px solid var(--line-2); }
.chk-ok .chk-mark { border-color: var(--ok); background: var(--ok); }
.chk-ok .chk-mark::after { content: ""; position: absolute; left: 4px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chk-warn .chk-mark { border-color: var(--warn); }
.chk-warn .chk-mark::after { content: "!"; position: absolute; inset: 0; font-size: 11px; font-weight: 800; color: var(--warn); text-align: center; line-height: 13px; }
.tool-downloads { display: grid; gap: 8px; }
.tool-downloads .field { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.tool-msg { min-height: 1.4em; font-size: .92rem; margin: 10px 0 0; color: var(--ink-2); }
.tool-msg.is-error { color: var(--stamp); }
.tool-msg.is-warn { color: var(--warn); }
.tool-msg.is-ok { color: var(--ok); }
.tool-warn { background: #fff6e6; border: 1px solid #f0d9a8; color: #6b4a00; border-radius: var(--radius); padding: 10px 12px; font-size: .92rem; margin: 0 0 12px; }
.privacy-note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field input { width: 100%; }

/* Content blocks */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 40px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 0; } }
.spec-table, .data-table { width: 100%; border-collapse: collapse; font-size: .96rem; background: var(--white); }
.spec-table th, .spec-table td, .data-table th, .data-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 42%; color: var(--ink-2); font-weight: 600; }
.data-table thead th { font-size: .85rem; color: var(--ink-2); font-weight: 650; background: #f2f6f4; border-bottom: 1px solid var(--line-2); }
.data-table td.num, .data-table th.num { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.2em; }
.table-scroll table { margin: 0; }
figure { margin: 0 0 1.4em; }
figure.figure { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.callout { border-left: 3px solid var(--seal); background: var(--white); padding: 12px 16px; margin: 0 0 1.2em; border-radius: 0 var(--radius) var(--radius) 0; }
.callout.is-warn { border-left-color: var(--warn); background: #fffaf0; }
.callout p:last-child { margin-bottom: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 1.1em; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--seal); color: var(--seal); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.steps h3 { margin: 0 0 .25em; font-size: 1.05rem; }
.doc-list { list-style: none; padding: 0; margin: 0 0 1.2em; columns: 3 240px; column-gap: 28px; }
.doc-list li { break-inside: avoid; margin: 0 0 .45em; }
.doc-list .dim { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.country-block { break-inside: avoid; margin-bottom: 1.1em; }
.country-block h3 { margin: 0 0 .3em; font-size: 1rem; }
.country-block ul { list-style: none; padding: 0; margin: 0; }
.search-box { margin: 6px 0 16px; }
.search-box input { width: min(420px, 100%); font: inherit; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-size: 1.3rem; color: var(--seal); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }
.aside-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; font-size: .95rem; }
.aside-box h2, .aside-box h3 { margin-top: 0; font-size: 1rem; }
.aside-box ul { list-style: none; padding: 0; margin: 0; }
.aside-box li { padding: 5px 0; border-bottom: 1px solid var(--line); margin: 0; }
.aside-box li:last-child { border-bottom: 0; }
.official { font-size: .95rem; }
.updated { font-size: .85rem; color: var(--muted); }
.mistakes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0 0 1.4em; padding: 0; list-style: none; }
.mistakes li { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; font-size: .88rem; text-align: center; }
.mistakes svg { display: block; margin: 0 auto 6px; }

/* Footer */
.site-foot { margin-top: 64px; border-top: 1px solid var(--line); background: var(--white); padding: 36px 0 28px; font-size: .92rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.site-foot h2 { font-size: .95rem; margin: 0 0 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--seal); text-decoration: underline; }
.disclaimer { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .site-head, .site-foot, .tool { display: none; } }
