/* onevisaphoto app: the same look as the landing page (mist palette, Inter Tight). */
:root {
  --page: #F9FBFB;
  --green: #22292B;
  --green-2: #394447;
  --leaf: #67787C;
  --leaf-ink: #4B585B;
  --mint: #E3E7E8;
  --mint-soft: #F1F3F3;
  --sage: #D0D6D8;
  --ink: #090B0C;
  --muted: #4B585B;
  --line: rgba(34, 41, 43, .12);
  --line-strong: rgba(34, 41, 43, .3);
  --rail: #D0D6D8; /* solid line colour, so branch joints never darken */
  --card: #ffffff;
  --red: #C2412D;
  --red-soft: #FBE9E5;
  --amber: #7A5300;
  --amber-soft: #FBF0D9;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(34, 41, 43, .06), 0 14px 36px rgba(34, 41, 43, .08);
  --ease: cubic-bezier(.22, .8, .2, 1);
}
/* Dark theme (data-theme on <html>, set before paint by the head script in lib/pages.js).
   Mist runs the other way: mist 950 page, mist 900 cards, light mist for primary and text. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #090B0C;
  --green: #E3E7E8;
  --green-2: #F9FBFB;
  --leaf: #9CA8AB;
  --leaf-ink: #D0D6D8;
  --mint: #394447;
  --mint-soft: #22292B;
  --sage: #4B585B;
  --ink: #F1F3F3;
  --muted: #9CA8AB;
  --line: rgba(227, 231, 232, .12);
  --line-strong: rgba(227, 231, 232, .3);
  --rail: #394447;
  --card: #161B1D;
  --red: #F0735E;
  --red-soft: rgba(194, 65, 45, .22);
  --amber: #F2C063;
  --amber-soft: rgba(226, 179, 60, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1, h2 { font-family: "Inter Tight", Inter, sans-serif; font-weight: 700; }
h3 { font-size: 15px; margin-bottom: 10px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; margin: 10px 0 0; line-height: 1.45; }
.center { text-align: center; }
.center-block { display: block; margin: 10px auto 0; }
.error { color: var(--red); margin: 8px 0 0; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- top bar (same logo and position as the landing page) ---------- */
/* the header itself lives in site.css; the photo tool puts its progress steps in the middle and the guide links on the right */
.app-nav { justify-self: end; }
.progress { list-style: none; margin: 0; padding: 5px; display: flex; gap: 4px; background: var(--card); border-radius: 999px; box-shadow: 0 0 0 1px var(--line); }
.progress li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: background .3s, color .3s; }
.progress i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--mint-soft); color: var(--green); transition: background .3s, color .3s; }
.progress li.on { background: var(--mint-soft); color: var(--ink); }
.progress li.on i { background: var(--green); color: var(--on-green); }
.progress li.done { color: var(--ink); }
.progress li.done i { background: var(--ok-soft); color: var(--ok-ink); font-size: 0; }
.progress li.done i::before { content: '✓'; font-size: 12px; }

/* ---------- buttons, links, inputs ---------- */
.btn { font: inherit; font-weight: 600; border-radius: 999px; padding: 13px 22px; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; gap: 8px; transition: background .15s, transform .15s, opacity .2s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover:not(:disabled) { background: var(--green-2); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-block { width: 100%; margin-top: 10px; }
.btn-xl { width: 100%; height: 60px; font-size: 17px; font-weight: 500; margin-top: 28px; }
.btn-xl:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(34, 41, 43, .22); }
.link { background: none; border: 0; padding: 0; color: var(--leaf-ink); font: inherit; font-weight: 500; cursor: pointer; }
.link:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.input, .select { font: inherit; width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; background: var(--card); color: var(--ink); }
.input:focus, .select:focus { outline: 2px solid var(--leaf); outline-offset: -1px; border-color: transparent; }
.chip { font: inherit; font-size: 13px; background: var(--card); border: 0; box-shadow: 0 0 0 1px var(--line); border-radius: 99px; padding: 7px 14px; cursor: pointer; color: var(--ink); }
.chip::after { content: ' · Change'; color: var(--leaf-ink); font-weight: 500; }

/* ---------- step 1: photo + document ---------- */
.select-screen { min-height: calc(100vh - 84px); display: grid; grid-template-columns: 380px minmax(0, 440px); justify-content: center; align-items: center; gap: 72px; padding: 8px 0 64px; }
.dropzone { position: relative; display: block; aspect-ratio: 35 / 45; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); cursor: pointer; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; view-transition-name: upload; }
.dropzone:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(34, 41, 43, .06), 0 22px 48px rgba(34, 41, 43, .14); }
.dropzone.over { background: var(--mint-soft); box-shadow: 0 0 0 2px var(--leaf), var(--shadow); }
.dz-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 20px 34px; }
.dz-guide { position: absolute; inset: 26px 26px 0; width: calc(100% - 52px); height: calc(100% - 26px); fill: none; stroke: var(--sage); stroke-width: 2.4; stroke-dasharray: 7 7; stroke-linecap: round; }
.dz-btn { position: relative; padding: 14px 26px; border-radius: 999px; background: var(--green); color: var(--on-green); font-weight: 500; font-size: 16px; box-shadow: 0 8px 20px rgba(34, 41, 43, .22); transition: background .15s; }
.dropzone:hover .dz-btn { background: var(--green-2); }
.dz-or { position: relative; font-size: 13.5px; color: var(--muted); background: color-mix(in srgb, var(--card) 85%, transparent); padding: 0 8px; border-radius: 99px; }
.dz-ready { position: absolute; inset: 0; }
.dz-ready img { width: 100%; height: 100%; object-fit: cover; display: block; animation: rise .4s var(--ease); }
.dz-change { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 13.5px; font-weight: 500; color: var(--green); white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }

.select-side > * { animation: rise .6s var(--ease) both; }
.select-side > :nth-child(2) { animation-delay: .05s; }
.select-side > :nth-child(3) { animation-delay: .1s; }
.select-side > :nth-child(4) { animation-delay: .15s; }
.select-side > :nth-child(5) { animation-delay: .2s; }
.select-side > :nth-child(n+6) { animation-delay: .25s; }
.kicker { margin: 0 0 12px; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--leaf-ink); }
.screen-title { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.02; letter-spacing: -0.035em; }
.screen-sub { color: var(--muted); margin: 14px 0 32px; font-size: 17px; line-height: 1.55; }
.field { display: block; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.select-wrap { position: relative; display: block; }
.select-wrap::after { content: ''; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg); pointer-events: none; }
.select { appearance: none; -webkit-appearance: none; font-size: 16.5px; font-weight: 500; padding: 17px 48px 17px 18px; border-radius: 16px; border: 0; box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(34, 41, 43, .04); cursor: pointer; transition: box-shadow .15s; }
.select:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 2px 6px rgba(34, 41, 43, .06); }
.field-hint { display: block; margin-top: 9px; color: var(--muted); font-size: 13.5px; }

/* ---------- document picker: branched dropdown ---------- */
.field:has(.doc-picker) { position: relative; z-index: 20; } /* above the animated siblings below it */
.doc-picker { z-index: 20; }
.doc-trigger { display: block; text-align: left; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-trigger:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px rgba(34, 41, 43, .6); }
[data-theme="dark"] .doc-trigger:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px rgba(227, 231, 232, .6); }
.doc-trigger[aria-expanded="true"] { box-shadow: 0 0 0 1px var(--line-strong), 0 2px 6px rgba(34, 41, 43, .06); }
.doc-picker::after { transition: transform .2s var(--ease); }
.doc-picker:has(.doc-trigger[aria-expanded="true"])::after { transform: rotate(-135deg); margin-top: -2px; }
.doc-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); display: flex; flex-direction: column; max-height: min(440px, 62vh); background: var(--card); border-radius: 18px; box-shadow: 0 0 0 1px var(--line), 0 18px 48px rgba(34, 41, 43, .16), 0 2px 6px rgba(34, 41, 43, .06); overflow: hidden; transform-origin: top center; animation: doc-pop .18s var(--ease); }
[data-theme="dark"] .doc-pop { box-shadow: 0 0 0 1px var(--line), 0 18px 48px rgba(0, 0, 0, .55); }
.doc-pop[hidden] { display: none; }
@keyframes doc-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.doc-search { padding: 10px; border-bottom: 1px solid var(--line); }
.doc-search .input { padding: 10px 12px; border-radius: 11px; font-size: 15px; background: var(--mint-soft); border-color: transparent; }
.doc-tree { overflow-y: auto; overscroll-behavior: contain; padding: 8px 12px 12px 14px; }
.doc-search .input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.doc-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 14px; text-align: center; }

.branched-menu {
  --bm-ink: var(--ink);
  --bm-accent: var(--green);
  --bm-line: var(--rail);
  --bm-line-w: 1.5;
  --bm-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --bm-muted: var(--muted);
  position: relative; display: flex; flex-direction: column; width: 100%; padding-left: 14px; box-sizing: border-box;
  color: var(--bm-ink); font-size: 14.5px; line-height: 1.2;
}
.branched-menu::before { content: ''; position: absolute; top: 8px; bottom: 0; left: 0; width: 2px; border-radius: 1px; background: linear-gradient(to bottom, var(--bm-line) 0%, var(--bm-line) 70%, transparent 100%); }
.branched-menu__marker { position: absolute; top: -1px; left: 0; z-index: 1; width: 2px; height: 16px; border-radius: 1px; background: var(--bm-accent); opacity: 0; transition: top 220ms var(--bm-ease-out), opacity 150ms ease; }
.branched-menu__marker[data-on] { opacity: 1; }
.branched-menu__section { display: flex; flex-direction: column; }
.branched-menu__head, .branched-menu__item {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; margin: 0; border: 0; background: none;
  color: var(--bm-muted); font: inherit; text-align: left; cursor: pointer; border-radius: 9px; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; transition: color 200ms ease, background-color 150ms ease;
}
.branched-menu__head { padding: 9px 8px; font-size: 15px; font-weight: 500; }
.branched-menu__section[data-open] .branched-menu__head, .branched-menu__head[data-active] { color: var(--bm-ink); }
.branched-menu__head[data-active] { background: var(--mint-soft); font-weight: 600; }
.branched-menu__head[aria-expanded]::after { content: ''; flex: none; width: 6px; height: 6px; margin: 0 4px 3px 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--bm-ease-out); }
.branched-menu__head[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -3px; }
.branched-menu__head:focus-visible, .branched-menu__item:focus-visible { outline: 2px solid var(--leaf); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .branched-menu__head:hover, .branched-menu__item:hover { color: var(--bm-ink); background-color: var(--mint-soft); }
}
.branched-menu__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--bm-fold) var(--bm-ease-out); }
.branched-menu__section[data-open] .branched-menu__body { grid-template-rows: 1fr; }
.branched-menu__fold { min-height: 0; overflow: hidden; }
.branched-menu__tree { position: relative; padding: 6px 0; box-sizing: border-box; }
.branched-menu__lines { position: absolute; top: 0; left: 0; overflow: visible; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.branched-menu__section[data-open] .branched-menu__lines { opacity: 1; transition: opacity 250ms ease 100ms; }
.branched-menu__base, .branched-menu__reach { fill: none; stroke-width: var(--bm-line-w); stroke-linecap: round; stroke-linejoin: round; }
.branched-menu__base { stroke: var(--bm-line); }
.branched-menu__reach { stroke: var(--bm-accent); transition: stroke-dashoffset var(--bm-draw) var(--bm-ease-out); }
.branched-menu__item { height: var(--bm-row); padding: 0 8px 0 var(--bm-indent); background-clip: content-box; }
.branched-menu__item[data-active] { color: var(--bm-accent); font-weight: 600; }
.branched-menu__item[data-active] .branched-menu__label { color: var(--ink); }
.branched-menu__icon { display: inline-flex; flex: none; font-size: 17px; line-height: 1; }
.branched-menu__label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branched-menu__meta { flex: none; font-size: 12.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.branched-menu__head[aria-expanded] .branched-menu__meta { padding: 2px 7px; border-radius: 999px; background: var(--mint-soft); }
@media (hover: hover) and (pointer: fine) { .branched-menu__head[aria-expanded]:hover .branched-menu__meta { background: var(--card); } }
@media (prefers-reduced-motion: reduce) {
  .branched-menu__marker { transition: opacity 150ms ease; }
  .branched-menu__body, .branched-menu__reach, .doc-pop { transition: none; animation: none; }
}
.tips-row { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tips-row li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--mint-soft); color: var(--green); font-size: 13px; font-weight: 500; }
.tips-row li::before { content: '✓'; font-size: 11px; font-weight: 700; color: var(--ok); }
.start-note { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- result ---------- */
.panel { margin: 12px 0 72px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.panel-head h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.result-main { position: sticky; top: 20px; min-width: 0; background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 18px 18px 22px; }
.tabs { display: flex; width: max-content; gap: 2px; padding: 4px; border-radius: 999px; background: var(--mint-soft); margin: 0 auto 16px; }
.tab { font: inherit; font-size: 14px; font-weight: 500; border: 0; background: none; padding: 8px 18px; border-radius: 999px; cursor: pointer; color: var(--green); transition: background .2s, color .2s; }
.tab.on { background: var(--green); color: var(--on-green); }
.viewer { position: relative; width: 100%; }
.ba { position: absolute; left: 0; top: 0; line-height: 0; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(34, 41, 43, .12); touch-action: pan-y; user-select: none; }
.ba canvas { display: block; width: 100%; height: 100%; }
.ba #baBefore { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); transition: opacity .35s ease; }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); pointer-events: none; transition: opacity .3s ease; }
/* slider handle: green knob with two carets, white ring */
.ba-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: 46px; padding: 0 11px; border-radius: 999px; background: var(--green); color: #fff; display: flex; align-items: center; gap: 5px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .92), 0 8px 22px rgba(34, 41, 43, .38); transition: transform .2s var(--ease), background .2s; }
.ba-knob svg { width: 17px; height: 17px; fill: currentColor; display: block; }
.ba-knob i { width: 2px; height: 18px; border-radius: 2px; background: rgba(255, 255, 255, .45); }
.ba:hover .ba-knob { transform: translate(-50%, -50%) scale(1.06); }
.ba:active .ba-knob { transform: translate(-50%, -50%) scale(1.08); }
.ba:focus-visible-within .ba-knob { outline: 2px solid var(--leaf); outline-offset: 3px; }
.ba-tag { position: absolute; top: 12px; line-height: 1; font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 99px; background: rgba(9, 11, 12, .66); color: #fff; pointer-events: none; backdrop-filter: blur(6px); transition: opacity .3s ease; }
.ba-tag.left { left: 12px; } .ba-tag.right { right: 12px; background: var(--green); }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
/* Measurements: same photo, the before side and slider fade out and the guides draw in top-down */
.stage-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; clip-path: inset(0 0 100% 0); transition: opacity .3s ease, clip-path .7s var(--ease); }
.stage-overlay.on { opacity: 1; clip-path: inset(0 0 0 0); }
.viewer.measure #baBefore, .viewer.measure .ba-line, .viewer.measure .ba-tag { opacity: 0; }
.viewer.measure .ba input[type=range] { pointer-events: none; }
.viewer.measure .ba { cursor: default; }
.controls { display: flex; flex-direction: column; gap: 16px; }

.verdict h3 { display: flex; align-items: center; gap: 12px; font-family: "Inter Tight", Inter, sans-serif; font-size: 23px; letter-spacing: -0.02em; margin-bottom: 6px; }
.verdict .vi { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 16px; flex: none; }
.verdict.ok .vi { background: var(--ok); color: var(--on-ok); box-shadow: 0 0 0 6px var(--ok-soft); }
.verdict.bad .vi { background: var(--red); box-shadow: 0 0 0 6px var(--red-soft); }
.verdict > p { margin: 8px 0 14px; }
.verdict ul { margin: 12px 0 8px; padding-left: 18px; font-size: 14px; }
.verdict ul li { margin-bottom: 4px; }
.verdict .btn-block { height: 52px; }

.perfect-card { background: var(--feature); color: #fff; padding: 24px; box-shadow: 0 18px 40px rgba(34, 41, 43, .22); }
.perfect-card.pulse-pick { box-shadow: 0 0 0 3px var(--sage), 0 18px 40px rgba(34, 41, 43, .22); }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pc-kicker { margin: 0 0 2px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #D0D6D8; }
.pc-head h3 { margin: 0; font-family: "Inter Tight", Inter, sans-serif; font-size: 24px; letter-spacing: -0.02em; }
.pc-price { margin: 0; text-align: right; line-height: 1.1; }
.pc-price b { display: block; font-family: "Inter Tight", Inter, sans-serif; font-size: 26px; letter-spacing: -0.02em; }
.pc-price span { font-size: 12px; color: rgba(255, 255, 255, .65); }
.pc-pitch { margin: 10px 0 16px; font-size: 14.5px; color: rgba(255, 255, 255, .85); }
.pc-label { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: #D0D6D8; }
.pc-fixes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-fixes li { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 500; }
.pc-fixes li::before { content: '✓'; flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--ok); color: var(--on-ok); }
.pc-keep { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(227, 231, 232, .45); font-size: 13px; color: #E3E7E8; }
.perfect-card .btn-primary { background: #E3E7E8; color: #22292B; height: 52px; margin-top: 16px; }
.perfect-card .btn-primary:hover:not(:disabled) { background: #fff; }
.pc-meta { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.pc-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 11.5px; line-height: 1.5; color: rgba(255, 255, 255, .6); }
.ticks { list-style: none; padding: 0; margin: 12px 0 12px; }
.ticks li { padding-left: 24px; position: relative; margin-bottom: 7px; font-size: 13.5px; }
.ticks li::before { content: '✓'; position: absolute; left: 2px; top: 0; font-size: 12px; font-weight: 700; color: var(--ok); }

.check-summary { margin: -2px 0 10px; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 600; }
.check-summary.ok { background: var(--ok-soft); color: var(--ok-ink); }
.check-summary.warn { background: var(--amber-soft); color: var(--amber); }
.check-summary.bad { background: var(--red-soft); color: #9A2F1F; }
.check-summary:empty { display: none; }
.check-group { border-top: 1px solid var(--line); }
.check-group:first-child { border-top: 0; }
.check-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 11px 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); user-select: none; }
.check-group summary::-webkit-details-marker { display: none; }
.check-group summary::before { content: '›'; font-size: 16px; line-height: 1; transition: transform .15s; }
.check-group[open] summary::before { transform: rotate(90deg); }
.check-group .gb { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 12px; padding: 2px 9px; border-radius: 99px; }
.gb.ok { color: var(--ok-ink); background: var(--ok-soft); }
.gb.warn { color: var(--amber); background: var(--amber-soft); }
.gb.busy { padding: 0; background: none; }
.gb.busy .ovp-loader { width: 22px; height: 22px; }
.checks { list-style: none; padding: 0 0 6px; margin: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks .ic { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 11px; color: var(--on-ok); background: var(--ok); margin-top: 1px; }
.checks li.warn .ic { background: #E2B33C; color: var(--ink); }
.checks li.crit .ic { background: var(--red); color: #fff; }
.checks li.busy .ic { background: transparent; }
.checks li.busy .ovp-loader { width: 20px; height: 20px; }
.checks small { display: block; color: var(--muted); }
.check-foot { margin: 8px 0 0; }
.adjust summary { list-style: none; cursor: pointer; }
.adjust summary::-webkit-details-marker { display: none; }
.adjust summary h3 { margin: 0; display: flex; justify-content: space-between; }
.adjust summary h3::after { content: '›'; transition: transform .15s; color: var(--muted); }
.adjust[open] summary h3::after { transform: rotate(90deg); }
.adjust[open] summary { margin-bottom: 14px; }
.range-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; font-size: 14px; margin-bottom: 10px; }
input[type=range] { accent-color: var(--green); width: 100%; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; margin: 6px 0 10px; flex-wrap: wrap; }
.swatches { display: flex; gap: 6px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.swatch.on { outline: 2px solid var(--leaf); outline-offset: 2px; }
.switch { display: flex; gap: 6px; align-items: center; cursor: pointer; font-size: 13px; }
.switch input { accent-color: var(--green); }

/* ---------- step 4: AI checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
.thumb-card { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 28px; }
.thumb { display: block; margin: 0 auto; max-width: 100%; border-radius: 6px; box-shadow: 0 8px 28px rgba(34, 41, 43, .14); }
.order h3 { font-family: "Inter Tight", Inter, sans-serif; font-size: 20px; }
.line { display: flex; justify-content: space-between; padding: 8px 0; }
.line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; font-weight: 700; font-size: 19px; }
.line.discount { color: var(--ok-ink); }
.includes { margin: 4px 0 14px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.coupon { padding: 10px 0; border-top: 1px solid var(--line); }
.coupon-form { display: flex; gap: 8px; margin-top: 10px; }
.coupon-form .input { flex: 1; text-transform: uppercase; padding: 10px 14px; border-radius: 999px; }
.coupon-applied { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.tag { background: var(--ok-soft); color: var(--ok-ink); font-weight: 600; font-size: 13px; padding: 4px 11px; border-radius: 99px; }
#payBtn { height: 54px; margin-top: 14px; }

/* ---------- full-screen processing studio ---------- */
.studio { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: var(--page); color: var(--ink); animation: studio-in .35s ease; }
@keyframes studio-in { from { opacity: 0; } }
.studio.out { animation: studio-out .45s ease forwards; }
@keyframes studio-out { to { opacity: 0; } }
.studio-top { display: flex; justify-content: space-between; align-items: center; height: 84px; padding: 0 32px; font-size: 14px; flex: none; }
.studio-brand { display: flex; align-items: center; }
.studio-brand .brand-mark { display: none; }
.studio-doc { color: var(--green); background: var(--card); padding: 8px 14px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line); font-weight: 500; font-size: 13.5px; }
.studio-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: center; padding: 0 48px 32px; width: 100%; max-width: 1400px; margin: 0 auto; }
.studio-stage { display: grid; place-items: center; min-height: 0; height: 100%; }
.studio-stage canvas { display: block; border-radius: 28px; box-shadow: var(--shadow); background: #F1F3F3; }
.studio-side { position: relative; background: var(--card); border-radius: 28px; padding: 30px; box-shadow: var(--shadow); }
.studio-loader { position: absolute; top: 22px; right: 22px; }
.studio-loader .ovp-loader { width: 44px; height: 44px; }
.studio-side:has(.studio-loader:not([hidden])) :is(.studio-kicker, .studio-title) { padding-right: 52px; }
.studio-kicker { margin: 0 0 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--leaf-ink); }
.studio-title { margin: 0 0 8px; font-family: "Inter Tight", Inter, sans-serif; font-size: 32px; line-height: 1.08; letter-spacing: -0.03em; }
.studio-detail { margin: 0 0 22px; color: var(--muted); min-height: 44px; }
.studio-steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.studio-steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #9CA8AB; transition: color .2s; }
.studio-steps li::before { content: ''; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--mint); box-sizing: border-box; }
.studio-steps li.run { color: var(--ink); font-weight: 600; }
.studio-steps li.run::before { border: 0; border-radius: 0; background: url(/brand/onevisaphoto-loader.svg) center / contain no-repeat; }
[data-theme="dark"] .studio-steps li.run::before { background-image: url(/brand/onevisaphoto-loader-light.svg); }
.studio-steps li.done { color: var(--ink); }
.studio-steps li.done::before { content: '✓'; display: grid; place-items: center; font-size: 12px; color: var(--on-ok); background: var(--ok); border-color: var(--ok); }
.studio-bar { height: 6px; border-radius: 99px; background: var(--mint-soft); overflow: hidden; margin-bottom: 20px; }
.studio-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--leaf), var(--green)); transition: width .4s ease; }
.studio-stats { display: grid; gap: 7px; font-size: 14px; color: var(--green-2); min-height: 60px; }
.studio-stats div { animation: stat-in .3s ease; }
.studio-stats b { color: var(--leaf-ink); font-weight: 700; margin: 0 2px; }
@keyframes stat-in { from { opacity: 0; transform: translateY(4px); } }
.studio-skip { margin-top: 16px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.studio-skip:hover { color: var(--green); }
.studio .err { color: var(--red); }
.studio .studio-retry { margin: 12px 8px 0 0; }

/* ---------- page transitions ---------- */
/* Landing → app: the "Upload photo" button grows into the photo frame; the logo stays put. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: var(--ease); }
::view-transition-old(root) { animation: vt-out .28s ease both; }
::view-transition-new(root) { animation: vt-in .5s .1s var(--ease) both; }
::view-transition-old(band) { animation: vt-band-out .4s ease both; }
::view-transition-image-pair(upload) { overflow: hidden; animation: vt-pair .6s var(--ease) both; }
::view-transition-old(upload) { animation: vt-fade-out .14s ease both; }
::view-transition-new(upload) { animation: vt-fade-in .3s .32s ease both; height: 100%; object-fit: cover; }
::view-transition-image-pair(stage) { overflow: hidden; border-radius: 12px; }
/* photo frame ⇄ studio ⇄ result: hand over quickly instead of showing two photos at once */
::view-transition-old(stage) { animation: vt-fade-out .18s ease both; height: 100%; object-fit: cover; }
::view-transition-new(stage) { animation: vt-fade-in .28s .12s ease both; height: 100%; object-fit: cover; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes vt-band-out { to { opacity: 0; transform: translateY(80px) scale(.94); } }
@keyframes vt-pair { from { background: rgba(241, 243, 243, .7); border-radius: 999px; } to { background: var(--card); border-radius: 28px; } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*), ::view-transition-image-pair(*) { animation: none !important; }
  .select-side > *, .dz-ready img { animation: none; }
}

@media (max-width: 960px) {
  .app-nav { display: none; }
  .progress { justify-self: end; padding: 3px; }
  .progress li { padding: 3px; } .progress li span { display: none; }
  .progress li.on { padding-right: 10px; } .progress li.on span { display: inline; }
  .wrap { padding: 0 16px; }
  .select-screen { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding: 8px 0 48px; }
  .select-side { display: contents; }
  .kicker { order: 1; } .screen-title { order: 2; } .screen-sub { order: 3; margin-bottom: 22px; }
  .dropzone { order: 4; width: min(100%, 300px); align-self: center; margin-bottom: 26px; }
  .field { order: 5; } .tips-row { order: 6; } #startBtn { order: 7; } .start-note { order: 8; }
  .review-layout, .checkout-layout { grid-template-columns: 1fr; }
  .result-main { position: static; padding: 14px 10px 18px; }
  .studio-top { height: 64px; padding: 0 16px; }
  .studio-brand .brand-logo { height: 24px; } .studio-doc { font-size: 12px; padding: 6px 10px; }
  .studio-body { grid-template-columns: 1fr; gap: 14px; padding: 0 16px 20px; align-content: start; overflow-y: auto; }
  .studio-stage { height: auto; }
  .studio-side { padding: 20px; }
  .studio-title { font-size: 24px; }
}

/* ---------- guide pages: /requirements, /requirements/:id, /photo-guide ---------- */
.guide-main { padding-bottom: 40px; }
.guide h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.04; letter-spacing: -0.035em; }
.guide h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.025em; margin-bottom: 14px; }
.guide p { line-height: 1.6; }
.guide .lead { color: var(--muted); font-size: 17.5px; margin: 16px 0 26px; max-width: 720px; }
.guide-hero { padding: 48px 0 28px; }
.guide-section { padding: 36px 0; border-top: 1px solid var(--line); }
.guide-section > p { max-width: 780px; }
.guide-h3 { font-size: 18px; margin: 30px 0 6px; }
.rule-grid { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.rule-grid .card h3 { font-size: 16px; margin: 10px 0 6px; }
.rule-grid .card p { margin: 0; font-size: 14px; color: var(--muted); }
.rule-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--mint); color: var(--green); font-weight: 700; font-size: 14px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.doc-card { display: flex; flex-direction: column; gap: 6px; background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
.doc-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(34, 41, 43, .06), 0 22px 48px rgba(34, 41, 43, .14); }
.doc-flag { font-size: 26px; line-height: 1; }
.doc-name { font-family: "Inter Tight", Inter, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.doc-card ul { list-style: none; padding: 0; margin: 4px 0 6px; font-size: 13.5px; color: var(--muted); }
.doc-card li { padding: 2px 0; }
.doc-more { margin-top: auto; font-size: 13.5px; font-weight: 600; color: var(--leaf-ink); }
.table-wrap { padding: 6px 0; overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.spec-table tbody tr:last-child > * { border-bottom: 0; }
.spec-table a { color: var(--ink); font-weight: 600; text-decoration: none; }
.spec-table a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.crumbs { padding: 28px 0 0; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--leaf-ink); text-decoration: none; }
.crumbs span { margin: 0 6px; }
.req-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding: 24px 0 40px; }
.req-card { padding: 6px 24px; }
.req-list { margin: 0; }
.req-list > div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.req-list > div:last-child { border-bottom: 0; }
.req-list dt { font-weight: 600; font-size: 14px; }
.req-list dd { margin: 0; font-size: 14.5px; color: var(--ink); }
.swatch-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin: 0 8px -2px 0; box-shadow: 0 0 0 1px var(--line); }
.notice { margin-top: 18px; background: var(--amber-soft); box-shadow: none; }
.notice h3 { color: var(--amber); }
.notice p { margin: 0; font-size: 14px; }
.source { font-size: 14px; color: var(--muted); margin-top: 18px; }
.req-side { position: sticky; top: 20px; display: grid; gap: 14px; }
.req-cta { text-align: center; }
.req-frame { width: 150px; margin: 4px auto 0; border-radius: 6px; box-shadow: 0 0 0 1px var(--line), var(--shadow); overflow: hidden; }
.req-frame svg { display: block; width: 100%; height: 100%; fill: var(--sage); stroke: none; }
.req-size { font-family: "Inter Tight", Inter, sans-serif; font-weight: 700; font-size: 18px; margin: 14px 0 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two-col h2 { font-size: 22px; }
.two-col p { font-size: 14.5px; }
.steps { padding-left: 22px; max-width: 780px; }
.steps li { margin-bottom: 12px; line-height: 1.6; padding-left: 4px; }
.crosses { list-style: none; padding: 0; margin: 12px 0; }
.crosses li { padding-left: 24px; position: relative; margin-bottom: 7px; font-size: 13.5px; }
.crosses li::before { content: '✕'; position: absolute; left: 2px; top: 0; font-size: 12px; font-weight: 700; color: var(--red); }
.field-hint .link { white-space: nowrap; }
.country-grid { columns: 3 280px; column-gap: 14px; }
.country { break-inside: avoid; margin-bottom: 14px; padding: 18px 20px; }
.country h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.country ul { list-style: none; padding: 0; margin: 0; }
.country a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.country a:hover span { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.country small { color: var(--muted); white-space: nowrap; font-size: 13px; }

@media (max-width: 960px) {
  .guide-hero { padding: 28px 0 16px; }
  .req-layout, .two-col { grid-template-columns: 1fr; }
  .req-side { position: static; }
  .req-list > div { grid-template-columns: 1fr; gap: 2px; }
  .spec-table thead { display: none; }
  .spec-table tr { display: block; padding: 12px 18px; border-bottom: 1px solid var(--line); }
  .spec-table th, .spec-table td { display: block; padding: 3px 0; border: 0; }
  .spec-table td::before { content: attr(data-label) ': '; color: var(--muted); }
}

/* flags, country guides, sample photos */
.flag { width: 22px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--line); vertical-align: -3px; }
.flag-globe { box-shadow: none; font-size: 18px; width: auto; }
.flag-lg { width: 44px; height: auto; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); flex-shrink: 0; }
.flag-lg.flag-globe { font-size: 30px; box-shadow: none; }
.flag-hero { width: 96px; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), var(--shadow); flex-shrink: 0; }
.flag-hero.flag-globe { font-size: 64px; box-shadow: none; }
.kicker-flag { display: flex; align-items: center; gap: 8px; }
/* Flag cards (/requirements "Choose your country"): port of shader-card.tsx, driven by public/flag-card.js.
   A dark card (mist 950) with the country's flag rising like a flame from the bottom and a white map silhouette on
   the right. Each card sits in a 2:1 .fc-slot that never changes size; on hover/focus the card grows down to 1:1
   and flag-card.js slides the cards below it (same column) down to make room, padding the grid to match.
   The canvas is a fixed square pinned to the bottom, so growing never resizes it. */
.flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px;
  transition: padding-bottom .5s cubic-bezier(.22, 1, .36, 1); }
.fc-slot { --fc-ease: cubic-bezier(.22, 1, .36, 1); --fc-dur: .5s; position: relative; aspect-ratio: 2 / 1; z-index: 0;
  transition: transform var(--fc-dur) var(--fc-ease); }
.fc-slot.is-raised { z-index: 30; }
.flag-card { position: absolute; left: 0; right: 0; top: 0; height: 100%; display: block; border-radius: 16px; background: #090B0C;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 1px var(--line); color: #fff; text-decoration: none;
  transition: height var(--fc-dur) var(--fc-ease), box-shadow var(--fc-dur) var(--fc-ease); will-change: height; }
.fc-slot.is-open .flag-card { height: 200%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), 0 30px 80px -20px rgba(0, 0, 0, .85); }
.flag-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--page, #fff), 0 0 0 4px rgba(103, 120, 124, .9), 0 30px 80px -20px rgba(0, 0, 0, .85); }
.fc-media { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.fc-media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .7), rgba(0, 0, 0, .35) 45%, transparent 75%); }
.fc-media::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, .5) 55%, rgba(0, 0, 0, .15) 80%, transparent);
  transition: opacity var(--fc-dur) var(--fc-ease); }
.fc-slot.is-open .fc-media::before { opacity: 1; } /* open: a darker field behind the list, like the reference card */
.fc-gl { position: absolute; left: 0; right: 0; bottom: 0; display: block; width: 100%; aspect-ratio: 1; opacity: 0; transition: opacity .3s; }
.flag-card.is-gl .fc-gl { opacity: 1; }
.fc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; filter: blur(12px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }
.flag-card.is-gl .fc-img { visibility: hidden; }
.fc-globe { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px;
  background: radial-gradient(ellipse at 50% 100%, #394447, #090B0C 70%); }
/* country silhouette: black mapsicon art inverted to white and blended into the flag */
.fc-map { position: absolute; right: 4%; top: 50%; width: 48%; height: 78%; object-fit: contain; pointer-events: none; display: none;
  filter: invert(1); mix-blend-mode: overlay; opacity: .22; transform: translateY(-50%);
  transition: opacity var(--fc-dur) var(--fc-ease), transform var(--fc-dur) var(--fc-ease); }
.fc-map.is-ok { display: block; }
.fc-slot.is-open .fc-map { opacity: .38; transform: translateY(-50%) scale(1.04); }
/* content (layout from the React Bits Shader Card): title and grey line at the top, then a document list with
   line icons, and a full-width pill pinned to the bottom when open */
.fc-body { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; padding: 16px 16px 4px; }
.fc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fc-titles { min-width: 0; }
.flag-card b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: "Inter Tight", Inter, sans-serif;
  font-size: 21px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; color: #F1F3F3; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.flag-card small { display: block; margin-top: 3px; color: rgba(255, 255, 255, .6); font-size: 13.5px; }
/* expanded-only content: a 0fr -> 1fr grid row fills the rest of the card and slides it in */
.fc-more { flex: 1 1 0; min-height: 0; display: grid; grid-template-rows: 0fr; opacity: 0; margin: 0 -12px; /* room inside the clip */
  transition: grid-template-rows var(--fc-dur) var(--fc-ease), opacity .15s var(--fc-ease); }
.fc-slot.is-open .fc-more { grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows var(--fc-dur) var(--fc-ease), opacity .4s var(--fc-ease) .12s; }
.fc-more-in { overflow: hidden; min-height: 0; }
.fc-more-pad { box-sizing: border-box; display: flex; flex-direction: column; height: 100%; padding: 8px 12px 12px;
  transform: translateY(12px); transition: transform var(--fc-dur) var(--fc-ease); }
.fc-slot.is-open .fc-more-pad { transform: none; }
.fc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .6); }
.fc-feats { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .86);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.fc-feats li { display: flex; align-items: center; gap: 11px; min-width: 0; }
.fc-feats li span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fc-feats svg { width: 17px; height: 17px; flex-shrink: 0; color: rgba(255, 255, 255, .9); }
.fc-cta { display: flex; align-items: center; justify-content: center; margin-top: auto; width: 100%; height: 40px; flex-shrink: 0;
  border-radius: 999px; background: rgba(9, 11, 12, .3); color: #fff; font-size: 14.5px; font-weight: 600; }
/* Liquid glass (glass.js gives it .lg .on-photo .lg-press). The card is dark in both themes, so the pane is the same
   same smoked glass in both, so white text reads even over the white of a flag, with soft light rims. */
.flag-card .fc-cta.lg.on-photo { background: rgba(9, 11, 12, .3) !important; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .65);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), inset 0 -1px 1px rgba(255, 255, 255, .14), inset 0 0 8px rgba(255, 255, 255, .1),
    0 0 0 .5px rgba(255, 255, 255, .2), 0 10px 24px -10px rgba(0, 0, 0, .6) !important; }
.flag-card:hover .fc-cta.lg.on-photo { background: rgba(9, 11, 12, .22) !important; }
@media (prefers-reduced-motion: reduce) {
  .flag-grid, .fc-slot, .flag-card, .fc-media::before, .fc-map, .fc-more, .fc-slot.is-open .fc-more, .fc-more-pad { transition: none; }
}
.country h3 a { color: var(--ink); text-decoration: none; }
.country h3 a:hover { color: var(--green); }
.country-hero { display: flex; align-items: center; gap: 28px; padding: 28px 0 8px; }
.country-hero .lead { margin-bottom: 0; }
.country-layout { padding-top: 20px; }
.tips-card { margin-top: 16px; }
.tips-card .ticks li { font-size: 14.5px; line-height: 1.55; margin-bottom: 10px; }
.req-cta .flag-lg { display: block; margin: 6px auto 0; width: 72px; }
.checked { color: var(--ok-ink); font-weight: 500; }
.samples-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 16px; }
.samples-head h2 { margin-bottom: 4px; }
.samples-head p { margin: 0; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pick { font: inherit; font-size: 13.5px; padding: 8px 14px; border-radius: 999px; border: 0; background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.pick:hover { box-shadow: 0 0 0 1px var(--line-strong); }
.pick[aria-pressed="true"] { background: var(--green); color: var(--on-green); box-shadow: none; }
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; align-items: start; }
.sample { margin: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 10px 16px; transition: transform .25s var(--ease), box-shadow .25s; }
.sample:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(34, 41, 43, .06), 0 22px 48px rgba(34, 41, 43, .14); }
.sample-media { position: relative; border-radius: 14px; overflow: hidden; background: var(--mint-soft); }
.sample-media canvas, .sample-media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.sample.ok .sample-media { box-shadow: inset 0 0 0 1px var(--line); }
.sample-badge { position: absolute; left: 10px; top: 10px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--on-ok); background: var(--ok); box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
.sample.bad .sample-badge { background: var(--red); }
/* Liquid-glass show/hide measurements button, top right of accepted samples. Sits on the photo (a light island), so fixed light glass in both themes. */
.measure-toggle {
  position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #22292B;
  background: linear-gradient(150deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .22));
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 2px rgba(34, 41, 43, .08), 0 4px 14px rgba(34, 41, 43, .18);
  -webkit-backdrop-filter: blur(10px) saturate(180%); backdrop-filter: blur(10px) saturate(180%);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.measure-toggle:hover { transform: scale(1.06); background: linear-gradient(150deg, rgba(255, 255, 255, .78), rgba(241, 243, 243, .42)); }
.measure-toggle:active { transform: scale(.96); }
.measure-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(34, 41, 43, .6); }
.measure-toggle .mt-slash { opacity: 0; transition: opacity .2s ease; }
.measure-toggle[aria-pressed="false"] { color: #67787C; }
.measure-toggle[aria-pressed="false"] .mt-slash { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .measure-toggle, .measure-toggle .mt-slash { transition: none; } }
.sample.bad .sample-media::after { content: ''; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 3px var(--red); pointer-events: none; }
.sample figcaption ul { list-style: none; margin: 14px 6px 0; padding: 0; display: grid; gap: 6px; }
.sample figcaption li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 1.4; color: var(--ink); }
.sample figcaption li::before { position: absolute; left: 0; top: 0; font-weight: 700; font-size: 12.5px; }
.sample.ok figcaption li::before { content: '✓'; color: var(--ok); }
.sample.bad figcaption li::before { content: '✕'; color: var(--red); }

@media (max-width: 960px) {
  .country-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .flag-hero { width: 72px; }
  .samples-head { flex-direction: column; align-items: flex-start; }
  .flag-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .flag-card b { font-size: 15.5px; }
  .fc-body { padding: 12px; }
  .sample-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sample { padding: 6px 6px 12px; }
  .sample-badge { left: 6px; top: 6px; padding: 4px 8px; font-size: 11px; }
  .measure-toggle { right: 6px; top: 6px; width: 30px; height: 30px; }
  .measure-toggle svg { width: 15px; height: 15px; }
  .sample figcaption ul { margin: 10px 4px 0; }
  .sample figcaption li { font-size: 12px; padding-left: 17px; }
}
@media (max-width: 480px) {
  .progress li.on { padding-right: 3px; } .progress li.on span { display: none; }
  /* shared rules: number beside the title, so seven cards don't each take a screen third */
  .rule-grid { gap: 10px; }
  .rule-grid .card { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: center; padding: 16px; }
  .rule-grid .card h3 { margin: 0; }
  .rule-grid .card p { grid-column: 2; margin-top: 4px; }
}

/* =====================================================================
   Liquid Glass in the photo tool. The material itself (.lg) lives in site.css
   and is shared by every page; these rules place it on the tool's own controls.
   ===================================================================== */

/* colour for the glass to bend: soft fields behind the page */
body { background:
  radial-gradient(48vw 36vw at 6% -4%, rgba(208, 214, 216, .75), transparent 70%),
  radial-gradient(40vw 30vw at 96% 12%, rgba(103, 120, 124, .28), transparent 70%),
  radial-gradient(36vw 28vw at 82% 88%, rgba(255, 214, 140, .35), transparent 70%),
  radial-gradient(60vw 44vw at 30% 108%, rgba(160, 210, 220, .45), transparent 70%),
  var(--page); background-attachment: fixed; }


.ba-tag.on-photo.lg, .dz-change.on-photo.lg { background: rgba(9, 11, 12, .26) !important; }

.app-head .progress { background: rgba(9, 11, 12, .05); box-shadow: inset 0 1px 2px rgba(9, 11, 12, .08); position: relative; overflow: visible; }
.app-head .progress li { position: relative; z-index: 3; background: none !important; }
.app-head .progress li.on { color: var(--green); font-weight: 600; }
.app-head .progress li.on i { background: var(--green); color: var(--on-green); }

.progress .lg-lens { top: 5px; bottom: 5px; }

/* tabs: one glass track with the lens inside */
.tabs.lg { padding: 4px; }
.tabs.lg .tab { position: relative; z-index: 3; background: none !important; color: var(--muted); transition: color .35s; }
.tabs.lg .tab.on { color: var(--green); font-weight: 600; }

/* buttons: all glass. Primary actions read stronger (bolder text, a touch of green in the glass) */
.btn.lg { color: var(--green); font-weight: 600; }
.btn-primary.lg { background: rgba(103, 120, 124, .10) !important; font-size: 16.5px; }
.btn-xl.lg { font-size: 17.5px; }
.perfect-card .btn.lg { color: #fff; background: rgba(255, 255, 255, .08) !important; }
.dz-btn.lg { color: var(--green); background: rgba(103, 120, 124, .10) !important; box-shadow: inset 0 1.5px 1px #fff, inset 0 -1px 1px rgba(255, 255, 255, .5), inset 0 0 6px rgba(255, 255, 255, .4), 0 0 0 .5px rgba(9, 11, 12, .14), 0 10px 24px -8px rgba(22, 27, 29, .3) !important; }

/* controls over the photo */
.ba-knob.lg { padding: 0 8px; height: 32px; gap: 4px; }
.ba-knob.lg svg { width: 11px; height: 11px; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45)); }
.ba-knob.lg i { height: 12px; }
.ba-knob.lg i { background: rgba(255, 255, 255, .75); box-shadow: 0 0 2px rgba(0, 0, 0, .3); }
.ba-line { background: rgba(255, 255, 255, .85); }
.chip.lg::after { content: ' · Change'; position: static; inset: auto; background: none; mix-blend-mode: normal; color: var(--leaf-ink); font-weight: 500; }
.chip.lg { color: var(--ink); }
.studio-skip.lg { padding: 8px 14px; border-radius: 999px; }
.studio-doc.lg { color: var(--green); }

/* ---------- dark theme: the few rules tokens can't reach ---------- */
[data-theme="dark"] body { background:
  radial-gradient(48vw 36vw at 6% -4%, rgba(57, 68, 71, .55), transparent 70%),
  radial-gradient(40vw 30vw at 96% 12%, rgba(103, 120, 124, .18), transparent 70%),
  radial-gradient(36vw 28vw at 82% 88%, rgba(255, 214, 140, .07), transparent 70%),
  radial-gradient(60vw 44vw at 30% 108%, rgba(160, 210, 220, .1), transparent 70%),
  var(--page); background-attachment: fixed; }
[data-theme="dark"] .app-head .progress { background: rgba(255, 255, 255, .05); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
[data-theme="dark"] .check-summary.bad { color: #F6A898; }
[data-theme="dark"] .checks li.warn .ic { color: #090B0C; }
[data-theme="dark"] .studio-steps li { color: #67787C; }
[data-theme="dark"] .dz-btn.lg { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25), inset 0 0 6px rgba(255, 255, 255, .06), 0 0 0 .5px rgba(255, 255, 255, .14), 0 10px 24px -8px rgba(0, 0, 0, .6) !important; }
/* the photo stays on its own light backdrop */
[data-theme="dark"] .ba { background: #F1F3F3; }
[data-theme="dark"] .studio-stage canvas { background: #161B1D; }

