/* =========================================================================
   Planet 9 Onboarding Portal (powered by Metzer)
   Shares the Planet 9 palette and type; tuned for a form-led app.
   ========================================================================= */

@font-face { font-family:"Bricolage Grotesque"; src:url("/assets/fonts/bricolage.woff2") format("woff2"); font-weight:200 800; font-stretch:75% 100%; font-display:swap; }
@font-face { font-family:"Newsreader"; src:url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight:200 800; font-style:normal; font-display:swap; }
@font-face { font-family:"Newsreader"; src:url("/assets/fonts/newsreader-italic.woff2") format("woff2"); font-weight:200 800; font-style:italic; font-display:swap; }

:root {
  --marigold:#FFD23F; --bottle:#0F3D2E; --bottle-2:#1C5741; --sage:#CFDCC6;
  --paper:#F7F7F2; --white:#FFFFFF; --quiet:#4A6358; --error:#A8231A; --ok:#1C5741;
  --f-shout:"Bricolage Grotesque","Arial Narrow",Arial,sans-serif;
  --f-read:"Newsreader",Georgia,"Times New Roman",serif;
  --wrap:1080px; --gutter:clamp(20px,4vw,48px); --rule:2px solid var(--bottle);
}
*,*::before,*::after{ box-sizing:border-box; }
/* The hidden attribute must always win, even over display:grid/flex rules. */
[hidden]{ display:none !important; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
html{ -webkit-text-size-adjust:100%; scroll-padding-top:24px; }
@media (prefers-reduced-motion:no-preference){ html{ scroll-behavior:smooth; } }
body{ margin:0; background:var(--paper); color:var(--bottle); font-family:var(--f-read);
  font-size:1.1875rem; line-height:1.6; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  padding-top:env(safe-area-inset-top,0); padding-bottom:env(safe-area-inset-bottom,0); }
img,svg{ max-width:100%; }
a{ color:inherit; text-decoration-thickness:2px; text-underline-offset:.18em; }

h1,h2,h3,h4{ font-family:var(--f-shout); font-stretch:78%; font-weight:750; line-height:1; letter-spacing:-.012em; margin:0 0 .45em; text-wrap:balance; }
h1{ font-size:clamp(2.6rem,1.6rem+3.6vw,5rem); line-height:.95; font-weight:800; letter-spacing:-.02em; }
h2{ font-size:clamp(1.9rem,1.3rem+2.2vw,3rem); }
h3{ font-size:clamp(1.35rem,1.15rem+.7vw,1.75rem); font-weight:700; line-height:1.05; }
h4{ font-size:1.2rem; font-weight:700; }
p{ margin:0 0 1em; max-width:66ch; } p:last-child{ margin-bottom:0; }
.lede{ font-size:clamp(1.2rem,1.05rem+.5vw,1.45rem); line-height:1.5; max-width:46ch; }
.quiet{ color:var(--quiet); } .fine{ font-size:1rem; line-height:1.55; }
:focus-visible{ outline:3px solid var(--bottle); outline-offset:3px; }
.band--bottle :focus-visible{ outline-color:var(--marigold); }

.skip{ position:absolute; left:12px; top:-80px; z-index:100; background:var(--bottle); color:var(--marigold);
  font:700 1rem/1 var(--f-shout); padding:14px 18px; text-decoration:none; }
.skip:focus{ top:12px; }

.wrap{ width:100%; max-width:var(--wrap); margin-inline:auto; padding-inline:var(--gutter); }
.band{ padding-block:clamp(40px,6vw,80px); }
.band--marigold{ background:var(--marigold); } .band--sage{ background:var(--sage); }
.band--paper{ background:var(--paper); } .band--white{ background:var(--white); }
.band--bottle{ background:var(--bottle); color:var(--paper); }
.band--bottle h1,.band--bottle h2,.band--bottle h3{ color:var(--marigold); }

/* ---------- Masthead ---------- */
.masthead{ background:var(--bottle); color:var(--paper); }
.masthead__inner{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding-block:16px; }
.brand{ display:flex; align-items:center; gap:14px; text-decoration:none; color:var(--paper); }
.brand__mark{ display:grid; place-items:center; width:42px; height:42px; flex:none; background:var(--marigold); color:var(--bottle);
  font-family:var(--f-shout); font-stretch:75%; font-weight:800; font-size:1.7rem; border-radius:9px; }
.brand__text{ display:flex; flex-direction:column; line-height:1.05; }
.brand__name{ font-family:var(--f-shout); font-stretch:80%; font-weight:700; font-size:1.2rem; color:var(--marigold); }
.brand__sub{ font-weight:500; color:var(--paper); }
.brand__engine{ font-family:var(--f-shout); font-weight:400; font-size:.8rem; color:#B9CDC1; letter-spacing:.01em; }
.brand__engine b{ color:var(--paper); font-weight:700; }
.masthead__secure{ display:inline-flex; align-items:center; gap:8px; color:var(--paper); text-decoration:none;
  font-family:var(--f-shout); font-weight:500; font-size:.95rem; border:1.5px solid rgba(247,247,242,.4); border-radius:999px; padding:8px 14px; }
.masthead__secure:hover{ border-color:var(--marigold); color:var(--marigold); }

/* ---------- Buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:var(--f-shout); font-weight:700;
  font-size:1.125rem; line-height:1; padding:17px 30px; border-radius:999px; border:2px solid var(--bottle);
  background:var(--bottle); color:var(--paper); text-decoration:none; cursor:pointer; transition:background-color .15s,color .15s; }
.btn:hover{ background:var(--bottle-2); border-color:var(--bottle-2); }
.btn--ghost{ background:transparent; color:var(--bottle); } .btn--ghost:hover{ background:var(--bottle); color:var(--paper); }
.btn--small{ padding:11px 20px; font-size:1rem; }
.btn--wide{ width:100%; }
.btn[disabled]{ opacity:.55; cursor:progress; }
.band--marigold .btn--ghost,.band--bottle .btn{ }
.band--bottle .btn{ background:var(--marigold); color:var(--bottle); border-color:var(--marigold); }
.band--bottle .btn:hover{ background:var(--paper); border-color:var(--paper); }
.actions{ display:flex; flex-wrap:wrap; gap:14px; margin-top:clamp(24px,3vw,36px); }

/* ---------- Intro / what you need ---------- */
.hero{ padding-block:clamp(36px,5vw,72px); }
.hero h1{ max-width:16ch; }
.need{ list-style:none; margin:0; padding:0; display:grid; gap:clamp(18px,2.5vw,28px); grid-template-columns:repeat(2,minmax(0,1fr)); }
.need > li{ background:var(--white); border:var(--rule); border-radius:14px; padding:clamp(20px,2.5vw,30px); display:grid; grid-template-columns:48px 1fr; gap:4px 18px; }
.need__icon{ grid-row:span 2; width:48px; height:48px; color:var(--bottle); }
.need h3{ margin:2px 0 4px; }
.need p{ margin:0; font-size:1.05rem; line-height:1.45; color:var(--quiet); }
.checklist{ list-style:none; margin:0; padding:0; }
.checklist li{ position:relative; padding:12px 0 12px 40px; border-bottom:1px solid rgba(15,61,46,.18); font-size:1.1rem; }
.checklist li:last-child{ border-bottom:0; }
.checklist li::before{ content:""; position:absolute; left:4px; top:50%; transform:translateY(-50%); width:24px; height:24px;
  border-radius:50%; background:var(--bottle) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 7.5 5.5 11 12 3.5' fill='none' stroke='%23FFD23F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }

/* ---------- Panels / cards ---------- */
.panel{ background:var(--white); border:var(--rule); border-radius:16px; padding:clamp(22px,3.5vw,44px); }
.note{ background:var(--sage); border-radius:12px; padding:18px 20px; font-size:1.02rem; line-height:1.5; }
.note b{ font-family:var(--f-shout); }

/* ---------- Progress ---------- */
.progress{ position:sticky; top:0; z-index:20; background:var(--paper); border-bottom:var(--rule); }
.progress__inner{ display:flex; gap:6px; padding:14px 0; list-style:none; margin:0; counter-reset:p; }
.progress li{ flex:1; display:flex; flex-direction:column; gap:7px; font-family:var(--f-shout); font-weight:600; font-size:.82rem; color:var(--quiet); counter-increment:p; }
.progress li::before{ content:""; height:6px; border-radius:999px; background:rgba(15,61,46,.18); }
.progress li .progress__n{ display:none; }
.progress li[data-state="done"]{ color:var(--bottle); }
.progress li[data-state="done"]::before{ background:var(--bottle); }
.progress li[data-state="current"]{ color:var(--bottle); }
.progress li[data-state="current"]::before{ background:var(--marigold); }
.progress__label{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ---------- Form ---------- */
.formwrap{ max-width:720px; margin-inline:auto; }
.step{ display:none; }
.step.is-active{ display:block; animation:fade .25s ease; }
@keyframes fade{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }
.step__head{ margin-bottom:clamp(20px,3vw,32px); }
.step__kicker{ font-family:var(--f-shout); font-weight:700; font-size:.95rem; letter-spacing:.06em; text-transform:uppercase; color:var(--quiet); margin:0 0 6px; }

.field{ margin-bottom:24px; }
.field-pair{ display:grid; grid-template-columns:1fr 1fr; gap:0 20px; }
.field label,.field .label{ display:block; font-family:var(--f-shout); font-weight:700; font-size:1.1rem; line-height:1.25; margin-bottom:8px; }
.req{ color:var(--error); }
.hint{ font-size:1rem; line-height:1.5; color:var(--quiet); margin:-2px 0 10px; }
.input,.select,.textarea{ width:100%; font:400 1.125rem/1.4 var(--f-read); color:var(--bottle); background:var(--white);
  border:2px solid var(--bottle); border-radius:8px; padding:14px 16px; min-height:56px; }
.textarea{ min-height:120px; resize:vertical; }
.select{ appearance:none; -webkit-appearance:none; padding-right:48px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230F3D2E' stroke-width='2.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 18px center; }
.input:focus,.select:focus,.textarea:focus{ outline:3px solid var(--marigold); outline-offset:0; border-color:var(--bottle); }
[aria-invalid="true"]{ border-color:var(--error) !important; box-shadow:0 0 0 1px var(--error); }
.field-error{ display:block; font-family:var(--f-shout); font-weight:600; font-size:1rem; color:var(--error); margin-top:8px; }
.field-error:empty{ display:none; }

/* Segmented radio (start time) */
.segmented{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.segmented input{ position:absolute; opacity:0; pointer-events:none; }
.segmented label{ display:block; margin:0; cursor:pointer; border:2px solid var(--bottle); border-radius:12px; padding:16px 18px; background:var(--white); font-family:var(--f-read); font-weight:400; }
.segmented label b{ display:block; font-family:var(--f-shout); font-size:1.15rem; margin-bottom:2px; }
.segmented input:checked + label{ background:var(--marigold); box-shadow:inset 0 0 0 2px var(--bottle); }
.segmented input:focus-visible + label{ outline:3px solid var(--bottle); outline-offset:3px; }

/* Checkboxes */
.check{ display:grid; grid-template-columns:26px 1fr; gap:14px; align-items:start; font-size:1.05rem; line-height:1.5; cursor:pointer; font-family:var(--f-read); font-weight:400; }
.check input{ width:24px; height:24px; margin:2px 0 0; accent-color:var(--bottle); cursor:pointer; }

/* File upload / dropzone */
.drop{ border:2px dashed var(--bottle); border-radius:14px; background:var(--paper); padding:24px; text-align:center; cursor:pointer; transition:background-color .15s,border-color .15s; }
.drop:hover,.drop.is-over{ background:#EEF2E8; }
.drop.is-filled{ border-style:solid; background:var(--white); text-align:left; }
.drop input[type=file]{ position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; }
.drop__cta{ display:block; font-family:var(--f-shout); font-weight:700; font-size:1.1rem; }
.drop__hint{ display:block; font-size:.98rem; color:var(--quiet); margin-top:6px; }
.drop__preview{ display:none; align-items:center; gap:16px; }
.drop.is-filled .drop__preview{ display:flex; }
.drop.is-filled .drop__empty{ display:none; }
.drop__thumb{ width:76px; height:76px; flex:none; border-radius:8px; object-fit:cover; border:1.5px solid var(--bottle); background:var(--sage); }
.drop__meta{ text-align:left; min-width:0; }
.drop__fname{ font-family:var(--f-shout); font-weight:700; word-break:break-all; }
.drop__fsize{ font-size:.95rem; color:var(--quiet); }
.drop__change{ margin-left:auto; flex:none; font-family:var(--f-shout); font-weight:600; font-size:.95rem; text-decoration:underline; background:none; border:0; color:var(--bottle); cursor:pointer; padding:6px; }

/* ID guidance — one guide per document type, only the chosen one shows */
.guide-prompt{ background:var(--white); border:2px dashed rgba(15,61,46,.4); border-radius:12px; padding:16px 18px; font-size:1.02rem; color:var(--quiet); margin:4px 0 20px; }
.guide{ display:grid; gap:14px; margin:4px 0 22px; }
.guide figure{ margin:0; background:var(--white); border:2px solid var(--bottle); border-radius:12px; padding:12px; }
.guide figure svg{ width:100%; height:auto; display:block; }
.guide figcaption{ font-family:var(--f-shout); font-weight:700; font-size:.95rem; line-height:1.25; margin-top:10px; display:flex; align-items:flex-start; gap:8px; }
.guide__good figcaption{ color:var(--ok); }
.guide__bad{ border-color:var(--error) !important; }
.guide__bad figcaption{ color:var(--error); }
.tick,.cross{ flex:none; width:20px; height:20px; border-radius:50%; margin-top:-1px; background-position:center; background-repeat:no-repeat; background-size:11px; }
.tick{ background-color:var(--ok); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.8 9.3 10 3.2' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.cross{ background-color:var(--error); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3 3 9' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* Passport: the correct (tall) example on the left, the two mistakes stacked on the right */
.guide--passport{ grid-template-columns:1.15fr 1fr; grid-template-areas:"good bad1" "good bad2" "rules rules"; }
.guide--passport .guide__good{ grid-area:good; }
.guide--passport .guide__bad:nth-of-type(2){ grid-area:bad1; }
.guide--passport .guide__bad:nth-of-type(3){ grid-area:bad2; }
.guide--passport .rules{ grid-area:rules; }
.guide--licence{ grid-template-columns:1fr 1fr; }
.guide--licence .rules{ grid-column:1 / -1; }
.rules{ list-style:none; margin:4px 0 0; padding:16px 18px; display:grid; gap:10px; background:var(--white); border-radius:12px; }
.rules li{ position:relative; padding-left:30px; font-size:1.02rem; line-height:1.4; }
.rules li::before{ content:""; position:absolute; left:0; top:1px; width:20px; height:20px; border-radius:50%;
  background:var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.8 9.3 10 3.2' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat; }

/* Day / Month / Year date of birth */
fieldset.field{ border:0; padding:0; margin:0 0 24px; min-width:0; }
fieldset.field legend{ padding:0; }
.datefield__row{ display:flex; gap:12px; flex-wrap:wrap; }
.datefield__part label{ display:block; font-family:var(--f-shout); font-weight:600; font-size:1rem; margin-bottom:6px; }
.datefield__part--day,.datefield__part--year{ flex:0 0 auto; }
.datefield__part--day .input{ width:4.6rem; text-align:center; }
.datefield__part--year .input{ width:6.2rem; text-align:center; }
.datefield__part--month{ flex:1 1 8rem; min-width:0; }
.datefield__row{ flex-wrap:nowrap; }

/* Start-date calendar */
.cal{ background:var(--white); border:2px solid var(--bottle); border-radius:14px; padding:14px; max-width:400px; user-select:none; }
.cal__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.cal__title{ font-family:var(--f-shout); font-weight:700; font-size:1.15rem; }
.cal__nav{ width:44px; height:44px; border-radius:50%; border:2px solid var(--bottle); background:var(--white); color:var(--bottle); font:700 1.2rem/1 var(--f-shout); cursor:pointer; display:grid; place-items:center; }
.cal__nav:disabled{ opacity:.3; cursor:not-allowed; }
.cal__nav:not(:disabled):hover{ background:var(--sage); }
.cal__grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.cal__dow{ font-family:var(--f-shout); font-weight:600; font-size:.8rem; text-align:center; color:var(--quiet); padding:4px 0; }
.cal__day{ aspect-ratio:1; min-height:40px; border:0; border-radius:10px; background:var(--paper); color:var(--bottle); font:600 1rem/1 var(--f-shout); cursor:pointer; }
.cal__day:hover:not(:disabled){ background:var(--sage); }
.cal__day:disabled{ background:transparent; color:rgba(15,61,46,.28); cursor:not-allowed; text-decoration:line-through; text-decoration-thickness:1px; }
.cal__day[aria-pressed="true"]{ background:var(--bottle); color:var(--marigold); }
.cal__day.is-today{ box-shadow:inset 0 0 0 2px rgba(15,61,46,.35); }
.cal__blank{ visibility:hidden; }
.cal__chosen{ font-family:var(--f-shout); font-weight:600; font-size:1.05rem; margin:12px 0 0; }
.cal__chosen:empty{ display:none; }

/* Step nav */
.step-nav{ display:flex; gap:12px; margin-top:28px; }
.step-nav .btn{ flex:1; }
.step-nav .btn--back{ flex:0 0 auto; }

/* Review */
.review{ list-style:none; margin:0; padding:0; }
.review > div{ display:grid; grid-template-columns:12rem 1fr auto; gap:6px 18px; padding:14px 0; border-bottom:1px solid rgba(15,61,46,.18); align-items:baseline; }
.review dt{ font-family:var(--f-shout); font-weight:700; }
.review dd{ margin:0; word-break:break-word; }
.review__edit{ font-family:var(--f-shout); font-weight:600; font-size:.92rem; background:none; border:0; color:var(--bottle); text-decoration:underline; cursor:pointer; }

/* Status banner */
.form-status{ font-family:var(--f-shout); font-weight:600; font-size:1.08rem; line-height:1.35; padding:16px 18px; margin-bottom:24px; border-radius:10px; border:2px solid var(--bottle); }
.form-status:empty{ display:none; }
.form-status[data-state="error"]{ background:#FBE7E4; border-color:var(--error); color:var(--error); }
.form-status[data-state="sending"]{ background:var(--sage); }
.upbar__label{ display:block; }
.upbar{ display:block; height:10px; margin-top:10px; border-radius:999px; background:rgba(15,61,46,.15); overflow:hidden; }
.upbar__fill{ display:block; height:100%; width:0; background:var(--bottle); border-radius:999px; transition:width .2s ease; }

.hp{ position:absolute !important; left:-10000px !important; width:1px; height:1px; overflow:hidden; }

/* Received */
.receipt__ref{ display:inline-block; font-family:var(--f-shout); font-stretch:75%; font-weight:800;
  font-size:clamp(2.4rem,1.6rem+3vw,4.2rem); line-height:1; letter-spacing:.02em; border-bottom:6px solid var(--bottle);
  padding-bottom:6px; user-select:all; }
.steps-after{ list-style:none; margin:0; padding:0; counter-reset:s; display:grid; gap:18px; }
.steps-after li{ counter-increment:s; display:grid; grid-template-columns:3rem 1fr; gap:0 16px; }
.steps-after li::before{ content:counter(s); font-family:var(--f-shout); font-stretch:75%; font-weight:800; font-size:2.2rem; grid-row:span 2; line-height:1; }

/* Footer */
.footer{ background:var(--bottle); color:var(--paper); padding-block:clamp(40px,6vw,72px) 28px; margin-top:auto; }
.footer__inner{ display:grid; gap:20px; }
.footer__brand{ font-family:var(--f-shout); font-stretch:80%; font-weight:700; font-size:1.3rem; color:var(--marigold); margin:0; }
.footer__engine{ font-family:var(--f-shout); font-weight:400; color:#B9CDC1; margin:2px 0 0; }
.footer__engine b{ color:var(--paper); }
.footer__links{ display:flex; flex-wrap:wrap; gap:8px 22px; font-family:var(--f-shout); font-weight:500; }
.footer__links a{ text-decoration:none; } .footer__links a:hover{ text-decoration:underline; text-decoration-color:var(--marigold); }
.footer__legal{ font-size:.92rem; color:#B9CDC1; max-width:none; border-top:1px solid rgba(247,247,242,.22); padding-top:18px; }
.footer__legal a{ color:var(--paper); }
body{ display:flex; flex-direction:column; min-height:100vh; }

/* Prose for the privacy page */
.prose{ max-width:72ch; }
.prose h2{ margin-top:1.6em; } .prose h3{ margin-top:1.3em; }
.prose ul{ padding-left:1.2em; } .prose li{ margin-bottom:.4em; }
.prose table{ width:100%; border-collapse:collapse; margin:1em 0; font-size:1rem; }
.prose th,.prose td{ text-align:left; vertical-align:top; padding:10px 12px; border-bottom:1px solid rgba(15,61,46,.2); }
.prose th{ font-family:var(--f-shout); }
.back{ font-family:var(--f-shout); font-weight:600; font-size:1.02rem; }

@media (max-width:760px){
  .need{ grid-template-columns:1fr; }
  .field-pair,.segmented{ grid-template-columns:1fr; }
  .guide--passport,.guide--licence{ grid-template-columns:1fr; grid-template-areas:none; }
  .guide--passport > *{ grid-area:auto !important; }
  .guide--licence .rules{ grid-column:auto; }
  .cal{ max-width:none; }
  .review > div{ grid-template-columns:1fr; }
  .review__edit{ justify-self:start; }
  .masthead__secure span{ display:none; }
  .masthead__secure{ padding:10px; }
  .progress__label{ display:none; }
  .progress li{ gap:0; }
  .progress li .progress__n{ display:block; text-align:center; }
}
@media (prefers-reduced-motion:reduce){ *,*::before,*::after{ transition:none !important; animation:none !important; } }
