/* =====================================================================
   NBSS — online affiliation application (2026-10)
   Loaded only by apply.php, application-status.php, application-form.php
   and affiliation-certificate.php, after css/nbss.css (colours come from there).
   ---------------------------------------------------------------------
   Sections:  1 page layout & step bar   2 form fields   3 upload boxes
              4 payment box   5 review   6 bottom buttons   7 smoke loading screen
              8 status page   9 printable sheets (form + certificate)   10 phones
   ===================================================================== */

/* ---------- 1. Page layout & step bar ---------- */
.apply-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 1000px) { .apply-layout { grid-template-columns: 290px minmax(0, 1fr); } }
.apply-side { display: grid; gap: 18px; }
@media (min-width: 1000px) { .apply-side { position: sticky; top: calc(var(--header-h) + 18px); } }

.step-list { list-style: none; margin: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); counter-reset: st; }
.step-list li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 6px; color: var(--muted); font-weight: 600; }
.step-list li + li::before { content: ""; position: absolute; left: 22px; top: -10px; height: 20px; border-left: 2px dashed var(--line); }
.step-list .dot { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ivory); border: 2px solid var(--line); color: var(--muted); font-weight: 700; font-size: .9rem; transition: all .3s var(--ease); }
.step-list li.is-current { color: var(--navy); }
.step-list li.is-current .dot { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 0 0 5px rgba(7, 43, 96, .12); }
.step-list li.is-done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-list li.is-done { color: var(--ink); }

.step-bar { display: none; }
.fee-card { background: linear-gradient(140deg, var(--navy) 0%, var(--blue) 100%); color: #fff; border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.fee-card::after { content: ""; position: absolute; width: 220px; aspect-ratio: 1; right: -80px; bottom: -90px; background: var(--mandala) center/contain no-repeat; opacity: .35; }
.fee-card small { display: block; color: #E9D3A6; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; }
.fee-card strong { display: block; font-family: var(--f-display); font-size: 2.2rem; line-height: 1.1; margin: 4px 0; }
.fee-card p { margin: 0; color: rgba(255, 255, 255, .85); font-size: .92rem; }

.apply-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm); padding: clamp(20px, 3vw, 34px); }
.apply-step { display: none; animation: rise .45s var(--ease); }
.apply-step.is-current { display: block; }
.step-head { margin-bottom: 22px; }
.step-head .eyebrow { margin-bottom: 6px; }
.step-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 4px; }
.step-head p { margin: 0; color: var(--muted); }

/* ---------- 2. Form fields ---------- */
.apply-grid { display: grid; gap: 18px 20px; }
@media (min-width: 720px) { .apply-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .apply-grid .span-2 { grid-column: 1 / -1; } }
.apply-card .field label .req { color: var(--bad); margin-left: 2px; }
.apply-card .field label .opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.input.upper, .textarea.upper { text-transform: uppercase; }
.input.upper::placeholder, .textarea.upper::placeholder { text-transform: none; }
.field-error { display: block; font-size: .88rem; font-weight: 700; color: var(--bad); }
.field[hidden], .field-error[hidden] { display: none; }   /* e.g. "Registration number" while "No" is chosen */
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(179, 38, 30, .1); }
.field .count { justify-self: end; font-size: .8rem; color: var(--muted); }

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; color: var(--ink); transition: all .2s; }
.choice input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--ivory); cursor: pointer; }
.check-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--navy); flex: none; }
.check-row span { color: var(--ink); line-height: 1.55; }
.check-row.is-strong { border-color: var(--gold); background: #FFF9EE; }

/* ---------- 3. Upload boxes ---------- */
.uploads { display: grid; gap: 18px; }
@media (min-width: 860px) { .uploads { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.up-box { border: 1.5px solid var(--line); border-radius: 18px; padding: 18px; background: #fff; display: grid; gap: 12px; align-content: start; transition: border-color .2s, box-shadow .2s; }
.up-box.is-done { border-color: #A8D6BC; }
.up-box.has-error { border-color: var(--bad); }
.up-box.is-drag { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(197, 155, 82, .18); }
.up-head { display: flex; gap: 12px; align-items: flex-start; }
.up-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--blue-50); color: var(--blue); }
.up-box.is-done .up-icon { background: var(--ok-50); color: var(--ok); }
.up-head h3 { font-family: var(--f-body); font-size: 1.02rem; margin: 0 0 2px; color: var(--navy); }
.up-head p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.up-pick { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 10px 14px; border: 2px dashed #D8CCB6; border-radius: 14px; background: #FFFDF9; color: var(--navy); font-weight: 700; cursor: pointer; text-align: center; }
.up-pick:hover { border-color: var(--gold); background: #FFF8EA; }
.up-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.up-pick[hidden] { display: none; }
.up-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.up-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--ivory); }
.up-thumb { width: 52px; height: 52px; border-radius: 10px; background: #fff center/cover no-repeat; border: 1px solid var(--line); display: grid; place-items: center; color: var(--bad); font-weight: 700; font-size: .72rem; overflow: hidden; }
.up-meta { min-width: 0; }
.up-name { display: block; font-weight: 700; font-size: .9rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-state { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.up-state.is-ok { color: var(--ok); font-weight: 700; }
.up-state.is-bad { color: var(--bad); font-weight: 700; }
.up-bar { height: 7px; border-radius: 99px; background: #E9E1D2; overflow: hidden; margin-top: 6px; }
.up-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--gold)); transition: width .2s linear; }
.up-item.is-done .up-bar { display: none; }
.up-actions { display: flex; gap: 6px; }
.up-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.up-btn:hover { color: var(--bad); border-color: var(--bad); }
.up-btn.retry:hover { color: var(--blue); border-color: var(--blue); }

/* ---------- 4. Payment box ---------- */
.pay-grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 860px) { .pay-grid { grid-template-columns: 300px minmax(0, 1fr); } }
.pay-card { border: 1.5px solid var(--gold); border-radius: 20px; padding: 20px; background: linear-gradient(180deg, #FFFDF8, #FFF6E6); text-align: center; }
.pay-amount { font-family: var(--f-display); font-size: 2.4rem; color: var(--navy); line-height: 1; margin: 4px 0 14px; }
.pay-qr { width: 100%; max-width: 240px; aspect-ratio: 1; margin: 0 auto 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); padding: 10px; }
.pay-qr img { width: 100%; height: 100%; object-fit: contain; }
.upi-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--ink); word-break: break-all; }
.upi-line code { font: 700 1rem/1.3 var(--f-body); background: #fff; border: 1px dashed var(--gold); padding: 6px 10px; border-radius: 8px; }
.copy-btn { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy); font-weight: 700; cursor: pointer; }
.copy-btn.is-copied { background: var(--ok); border-color: var(--ok); color: #fff; }
.pay-steps { margin: 0; padding-left: 1.2em; color: var(--ink); }
.pay-steps li { margin-bottom: 6px; }

/* ---------- 5. Review ---------- */
.review { display: grid; gap: 16px; }
.review-block { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: #FFFDF9; }
.review-block h3 { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--f-body); font-size: 1rem; margin: 0 0 10px; color: var(--navy); }
.review-block h3 button { border: 0; background: none; color: var(--blue); font-weight: 700; cursor: pointer; text-decoration: underline; }
.review-block dl { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .95rem; }
.review-block dt { color: var(--muted); }
.review-block dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.review-files { display: flex; flex-wrap: wrap; gap: 8px; }
.review-files span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--ok-50); color: var(--ok); font-size: .82rem; font-weight: 700; }

/* ---------- 6. Bottom buttons ---------- */
.apply-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.apply-nav .spacer { flex: 1; }
.apply-nav .btn[hidden] { display: none; }
.form-msg { margin-top: 16px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 7. Smoke loading screen ---------- */
.smoke-loader {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 100%, var(--blue) 0%, var(--navy) 45%, var(--navy-900) 100%);
  color: #fff; text-align: center;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  overflow: hidden;
}
.smoke-loader.is-on { opacity: 1; visibility: visible; }
.smoke-loader.is-soft { background: rgba(4, 25, 58, .82); backdrop-filter: blur(3px); }
.smoke { position: absolute; inset: 0; pointer-events: none; }
.smoke::before {   /* low fog that drifts slowly along the bottom */
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -10%; height: 55%;
  background: radial-gradient(60% 70% at 30% 100%, rgba(255, 255, 255, .16), transparent 70%),
              radial-gradient(55% 65% at 75% 100%, rgba(233, 211, 166, .14), transparent 70%);
  filter: blur(20px); animation: fog 14s ease-in-out infinite alternate;
}
@keyframes fog { to { transform: translateX(8%); } }
.puff {
  position: absolute; bottom: -260px; left: var(--x);
  width: var(--s, 420px); aspect-ratio: 1.35; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 255, 255, .26) 0%, rgba(233, 211, 166, .12) 38%, rgba(255, 255, 255, .04) 55%, rgba(255, 255, 255, 0) 70%);
  filter: blur(26px);
  will-change: transform, opacity;
  animation: smoke-rise var(--t, 9s) cubic-bezier(.35, .1, .55, 1) var(--d, 0s) infinite;
  opacity: 0;
}
@keyframes smoke-rise {
  0%   { transform: translate(-50%, 0) scale(.45) rotate(0deg); opacity: 0; }
  15%  { opacity: 1; }
  55%  { opacity: .7; }
  100% { transform: translate(calc(-50% + var(--dx, 40px)), -120vh) scale(2.6) rotate(35deg); opacity: 0; }
}
.loader-core { position: relative; z-index: 1; display: grid; justify-items: center; gap: 16px; padding: 24px; }
.loader-ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.loader-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(233, 211, 166, .25); border-top-color: var(--gold); border-right-color: var(--gold); animation: spin 1.1s linear infinite; }
.loader-ring::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(233, 211, 166, .35); animation: spin 14s linear infinite reverse; }
.loader-ring img { width: 100px; height: 100px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 0 40px rgba(233, 211, 166, .45); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(233, 211, 166, .7); } }
.loader-title { font-family: var(--f-display); font-size: 1.35rem; margin: 0; color: #fff; }
.loader-text { margin: 0; color: #DCE6F5; max-width: 34ch; }
.loader-pct { font: 700 1.1rem/1 var(--f-body); color: #E9D3A6; min-height: 1.1em; font-variant-numeric: tabular-nums; }
.loader-bar { width: min(280px, 70vw); height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #E9D3A6, var(--gold)); transition: width .25s linear; }
.loader-bar.is-free i { width: 40%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.loader-net { display: none; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: rgba(179, 38, 30, .85); color: #fff; font-weight: 700; font-size: .9rem; }
.smoke-loader.is-offline .loader-net { display: inline-flex; }

.net-banner { position: fixed; left: 50%; bottom: 18px; z-index: 300; visibility: hidden; transform: translate(-50%, calc(100% + 40px)); display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--bad); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); transition: transform .35s var(--ease), visibility .35s; }
.net-banner.is-on { visibility: visible; transform: translate(-50%, 0); }
.net-banner.is-slow { background: var(--warn); }

/* ---------- 8. Status page ---------- */
.status-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.status-top { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 24px; background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; }
.status-top img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 3px solid #fff; background: #fff; }
.status-top h2 { color: #fff; margin: 0 0 4px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.status-top p { margin: 0; color: #DCE6F5; }
.status-body { padding: 24px; display: grid; gap: 20px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: .92rem; }
.status-pill.info { background: var(--blue-50); color: var(--navy); }
.status-pill.warn { background: var(--warn-50); color: var(--warn); }
.status-pill.ok { background: var(--ok-50); color: var(--ok); }
.status-pill.bad { background: var(--bad-50); color: var(--bad); }
.status-facts { display: grid; gap: 12px; }
@media (min-width: 720px) { .status-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.status-facts div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--ivory); }
.status-facts small { display: block; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.status-facts strong { display: block; color: var(--navy); font-size: 1.05rem; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 30px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-100); }
.timeline li::after { content: ""; position: absolute; left: 12px; top: 20px; bottom: 0; border-left: 2px solid var(--line); }
.timeline li:last-child::after { display: none; }
.timeline b { color: var(--navy); }
.timeline span { display: block; font-size: .85rem; color: var(--muted); }
.timeline p { margin: 4px 0 0; white-space: pre-line; }
.status-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 9. Printable sheets (A4) ---------- */
.doc-page { background: #E9E4DA; min-height: 100vh; }
.doc-toolbar { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; padding: 12px 16px; background: rgba(255, 255, 255, .95); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.doc-toolbar p { margin: 0 auto 0 0; font-weight: 700; color: var(--navy); }
.doc-stage { padding: 24px 12px 60px; display: flex; justify-content: center; overflow: hidden; }
.doc-scale { transform-origin: top left; }   /* its width is set to the scaled width (js/apply.js), so shrink from the left edge */
.sheet {
  width: 794px; min-height: 1123px; position: relative; overflow: hidden;   /* A4 at 96 px per inch */
  background: #fff; color: #23180E; box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  font-family: var(--f-body); font-size: 15px; line-height: 1.45;
}
.sheet h1, .sheet h2, .sheet h3 { color: inherit; margin: 0; text-wrap: normal; }
.sheet img { display: inline-block; }

/* 9a. Affiliation form — gold frame on white, brown/navy text like the printed form */
.form-sheet { padding: 30px 40px 96px; background: #FFFEFB; }   /* the bottom padding keeps room for .fs-footer-note */
.form-sheet::before { content: ""; position: absolute; inset: 14px; border: 3px solid #B9853B; border-radius: 4px; pointer-events: none; }
.form-sheet::after { content: ""; position: absolute; inset: 22px; border: 1px solid #D9B57A; pointer-events: none; }
.corner { position: absolute; width: 70px; height: 70px; color: #B9853B; }
.corner.tl { top: 10px; left: 10px; } .corner.tr { top: 10px; right: 10px; transform: scaleX(-1); }
.corner.bl { bottom: 10px; left: 10px; transform: scaleY(-1); } .corner.br { bottom: 10px; right: 10px; transform: scale(-1); }
.fs-top { position: relative; text-align: center; padding-top: 8px; }
.fs-logo { width: 88px; height: 88px; border-radius: 50%; }
.fs-mobile { position: absolute; right: 18px; top: 46px; font-size: 15px; font-weight: 600; }
.fs-name { font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 35px; letter-spacing: .5px; color: #2A1A0C; margin-top: 4px; line-height: 1.1; }
.fs-city { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 6px; color: #A86A1E; font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 22px; letter-spacing: 2px; }
.fs-city::before, .fs-city::after { content: ""; flex: 1; max-width: 230px; border-top: 1.5px solid #C08A3E; }
.fs-reg { font-size: 13px; line-height: 1.5; }
.fs-reg b { font-weight: 700; }
.fs-allover { display: inline-block; margin: 6px 0 0; color: #A86A1E; font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 17px; border-bottom: 1.5px solid #C08A3E; }
.fs-mid { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 12px; padding-right: 150px; }
.fs-iso { border: 2px solid #B9853B; border-radius: 6px; padding: 6px 4px; text-align: center; font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 19px; color: #2A1A0C; }
.fs-affno { font-weight: 700; font-size: 15px; }
.fs-affno span { color: #9B1C1C; }
.fs-photo { position: absolute; right: 42px; top: 248px; width: 128px; height: 156px; border: 2px solid #B9853B; border-radius: 6px; padding: 4px; background: #fff; }
.fs-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.fs-title { display: flex; justify-content: center; margin: 12px 0 10px; }
.fs-title span { display: inline-block; padding: 7px 44px; border-radius: 12px; background: linear-gradient(180deg, #4B2A12, #2C170A); color: #FFF3DC; font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 24px; letter-spacing: 2px; border: 2px solid #C08A3E; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #C08A3E; }
.fs-letter p { margin: 0 0 4px; font-size: 14px; line-height: 1.5; }
.fs-letter .indent { text-indent: 40px; text-align: justify; }
.fs-sign-row { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 0 6px; }
.fs-sign { text-align: center; font-size: 14px; }
.fs-sign img { max-width: 160px; max-height: 44px; object-fit: contain; display: block; margin: 0 auto 2px; }
.fs-rule { border: 0; border-top: 1.5px solid #C08A3E; margin: 4px 0 10px; }
.fs-fields { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.fs-fields li { display: flex; gap: 6px; align-items: flex-end; margin-bottom: 7px; }
.fs-fields .lab { flex: none; }
.fs-fields .val { flex: 1; min-width: 0; border-bottom: 1.5px dotted #7A6650; padding: 0 4px 1px; font-weight: 700; font-size: 14px; color: #10233F; text-transform: uppercase; overflow-wrap: anywhere; min-height: 21px; }
.fs-fields .val.normal { text-transform: none; }
.fs-fields .sub { display: flex; gap: 6px; padding-left: 22px; }
.fs-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; font-size: 13px; }
.fs-bottom .box { text-align: center; }
/* the two small lines (application no., fee) — centred at the foot of the page, between the corner ornaments */
.fs-footer-note { position: absolute; left: 110px; right: 110px; bottom: 38px; padding-top: 7px; border-top: 1px dashed #D9B57A; font-size: 12px; line-height: 1.6; color: #5A4A38; display: flex; flex-direction: column; align-items: center; text-align: center; }

/* 9b. Certificate — navy frame, gold inner frame, cream paper */
.cert-sheet { padding: 0; background: #11204A; }
.cert-paper { position: absolute; inset: 20px; background: radial-gradient(120% 90% at 50% 40%, #FFFBEF 0%, #FBF1D8 70%, #F3E3BC 100%); border: 3px solid #C59B52; }
.cert-paper::before { content: ""; position: absolute; inset: 8px; border: 1.5px solid #C59B52; }
.cert-paper::after { content: ""; position: absolute; inset: 0; background: var(--mandala) center 42%/520px no-repeat; opacity: .07; pointer-events: none; }
.cert-in { position: relative; z-index: 1; padding: 40px 64px 104px; height: 100%; display: flex; flex-direction: column; }
.cert-corner { position: absolute; width: 96px; height: 96px; color: #B9853B; z-index: 2; }
.cert-corner.tl { top: 4px; left: 4px; } .cert-corner.tr { top: 4px; right: 4px; transform: scaleX(-1); }
.cert-corner.bl { bottom: 4px; left: 4px; transform: scaleY(-1); } .cert-corner.br { bottom: 4px; right: 4px; transform: scale(-1); }
.cert-head { text-align: center; }
.cert-head .crest { display: block; margin: 0 auto 4px; width: 210px; height: 22px; color: #B9853B; }
.cert-name { font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 34px; color: #2C1B10; letter-spacing: .5px; line-height: 1.1; }
.cert-city { font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 22px; color: #2C1B10; margin: 2px 0 6px; }
.cert-reg-wrap { display: grid; grid-template-columns: 104px minmax(0, 1fr) 116px; gap: 8px; align-items: start; }
.cert-logo { width: 104px; height: 104px; border-radius: 50%; margin-top: 4px; }
.cert-reg { text-align: center; font-size: 12.3px; line-height: 1.5; color: #2C1B10; }
.cert-reg b { font-weight: 700; }
.cert-photo { position: relative; width: 112px; height: 132px; border: 2px solid #8D7A5F; background: #fff; padding: 3px; justify-self: end; }
.cert-photo img.p { width: 100%; height: 100%; object-fit: cover; }
.cert-photo img.seal { position: absolute; right: -26px; bottom: -30px; width: 74px; height: 74px; object-fit: contain; opacity: .9; }
.cert-affno { text-align: center; margin: 12px 0 18px; font-weight: 700; font-size: 19px; color: #2C1B10; }
.cert-affno span { color: #B3261E; }
.cert-to { font-family: "Lora", Georgia, serif; font-style: italic; font-weight: 700; font-size: 17px; color: #10233F; }
.cert-lines { margin: 4px 0 0 0; display: grid; gap: 7px; }
.cert-line { display: flex; align-items: flex-end; gap: 8px; }
.cert-line .k { flex: none; width: 112px; font-family: "Lora", Georgia, serif; font-weight: 700; font-size: 16px; color: #10233F; }
.cert-line .v { flex: 1; min-width: 0; border-bottom: 1.5px solid #2B3B66; padding: 0 6px 2px; font-weight: 700; font-size: 16px; color: #14275A; text-transform: uppercase; overflow-wrap: anywhere; }
.cert-line .v.red { color: #B3261E; font-style: italic; }
.cert-line.cont .k { visibility: hidden; }
.cert-ornament { display: block; margin: 18px auto 10px; width: 200px; height: 20px; color: #B9853B; }
.cert-dear { font-family: "Lora", Georgia, serif; font-style: italic; font-size: 17px; color: #10233F; margin: 0 0 6px; }
.cert-body { font-family: "Lora", Georgia, serif; font-style: italic; font-size: 18.5px; line-height: 1.6; color: #10233F; text-indent: 48px; margin: 0; }
.cert-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: end; gap: 20px; padding-top: 24px; }
.cert-from { font-size: 15px; color: #10233F; line-height: 1.5; }
.cert-from .script { font-family: "Lora", Georgia, serif; font-style: italic; font-weight: 700; font-size: 20px; }
.cert-date { margin-top: 12px; font-family: "Lora", Georgia, serif; font-style: italic; font-size: 16px; }
.cert-date b { font-style: normal; border-bottom: 1.5px solid #2B3B66; padding: 0 10px; }
.cert-signs { position: relative; text-align: center; font-size: 15px; color: #10233F; }
.cert-signs .yf { font-family: "Lora", Georgia, serif; font-style: italic; margin-bottom: 4px; }
.cert-signs .marks { position: relative; height: 92px; }
.cert-signs .seal { position: absolute; left: 50%; top: 0; transform: translateX(-62%); width: 92px; height: 92px; object-fit: contain; opacity: .9; }
.cert-signs .sign { position: absolute; left: 50%; bottom: 0; transform: translateX(-40%); max-width: 190px; max-height: 58px; object-fit: contain; }
.cert-signs .line { border-top: 1px solid transparent; }
.cert-signs b { display: block; font-size: 14px; letter-spacing: .3px; }
.cert-emblem { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%; background: #11204A; border: 3px solid #C59B52; display: grid; place-items: center; z-index: 3; }
.cert-emblem img { width: 50px; height: 50px; border-radius: 50%; }

/* Printing / PDF: only the sheet, full size */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  .doc-toolbar, .net-banner, .smoke-loader, .skip-link { display: none !important; }
  .doc-page { background: #fff; }
  .doc-stage { padding: 0; display: block; overflow: visible; }
  .doc-scale { transform: none !important; height: auto !important; }
  .sheet { box-shadow: none; margin: 0 auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- 10. Phones ---------- */
@media (max-width: 999px) {
  .step-list { display: none; }
  .step-bar { display: flex; gap: 6px; margin-bottom: 18px; }
  .step-bar span { flex: 1; height: 6px; border-radius: 99px; background: var(--line); transition: background .3s; }
  .step-bar span.is-done { background: var(--ok); }
  .step-bar span.is-current { background: var(--navy); }
  .apply-side .fee-card { order: -1; }
}
@media (max-width: 640px) {
  .apply-nav { position: sticky; bottom: 0; z-index: 20; margin: 22px -20px -20px; padding: 12px 16px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); border-radius: 0 0 22px 22px; }
  .apply-nav .btn { flex: 1; padding-inline: 1em; }
  .apply-nav .spacer { display: none; }
  .review-block dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .review-block dd { margin-bottom: 8px; }
  .up-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .up-thumb { width: 44px; height: 44px; }
  .doc-toolbar p { width: 100%; text-align: center; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .puff, .loader-ring::before, .loader-ring::after, .loader-ring img, .apply-step { animation: none !important; }
}

/* The loading screen shown while a page loads hides itself after 8 s even if the script never ran. */
.smoke-loader.is-boot { animation: boot-out .4s ease 8s forwards; }
@keyframes boot-out { to { opacity: 0; visibility: hidden; } }
