/* Companies House ID checks: the identity check card (doc-chid.php) and the pinned four-step phone stage (set-chid.php). */

/* ---------- Opener document: an ID check card ---------- */
.doc--chid .doc__idtop { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.doc--chid .doc__idtop p { display: grid; line-height: 1.2; }
.doc--chid .doc__idtop b { font-family: var(--serif); font-weight: 400; font-size: 1.22rem; }
.doc--chid .doc__idtop span:not(.doc__face) { font-size: .86rem; color: var(--ink-soft); }
.doc__face { position: relative; flex: none; width: 44px; height: 54px; border-radius: 50%; border: 2px solid var(--crimson); background: var(--blush); overflow: hidden; }
.doc__face::before { content: ''; position: absolute; left: 50%; top: 11px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #C9A9B1; }
.doc__face::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: 34px; height: 24px; margin-left: -17px; border-radius: 50% 50% 0 0; background: #C9A9B1; }
.doc__face i { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--crimson); box-shadow: 0 0 8px rgba(163,24,62,.7); z-index: 2; }
.motion .doc__face i { animation: cv-face-scan 2.4s ease-in-out infinite alternate; }
@keyframes cv-face-scan { from { transform: translateY(0); } to { transform: translateY(50px); } }
.doc--chid .doc__stamp { width: 136px; right: -60px; }
.doc--chid .doc__stamp span { font-size: 1.12rem; letter-spacing: .04em; }
.doc--chid .doc__stamp small { font-size: .56rem; letter-spacing: .08em; }
@media (max-width: 560px) { .doc--chid .doc__stamp { width: 112px; right: -10px; } .doc--chid .doc__stamp span { font-size: .95rem; } }

/* ---------- Set piece: four steps on a phone ---------- */
.cv { overflow: clip; }
.cv-pin { min-height: 100vh; display: grid; align-items: center; padding-block: calc(var(--head-h) + 24px) 32px; }
.cv__ruling { position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(255,255,255,.04) 35px, rgba(255,255,255,.04) 36px); animation: so-drift-36 22s linear infinite; }
.cv__ruling::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(20px, 4.4vw, 70px); width: 1px; background: rgba(163,24,62,.6); }
.cv__oval { position: absolute; right: -10vw; top: 50%; width: min(1000px, 70vw); transform: translateY(-50%); overflow: visible; pointer-events: none; }
.cv__oval ellipse { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1.4; }
.cv__oval .dash { stroke: rgba(242,214,75,.22); stroke-dasharray: 3 12; animation: dash-turn 50s linear infinite; }
.cv__grid { position: relative; display: grid; grid-template-columns: minmax(0, 6.2fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 110px); align-items: center; }
.cv h2 { color: #fff; margin-bottom: 16px; }
.cv__lede { margin-bottom: clamp(22px, 3vh, 34px); }

.cv__steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(255,255,255,.18); }
.cv__step { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
/* the step in progress fills with a soft highlight as it runs (the same progress as the line under it) */
.cv__step.is-on { background: linear-gradient(90deg, rgba(242,214,75,.2) calc(var(--p, 0) * 100%), transparent 0); }
.cv__step::before { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--highlight); transform: scaleX(var(--p, 0)); transform-origin: left; }
.cv__n { display: grid; place-items: center; width: 46px; height: 46px; border: 1.5px solid rgba(255,255,255,.45); border-radius: 50%; font-weight: 700; font-size: 1.15rem; color: #fff; transition: background-color .4s, color .4s, border-color .4s; }
.cv__step h3 { color: #fff; font-size: clamp(1.15rem, 1.4vw, 1.35rem); margin: 9px 0 0; transition: color .4s; }
.cv__more p { margin: 6px 0 0; color: var(--on-dark-soft); }
/* Pinned mode: only the step you're on opens */
.cv-pin .cv__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.cv-pin .cv__more > p { overflow: hidden; min-height: 0; }
.cv-pin .cv__step.is-on .cv__more { grid-template-rows: 1fr; }
.cv-pin .cv__step:not(.is-on) h3 { color: rgba(255,255,255,.62); }
.cv__step.is-on .cv__n, .cv__step.is-done .cv__n { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }

/* The phone */
.cv__stage { position: relative; display: grid; place-items: center; perspective: 1400px; }
.cv__stage::before { content: ''; position: absolute; left: 50%; top: 50%; width: 120%; height: 64%; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(163,24,62,.45), rgba(163,24,62,0)); pointer-events: none; }
.cv__phone { position: relative; width: min(330px, 100%); height: min(64vh, 600px); min-height: 460px; padding: 14px; border-radius: 44px; background: linear-gradient(150deg, #2A3747, #0A1119 60%); box-shadow: 0 40px 80px rgba(0,0,0,.5), inset 0 0 0 1.5px rgba(255,255,255,.18); }
.cv__notch { position: absolute; left: 50%; top: 22px; z-index: 3; width: 86px; height: 22px; margin-left: -43px; border-radius: 12px; background: #0A1119; }
.cv__screen { position: relative; height: 100%; display: flex; flex-direction: column; border-radius: 32px; background: #fff; color: var(--ink); overflow: hidden; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #F4EBED 31px, #F4EBED 32px); }
.cv__appbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; padding: 48px 20px 12px; background: var(--claret); color: #fff; font-weight: 700; font-size: .95rem; }
.cv__appbar b { font-weight: 600; font-size: .85rem; color: #F6D3DB; }
.cv__panes { position: relative; flex: 1; }
.cv__pane { position: absolute; inset: 0; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; opacity: 0; visibility: hidden; }
.cv__pane--done { opacity: 1; visibility: visible; }
.cv__pane p { margin: 0; }
.cv__dots { display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0 0 18px; list-style: none; }
.cv__dots li { width: 26px; height: 6px; border-radius: 3px; background: #E6D8DB; transition: background-color .4s; }
.cv__dots li.is-on { background: var(--crimson); }

/* Pane 1: the passport being scanned */
.cv__pass { position: relative; padding: 14px; background: #FBF6F7; border: 1px solid #E6D8DB; overflow: hidden; }
.cv__passhead { font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--claret); margin-bottom: 10px !important; }
.cv__passbody { display: flex; gap: 14px; }
.cv__passphoto { position: relative; flex: none; width: 70px; height: 88px; background: #E9DDE0; overflow: hidden; }
.cv__passphoto::before { content: ''; position: absolute; left: 50%; top: 16px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: #BFA0A8; }
.cv__passphoto::after { content: ''; position: absolute; left: 50%; bottom: -14px; width: 58px; height: 40px; margin-left: -29px; border-radius: 50% 50% 0 0; background: #BFA0A8; }
.cv__passlines { flex: 1; display: grid; gap: 9px; align-content: start; padding-top: 4px; }
.cv__passlines i { display: block; height: 7px; background: #DCCBD0; }
.cv__passlines i:nth-child(2) { width: 70%; } .cv__passlines i:nth-child(3) { width: 85%; } .cv__passlines i:nth-child(4) { width: 55%; } .cv__passlines i:nth-child(5) { width: 75%; }
.cv__mrz { display: grid; gap: 6px; margin-top: 14px; }
.cv__mrz i { display: block; height: 6px; background: repeating-linear-gradient(90deg, #CDB8BE 0 7px, transparent 7px 10px); }
.cv__scan { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--crimson); box-shadow: 0 0 14px 3px rgba(163,24,62,.55); }
.motion .cv__scan { animation: cv-scan 2.6s ease-in-out infinite alternate; }
@keyframes cv-scan { from { transform: translateY(0); } to { transform: translateY(160px); } }
.cv__chips { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cv__chips li, .cv__list li, .cv__match { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: .98rem; }
.cv__chips svg, .cv__list svg, .cv__match svg { flex: none; width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--crimson); color: #fff; }

/* Pane 2: the face match */
.cv__face { position: relative; width: 170px; height: 210px; margin: 0 auto; }
.cv__face svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cv__ring-bg { fill: #FBF6F7; stroke: #E6D8DB; stroke-width: 4; }
.cv__ring { fill: none; stroke: var(--crimson); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; transform: rotate(-90deg); transform-origin: 50% 50%; transform-box: fill-box; }
.cv__head { position: absolute; inset: 22px 26px; border-radius: 50%; overflow: hidden; }
.cv__head::before { content: ''; position: absolute; left: 50%; top: 30px; width: 54px; height: 62px; margin-left: -27px; border-radius: 50%; background: #CDB3BA; }
.cv__head::after { content: ''; position: absolute; left: 50%; bottom: -30px; width: 110px; height: 80px; margin-left: -55px; border-radius: 50% 50% 0 0; background: #CDB3BA; }
.cv__corner { position: absolute; width: 22px; height: 22px; border: 3px solid var(--ink); }
.cv__corner--tl { left: -8px; top: -8px; border-right: 0; border-bottom: 0; }
.cv__corner--tr { right: -8px; top: -8px; border-left: 0; border-bottom: 0; }
.cv__corner--bl { left: -8px; bottom: -8px; border-right: 0; border-top: 0; }
.cv__corner--br { right: -8px; bottom: -8px; border-left: 0; border-top: 0; }
.motion .cv__corner { animation: cv-brackets 1.8s ease-in-out infinite alternate; }
@keyframes cv-brackets { to { transform: scale(.9); } }
.cv__match { justify-content: center; }

/* Pane 3: the personal code */
.cv__pane--code { justify-content: center; text-align: center; }
.cv__codek { font-weight: 700; color: var(--ink-soft); font-size: .95rem; }
.cv__code { font-weight: 700; font-size: 1.7rem; letter-spacing: .08em; color: var(--claret); padding: 14px 6px; border: 2px dashed rgba(163,24,62,.5); background: #fff; font-variant-numeric: tabular-nums; }
.cv__codenote { font-size: .88rem; color: var(--ink-soft); }
.cv__key { width: 64px; height: 64px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--blush); }
.cv__key svg { width: 38px; fill: none; stroke: var(--crimson); stroke-width: 3; stroke-linecap: round; }
.motion .cv__key { animation: wobble 4s ease-in-out infinite alternate; }

/* Pane 4: filed */
.cv__donek { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.cv__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.cv__list li { padding-bottom: 10px; border-bottom: 1px dashed #DCCBD0; }
.cv__stamp { align-self: center; margin-top: 10px; width: 170px; height: 100px; display: grid; place-content: center; text-align: center; border: 3px solid var(--crimson); outline: 1.5px solid var(--crimson); outline-offset: -9px; border-radius: 50%; color: var(--crimson); background: rgba(255,255,255,.9); transform: rotate(-10deg); }
.cv__stamp span { font-family: var(--serif); font-size: 1.5rem; line-height: 1; text-transform: uppercase; letter-spacing: .05em; }
.cv__stamp small { font-weight: 700; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }

@media (max-width: 960px) {
  .cv__grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .cv__phone { height: min(48vh, 440px); min-height: 380px; width: min(290px, 86vw); }
  .cv__appbar { padding-top: 40px; }
  .cv-pin { padding-block: calc(var(--head-h) + 14px) 20px; }
  .cv-pin .cv__lede { display: none; }
  .cv__step { padding: 8px 0; gap: 12px; grid-template-columns: 36px minmax(0, 1fr); }
  .cv__n { width: 36px; height: 36px; font-size: 1.05rem; }
  .cv__step h3 { margin-top: 5px; }
}
@media (max-width: 560px) {
  .cv__ruling::before { display: none; }
  .cv__pane { padding: 16px 14px; gap: 12px; }
  .cv__face { width: 140px; height: 172px; }
  .cv__code { font-size: 1.35rem; }
  .cv__step { padding: 6px 0; }
  .cv__n { width: 32px; height: 32px; font-size: 1rem; }
  .cv__step { grid-template-columns: 32px minmax(0, 1fr); }
  .cv__step h3 { font-size: 1.08rem; margin-top: 4px; }
  .cv__more p { font-size: 1rem; line-height: 1.5; }
  .cv-pin h2 { margin-bottom: 12px; }
  .cv-pin .cv__grid { gap: 14px; }
  .cv-pin .cv__phone { height: 440px; min-height: 0; width: 290px; scale: .66; transform-origin: 50% 0; margin-bottom: -150px; }
}
