/* =====================================================================
   SkillLink — Accessibility & Inclusion toolkit
   Designed for low-literacy / first-time-smartphone workers:
   read-aloud, bigger text, high contrast, low-data mode, one-tap help,
   scam reporting, WhatsApp & missed-call fallbacks, safety, ratings.
   Loaded on every public page (after styles.css).
   ===================================================================== */

/* ---------- Global preference modes (classes on <html>) ---------- */
html.ts-2 { font-size: 18px; }
html.ts-3 { font-size: 20px; }

html.hc {
  --ink: #000; --body: #111; --muted: #333;
  --line: #000; --line-soft: #444;
  --brand: #0b3d91; --brand-dark: #062a66; --brand-tint: #eaf0ff;
  --surface: #fff; --surface-2: #fff; --surface-3: #f2f2f2;
  --verified: #0a6b2b; --accent: #a15c00; --accent-dark: #7a4500;
}
html.hc body { background: #fff; }
html.hc .card, html.hc .vmodule, html.hc .panel, html.hc .plan,
html.hc .problem-col, html.hc .benefit, html.hc .tile, html.hc .step,
html.hc .cat, html.hc .field input, html.hc .field select, html.hc .upload {
  border-width: 2px !important; border-color: #000 !important;
}
html.hc .btn { border-width: 2px !important; }
html.hc a { text-decoration: underline; }

html.lite *, html.lite *::before, html.lite *::after {
  animation: none !important; transition: none !important;
  box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html.lite .hero::before, html.lite .hero::after,
html.lite [data-decor] { display: none !important; }
html.lite .has-reveal .reveal { opacity: 1 !important; transform: none !important; }
html.lite .site-header { background: #fff !important; }

/* ---------- Speak (read-aloud) buttons ---------- */
.speak {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; min-width: 40px; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--brand);
  cursor: pointer; vertical-align: middle; margin-left: .5rem; flex: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.speak:hover { background: var(--brand-tint); border-color: var(--brand); }
.speak.is-playing { background: var(--brand); color: #fff; border-color: var(--brand); animation: speakPulse 1s infinite; }
.speak svg { width: 20px; height: 20px; }
@keyframes speakPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(0,113,227,.4); } 50% { box-shadow: 0 0 0 8px rgba(0,113,227,0); } }
.speak-inline { width: 34px; height: 34px; min-width: 34px; }
.speak-inline svg { width: 17px; height: 17px; }
h1 .speak, h2 .speak, h3 .speak { vertical-align: middle; }

/* ---------- Floating action buttons (Help + Accessibility) ---------- */
.fab-stack { position: fixed; right: 16px; bottom: 16px; z-index: 150; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.fab { display: inline-flex; align-items: center; gap: .55rem; border: none; cursor: pointer; border-radius: 999px; font: inherit; font-weight: 800; font-size: .98rem; padding: .9rem 1.2rem; box-shadow: 0 8px 24px rgba(0,0,0,.18); min-height: 56px; }
.fab svg { width: 24px; height: 24px; flex: none; }
.fab--help { background: var(--verified); color: #fff; }
.fab--a11y { background: var(--brand); color: #fff; }
.fab--help:hover { filter: brightness(1.06); }
.fab__label { white-space: nowrap; }
@media (max-width: 560px) { .fab__label { display: none; } .fab { padding: 0; width: 56px; justify-content: center; } }

/* Accessibility panel */
.a11y-panel { position: fixed; right: 16px; bottom: 150px; z-index: 151; width: min(300px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,.22); padding: 1rem; display: none; }
.a11y-panel.is-open { display: block; }
.a11y-panel h4 { margin: 0 0 .2rem; font-size: 1rem; }
.a11y-panel .sub { color: var(--muted); font-size: .82rem; margin: 0 0 .8rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--line-soft); }
.a11y-row:first-of-type { border-top: 0; }
.a11y-row span { font-weight: 600; color: var(--ink); font-size: .92rem; display: inline-flex; align-items: center; gap: .5rem; }
.a11y-row span svg { width: 20px; height: 20px; color: var(--brand); }
.a11y-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.a11y-seg button { border: 0; background: #fff; font: inherit; font-weight: 700; padding: .4rem .7rem; cursor: pointer; color: var(--body); min-width: 40px; }
.a11y-seg button.is-on { background: var(--brand); color: #fff; }
.toggle { width: 52px; height: 30px; border-radius: 999px; border: 0; background: var(--surface-3); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.toggle.is-on { background: var(--verified); }
.toggle.is-on::after { left: 25px; }

/* ---------- Bottom-sheet modal (help / scam / digilocker) ---------- */
.sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: rgba(15,23,42,.5); opacity: 0; visibility: hidden; transition: opacity .25s; }
.sheet.is-open { opacity: 1; visibility: visible; }
.sheet__card { width: 100%; max-width: 520px; background: #fff; border-radius: 24px 24px 0 0; padding: 1.4rem 1.4rem 2rem; transform: translateY(30px); transition: transform .3s var(--spring); max-height: 90vh; overflow-y: auto; }
@media (min-width: 560px) { .sheet { align-items: center; } .sheet__card { border-radius: 24px; } }
.sheet.is-open .sheet__card { transform: none; }
.sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: -0.4rem auto 1rem; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .3rem; }
.sheet__head h3 { margin: 0; font-size: 1.35rem; }
.sheet__x { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; display: grid; place-items: center; }
.sheet__x svg { width: 22px; height: 22px; }
.sheet__lead { color: var(--muted); margin: .2rem 0 1.2rem; }
.big-action { display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1.1rem 1.2rem; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; text-align: left; margin-bottom: .8rem; text-decoration: none; transition: border-color .2s, background .2s; }
.big-action:hover { border-color: var(--brand); background: var(--brand-tint); text-decoration: none; }
.big-action__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.big-action__ic svg { width: 28px; height: 28px; }
.big-action.call .big-action__ic { background: var(--verified-tint); color: var(--verified); }
.big-action.wa .big-action__ic { background: #e7f9ee; color: #17924a; }
.big-action.scam .big-action__ic { background: #fdecec; color: #c02626; }
.big-action b { display: block; color: var(--ink); font-size: 1.1rem; }
.big-action span { color: var(--muted); font-size: .9rem; }

/* ---------- No-fees promise bar ---------- */
.promise-bar { background: var(--verified); color: #fff; }
.promise-bar .container { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .8rem clamp(1rem,4vw,2rem); font-weight: 700; }
.promise-bar svg { width: 22px; height: 22px; flex: none; }
.promise-bar .grow { flex: 1; min-width: 200px; }
.promise-bar button { background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.6); color: #fff; font: inherit; font-weight: 700; border-radius: 999px; padding: .5rem 1rem; cursor: pointer; white-space: nowrap; }
.promise-bar button:hover { background: rgba(255,255,255,.3); }

/* ---------- Voice job search + icon chooser ---------- */
.voice-search { display: flex; gap: .6rem; max-width: 640px; margin: 0 auto 1.4rem; }
.voice-search input { flex: 1; font: inherit; padding: .95rem 1.1rem; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.mic-btn { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.mic-btn.is-listening { background: #e05555; animation: speakPulse 1s infinite; }
.mic-btn svg { width: 26px; height: 26px; }
.pick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: .8rem; }
@media (min-width: 560px) { .pick-grid { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 900px) { .pick-grid { grid-template-columns: repeat(4,1fr); } }
.pick { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1.2rem .6rem; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .2s var(--spring), border-color .2s; }
.pick:hover { transform: translateY(-3px); border-color: var(--brand); text-decoration: none; }
.pick__ic { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; }
.pick__ic svg { width: 30px; height: 30px; }
.pick b { color: var(--ink); font-size: 1rem; text-align: center; }

/* ---------- WhatsApp CTA & missed-call (IVR) ---------- */
.channel-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .channel-grid { grid-template-columns: 1fr 1fr; } }
.channel { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.channel__ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; }
.channel__ic svg { width: 30px; height: 30px; }
.channel.whatsapp .channel__ic { background: #e7f9ee; color: #17924a; }
.channel.ivr .channel__ic { background: #fef3dd; color: var(--accent-dark); }
.channel h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.channel p { margin: 0 0 .6rem; color: var(--muted); font-size: .95rem; }
.channel .num { font-weight: 800; color: var(--ink); font-size: 1.1rem; letter-spacing: .02em; }

/* ---------- Women's safety ---------- */
.safety-card { display: grid; grid-template-columns: auto 1fr; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.safety-card .s-ic { width: 46px; height: 46px; border-radius: 12px; background: #fdeef4; color: #c026a0; display: grid; place-items: center; }
.safety-card .s-ic svg { width: 24px; height: 24px; }
.safety-card h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.safety-card p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- Star ratings ---------- */
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 22px; height: 22px; color: #e2b400; }
.rate-stars button { border: 0; background: none; cursor: pointer; padding: 2px; }
.rate-stars svg { width: 34px; height: 34px; color: var(--line); transition: color .15s; }
.rate-stars button.on svg, .rate-stars button.hover svg { color: #e2b400; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.review-card .who { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .4rem; }
.review-card b { color: var(--ink); }
.review-card p { margin: 0; color: var(--body); font-size: .95rem; }

/* ---------- Tutorials ---------- */
.tut { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .2s var(--spring); }
.tut:hover { transform: translateY(-3px); text-decoration: none; }
.tut__thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--brand), var(--brand-darker)); display: grid; place-items: center; position: relative; }
.tut__thumb .play { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; }
.tut__thumb .play svg { width: 28px; height: 28px; color: var(--brand); margin-left: 3px; }
.tut__b { padding: 1rem 1.2rem; }
.tut__b b { display: block; color: var(--ink); }
.tut__b span { color: var(--muted); font-size: .88rem; }

/* ---------- DigiLocker button ---------- */
.digilocker { display: flex; align-items: center; gap: .8rem; width: 100%; justify-content: center; margin-bottom: 1rem; padding: 1rem; border: 2px solid var(--brand); border-radius: 14px; background: var(--brand-tint); color: var(--brand); font: inherit; font-weight: 800; cursor: pointer; font-size: 1.02rem; }
.digilocker:hover { background: #e2ecff; }
.digilocker svg { width: 24px; height: 24px; }
.or-divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; font-weight: 600; margin: 0 0 1rem; }
.or-divider::before, .or-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- OTP login (login.html) ---------- */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 2rem 1rem; background:
  radial-gradient(900px 500px at 80% -10%, #d6e8ff 0, transparent 60%),
  radial-gradient(800px 500px at 0 100%, #ffeecf 0, transparent 55%), var(--surface); }
.auth-card { width: 100%; max-width: 420px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(1.5rem, 5vw, 2.4rem); }
.auth-card h1 { font-size: clamp(1.4rem, 4.5vw + .5rem, 1.7rem); margin: .6rem 0 .3rem; }
.auth-card .lead { font-size: 1rem; margin-bottom: 1.4rem; }
.phone-input { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.phone-input .cc { padding: 0 .9rem; font-weight: 800; color: var(--ink); border-right: 1px solid var(--line); background: #fff; align-self: stretch; display: flex; align-items: center; }
.phone-input input { border: 0; background: none; flex: 1; font: inherit; font-size: 1.2rem; letter-spacing: .06em; padding: 1rem; min-width: 0; }
.otp-boxes { display: flex; gap: .6rem; justify-content: space-between; margin: 1rem 0; }
.otp-boxes input { width: 100%; min-width: 0; aspect-ratio: 1; text-align: center; font-size: 1.6rem; font-weight: 800; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.otp-boxes input:focus { border-color: var(--brand); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--brand-tint); }
.auth-step { display: none; } .auth-step.is-active { display: block; }
.otp-note { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 1rem; }
.otp-resend { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 380px) {
  .auth-wrap { padding: 1.2rem .8rem; }
  .phone-input input { font-size: 1.05rem; padding: .9rem .8rem; }
  .phone-input .cc { padding: 0 .7rem; }
  .otp-boxes { gap: .45rem; }
  .otp-boxes input { font-size: 1.35rem; border-radius: 10px; }
}

/* ---------- Assisted / kiosk onboarding ---------- */
.assist-toggle { display: flex; align-items: center; gap: .8rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1.2rem; }
.assist-toggle .txt { flex: 1; } .assist-toggle b { color: var(--ink); display: block; } .assist-toggle span { color: var(--muted); font-size: .88rem; }

/* screen-reader only */
.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; }
