/* Same type and colour as the Spindle landing (spindle.berlayar.ai): classic serif display, Caveat hand line,
   DM Sans text, graphite ink and actions on white. Faces come from the landing's own font sheet; the hand
   follows the visitor's landing choice through --spindle-handwriting-font. */
@import url('/landing-assets/fonts.css');
/* Element rules stop at the Tools photo controls (#tools-section), which bring the Tools page's own styles (tools.css,
   #422); :where() keeps their specificity unchanged. */
:root{--ink:#23272f;--action:#303642;--muted:#5d6471;--line:#e1e3e1;--paper:#fff;--surface:#f7f7f7;--accent:#f3ce36;--gold:#c4952f;--band:#f4f1e8;
  --serif:'Nimbus Roman',Georgia,serif;--hand:var(--spindle-handwriting-font,Caveat),'Segoe Print',cursive;--sans:'DM Sans',Arial,sans-serif;color-scheme:light;
  /* Ink marks from the landing: the accent tone is the illustration's gold. */
  --sf-orange:var(--gold)}
*:where(:not(#tools-section *)){box-sizing:border-box}
body{margin:0;background:#fbfbfa;color:var(--ink);font:400 16px/1.6 var(--sans);overflow-x:clip}
a:where(:not(#tools-section *)){color:inherit;text-underline-offset:.18em}
:focus-visible:where(:not(#tools-section *)){outline:3px solid var(--accent);outline-offset:3px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.shell{width:min(72rem,calc(100% - 2.5rem));margin-inline:auto}
/* Full-bleed bands keep their content on the same 72rem line as .shell. */
:root{--gutter:max(1.25rem,calc((100% - 72rem) / 2))}

.site-header,.site-footer{padding-inline:clamp(1.25rem,5vw,4.25rem)}
.site-header{position:sticky;top:0;z-index:3;height:70px;display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#fbfbfa}
.brand{display:flex;align-items:baseline;gap:1px;text-decoration:none;font:400 34px/1 var(--serif);letter-spacing:-.02em}
.brand-mark{display:inline-block;width:.46em;height:.72em;background:var(--accent);mask:url('/landing-assets/assets/brand/flowing-sand.svg') center/100% 100% no-repeat;-webkit-mask:url('/landing-assets/assets/brand/flowing-sand.svg') center/100% 100% no-repeat}
.locale-select{font:400 15px/1.2 var(--sans);color:var(--ink);background:transparent;border:0;border-radius:6px;padding:.5rem .4rem;cursor:pointer}
.locale-select:hover{background:var(--surface)}

section:where(:not(#tools-section *)),article:where(:not(#tools-section *)){margin-block:clamp(3.5rem,9vw,6.5rem)}
/* Below the hero, every section is its own full-width band, edge to edge, each with its own ground. */
main > :is(section,aside):not(.hero):where(:not(#tools-section *)){margin:0;padding:clamp(3.5rem,8vw,6rem) var(--gutter)}
.compliant{background:var(--paper);overflow-x:clip}
.popular{background:#eef0ea}
main > section.popular:not(.hero){padding-inline:0}
.faq{background:#fbfbfa}
/* The story between the documents and the questions: a short dark band, not another section of facts. */
.interlude{background:var(--ink);text-align:center}
.interlude-inner{max-width:58rem;margin:0 auto}
.interlude p{margin:0 auto;max-width:none;font:400 clamp(22px,2.6vw,32px)/1.4 var(--serif);color:#eef0ea}
.interlude .interlude-sign{margin-top:1rem;font:400 clamp(26px,2.8vw,34px)/1.3 var(--hand);color:var(--gold)}
/* The one underline here is the link's own, drawn in gold. */
.interlude-sign a{margin-left:.35em;padding-bottom:.18em;font:400 .82em/1 var(--serif);color:#fff;text-decoration:none;white-space:nowrap;background:linear-gradient(var(--gold),var(--gold)) left bottom/100% 2px no-repeat}
.interlude-sign a::after{content:'→';display:inline-block;margin-left:.35em;transition:transform .2s}
.interlude-sign a:hover::after{transform:translateX(4px)}
h1:where(:not(#tools-section *)),h2:where(:not(#tools-section *)){font-weight:400;margin:0 0 .4em;color:var(--ink)}
h2:where(:not(#tools-section *)){font:400 clamp(40px,5.5vw,64px)/1.05 var(--hand)}
p:where(:not(#tools-section *)){color:var(--muted);max-width:56ch}
section:not(.panel) > h2:where(:not(#tools-section *)){text-align:center}
.serif-title{font:400 clamp(36px,4.6vw,56px)/1.08 var(--serif);letter-spacing:-.02em}

.primary:where(:not(#tools-section *)),.secondary:where(:not(#tools-section *)),input:where(:not(#tools-section *))::file-selector-button{display:inline-block;font:500 15px/1.2 var(--sans);padding:12px 22px;border-radius:6px;text-decoration:none;cursor:pointer;border:1px solid var(--action)}
.primary:where(:not(#tools-section *)),input:where(:not(#tools-section *))::file-selector-button{background:var(--action);color:#fff}
.secondary{background:var(--paper);color:var(--ink);border-color:var(--line)}
button:disabled:where(:not(#tools-section *)){opacity:.5;cursor:default}

/* Hero: the maker on the left, the illustration and its document on the right. */
/* The illustration runs to the right edge and stands on the How it works band below. */
.hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(1.5rem,3vw,3rem);align-items:end;padding-left:var(--gutter);margin:0}
/* The copy starts just under the header; the illustration fills the height beside it. */
.hero-copy{align-self:start;padding-block:clamp(.75rem,2.5vw,2rem) clamp(2rem,4vw,3rem)}
.hero-visual img{max-height:calc(100vh - 70px);object-fit:contain;object-position:right bottom}
.hero h1{font:400 clamp(40px,3.7vw,62px)/1.08 var(--serif);letter-spacing:-.025em;margin:0 0 clamp(1.25rem,3vw,2rem)}
.title-line{display:block}
@media(min-width:861px){.title-line{white-space:nowrap}}
.hero .hand{font:400 1.14em/1 var(--hand);letter-spacing:0;white-space:nowrap;color:var(--action);--ink-mark-stroke:2.6}
.rotation{display:inline-block;color:inherit;transition:color .4s ease}
/* Hold the hand-lettered words until their face is ready, so they never flash in a fallback hand. */
@media(scripting:enabled){html:not(.fonts-ready) .hero .hand{visibility:hidden}}
.hero h1[data-kind=passport] .rotation{color:#8e1f2f}
.hero h1[data-kind=ic] .rotation{color:#b2486a}

.panel{scroll-margin-top:84px;margin:0;max-width:36rem}
fieldset:where(:not(#tools-section *)){border:0;margin:0;padding:0;min-width:0}
legend:where(:not(#tools-section *)){padding:0;margin-bottom:.6rem;font-weight:500}
.chips{display:flex;flex-wrap:wrap;gap:.6rem}
.chip-loading{color:var(--muted);font-size:15px}
.chip{display:inline-flex;align-items:center;gap:.55rem;padding:.55rem 1.1rem .55rem .8rem;border:1.5px solid var(--line);border-radius:999px;background:var(--paper);cursor:pointer;font-weight:500;transition:border-color .2s,background-color .2s,transform .2s}
.chip:hover{border-color:#b9bcc2}
.chip-doc{display:block;height:2.1rem;width:auto;border-radius:3px;box-shadow:0 2px 6px -2px rgb(0 0 0 / .35)}
.chip-doc-ic{border-radius:4px}
.chip input{appearance:none;margin:0;width:1.15rem;height:1.15rem;border:1.5px solid #a9adb4;border-radius:5px;display:grid;place-content:center;background:var(--paper);transition:background-color .2s,border-color .2s}
.chip input::after{content:'';width:.6rem;height:.32rem;border:solid #fff;border-width:0 0 2px 2px;transform:translateY(-1px) rotate(-45deg) scale(0);transition:transform .15s ease}
.chip input:checked{background:var(--action);border-color:var(--action)}
.chip input:checked::after{transform:translateY(-1px) rotate(-45deg) scale(1)}
.chip:has(input:checked){border-color:var(--action);background:#fff9e0}
.chip.is-featured{border-color:var(--gold);box-shadow:0 0 0 4px rgb(196 149 47 / .18);transform:translateY(-1px)}
.chip:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
.chip input:focus-visible{outline:none}
fieldset:disabled .chip{opacity:.55;cursor:default}
#spec-summary{font-size:14px;margin:.75rem 0 .1rem;white-space:pre-line}
#spec-details{font-size:14px;margin:0;display:flex;flex-wrap:wrap;gap:.1rem 1rem}
#preset-warning{margin:.5rem 0 0}

.dropzone{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:.1rem 1rem;margin-top:1.25rem;padding:1.1rem 1.25rem;border:2px dashed #cdd0d5;border-radius:16px;background:var(--paper);transition:border-color .2s,background-color .2s,transform .2s}
.dropzone.dragging{border-color:var(--gold);background:#fffaf0;transform:scale(1.01)}
.drop-art{grid-row:span 2;width:3rem;height:3rem;fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.drop-art .accent{stroke:var(--gold)}
.drop-copy{margin:0;color:var(--ink);font-size:18px;font-weight:500}
.take{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-decoration-color:var(--gold);text-decoration-thickness:2px;text-underline-offset:.2em}
.take:hover{text-decoration-thickness:3px}
#upload-help{font-size:14px;margin:0}
.actions{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;margin-top:1rem}
.upload{margin:0}
.cta{position:relative;overflow:hidden;font-size:17px;padding:15px 30px;border-radius:10px;box-shadow:0 10px 24px -12px rgb(35 39 47 / .7);transition:transform .2s,box-shadow .2s}
.cta::after{content:'→';display:inline-block;margin-left:.6rem;transition:transform .2s}
.cta:hover{transform:translateY(-1px);box-shadow:0 14px 28px -12px rgb(35 39 47 / .75)}
.cta:hover::after{transform:translateX(4px)}
.upload:has(input:disabled){opacity:.5;cursor:default;box-shadow:none;transform:none}
.upload:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
#maker-status{margin:1rem 0 0;white-space:pre-line}
#maker-status:empty,#preset-warning:empty,#camera-status:empty,#spec-summary:empty{margin:0}
/* The superadmin's checks control and compare (#778); nobody else gets these elements. */
#checks{margin-top:1rem;font-size:14px;color:var(--ink)}
.settings-table{border-collapse:collapse;width:100%;max-width:26rem;table-layout:fixed}
.settings-table th,.settings-table td{padding:.25rem .35rem;text-align:left;font-weight:400;border-bottom:1px solid var(--line)}
.settings-table thead th{font-weight:500;color:var(--muted)}
.settings-table tbody th{width:40%}
.settings-table select{font:inherit;width:100%;padding:.3rem .35rem;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink)}
.settings-table input[type=checkbox]{width:1.1rem;height:1.1rem;accent-color:var(--action)}
.checks-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.6rem}
#checks .checks-actions .secondary{padding:8px 14px;font-size:14px}
#checks .run-both:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
#site-default{margin:.5rem 0 0;font-size:13px}
#compare-status{margin:.5rem 0 0}
#compare-status:empty{display:none}
.compare-table{width:100%;margin-top:.75rem;border-collapse:collapse;table-layout:fixed;font-size:14px;color:var(--ink)}
.compare-table th,.compare-table td{padding:.4rem .35rem;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;overflow-wrap:anywhere}
.compare-table thead th:first-child,.compare-table tbody th{width:28%}
.compare-table small{display:block;color:var(--muted);font-size:12px;line-height:1.35}
.compare-table tr.differs{background:var(--band)}
.compare-table tr.differs th{box-shadow:inset 3px 0 0 var(--gold)}
.differs-mark{color:var(--gold);font-weight:700}
.compare-thumb{display:block;width:100%;max-width:9rem;height:auto;border:1px solid var(--line)}
input:disabled:where(:not(#tools-section *))::file-selector-button{opacity:.45;cursor:default}

#camera-panel{margin-top:1rem;scroll-margin-top:84px}
#camera-panel p{margin-top:0}
.camera-layout{display:grid;grid-template-columns:minmax(0,20rem) minmax(0,1fr);gap:1rem 1.25rem;align-items:start}
.camera-frame{position:relative;width:100%}
.live-light{display:none;position:absolute;top:.6rem;left:.6rem;align-items:center;gap:.4rem;padding:.2rem .55rem;border-radius:999px;background:rgb(0 0 0 / .55);color:#fff;font:600 12px/1.4 var(--sans);letter-spacing:.06em;text-transform:uppercase}
.live-light::before{content:'';width:.55rem;height:.55rem;border-radius:50%;background:#e5484d;box-shadow:0 0 0 3px rgb(229 72 77 / .35)}
.live .live-light{display:inline-flex}
#camera-preview{display:block;width:100%;object-fit:cover;object-position:center;background:var(--surface);border-radius:6px}
#camera-preview.mirrored{transform:scaleX(-1)}
#head-guide{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;fill:none;stroke:#fff;stroke-width:3;stroke-dasharray:10 7;filter:drop-shadow(0 0 2px rgb(0 0 0 / .55))}
.camera-frame:has(#camera-preview[hidden]) #head-guide{display:none}
.camera-actions{display:flex;gap:.6rem;margin-top:.85rem;flex-wrap:wrap}
#camera-guides{list-style:none;padding:0;margin:0;display:grid;gap:.45rem;font-size:15px;color:var(--ink)}
#camera-guides li{display:flex;gap:.55rem;align-items:baseline}
#camera-guides li::before{content:'';flex:none;width:.45rem;height:.45rem;border-radius:50%;background:var(--gold);transform:translateY(-.1em)}
#camera-panel[hidden],#camera-controls[hidden],#switch-camera[hidden],#camera-preview[hidden],#accept-current[hidden],#continue-photo[hidden],#hero[hidden],
#maker.camera-open :is(#maker-status,.actions,.dropzone){display:none}

.hero-visual{position:relative;container-type:inline-size;align-self:end}
.hero-visual img{display:block;width:100%;height:auto}

/* Drawn documents: illustrative colours, not official designs. */
.doc-face{position:absolute;inset:0;display:grid;grid-template-columns:32% minmax(0,1fr);gap:8%;align-items:center;padding:8% 8%;border-radius:7cqw;background:var(--doc-bg);color:var(--doc-ink);box-shadow:0 1.4em 2.4em -1.4em rgb(0 0 0 / .5),inset 0 0 0 1px rgb(0 0 0 / .12);backface-visibility:hidden}
.doc-face[data-kind=passport]{--doc-bg:#8e1f2f;--doc-ink:#f1d48c}
.doc-face[data-kind=ic]{--doc-bg:#f5c7d2;--doc-ink:#6b2638}
.doc-face[data-kind=visa]{--doc-bg:#2f6b5e;--doc-ink:#e6f2ec}
.doc-face[data-kind=print]{--doc-bg:#fff;--doc-ink:#4a4f58;box-shadow:0 1.4em 2.4em -1.4em rgb(0 0 0 / .35),inset 0 0 0 1.5px #d7d9dc}
.doc-face[data-kind=license]{--doc-bg:#2d5b9a;--doc-ink:#eef3fb}
.doc-face[data-kind=student]{--doc-bg:#f3ce36;--doc-ink:#3b3206}
.doc-photo svg{display:block;width:100%}
.doc-photo rect{fill:#fff}
.doc-text{display:grid;gap:.4em;min-width:0;font:500 6cqw/1.1 var(--sans)}
.doc-text b{font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.doc-face{grid-template-rows:auto 1fr}
.doc-head{grid-column:1/-1;font:700 5.2cqw/1 var(--sans);letter-spacing:.08em;text-transform:uppercase;opacity:.85}
/* The real passport cover image, at its own proportions. */
.doc-cover{inset:0 27%;display:block;padding:0;background:none;box-shadow:none;border-radius:0}
/* ICA's specimen card photo, rounded like the card itself. */
.doc-image{display:block;padding:0;background:none}
.doc-image img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.doc-cover img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1.2em 1.6em rgb(0 0 0 / .35))}
/* A 35 × 45 mm print with cut marks. */
.doc-print{inset:-4% 30%;display:block;padding:7%;border-radius:2px}
.doc-print .doc-photo,.doc-print svg{height:100%;width:100%}
.doc-text span{font-size:.72em;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.doc-text b:empty,.doc-text span:empty{display:none}
.doc-text i{display:block;height:.45em;border-radius:1em;background:currentColor;opacity:.35}
.doc-text i + i{width:62%}

.doc-deck{position:absolute;left:0;bottom:10%;width:44%;aspect-ratio:1.58;container-type:inline-size;perspective:900px;rotate:-7deg}
.doc-deck .doc-face{transition:transform .6s cubic-bezier(.3,.7,.2,1),opacity .45s ease;transform:rotateY(-80deg) translateX(-14%);opacity:0}
.doc-deck .doc-face.is-front{transform:none;opacity:1}

/* How it works: a warm band; the three drawings joined by a path that draws in. */
.how{position:relative;margin-top:0;background:var(--band);padding:clamp(2.75rem,6vw,4.5rem) var(--gutter)}
.how-path{position:absolute;left:calc(var(--gutter) + 9%);right:auto;width:calc(100% - 2 * var(--gutter) - 18%);top:calc(clamp(2.75rem,6vw,4.5rem) + clamp(36px,4.6vw,56px) * 1.08 + 4.6rem);height:40px;fill:none;stroke:var(--gold);stroke-width:2;stroke-linecap:round;overflow:visible}
.how-path path{stroke-dasharray:1;stroke-dashoffset:0}
.steps{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem;list-style:none;counter-reset:step;padding:0;margin:1.5rem 0 0}
.steps li{counter-increment:step;color:var(--muted);text-align:center;display:flex;flex-direction:column;align-items:center}
.step-art{position:relative;display:grid;place-items:center;width:9.5rem;height:9.5rem;border-radius:50%;background:var(--paper);box-shadow:0 12px 30px -18px rgb(35 39 47 / .45);margin-bottom:1rem}
.step-art::before{content:counter(step);position:absolute;top:.1rem;left:.2rem;display:grid;place-items:center;width:2.6rem;height:2.6rem;border-radius:50%;background:var(--accent);color:var(--ink);font:400 30px/1 var(--hand)}
.step-art svg{width:5.5rem;height:5.5rem;fill:none;stroke:var(--ink);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.step-art svg text{fill:var(--ink);stroke:none;font:700 12px var(--sans);letter-spacing:.06em}
.step-art .accent,.step-art .arrow{stroke:var(--gold);stroke-width:3}
.step-art .guide{stroke:var(--gold);stroke-dasharray:5 4}
.steps strong{display:block;color:var(--ink);font:400 26px/1.2 var(--serif);margin:.25rem 0}

/* Compliant by design: the photo's rules drawn as a measured sheet beside the checks. */

/* Popular documents: every document for the country scrolls past; hover, focus or Pause holds it. */
.popular{overflow:hidden}
.strip{margin-top:1.75rem;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;cursor:grab}
.strip::-webkit-scrollbar{display:none}
.strip.dragging{cursor:grabbing;user-select:none}
.strip.dragging a{pointer-events:none}
.strip:focus-visible{outline-offset:-3px}
.marquee{display:flex;width:max-content}
.doc-track{display:flex;gap:1.25rem;list-style:none;margin:0;padding:.5rem 0 1.25rem 1.25rem}
.doc-track li{flex:none;width:15rem;display:grid;justify-items:center;text-align:center;gap:.35rem;padding:1.25rem 1rem 1.1rem;border-radius:18px;background:var(--paper);box-shadow:0 1px 2px #0000000a,0 12px 30px -22px rgb(35 39 47 / .45)}
.doc-art{position:relative;display:block;width:10rem;aspect-ratio:1.58;margin-bottom:.6rem;container-type:inline-size;transition:transform .3s ease}
.doc-track li:hover .doc-art{transform:rotate(-3deg) translateY(-3px)}
.doc-track h3{margin:0;font:400 22px/1.15 var(--serif)}
.card-note{font-size:14px;color:var(--muted)}
/* The whole card opens its guide; the citation number sits above that link. */
.card-link{color:inherit;text-decoration:none}
.card-link::after{content:'';position:absolute;inset:0;border-radius:inherit}
.card-link:hover{text-decoration:underline;text-decoration-color:var(--gold);text-underline-offset:.2em}
.card-link:focus-visible{outline:none}
.doc-track li:has(.card-link:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
.cite{position:relative;display:inline-block}
.cite-n{position:relative;z-index:1}
/* Image citations on the cards, as on the Tools page: a number that opens the source over the card. */
.doc-track li{position:relative}
.cite-n{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:.35rem;padding:0 5px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--muted);font:600 11px/1 var(--sans);vertical-align:3px;cursor:pointer}
.cite-n:hover,.cite-n[aria-expanded=true]{background:var(--action);border-color:var(--action);color:#fff}
/* The source opens right above its number, touching it so the pointer can move straight in. */
.cite-pop{display:none;position:absolute;left:50%;bottom:100%;z-index:2;padding-bottom:6px;transform:translateX(-50%);width:max-content;max-width:13rem;text-align:left}
.cite.open .cite-pop,body:not(.cite-open) .cite:hover .cite-pop{display:block}
.cite-box{display:block;padding:.5rem .75rem;background:var(--paper);border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 16px #1d38231a;font:400 13px/1.5 var(--sans);color:var(--muted)}
.cite-box a{color:var(--ink);text-underline-offset:3px}
.marquee-toggle{display:grid;place-items:center;width:2.25rem;height:2.25rem;margin:.25rem auto 0;color:var(--muted);background:var(--paper);border:1px solid var(--line);border-radius:50%;cursor:pointer}
.marquee-toggle svg{width:14px;height:14px;fill:currentColor}
.marquee-toggle .icon-play,.marquee-toggle[aria-pressed=true] .icon-pause{display:none}
.marquee-toggle[aria-pressed=true] .icon-play{display:block}
.marquee-toggle:hover{color:var(--ink);border-color:#b9bcc2}

/* Questions run the same 72rem line as How It Works. */
.faq > :not(h2){max-width:72rem;margin-inline:auto}
.faq-more{text-align:center;margin:1.5rem auto 0;font-weight:500}
.faq-more a{color:var(--ink);text-decoration-color:var(--gold);text-decoration-thickness:2px}
.faq-group{margin-block:2.5rem 0}
.faq-group > h2{text-align:left}
.faq-page .primary{margin-top:2rem}
details:where(:not(#tools-section *)){border-bottom:1px solid var(--line)}
summary:where(:not(#tools-section *)){list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:1rem;padding:1.1rem 0;font-weight:500;font-size:17px}
summary:where(:not(#tools-section *))::-webkit-details-marker{display:none}
summary:where(:not(#tools-section *))::after{content:'+';font:400 24px/1 var(--sans);color:var(--gold);transition:transform .25s ease}
details[open] summary:where(:not(#tools-section *))::after{transform:rotate(45deg)}
details p:where(:not(#tools-section *)){margin:0 0 1.1rem}

footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem 1.5rem;padding-block:1.75rem;border-top:1px solid var(--line);font-size:14px;color:var(--muted)}
.guide + footer,main + footer{margin-top:clamp(2rem,6vw,4rem)}
footer nav{display:flex;flex-wrap:wrap;gap:.5rem 1.25rem}
footer a{text-decoration:none}
footer a:hover{text-decoration:underline}
.disclaimer{flex-basis:100%;max-width:none;margin:.25rem 0 0;font-size:12px;line-height:1.5;color:#8a8f98}
.soon small{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#8a8f98;border:1px solid var(--line);border-radius:999px;padding:0 .4rem;margin-left:.15rem}

.guide{margin-inline:auto}
.guide h1{font:400 clamp(40px,6vw,64px)/1.05 var(--serif);letter-spacing:-.02em}
.guide h2{font:400 clamp(26px,3.5vw,34px)/1.15 var(--serif);text-align:left;margin-top:2rem}
.guide dl{border-block:1px solid var(--line);padding-block:1rem;display:grid;gap:.75rem}
.guide dl div{display:grid;grid-template-columns:8rem 1fr}
.guide dt{font-weight:500}
.guide dd{margin:0}
.guide li{color:var(--muted)}

/* Motion: the deck floats, the guide marches and sections draw in, each once and briefly (see maker.js). None with reduced motion. */
@media(prefers-reduced-motion:no-preference){
  /* Each loop ends within five seconds (WCAG 2.2.2). */
  .doc-deck{animation:float 2.4s ease-in-out 2}
  .is-in .step-art .guide{animation:march 1.2s linear 4}
  .reveals .reveal{transition:background-color .8s ease}
  .reveals .reveal .r-item{opacity:0;transform:translateY(28px);transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
  .reveals .reveal .r-item.is-in{opacity:1;transform:none}
  .reveals .reveal .r-item:nth-child(2){transition-delay:.12s}
  .reveals .reveal .r-item:nth-child(3){transition-delay:.24s}
  .reveals .reveal .r-item:nth-child(4){transition-delay:.36s}
  .reveals .reveal .r-item:nth-child(5){transition-delay:.48s}
  .reveals .reveal .r-item:nth-child(6){transition-delay:.6s}
  .reveals .reveal .step-art{transform:scale(.6);transition:transform .7s cubic-bezier(.3,1.5,.5,1)}
  .reveals .reveal .r-item.is-in .step-art{transform:none}
  .reveals .how-path path{stroke-dashoffset:1;transition:stroke-dashoffset 1.4s cubic-bezier(.4,.2,.2,1)}
  .reveals .how:has(.steps .is-in) .how-path path{stroke-dashoffset:0}
  details[open] > p:where(:not(#tools-section *)){animation:open .3s ease}
  /* Why Spindle reads in beats: each sentence clears in turn, the last one lands, then the sign-off. */
  .reveals .interlude .beat{opacity:0;filter:blur(6px);transition:opacity .7s ease,filter .7s ease}
  .reveals .interlude.is-in .beat{opacity:1;filter:none}
  .reveals .interlude .beat:nth-of-type(2){transition-delay:.45s}
  .reveals .interlude .beat:nth-of-type(3){transition-delay:.9s}
  .reveals .interlude .punch{display:inline-block;transform:scale(.92);transition:opacity .5s ease 1.45s,filter .5s ease 1.45s,transform .6s cubic-bezier(.3,1.6,.5,1) 1.45s}
  .reveals .interlude.is-in .punch{transform:none}
  .reveals .interlude .interlude-sign .beat{transition-delay:2.1s}
  .reveals .interlude .interlude-sign a.beat{transition:opacity .7s ease 2.5s,filter .7s ease 2.5s,background-size .9s cubic-bezier(.4,.2,.2,1) 3.1s;background-size:0 2px}
  .reveals .interlude.is-in .interlude-sign a.beat{background-size:100% 2px}
  /* The hero arrives on load: words rise in turn, the illustration slides in from the edge. */
  .hero-copy > *{animation:rise .8s cubic-bezier(.2,.7,.2,1) both}
  .hero-copy > :nth-child(2){animation-delay:.15s}
  .hero-visual{animation:arrive 1s cubic-bezier(.2,.7,.2,1) .1s both}
}
@keyframes float{50%{transform:translateY(-10px)}}
@keyframes rise{from{opacity:0;transform:translateY(22px)}}
@keyframes arrive{from{opacity:0;transform:translateX(40px)}}
@keyframes march{to{stroke-dashoffset:-18}}
@keyframes open{from{opacity:0;transform:translateY(-4px)}}


@media(max-width:860px){
  .hero{grid-template-columns:minmax(0,1fr)}
  /* The changing word gets a line of its own, so the headline never reflows as it changes. */
  .doc-line{display:block}
  .hero{padding-left:0}
  .hero-copy{padding-inline:1.25rem}
  .hero-visual{width:min(100%,32rem);margin-left:auto}
  .doc-deck{left:4%}
}
@media(max-width:650px){
  .brand{font-size:30px}
  .locale-select{font-size:14px;padding-right:1.5rem}
  .hero h1{font-size:clamp(36px,10.5vw,46px)}
  .steps{grid-template-columns:1fr;gap:2rem}
  .step-art{width:7.5rem;height:7.5rem}
  .step-art svg{width:4.5rem;height:4.5rem}
  .how-path{display:none}
  .camera-layout{grid-template-columns:1fr}
  footer{justify-content:flex-start}
}
/* Phones can't drag a file in; the camera is the way. */
@media(pointer:coarse){
  .drag-copy{display:none}
  .take::first-letter{text-transform:uppercase}
}
/* Without motion the strip doesn't drift: the second copy and its control go away; it still scrolls. */
@media(prefers-reduced-motion:reduce){
  .doc-track[aria-hidden],.marquee-toggle{display:none}
}

/* Compliant by Design: the photos a Singapore citizen needs from birth to 80, then one person at five ages. */
.lc-life,.lc-stage{max-width:64rem;margin:1.75rem auto 0}
.lc-life{margin-top:2.5rem}
/* Lanes: a label column, then one column per photo, on two lines (Passport, NRIC); ages under them. */
.lc-track{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem}
.lc-lanes{margin:0;display:grid;grid-template-rows:1.6rem 1.75rem 1.75rem 1.75rem;align-items:center;font:500 13px/1 var(--sans);color:var(--muted)}
.lc-lanes span:first-child{grid-row:4;visibility:hidden}
.lc-lanes span:nth-child(2){grid-row:2}.lc-lanes span:nth-child(3){grid-row:3}
.lc-ages{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(12,minmax(0,1fr))}
.lc-age{position:relative;display:grid;grid-template-rows:1.6rem 1.75rem 1.75rem 1.75rem;justify-items:center;align-items:center}
.lc-dot.is-passport{grid-row:2}.lc-dot.is-nric{grid-row:3}.lc-year{grid-row:4;font:500 14px/1 var(--sans);font-variant-numeric:tabular-nums;color:var(--ink)}
.lc-both{grid-row:1;font:400 20px/1 var(--hand);color:var(--gold)}
/* The lane lines run behind the dots. */
.lc-age::before,.lc-age::after{content:'';position:absolute;left:0;right:0;height:2px;background:var(--line);z-index:0}
.lc-age::before{top:calc(1.6rem + .875rem - 1px)}.lc-age::after{top:calc(1.6rem + 2.625rem - 1px)}
.lc-dot{position:relative;z-index:1;width:14px;height:14px;border-radius:50%;background:var(--ink)}
.lc-dot.is-off{background:none}
/* One photo for both: both dots in gold. */
.lc-age.is-both .lc-dot{background:var(--gold)}
/* Each age is a button laid over its column: pick it to see that age above. */
.lc-pick{position:absolute;inset:0;z-index:2;margin:0;padding:0;border:0;border-radius:6px;background:none;cursor:pointer}
.lc-pick:hover{background:#1b1d220a}
.lc-pick:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
/* The age on show: its column lit, its year bold. */
.lc-age.is-selected{background:#f6eccb;border-radius:8px}
.lc-age.is-selected .lc-year{font-weight:700}
.lc-stage{display:grid;gap:1rem}
.lc-panel{display:grid;grid-template-columns:minmax(0,22rem) minmax(0,26rem);justify-content:center;gap:clamp(1.5rem,5vw,4rem);align-items:start}
.lc-compare{--at:50%;position:relative;aspect-ratio:400/514;overflow:hidden;border-radius:8px;border:1px solid var(--line);background:#fff;touch-action:pan-y;cursor:ew-resize;user-select:none;-webkit-user-select:none}
.lc-compare img{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.lc-after{position:absolute;inset:0;clip-path:inset(0 0 0 50%)}
.lc-window{position:absolute;border:2px dashed var(--gold);border-radius:2px;pointer-events:none}
.lc-tag{position:absolute;top:.6rem;left:.7rem;font:500 12px/1 var(--sans);color:var(--ink);background:#ffffffd9;padding:.3rem .45rem;border-radius:4px}
.lc-tag.is-after{left:auto;right:.7rem}
.lc-divider{position:absolute;top:0;bottom:0;left:var(--at);width:2px;margin-left:-1px;background:#fff}
.lc-divider::after{content:'';position:absolute;top:50%;left:50%;width:40px;height:40px;margin:-20px 0 0 -20px;border-radius:50%;background:#fff;box-shadow:0 1px 6px #1b1d2233}
.lc-grip{position:absolute;top:50%;left:50%;z-index:1;width:22px;height:22px;transform:translate(-50%,-50%);fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lc-divider:focus-visible{outline:none}
.lc-divider:focus-visible::after{outline:3px solid var(--accent);outline-offset:2px}
/* The chop: a red rubber stamp, drawn, not a picture of text. It lands once the Spindle side is showing. */
.lc-view{position:relative}
/* The Spindle photo's size, drawn beside it like a dimension line: width above, height on the right. Drawn in with the chop,
   and shown only while the Spindle photo fills the frame (--dims follows the line). */
.lc-frame{position:relative;padding:1.7rem 2.1rem 0 0}
.lc-dim{position:absolute;margin:0;display:flex;align-items:center;justify-content:center;pointer-events:none;color:var(--muted);opacity:var(--dims,0);font:600 12px/1 var(--sans);font-variant-numeric:tabular-nums}
.lc-dim::before{content:'';position:absolute;background:var(--muted);transition:transform .7s ease-out}
.lc-dim span{position:relative;background:var(--paper);padding:0 .35rem;opacity:0;transition:opacity .3s .5s}
.lc-dim.is-w{top:0;left:0;right:2.1rem;height:1.7rem;border-inline:2px solid #0000}
.lc-dim.is-w::before{left:0;right:0;top:50%;height:2px;margin-top:-1px;transform:scaleX(0)}
.lc-dim.is-h{top:1.7rem;bottom:0;right:0;width:2.1rem}
.lc-dim.is-h::before{top:0;bottom:0;left:50%;width:2px;margin-left:-1px;transform:scaleY(0)}
.lc-dim.is-h span{writing-mode:vertical-rl;padding:.35rem 0}
.lc-frame.is-measured .lc-dim.is-w{border-color:var(--muted)}
.lc-frame.is-measured .lc-dim::before{transform:none}
.lc-frame.is-measured .lc-dim span{opacity:1}
.lc-dim.is-h{border-block:2px solid #0000}
.lc-frame.is-measured .lc-dim.is-h{border-color:var(--muted)}
@media(prefers-reduced-motion:reduce){.lc-dim::before,.lc-dim span{transition:none}}
/* Inside the Spindle side, so the line's clip hides it with that side. */
.lc-stamp{position:absolute;right:5%;bottom:5%;width:58%;transform:rotate(-8deg);opacity:0;pointer-events:none}
.lc-stamp rect{fill:#fffffff0;stroke:#c8202f;stroke-width:5}
.lc-stamp rect.inner{fill:none;stroke-width:2}
.lc-stamp text{fill:#c8202f}
.lc-stamp .big{font:700 27px/1 var(--serif);letter-spacing:.06em}
.lc-stamp.is-stamped{opacity:.92;animation:chop .45s cubic-bezier(.3,1.4,.5,1) both}
.lc-stamp.is-still{animation:none}
.lc-stamp.is-stamped.is-covered{opacity:0;animation:none;transition:opacity .2s}
@keyframes chop{0%{opacity:0;transform:scale(2.2) rotate(-16deg)}60%{opacity:.95;transform:scale(.94) rotate(-7deg)}100%{opacity:.92;transform:rotate(-8deg)}}
.lc-standard{display:flex;align-items:center;justify-content:center;gap:.6rem;margin:.9rem 0 0;font:500 15px/1.3 var(--sans);color:var(--ink);opacity:0;transform:translateY(6px);transition:opacity .4s,transform .4s}
.lc-standard.is-shown{opacity:1;transform:none}
.lc-standard > img{width:46px;height:auto}
@media(prefers-reduced-motion:reduce){.lc-standard{transition:none;transform:none}}
/* The checks: the Tools checklist's tick, a short label, the measured value and the route's range. */
/* Side by side the photo sets the row's height (the list adds none), and the list scrolls within it. */
.lc-checks{min-width:0;display:flex;flex-direction:column;align-self:stretch;contain:size}
/* The list scrolls inside the photo's height rather than growing past it. */
.lc-scroll-frame{position:relative;flex:0 1 auto;min-height:0;display:flex;flex-direction:column}
.lc-scroll-frame::after{content:'';position:absolute;left:0;right:0;bottom:0;height:3.5rem;pointer-events:none;opacity:0;transition:opacity .2s;background:linear-gradient(to bottom,#ffffff00,var(--paper))}
.lc-scroll-frame.has-more::after{opacity:1}
.lc-scroll{flex:0 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:.25rem}
.lc-checks .check-summary{margin:0 0 .4rem;font:500 15px/1.3 var(--sans);color:var(--muted)}
.lc-checks .check-summary strong{font:400 32px/1 var(--serif);color:var(--ink);margin-right:.35rem}
.lc-checks .check-guidelines-heading{margin:1rem 0 .2rem;font:600 13px/1.3 var(--sans);color:var(--muted)}
.lc-checks .check-toggle{align-self:flex-start;margin-top:.6rem;font:500 15px/1.2 var(--sans);color:var(--ink);background:none;border:0;padding:.5rem 0;text-decoration:underline;text-underline-offset:.2em;cursor:pointer}
.lc-list{list-style:none;margin:0;padding:0}
.lc-list li{display:grid;grid-template-columns:20px 7.5rem minmax(0,1fr);gap:.6rem;align-items:start;padding:.5rem 0;border-bottom:1px solid var(--line);font:400 15px/1.35 var(--sans);color:var(--ink)}
.lc-list li svg{margin-top:2px}
.lc-list .check-label{color:var(--muted)}
.lc-list li[hidden]{display:none}
.lc-list svg{fill:none;stroke:#1f7a4d;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.lc-list .check-value{font-variant-numeric:tabular-nums}
.lc-list .unchecked{color:var(--muted)}
.lc-list .no svg{stroke:#b3261e}
.lc-list .unsure svg{stroke:#8a6d1a}
/* Numbered sources: the Tools popover, in this page's colours. */
.tools-cite{position:relative;display:inline-block}
.tools-cite-pop{display:none;position:absolute;left:0;top:100%;z-index:5;width:max-content;max-width:calc(100vw - 32px);text-align:left;white-space:normal}
.tools-cite.open .tools-cite-pop{display:block}
@media(hover:hover){body:not(.cite-open) .tools-cite:hover .tools-cite-pop{display:block}}
.tools-cite-box{display:block;max-height:inherit;overflow:auto;padding:.5rem .75rem;background:var(--paper);border:1px solid var(--line);border-radius:8px;box-shadow:0 4px 16px #1d38231a;font:400 13px/1.5 var(--sans);color:var(--muted)}
.tools-cite-box q{quotes:none;display:block;color:var(--ink);background:#fbf3d6;margin-bottom:.25rem}
.tools-cite-label a{color:var(--ink);text-underline-offset:3px}
.sp-cite-n{display:inline-grid;place-items:center;min-width:18px;height:18px;margin:0 0 0 .3rem;padding:0 5px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--muted);font:600 11px/1 var(--sans);font-variant-numeric:tabular-nums;vertical-align:2px;cursor:pointer}
.sp-cite-n:hover,.sp-cite-n[aria-expanded=true]{background:var(--action);border-color:var(--action);color:#fff}
@media(max-width:760px){
  .lc-panel{grid-template-columns:minmax(0,22rem);}
  .lc-checks{contain:none}
  .lc-scroll-frame{flex:none}
  .lc-scroll{flex:none;max-height:60vh}
  /* Phones: the lanes stand up, one row per photo. */
  .lc-track{grid-template-columns:1fr}
  .lc-lanes{grid-template-rows:none;grid-template-columns:3.5rem 1fr 1fr 3rem;justify-items:center}
  .lc-lanes span:first-child{visibility:visible}
  .lc-lanes span:nth-child(n){grid-row:1}
  .lc-ages{grid-template-columns:1fr}
  .lc-age{grid-template-rows:none;grid-template-columns:3.5rem 1fr 1fr 3rem;height:2.1rem}
  .lc-year{grid-row:1;grid-column:1}.lc-dot.is-passport{grid-row:1;grid-column:2}.lc-dot.is-nric{grid-row:1;grid-column:3}.lc-both{grid-row:1;grid-column:4}
  .lc-age::before,.lc-age::after{left:auto;right:auto;top:0;bottom:0;width:2px;height:auto}
  .lc-age::before{left:calc(3.5rem + (100% - 6.5rem) / 4 - 1px)}.lc-age::after{left:calc(3.5rem + (100% - 6.5rem) * 3 / 4 - 1px)}
}
@media(prefers-reduced-motion:reduce){.lc-stamp.is-stamped{animation:none}}

/* The Tools photo controls in place of the hero; their own .tools-main sets the width. */
#tools-section{margin:0;padding:0 0 3rem}
/* Anything scrolled into view inside stays below the sticky 70px header. */
#tools-section,#tools-section *{scroll-margin-top:78px}
#tools-section[hidden]{display:none}
#tools-section:focus{outline:none}
/* Flip sits small on the Original's caption row; pressed, it reads as on. */
#tools-section .photo-col.original figcaption:has(.flip){display:flex;align-items:center;justify-content:space-between;gap:var(--sp-space-2)}
#tools-section .flip{min-height:28px;padding-block:0;font-size:var(--sp-caption-size)}
#tools-section .flip[hidden]{display:none}
#tools-section .flip[aria-pressed=true]{background:var(--sp-action);border-color:var(--sp-action);color:var(--sp-paper)}
