/* Guided journey: neutral POC palette (docs/UX-REDESIGN-PLAN.md decision 5). Swap the tokens for brand values. */
:root {
  --j-ink: #1B1F24;
  --j-muted: #5B6470;
  --j-line: #E6E9EE;
  --j-line-strong: #C9D0D8;
  --j-surface: #F4F6F8;
  --j-ground: #FFFFFF;
  --j-accent: #0F6E8C;
  --j-accent-ink: #FFFFFF;
  --j-accent-soft: #E3F1F5;
  --j-ok: #1E7A46;
  --j-ok-soft: #E8F5EE;
  --j-warn: #8A5A00;
  --j-warn-soft: #FFF4D6;
  --j-wait: #E0A100;
  --j-fail: #A32D2D;
  --j-fail-soft: #FBE9E9;
  --j-dark: #0F1B22;
  --j-photo: #D9E4EA;
  --j-radius: 14px;
  color-scheme: light;
}

/* Dark theme: the OS decides unless the toggle saved a choice (js/theme.js sets data-theme before first paint).
   The tokens are written twice rather than with light-dark(), which iOS before 17.5 drops, taking every colour with it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --j-ink: #E6E9ED;
    --j-muted: #9AA4AF;
    --j-line: #2A3038;
    --j-line-strong: #3B444F;
    --j-surface: #1A1F25;
    --j-ground: #111418;
    --j-accent: #5BB8D6;
    --j-accent-ink: #0B1A20;
    --j-accent-soft: #14303B;
    --j-ok: #5CC98A;
    --j-ok-soft: #142A1E;
    --j-warn: #E3B341;
    --j-warn-soft: #2E2410;
    --j-fail: #F28B82;
    --j-fail-soft: #3A1B1B;
    --j-dark: #1F2E38;
    --j-photo: #2C3A44;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --j-ink: #E6E9ED;
  --j-muted: #9AA4AF;
  --j-line: #2A3038;
  --j-line-strong: #3B444F;
  --j-surface: #1A1F25;
  --j-ground: #111418;
  --j-accent: #5BB8D6;
  --j-accent-ink: #0B1A20;
  --j-accent-soft: #14303B;
  --j-ok: #5CC98A;
  --j-ok-soft: #142A1E;
  --j-warn: #E3B341;
  --j-warn-soft: #2E2410;
  --j-fail: #F28B82;
  --j-fail-soft: #3A1B1B;
  --j-dark: #1F2E38;
  --j-photo: #2C3A44;
  color-scheme: dark;
}

/* Theme toggle, top right of every page header. Shows what a click switches to: a moon in light, a sun in dark. */
.j-theme { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; margin-left: 4px; border: 1px solid var(--j-line-strong); border-radius: 999px; background: var(--j-ground); color: var(--j-muted); cursor: pointer; flex-shrink: 0; }
.j-theme:hover { color: var(--j-accent); border-color: var(--j-accent); }
.j-theme:focus-visible { outline: 3px solid var(--j-accent); outline-offset: 2px; }
.j-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.j-theme .j-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .j-theme .j-sun { display: block; }
  :root:not([data-theme="light"]) .j-theme .j-moon { display: none; }
}
:root[data-theme="dark"] .j-theme .j-sun { display: block; }
:root[data-theme="dark"] .j-theme .j-moon { display: none; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Read by screen readers, not shown. */
.j-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* WCAG 2.4.7: one visible focus ring for everything focusable, including the hidden radio inside a choice card. */
a:focus-visible, summary:focus-visible, .j-store:focus-visible, .j-choice:has(input:focus-visible) { outline: 3px solid var(--j-accent); outline-offset: 2px; border-radius: 6px; }
html { -webkit-text-size-adjust: 100%; }
.j-body { margin: 0; background: var(--j-ground); color: var(--j-ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--j-accent); }
.j-wrap { max-width: 480px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 20px 24px; display: flex; flex-direction: column; gap: 18px; min-height: 100vh; }
.j-pagefoot { text-align: center; font-size: 12px; color: var(--j-muted); padding: 12px 20px 24px; }

.j-head { display: flex; flex-direction: column; gap: 10px; }
.j-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.j-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--j-accent); display: inline-block; }
.j-dim { color: var(--j-muted); font-weight: 400; font-size: 13px; margin-left: auto; }
.j-stepline { font-size: 13px; font-weight: 600; color: var(--j-accent); }
.j-ok-text { color: var(--j-ok); }
.j-progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.j-progress span { height: 6px; border-radius: 3px; background: var(--j-line); }
.j-progress span.on { background: var(--j-accent); }
.j-progress.done span { background: var(--j-ok); }

.j-h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; }
.j-lead { margin: 0; font-size: 15px; color: var(--j-muted); }
.j-small { margin: 0; font-size: 14px; color: var(--j-muted); }
.j-foot { margin: 0; font-size: 13px; color: var(--j-muted); text-align: center; }
.j-kicker { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--j-muted); font-weight: 600; }

.j-note { display: flex; align-items: center; gap: 10px; background: var(--j-surface); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.j-note.col { flex-direction: column; align-items: flex-start; gap: 6px; }
.j-note p { margin: 0; }
.j-ico { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--j-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.j-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.j-steps li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--j-line); align-items: flex-start; }
.j-steps li:last-child { border-bottom: none; }
.j-steps li div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.j-steps li div > strong { font-size: 16px; }
.j-steps li div > span { color: var(--j-muted); }
.j-steps.compact li { padding: 8px 0; border: none; font-size: 14px; }
.j-steps.compact li div { display: block; }
.j-num { width: 30px; height: 30px; border-radius: 15px; border: 2px solid var(--j-line-strong); color: var(--j-muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.j-steps li.now .j-num, .j-steps.compact .j-num { background: var(--j-accent-soft); border-color: var(--j-accent-soft); color: var(--j-accent); }
.j-steps li.now .j-num { background: var(--j-accent); border-color: var(--j-accent); color: var(--j-accent-ink); }

.j-actions { display: flex; flex-direction: column; gap: 10px; }
.j-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 18px; border-radius: var(--j-radius); border: none; font: inherit; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; }
.j-btn.primary { background: var(--j-accent); color: var(--j-accent-ink); }
.j-btn.secondary { background: var(--j-ground); color: var(--j-accent); border: 1px solid var(--j-accent); min-height: 48px; font-size: 15px; }
.j-btn.light { background: #FFFFFF; color: #0F1B22; min-height: 48px; font-size: 16px; }
.j-btn.link { background: none; color: var(--j-muted); font-size: 14px; font-weight: 500; min-height: 40px; text-decoration: underline; }
.j-btn:focus-visible { outline: 3px solid var(--j-accent); outline-offset: 2px; }

.j-stores { display: flex; flex-direction: column; gap: 10px; }
.j-store { display: flex; flex-direction: column; padding: 12px 16px; border: 1px solid var(--j-line-strong); border-radius: var(--j-radius); text-decoration: none; color: var(--j-ink); }
.j-store-k { font-size: 12px; color: var(--j-muted); }
.j-store-n { font-size: 17px; font-weight: 600; }

.j-cardpreview { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--j-surface); }
.j-cardpreview div { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.j-cardpreview strong { font-size: 16px; }
.j-cardphoto { width: 56px; height: 72px; border-radius: 10px; background: var(--j-photo); flex-shrink: 0; }

.j-status { display: flex; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--j-line-strong); font-size: 14px; }
.j-status p, .j-status ol { margin: 6px 0 0; color: var(--j-muted); }
.j-status ol { padding-left: 18px; color: var(--j-ink); }
.j-dot { width: 12px; height: 12px; border-radius: 6px; background: var(--j-line-strong); flex-shrink: 0; margin-top: 5px; }
.j-dot.wait { background: var(--j-wait); animation: j-pulse 1.4s ease-in-out infinite; }
@keyframes j-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .j-dot.wait { animation: none; } }

.j-banner { padding: 12px 14px; border-radius: 12px; background: var(--j-surface); font-size: 14px; }
.j-banner.ok { background: var(--j-ok-soft); }
.j-banner.fail { background: var(--j-fail-soft); color: var(--j-fail); }

.j-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.j-tips div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 12px; background: var(--j-surface); text-align: center; font-size: 12px; }
.j-tips .j-ico { width: 26px; height: 26px; }

.j-details { font-size: 14px; color: var(--j-muted); }
.j-details summary { cursor: pointer; font-weight: 500; color: var(--j-ink); padding: 6px 0; } /* 2.5.8: at least 24px tall */
.j-details p { margin: 8px 0 0; }
.j-details ol { margin: 8px 0 0; padding-left: 18px; color: var(--j-ink); }
/* Scanners want dark modules on a light ground with a quiet zone, whatever the page theme. */
.j-qr { display: block; width: 200px; max-width: 100%; margin: 10px auto 0; border-radius: 8px; background: #FFFFFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .j-qr { padding: 10px; } }
:root[data-theme="dark"] .j-qr { padding: 10px; }
.j-shot { display: block; max-width: 220px; width: 100%; margin: 10px 0 0; border: 1px solid var(--j-line); border-radius: 8px; }

.j-pass { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--j-dark); color: #FFFFFF; }
.j-pass-top { display: flex; justify-content: space-between; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #9FB3BF; font-weight: 600; }
.j-pass-top span:last-child { text-transform: none; letter-spacing: 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.j-pass-value { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 28px; letter-spacing: .12em; font-weight: 600; text-align: center; padding: 6px 0; user-select: all; -webkit-user-select: all; word-break: break-all; }
.j-pass.expired .j-pass-value { text-decoration: line-through; opacity: .5; }

.j-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--j-line-strong); font-size: 14px; }
.j-pk { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--j-line); }
.j-pk div { display: flex; flex-direction: column; font-size: 14px; }
.j-pk .j-dim { margin: 0; }
.j-pk .j-btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
.j-done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 16px; border-radius: 16px; background: var(--j-ok-soft); text-align: center; font-size: 14px; }
.j-done p { margin: 0; }
.j-done-mark { width: 60px; height: 60px; border-radius: 30px; background: var(--j-ok); position: relative; }
.j-done-mark::after { content: ""; position: absolute; left: 20px; top: 14px; width: 16px; height: 28px; border: solid var(--j-ground); border-width: 0 4px 4px 0; transform: rotate(45deg); }

.j-sim { margin-top: auto; padding: 12px; border: 1px dashed var(--j-warn); border-radius: 12px; font-size: 13px; }
.j-sim div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.j-sim button { font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--j-line-strong); background: var(--j-ground); color: var(--j-ink); cursor: pointer; }

/* Recovery start page */
.j-choice { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--j-radius); border: 1px solid var(--j-line-strong); text-decoration: none; color: var(--j-ink); }
.j-choice.selected { border: 2px solid var(--j-accent); background: var(--j-accent-soft); }
.j-choice div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--j-muted); }
.j-choice strong { font-size: 15px; color: var(--j-ink); }
.j-field { display: flex; flex-direction: column; gap: 6px; }
.j-field label { font-size: 14px; font-weight: 600; }
.j-field input { height: 52px; border-radius: 12px; border: 1px solid var(--j-line-strong); padding: 0 14px; font: inherit; background: var(--j-ground); color: var(--j-ink); }
.j-field input:focus { outline: 3px solid var(--j-accent); outline-offset: 1px; border-color: var(--j-accent); }
.j-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.j-fieldset legend { padding: 0; margin-bottom: 10px; }
.j-error { color: var(--j-fail); font-size: 13px; }

/* Desktop to phone: offered on large pointer screens, open there by default via journey.js. */
.j-handoff { border: 1px solid var(--j-line-strong); border-radius: 16px; padding: 14px 16px; font-size: 14px; }
.j-handoff summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.j-handoff p { margin: 8px 0 0; color: var(--j-muted); }
@media (max-width: 719px), (hover: none) { .j-handoff { display: none; } }
.j-mirror-steps li.done .j-num { background: var(--j-ok); border-color: var(--j-ok); color: var(--j-ground); }
/* Dark text on amber in both themes: white on #E0A100 is about 2:1 (WCAG 1.4.3 needs 4.5:1). */
.j-mirror-steps li.now .j-num { background: var(--j-wait); border-color: var(--j-wait); color: #1B1F24; }

/* Main column and side column: stacked on phones (side first only where the page puts it first). */
.j-main, .j-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.j-wide-only { display: none !important; }

@media (min-width: 720px) {
  .j-wrap { padding-top: 48px; }
  .j-h1 { font-size: 30px; }
}

/* Laptops and desktops: the step or form on the left, help and the phone hand-off on the right. */
@media (min-width: 960px) {
  .j-wrap { max-width: 600px; }
  .j-wrap.j-split { max-width: 1080px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 56px; row-gap: 28px; align-content: start; padding: 56px 40px 32px; }
  .j-split > .j-head { grid-column: 1 / -1; grid-row: 1; }
  .j-split > .j-main { grid-column: 1; grid-row: 2; }
  .j-split > .j-side { grid-column: 2; grid-row: 2; position: sticky; top: 24px; }
  .j-split .j-qr { width: 240px; }
  .j-h1 { font-size: 34px; }
  .j-lead { font-size: 16px; }
}
@media (min-width: 960px) and (hover: hover) {
  .j-wide-only { display: flex !important; }
}
.j-handoff-link { word-break: break-all; }

/* QA and UAT hub (qa.hindentech.com): wider than the journeys, paths in the main column, setup rules beside them. */
.qa-wrap { max-width: 1180px; }
.qa-hero { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.qa-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.qa-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--j-line-strong); border-radius: var(--j-radius); text-decoration: none; color: var(--j-ink); font-size: 13px; }
.qa-tile strong { font-size: 15px; }
.qa-tile span:last-child { color: var(--j-muted); }
.qa-tile:hover { border-color: var(--j-accent); background: var(--j-accent-soft); }
.qa-tile:focus-visible { outline: 3px solid var(--j-accent); outline-offset: 2px; }
.qa-tile .j-num, .qa-path-head .j-num { background: var(--j-accent-soft); border-color: var(--j-accent-soft); color: var(--j-accent); }
.qa-which ul, .qa-check { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.qa-cols, .qa-main, .qa-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.qa-path { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--j-line-strong); border-radius: 16px; scroll-margin-top: 16px; }
.qa-path-head { display: flex; align-items: center; gap: 12px; }
.qa-path h2 { margin: 0; font-size: 21px; line-height: 1.2; }
.qa-path h3 { margin: 4px 0 0; }
.qa-summary { margin: 0; color: var(--j-muted); font-size: 15px; }
.qa-meta, .qa-limits { margin: 0; display: grid; gap: 8px; font-size: 14px; }
.qa-meta div, .qa-limits div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.qa-limits div { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); padding: 8px 0; border-top: 1px solid var(--j-line); }
.qa-meta dt, .qa-limits dt { font-weight: 600; }
.qa-meta dd, .qa-limits dd { margin: 0; color: var(--j-muted); }
.qa-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.qa-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--j-accent-soft); color: var(--j-ink); text-decoration: none; font-size: 13px; border: 1px solid transparent; }
.qa-link strong { font-size: 15px; color: var(--j-accent); }
.qa-link .qa-url { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.qa-link span:last-child { color: var(--j-muted); }
.qa-link:hover { border-color: var(--j-accent); }
.qa-link:focus-visible { outline: 3px solid var(--j-accent); outline-offset: 2px; }
.qa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.qa-cases { border-top: 1px solid var(--j-line); padding-top: 8px; font-size: 14px; }
.qa-cases + .qa-cases { border-top: none; padding-top: 0; }
.qa-cases summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--j-accent); }
.qa-table { display: flex; flex-direction: column; margin-top: 6px; }
.qa-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--j-line); }
.qa-row > span:nth-child(n+3) { grid-column: 2; }
.qa-row-head { display: none; }
.qa-id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-weight: 600; font-size: 13px; }
.qa-dev { color: var(--j-muted); font-size: 13px; }
.qa-exp { color: var(--j-ok); }
.qa-warn { background: var(--j-warn-soft); }
.qa-side > .j-note { scroll-margin-top: 16px; }

@media (min-width: 960px) {
  .qa-wrap { max-width: 1180px; padding: 56px 40px 32px; }
  .qa-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
  .qa-row { grid-template-columns: 72px 170px minmax(0, 1.3fr) minmax(0, 1fr); }
  .qa-row > span:nth-child(n+3) { grid-column: auto; }
  .qa-row-head { display: grid; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--j-muted); font-weight: 600; border-top: none; padding-bottom: 4px; }
}
