/* Job Skills. Built to sit beside Quadrant: the same frame (left rail, Bricolage Grotesque headings, Public Sans
   body, cards, controls) so people who use both feel at home, but a forest-green and copper palette, a green rail
   band and its own mark, so nobody mistakes one tool for the other (Quadrant is night-sky navy with brass).
   Every token below was checked for WCAG contrast in both themes when chosen (text 5.2:1+, marks 3:1+). */
:root {
  color-scheme: light;
  --paper: #f4f6f1;
  --surface: #ffffff;
  --surface-2: #e8ede4;
  --ink: #14241a;
  --ink-2: #3a4a3f;
  --muted: #56655a;
  --line: #d0d8cc;
  --line-strong: #86958a;
  --accent: #25603a;          /* text-safe forest green */
  --accent-mark: #2f7a49;     /* green for marks and bars */
  --accent-wash: #e1eee3;
  --copper: #8a4b1f;          /* text-safe copper */
  --copper-mark: #b0642c;
  --copper-wash: #f6e8dc;
  --band: #1f4a2e;            /* the rail's top band */
  --band-ink: #f4f6f1;
  --track: #e3e8df;
  --focus: #2949c6;
  --radius-s: 6px;
  --radius-m: 10px;
  --shadow: 0 1px 0 rgba(20, 36, 26, .06), 0 8px 24px -12px rgba(20, 36, 26, .18);
  --font-display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0e1712; --surface: #15221a; --surface-2: #1c2c22; --ink: #ecf2ed; --ink-2: #c6d2c9;
    --muted: #a2b2a6; --line: #2c3d32; --line-strong: #5c7364; --accent: #7fd19a; --accent-mark: #5fbf80;
    --accent-wash: #1c3526; --copper: #f0a868; --copper-mark: #d98c4a; --copper-wash: #33261c;
    --band: #183a25; --band-ink: #ecf2ed; --track: #26362c; --focus: #9db3ff;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e1712; --surface: #15221a; --surface-2: #1c2c22; --ink: #ecf2ed; --ink-2: #c6d2c9;
  --muted: #a2b2a6; --line: #2c3d32; --line-strong: #5c7364; --accent: #7fd19a; --accent-mark: #5fbf80;
  --accent-wash: #1c3526; --copper: #f0a868; --copper-mark: #d98c4a; --copper-wash: #33261c;
  --band: #183a25; --band-ink: #ecf2ed; --track: #26362c; --focus: #9db3ff;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--font-body); font-feature-settings: "tnum" 1, "lnum" 1;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--ink); padding: 8px 12px; z-index: 50; border-radius: var(--radius-s); }
.skip:focus { top: 8px; }

/* ---------- frame (Quadrant's) ---------- */
.frame { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; padding: 0 16px 22px; border-right: 1px solid var(--line);
  background: var(--surface); display: flex; flex-direction: column; gap: 18px;
}
.rail-band { margin: 0 -16px; padding: 20px 16px 16px; background: var(--band); color: var(--band-ink); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--band-ink); }
.brand:hover { color: var(--band-ink); }
.brand svg { flex: none; }
.brand .cm { fill: var(--copper-mark); }
.brand b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.rail-tag { margin: 6px 0 0 40px; font-size: .84rem; opacity: .92; }
.rail-band .brand:focus-visible { outline-color: var(--band-ink); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-s);
  color: var(--ink-2); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-wash); color: var(--ink); box-shadow: inset 3px 0 0 var(--accent-mark); }
.nav svg { width: 18px; height: 18px; flex: none; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: .86rem; color: var(--muted); }
.rail-foot button { justify-content: flex-start; }
main { min-width: 0; padding: 28px clamp(16px, 4vw, 48px) 40px; }
.page { max-width: 1100px; margin: 0 auto; }
.foot { max-width: 1100px; margin: 40px auto 0; color: var(--muted); font-size: .86rem; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- controls (Quadrant's) ---------- */
button, .btn {
  font: inherit; font-weight: 600; font-size: .94rem; cursor: pointer; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  padding: 8px 14px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; line-height: 1.3;
}
button:hover, .btn:hover { border-color: var(--ink-2); color: var(--ink); }
button.primary { background: var(--accent-mark); color: var(--paper); border-color: var(--accent-mark); }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
button.ghost:hover { background: var(--surface-2); }
input[type="search"], input[type="password"] {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); padding: 9px 11px; width: 100%;
}
label { font-weight: 600; font-size: .92rem; color: var(--ink-2); display: block; margin-bottom: 5px; }

/* ---------- occupation list ---------- */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
        padding: clamp(18px, 3vw, 28px); margin-bottom: 22px; border-top: 4px solid var(--accent-mark); }
.hero h1 { margin-bottom: 10px; }
.hero p { font-size: 1.06rem; max-width: 62ch; color: var(--ink-2); }
.search { max-width: 520px; margin-top: 14px; }
.cards { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; }
.card h2 { font-size: 1.08rem; margin-bottom: 4px; }
.card p { margin: 4px 0; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.chips li { background: var(--accent-wash); color: var(--accent); border-radius: 99px; padding: 2px 10px; font-size: .84rem; font-weight: 600; }

/* ---------- profile ---------- */
.crumbs { margin: 0 0 10px; font-size: .92rem; }
.meta { color: var(--muted); margin: 8px 0 0; font-size: .92rem; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin: 18px 0; padding: 0; list-style: none; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; }
.tile .v { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.tile .k { color: var(--muted); font-size: .86rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.toc { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 10px 0; list-style: none; font-size: .94rem; }
section.kind { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px clamp(14px, 3vw, 24px) 18px; margin-top: 22px; }
section.kind h2 { margin: 14px 0 6px; }
.note { color: var(--ink-2); font-size: .94rem; max-width: 75ch; }
.warnbox { border-left: 4px solid var(--copper-mark); background: var(--copper-wash); color: var(--ink); padding: 10px 14px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }

/* bar rows: one series (share of postings) with its 95% range */
.bars { list-style: none; margin: 0; padding: 0; }
.bars details { border-top: 1px solid var(--line); }
.bars li:first-child details { border-top: 0; }
.bars summary, .bars .row {
  display: grid; grid-template-columns: minmax(130px, 34%) 1fr 4.5rem; gap: 12px; align-items: center;
  padding: 8px 2px; cursor: pointer; list-style: none;
}
.bars summary::-webkit-details-marker { display: none; }
.bars summary:hover { background: var(--surface-2); }
.bars .row { cursor: default; border-top: 1px solid var(--line); }
.bars li:first-child .row { border-top: 0; }
.bars .name { overflow-wrap: anywhere; }
.bars summary .name::before { content: "+"; display: inline-block; width: 1.1em; color: var(--muted); font-weight: 700; }
.bars details[open] summary .name::before { content: "\2212"; }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.track { position: relative; height: 16px; background: var(--track); border-radius: 4px; }
.bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-mark); border-radius: 0 4px 4px 0; width: var(--w, 0%); }
.ci { position: absolute; top: 50%; height: 0; border-top: 2px solid var(--ink-2); left: var(--lo, 0%); width: var(--ci, 0%); }
.ci::before, .ci::after { content: ""; position: absolute; top: -6px; height: 10px; border-left: 2px solid var(--ink-2); }
.ci::before { left: 0; } .ci::after { right: 0; }
.more { padding: 4px 0 14px 1.1em; }
.more q { font-style: italic; }
.more dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 8px 0 0; font-size: .9rem; }
.more dt { color: var(--muted); }
.more dd { margin: 0; }
.showall { margin-top: 10px; }
.cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ---------- tables (Quadrant's) ---------- */
.tablewrap { overflow: auto; max-height: 520px; border: 1px solid var(--line); border-radius: var(--radius-s); margin-top: 14px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
caption { text-align: left; padding: 8px 10px; color: var(--muted); }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 650; z-index: 1; white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- sign-in ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.login .rail-band { margin: 0; }
.login form { display: grid; gap: 10px; padding: 20px; }
.error { color: #a32635; font-weight: 600; margin: 0; }
:root[data-theme="dark"] .error { color: #ff8f9c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .error { color: #ff8f9c; } }

/* ---------- small screens: the rail becomes a top bar (as in Quadrant) ---------- */
@media (max-width: 860px) {
  .frame { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 0 12px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-band { width: calc(100% + 24px); margin: 0 -12px; padding: 12px; }
  .rail-tag { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .rail-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  #built { display: none; }
}
@media (max-width: 560px) {
  .bars summary, .bars .row { grid-template-columns: 1fr 4rem; }
  .bars .track { grid-column: 1 / -1; grid-row: 2; }
}
@media print {
  .rail, .actions, .toc, .skip, .showall { display: none; }
  .frame { display: block; }
  body { background: #fff; color: #000; }
  section.kind { border: 0; padding: 0; break-inside: avoid-page; }
  .bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
