/* JobAIRisk — self-contained stylesheet. No external fonts/CDNs (strict CSP).
   Color roles follow the validated dataviz reference palette; band/status colors
   are always paired with a text label — never color alone. */

:root {
  --surface-0: #fcfcfb;        /* page */
  --surface-1: #ffffff;        /* cards */
  --surface-2: #f1f1ee;        /* tracks, wells */
  --ink-1: #0b0b0b;
  --ink-2: #52514e;
  --ink-3: #7c7b76;
  --line: #e3e2de;
  --accent: #2a78d6;           /* sequential blue, light step 450 */
  --accent-ink: #ffffff;
  --seq-bar: #2a78d6;
  --hero-bg: #101a30;          /* deep navy hero, both modes */
  --hero-ink: #ffffff;
  --hero-muted: #94a3b8;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface-0: #1a1a19;
    --surface-1: #222221;
    --surface-2: #2c2c2a;
    --ink-1: #ffffff;
    --ink-2: #c3c2b7;
    --ink-3: #8f8e86;
    --line: #3a3936;
    --accent: #3987e5;         /* dark step 400 */
    --seq-bar: #3987e5;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink-1);
  background: var(--surface-0);
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; margin: 0 0 .6rem; letter-spacing: -.01em; }
p { margin: .4rem 0 .9rem; }
a { color: var(--accent); }
.link { color: var(--accent); text-decoration: none; }
.link:hover { text-decoration: underline; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }
.section { padding: 2rem 0 0.6rem; }
.sub { color: var(--ink-2); font-size: 1.06rem; max-width: 46rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface-1); color: var(--ink-1); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface-0); }
.head-row { display: flex; align-items: center; justify-content: space-between; padding: .7rem 20px; gap: 1rem; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink-1); text-decoration: none; letter-spacing: -.01em; }
.brand-mark { color: var(--accent); }
.site-head nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.site-head nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.site-head nav a:hover { color: var(--ink-1); }
.nav-cta { color: var(--accent) !important; font-weight: 600; }
.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.6rem 0 2.2rem; color: var(--ink-2); font-size: .9rem; }
.site-foot nav { margin: .5rem 0; }
.site-foot a { color: var(--ink-2); }
.foot-disclaimer { max-width: 46rem; }
.foot-fine { color: var(--ink-3); font-size: .82rem; }

/* buttons + forms */
.btn { display: inline-block; border: 1px solid transparent; border-radius: var(--radius); padding: .65rem 1.15rem; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink-1); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-3); }
input[type="text"], input[type="search"], input[type="email"], select, textarea {
  width: 100%; padding: .7rem .8rem; font-size: 1rem; color: var(--ink-1);
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .suggest-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.std-form label { display: block; margin: 0 0 1rem; font-weight: 600; }
.std-form input, .std-form select, .std-form textarea { margin-top: .35rem; font-weight: 400; }

/* hero */
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 3.2rem 0 2.6rem; }
.hero h1 { font-size: 2.3rem; max-width: 40rem; }
.hero .sub { color: var(--hero-muted); }
.trust-line { color: var(--hero-muted); font-size: .9rem; }
.scan-form { display: flex; gap: .6rem; margin: 1.3rem 0 .4rem; max-width: 40rem; flex-wrap: wrap; }
.scan-form .ac-wrap { flex: 1 1 260px; position: relative; }
.scan-form input#q { background: #ffffff; color: #0b0b0b; border: 0; }
.scan-form .btn-primary { flex: 0 0 auto; }
.ac-list { list-style: none; margin: .3rem 0 0; padding: .3rem; position: absolute; left: 0; right: 0; z-index: 30;
  background: var(--surface-1); color: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: 330px; overflow-y: auto; }
.ac-list li { padding: .5rem .6rem; border-radius: 6px; display: flex; justify-content: space-between; gap: .8rem; cursor: pointer; }
.ac-list li[aria-selected="true"], .ac-list li:hover { background: var(--surface-2); }
.ac-score { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* example card + stat tiles */
.example-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; max-width: 34rem; }
.ex-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.ex-role { font-weight: 700; font-size: 1.15rem; margin: 0; }
.ex-score { font-size: 2.6rem; font-weight: 800; margin: 0; line-height: 1; font-variant-numeric: tabular-nums; }
.ex-of { font-size: 1rem; font-weight: 600; color: var(--ink-3); }
.ex-tasks { padding-left: 1.1rem; margin: .6rem 0; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .6rem; }
.report-preview ul { columns: 2; column-gap: 2.2rem; padding-left: 1.1rem; }
@media (max-width: 640px) { .report-preview ul { columns: 1; } }

/* meters (status color on a visible track + text label = the relief rule) */
.meter { height: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: .6rem 0; }
.meter-lg { height: 18px; }
.meter-fill { height: 100%; border-radius: 999px; }
.band-chip { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: #0b0b0b; background: var(--surface-2); border: 1px solid var(--line); }
.band-chip[data-band="Low"] { background: var(--good); color: #fff; border-color: transparent; }
.band-chip[data-band="Moderate"] { background: var(--warning); color: #0b0b0b; border-color: transparent; }
.band-chip[data-band="High"] { background: var(--serious); color: #0b0b0b; border-color: transparent; }
.band-chip[data-band="Very High"] { background: var(--critical); color: #fff; border-color: transparent; }
.band-chip-sm { font-size: .74rem; padding: .05rem .5rem; }

/* risk page */
.result-hero { background: var(--hero-bg); color: var(--hero-ink); padding: 1.6rem 0 2rem; }
.result-hero .crumbs { font-size: .85rem; color: var(--hero-muted); margin-bottom: .8rem; }
.result-hero .crumbs a { color: var(--hero-muted); }
.result-hero .disclaimer { color: var(--hero-muted); font-size: .88rem; max-width: 44rem; }
.scan-tag { display: inline-block; background: rgba(255,255,255,.12); border-radius: 999px; padding: .1rem .7rem; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.role-desc { color: var(--hero-muted); max-width: 46rem; }
.score-block { display: flex; align-items: center; gap: 1.4rem; margin: 1rem 0 .4rem; flex-wrap: wrap; }
.score-num { font-size: 4.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score-of { font-size: 1.4rem; color: var(--hero-muted); font-weight: 600; }
.score-label { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--hero-muted); margin: 0 0 .3rem; }
.score-meta p { margin: .2rem 0; }
.result-hero .meter { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.18); max-width: 44rem; }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.hero-actions .btn-ghost { color: var(--hero-ink); border-color: rgba(255,255,255,.3); }

/* task lists: single-hue sequential bars, thin marks, value in text ink */
.task-list { list-style: none; padding: 0; margin: .8rem 0; max-width: 46rem; }
.task-list li { margin-bottom: .9rem; }
.task-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.task-text { flex: 1; }
.task-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); font-size: .92rem; }
.tbar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: .3rem; }
.tbar-fill { height: 100%; background: var(--seq-bar); border-radius: 4px 4px 4px 4px; }
.tbar-durable { background: var(--good); }

/* pivots */
.pivot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; margin-top: .8rem; }
.pivot-card { display: block; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--ink-1); }
.pivot-card:hover { border-color: var(--accent); }
.pivot-title { font-weight: 700; margin: 0 0 .3rem; }
.pivot-score { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.delta-chip { display: inline-block; margin-left: .4rem; padding: .05rem .55rem; border-radius: 999px; background: var(--good); color: #fff; font-size: .8rem; font-weight: 700; }
.stat-row { list-style: none; display: flex; gap: 2rem; padding: 0; flex-wrap: wrap; }
.stat-row li { display: flex; flex-direction: column; }
.stat-num { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-cap { color: var(--ink-2); font-size: .85rem; }
.cta-band { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-top: 2rem; }
.related-list { list-style: none; padding: 0; columns: 2; column-gap: 2rem; max-width: 44rem; }
.related-list li { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; break-inside: avoid; }
.rel-score { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .related-list { columns: 1; } .score-num { font-size: 3.4rem; } .hero h1 { font-size: 1.8rem; } }
.version-line { margin: 2rem 0 0; }

/* faq */
.faq dt { font-weight: 700; margin-top: 1rem; }
.faq dd { margin: .25rem 0 0; color: var(--ink-2); }

/* leaderboard */
.lb-filters { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; margin: 1.2rem 0; }
.lb-filters label { font-size: .88rem; font-weight: 600; color: var(--ink-2); display: flex; flex-direction: column; gap: .3rem; min-width: 180px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.lb-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 640px; background: var(--surface-1); }
.lb-table th, .lb-table td { padding: .55rem .8rem; text-align: left; border-bottom: 1px solid var(--line); }
.lb-table tbody tr:last-child td { border-bottom: 0; }
.lb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.score-cell { font-weight: 700; }
.th-link { color: var(--ink-1); text-decoration: none; }
.lb-family { display: block; color: var(--ink-3); font-size: .8rem; }
.lb-bar-row { display: flex; align-items: center; gap: .6rem; min-width: 190px; }
.lb-bar { flex: 1; margin: 0; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.4rem 0; }

/* misc */
.suggest-list { list-style: none; padding: 0; max-width: 34rem; }
.suggest-btn { width: 100%; display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; margin-bottom: .5rem;
  background: var(--surface-1); color: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius); font-size: 1rem; cursor: pointer; text-align: left; }
.suggest-btn:hover { border-color: var(--accent); }
.notice { border-radius: var(--radius); padding: .8rem 1.1rem; margin: 1rem 0; border: 1px solid var(--line); }
.notice-ok { border-left: 4px solid var(--good); background: var(--surface-1); }
.notice-err { border-left: 4px solid var(--critical); background: var(--surface-1); }
.notice-warn { border-left: 4px solid var(--warning); background: var(--surface-1); }
.prose { max-width: 46rem; }
.prose pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; overflow-x: auto; font-size: .9rem; }
.err-page { padding-top: 4rem; }
@media (prefers-reduced-motion: no-preference) {
  .meter-fill, .tbar-fill { transition: width .5s ease; }
}

/* paid flow */
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.2rem; align-items: start; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.report-aside { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; position: sticky; top: 1rem; }
.h-sm { font-size: 1.05rem; margin: 0 0 .5rem; }
.report-aside ul { padding-left: 1.1rem; }
.report-aside li { margin-bottom: .35rem; }
.check-label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400 !important; font-size: .92rem; color: var(--ink-2); }
.check-label input { width: auto; margin-top: .25rem; }
.btn-lg { font-size: 1.08rem; padding: .8rem 1.5rem; }

/* report page */
.conf-chip { display: inline-block; margin-left: .5rem; padding: .15rem .6rem; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .85rem; }
.class-tag { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); }
.class-tag.class-automatable { background: var(--critical); color: #fff; }
.class-tag.class-augmentable { background: var(--warning); color: #0b0b0b; }
.class-tag.class-durable { background: var(--good); color: #fff; }
.moat-list, .action-list { list-style: none; padding: 0; }
.moat-list li, .action-list li { margin-bottom: .8rem; }
.action-title { margin-bottom: .1rem; }
.fb-row { display: flex; gap: 1.4rem; }
.fb-row label { flex: 1; }
.report-page h3 { font-size: 1.05rem; }
.optin-form { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }

/* production polish pass */
.btn { min-height: 44px; }                          /* mobile tap target */
.site-head nav a { padding: .5rem .15rem; display: inline-block; }
h1, h2, .pivot-title, .task-text { overflow-wrap: break-word; }
@media (prefers-reduced-motion: no-preference) {
  .dots { display: inline-block; animation: jr-pulse 1.2s ease-in-out infinite; }
  @keyframes jr-pulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
}
@media print {
  .site-head, .site-foot, .hero-actions, .fb-form, .optin-form, .cta-band, .nav-cta, .skip { display: none !important; }
  .result-hero, .result-hero * { background: #fff !important; color: #000 !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
}
