/* How We Score — page-scoped styles. Plan: how-we-score-plan.md. Simple cards, large text, one motion per visual. */
:root { --hs-green: #059669; --hs-line: #e2e8f0; }

/* ---------- Motion: items fade up once when their visual scrolls into view ---------- */
html.hs-js .hs-scene:not(.play) .a { opacity: 0; transform: translateY(8px); }
.hs-scene .a { transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--d, 0s); }
@media (prefers-reduced-motion: reduce) { .hs-scene .a { transition-delay: 0s !important; } }

/* ---------- Layout ---------- */
.hs-hero .hero-inner { padding-bottom: clamp(40px, 5vw, 72px); }
.hs-hero .btn-row { justify-content: center; }
.hs-part { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 5vw, 72px); }
.hs-part-n { display: inline-block; font-size: .95rem; font-weight: 600; color: var(--brand-blue); margin-bottom: 10px; }
.hs-step { grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
.hs-step + .hs-step { margin-top: clamp(64px, 8vw, 112px); }
.hs-num { display: inline-block; font-size: .95rem; font-weight: 600; color: var(--brand-blue); background: rgba(37,99,235,.08); padding: 4px 12px; border-radius: 6px; }
.hs-copy .h2 { margin-top: 14px; }
.hs-copy .lead { margin-top: 14px; max-width: 500px; }
@media (max-width: 900px) { .hs-step { grid-template-columns: 1fr; } }

/* ---------- Card ---------- */
.hs-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow); font-size: 1.05rem; color: var(--text); }
.hs-card-h { font-size: 1rem; color: var(--muted); margin-bottom: 18px; }
.hs-card-h b { color: var(--text); }
.hs-note { margin-top: 14px; font-size: 1rem; color: var(--muted); text-align: center; }

/* Score ring (out of 10) */
.hs-ring { position: relative; display: inline-grid; place-items: center; width: var(--sz); height: var(--sz); flex: none; }
.hs-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hs-ring circle { fill: none; }
.hs-ring .trk { stroke: #eef2f7; }
.hs-ring .val { stroke: var(--brand-blue); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--off); transition: stroke-dashoffset .8s var(--ease); }
.hs-ring b { position: relative; font-size: calc(var(--sz) * .3); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Hero: resume scanned -> organized profile -> scored ----------
   Every timed element carries --t (its start time). .play starts the sequence; .reset snaps back for the loop. */
.hx { position: relative; display: grid; grid-template-columns: 1.08fr 1fr .98fr; gap: 64px; max-width: 1120px; margin: 60px auto 0; text-align: left; transition: opacity .45s; }
.hx.fading { opacity: 0; }
.hx.reset, .hx.reset * { transition: none !important; animation: none !important; }
.hx-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.hx-links path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s var(--ease); transition-delay: var(--t, 0s); }
.hx-links circle { opacity: 0; transition: opacity .3s; transition-delay: var(--t, 0s); }
.hx.play .hx-links path { stroke-dashoffset: 0; }
.hx.play .hx-links circle { opacity: 1; }
.hx-col { position: relative; display: flex; flex-direction: column; gap: 16px; }
.hx-step { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; line-height: 1.35; font-size: .98rem; font-weight: 600; color: var(--text); }
.hx-step i { margin-top: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: .82rem; font-weight: 700; color: #fff; background: var(--brand-blue); box-shadow: 0 0 0 4px rgba(37,99,235,.14); flex: none; }

/* Field colours */
.hx-title { --c: #2563EB; --cb: #dbeafe; }
.hx-company { --c: #7c3aed; --cb: #ede9fe; }
.hx-dates { --c: #0891b2; --cb: #cffafe; }
.hx-skills { --c: #d97706; --cb: #fef3c7; }
.hx-added { --c: #059669; --cb: #d1fae5; }

/* Resume paper */
.hx-stack { position: relative; }
.hx-sheet { position: absolute; inset: 0; background: #fff; border: 1px solid var(--border-soft); border-radius: 4px; box-shadow: var(--shadow); }
.hx-s1 { transform: rotate(-2.5deg) translate(-8px, 8px); opacity: .8; }
.hx-s2 { transform: rotate(2.5deg) translate(10px, 12px); opacity: .55; }
.hx-paper { position: relative; overflow: hidden; aspect-ratio: 8.5 / 11; background: #fff; border: 1px solid #e3e8f0; border-radius: 4px; padding: 30px 28px; box-shadow: var(--shadow-lg); font-size: .72rem; line-height: 1.45; color: #475569; }
.hx-rh { text-align: center; padding-bottom: 10px; border-bottom: 1.5px solid #1e293b; }
.hx-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; color: #0f172a; }
.hx-contact { margin-top: 3px; font-size: .66rem; color: #64748b; }
.hx-sec { margin-top: 14px; padding-bottom: 3px; border-bottom: 1px solid #cbd5e1; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #0f172a; }
.hx-jr { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.hx-jr b { font-size: .76rem; font-weight: 600; font-style: italic; color: #0f172a; }
.hx-jr > span { font-size: .68rem; color: #64748b; white-space: nowrap; }
.hx-co { margin-top: 9px; font-size: .74rem; font-weight: 600; color: #334155; }
.hx-ul { list-style: disc; padding-left: 14px; margin-top: 4px; }
.hx-ul li { margin-top: 2px; }
.hx-hl { border-radius: 4px; padding: 1px 4px; margin: 0 -4px; transition: background .4s, box-shadow .4s, color .4s; transition-delay: var(--t); }
.hx.play .hx-hl { background: var(--cb); color: var(--c); box-shadow: inset 0 -2px 0 var(--c); }
.hx-beam { position: absolute; left: 0; right: 0; top: -60px; height: 60px; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(37,99,235,0), rgba(37,99,235,.12)); border-bottom: 2px solid var(--brand-blue); box-shadow: 0 6px 18px rgba(37,99,235,.35); opacity: 0; }
.hx.play .hx-beam { animation: hxScan 2s cubic-bezier(.45,.05,.55,.95) .5s both; }
@keyframes hxScan { 0% { top: -60px; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* Cards (profile + score) */
.hx-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: 18px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--t); }
.hx.play .hx-card { opacity: 1; transform: none; }
.hx-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: .95rem; color: var(--text); }
.hx-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--sky-blue), var(--brand-blue)); }
.hx-row { position: relative; display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 8px; padding: 9px 12px; margin-top: 8px; border-radius: 8px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--cb) 40%, #fff); font-size: .82rem; opacity: 0; transform: translateX(-10px); transition: opacity .45s var(--ease), transform .45s var(--ease); transition-delay: var(--t); }
.hx.play .hx-row { opacity: 1; transform: none; }
.hx-row span { color: var(--muted); }
.hx-row b { font-weight: 600; color: var(--text); font-size: .88rem; }
.hx-row em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--c); }
.hx-row em svg { width: 13px; height: 13px; }
.hx-req { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: .9rem; font-weight: 500; color: var(--text); border-bottom: 1px solid #f1f5f9; }
.hx-tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #cbd5e1; color: #fff; flex: none; transition: background .3s, border-color .3s; transition-delay: inherit; }
.hx-req { transition-delay: var(--t); }
.hx-tick svg { width: 13px; height: 13px; stroke-width: 3.5; transform: scale(0); transition: transform .35s var(--ease); transition-delay: var(--t); }
.hx.play .hx-tick { background: #059669; border-color: #059669; }
.hx.play .hx-tick svg { transform: none; }
.hx-total { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.hx-total > span { display: grid; font-size: .85rem; color: var(--muted); }
.hx-total > span b { font-size: 1.05rem; color: var(--text); }
.hx .hs-ring .val { transition: stroke-dashoffset 1.1s var(--ease); transition-delay: var(--t); }
.hx:not(.play) .hs-ring .val { stroke-dashoffset: 100; }
.hx .hs-ring b { transition: opacity .4s; transition-delay: var(--t); }
.hx:not(.play) .hs-ring b { opacity: 0; }

@media (max-width: 960px) {
  .hx { grid-template-columns: 1fr; gap: 60px; max-width: 440px; }
  .hx-links { display: none; }
  .hx-col + .hx-col::before { content: ""; position: absolute; top: -40px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-right: 2px solid var(--brand-blue); border-bottom: 2px solid var(--brand-blue); transform: rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) { .hx *, .hx-links * { transition-delay: 0s !important; } .hx-beam { display: none; } }

/* Step 1: labels above the resume entry */
.hs-labels { display: flex; flex-wrap: wrap; gap: 44px 20px; padding-top: 34px; font-size: 1.2rem; font-weight: 600; }
.hs-lbl { position: relative; }
.hs-lbl em { position: absolute; left: 0; bottom: calc(100% + 8px); font-style: normal; font-size: .9rem; font-weight: 600; color: #fff; background: var(--brand-blue); padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.hs-lbl em::after { content: ""; position: absolute; left: 12px; top: 100%; border: 5px solid transparent; border-top-color: var(--brand-blue); }
.hs-lbl > span { border-bottom: 3px solid var(--brand-blue); padding-bottom: 2px; }

/* Step 2: facts added under the entry */
.hs-entry { font-size: 1.1rem; font-weight: 600; padding-bottom: 18px; border-bottom: 1px solid var(--hs-line); }
.hs-facts { display: grid; gap: 12px; margin-top: 18px; }
.hs-added { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; font-weight: 600; color: var(--brand-blue); }
.hs-added svg { width: 18px; height: 18px; }
.hs-fact { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 12px 16px; border-radius: 10px; background: #f5f8fd; }
.hs-fact span { color: var(--muted); }
@media (max-width: 480px) { .hs-fact { grid-template-columns: 1fr; gap: 2px; } }

/* Step 3: sentence -> skills */
.hs-quote { font-size: 1.2rem; line-height: 1.6; font-weight: 500; }
.hs-down { display: block; width: 28px; margin: 18px 0; color: var(--brand-blue); }
.hs-down svg { width: 28px; height: 28px; transform: rotate(90deg); }
.hs-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hs-chip { font-weight: 600; color: var(--brand-blue); background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.2); padding: 8px 16px; border-radius: 6px; }

/* Step 4: requirement list */
.hs-reqs, .hs-checks { display: grid; gap: 10px; }
.hs-reqs li { display: grid; grid-template-columns: 22px 130px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--hs-line); border-radius: 10px; }
.hs-reqs li > span:nth-child(2) { color: var(--muted); }
.hs-box { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 5px; }
@media (max-width: 480px) { .hs-reqs li { grid-template-columns: 22px 1fr; } .hs-reqs li b { grid-column: 2; } }

/* Step 5: checks with evidence + score */
.hs-checks li { display: grid; grid-template-columns: 28px 150px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #f5f8fd; }
.hs-checks li > span:last-child { color: var(--muted); }
.hs-tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--hs-green); color: #fff; }
.hs-tick svg { width: 15px; height: 15px; stroke-width: 3; }
.hs-result { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hs-line); font-size: 1.2rem; }
@media (max-width: 480px) { .hs-checks li { grid-template-columns: 28px 1fr; } .hs-checks li > span:last-child { grid-column: 2; } }

/* Step 6: redacted resume */
.hs-doc-top { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--hs-line); }
.hs-doc-top > div { display: grid; gap: 8px; justify-items: start; }
.hs-redact { position: relative; display: inline-block; }
.hs-redact i { position: absolute; inset: -2px -4px; background: #111827; border-radius: 3px; transform-origin: left; }
html.hs-js .hs-scene:not(.play) .hs-redact i.a { transform: scaleX(0); opacity: 1; }
.hs-photo { width: 76px; height: 76px; border-radius: 10px; background: linear-gradient(135deg, #fbbf24, #f472b6); flex: none; }
.hs-photo i { inset: 0; border-radius: 10px; }
.hs-doc-name { font-size: 1.3rem; font-weight: 700; }
.hs-doc-h { margin-top: 18px; font-weight: 600; color: var(--muted); }
.hs-doc-job { margin-top: 10px; color: var(--muted); }
.hs-doc-job b { display: block; color: var(--text); }

/* Steps 7 + 9: ranked applicants */
.hs-apps { display: grid; gap: 10px; }
.hs-app { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid var(--hs-line); border-radius: 10px; background: #fff; }
.hs-app-t { display: grid; }
.hs-app-t em { font-style: normal; font-size: .95rem; color: var(--muted); }
.hs-app-t em:empty { display: none; }
.hs-app-t span, .hs-app-t em { transition: opacity .25s; }
.hs-app.fade .hs-app-t span, .hs-app.fade .hs-app-t em { opacity: 0; }
.hs-swap { color: var(--brand-blue); display: inline-block; transition: opacity .25s, transform .25s var(--ease); }
.hs-card-h .hs-swap { color: var(--brand-blue); }
.hs-swap.out { opacity: 0; transform: translateY(-6px); }

/* Step 8: rule -> actions */
.hs-rule { font-size: 1.2rem; }
.hs-rule b { color: var(--brand-blue); }
.hs-acts { display: grid; gap: 10px; }
.hs-acts li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--hs-line); border-radius: 10px; }
.hs-acts .hs-tick { margin-left: auto; }
.hs-act-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(37,99,235,.08); color: var(--brand-blue); flex: none; }
.hs-act-ic svg { width: 20px; height: 20px; }

/* Results */
.hs-results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hs-res { background: #fff; border: 1px solid var(--border-soft); border-radius: 10px; padding: 26px 22px; }
.hs-res-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(37,99,235,.08); color: var(--brand-blue); }
.hs-res-ic svg { width: 22px; height: 22px; }
.hs-res p { margin-top: 16px; font-size: 1.05rem; font-weight: 500; line-height: 1.5; }
.hs-fine { margin-top: 28px; text-align: center; font-size: .9rem; color: var(--muted); }
@media (max-width: 1000px) { .hs-results { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hs-results { grid-template-columns: 1fr; } }
