/* Careers page only. The careers page agent owns this file. */

/* Departments: rank-ladder tabs */
.dept-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.dept-tabs button { font: 600 .85rem var(--font-body); padding: .55rem .9rem; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.dept-tabs button .s { font: 600 .7rem var(--font-mono); letter-spacing: .08em; color: var(--muted); margin-left: .4rem; }
.dept-tabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.dept-tabs button[aria-selected="true"] .s { color: inherit; opacity: .75; }
.dept { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.1rem, 3vw, 1.75rem); }
.band.alt .dept { background: var(--bg); }
.dept + .dept { margin-top: 1rem; }
.js .dept + .dept { margin-top: 0; }
@media (max-width: 860px) { .dept { grid-template-columns: minmax(0, 1fr); } }
.dept-info { display: grid; gap: .9rem; align-content: start; min-width: 0; }
.dept-info p { color: var(--muted); }
.dept-code { font: 600 .75rem var(--font-mono); letter-spacing: .12em; color: var(--clay); }
.ladder-label { margin-bottom: .5rem; }
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); min-width: 0; }
.ladder li { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr) auto; gap: .75rem; align-items: baseline; padding: .32rem 0 .32rem .9rem; position: relative; font-size: .93rem; }
.ladder li::before { content: ""; position: absolute; left: -6px; top: .8em; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.band.alt .ladder li::before { background: var(--bg); }
.ladder li.cmd::before, .band.alt .ladder li.cmd::before { border-color: var(--clay); background: var(--clay); }
.ladder li.sup::before { border-color: var(--clay); }
.ladder .ab { font: 600 .75rem var(--font-mono); color: var(--muted); white-space: nowrap; }
.ladder .tier { font: 600 .64rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--clay); }
@media (max-width: 400px) { .ladder li { grid-template-columns: 5.3rem minmax(0, 1fr) auto; gap: .5rem; font-size: .88rem; } .ladder .ab { font-size: .66rem; } .ladder .tier { font-size: .58rem; } }
.ladder-key { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .8rem; color: var(--muted); margin-top: .7rem; }
.ladder-key span { display: inline-flex; align-items: center; gap: .4rem; }
.ladder-key i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--clay); display: inline-block; }
.ladder-key i.f { background: var(--clay); }

/* Family overview cards */
.fams { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1040px) { .fams { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .fams { grid-template-columns: minmax(0, 1fr); } }
.fam { border-top: 4px solid var(--fam, var(--clay)); display: flex; flex-direction: column; gap: .75rem; }
.fam .status-row { margin-top: auto; padding-top: .3rem; }
.fam-law { --fam: var(--sign); }
.fam-fire { --fam: var(--bad); }
.fam-crime { --fam: var(--fg); }
.fam-civ { --fam: var(--amber); }
:root[data-theme="dark"] .fam-law { --fam: var(--ok); }
.fam-icon { width: 40px; height: 40px; color: var(--fam); }
.fam h3 { font-size: 1.3rem; }
.card p.fam-note { font-size: .86rem; }
.loop { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 0; font-size: .82rem; font-weight: 600; }
.loop li { display: inline-flex; align-items: center; }
.loop li:not(:last-child)::after { content: "\203A"; color: var(--muted); margin: 0 .4rem; font-weight: 400; }
.fams-foot { margin-top: 1.25rem; max-width: 80ch; }

/* Career detail: copy beside a shift card */
.career-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.career-split.flip > :first-child { order: 2; }
@media (max-width: 920px) { .career-split { grid-template-columns: minmax(0, 1fr); } .career-split.flip > :first-child { order: 0; } }
.career-copy { display: grid; gap: 1rem; min-width: 0; }
.career-copy h2 { font-size: var(--step-3); }
.career-copy > p { color: var(--muted); max-width: 62ch; }
.today { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.band.alt .today { background: var(--bg); }
.today .sub-label { margin-bottom: .6rem; }
.today > div:first-child .sub-label { color: var(--st-working); }
.today > div:last-child .sub-label { color: var(--st-designed); }
@media (max-width: 600px) { .today { grid-template-columns: minmax(0, 1fr); } }

/* Shift card with a timeline: .w = works in the prototype, .d = designed */
.shift-card, .path-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.1rem, 3vw, 1.6rem); display: grid; gap: 1rem; min-width: 0; box-shadow: 0 18px 40px -30px rgba(0,0,0,.4); --dot-bg: var(--surface); }
.band.alt .shift-card, .band.alt .path-card { background: var(--bg); --dot-bg: var(--bg); }
.shift-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; align-items: baseline; padding-bottom: .8rem; border-bottom: 1px dashed var(--line); }
.shift-unit { font: 600 .75rem var(--font-mono); letter-spacing: .08em; color: var(--clay); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; --tl-x: 3.2rem; }
.tl.compact { --tl-x: 0rem; }
.tl li { display: grid; grid-template-columns: var(--tl-x) minmax(0, 1fr); gap: .9rem; position: relative; padding: 0 0 1rem 0; }
.tl.compact li { grid-template-columns: minmax(0, 1fr); padding-left: 1.6rem; }
.tl li::before { content: ""; position: absolute; left: calc(var(--tl-x) + .45rem - 1px); top: .5rem; bottom: -.4rem; width: 2px; background: var(--line); }
.tl li::after { content: ""; position: absolute; left: calc(var(--tl-x) + .45rem - 6px); top: .3rem; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--st-designed); background: linear-gradient(90deg, var(--st-designed) 50%, var(--dot-bg) 50%); }
.tl.compact li::before { left: 5px; }
.tl.compact li::after { left: 0; }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::before { display: none; }
.tl li.w::after { border-color: var(--st-working); background: var(--st-working); }
.tl time { font: 600 .8rem var(--font-mono); color: var(--muted); padding-top: .1rem; }
.tl li > div { padding-left: 1.1rem; display: grid; gap: .1rem; min-width: 0; }
.tl.compact li > div { padding-left: 0; }
.tl b { font-weight: 700; font-size: .95rem; }
.tl span { color: var(--muted); font-size: .88rem; }
.tl-key { list-style: none; margin: 0; padding: .8rem 0 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .8rem; color: var(--muted); }
.tl-key li { display: inline-flex; align-items: center; gap: .45rem; }
.tl-key i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--st-designed); background: linear-gradient(90deg, var(--st-designed) 50%, transparent 50%); }
.tl-key i.w { border-color: var(--st-working); background: var(--st-working); }

/* Patient path diagram */
.path-svg { width: 100%; height: auto; display: block; }
.p-line { stroke: var(--line); stroke-width: 3; fill: none; }
.p-step circle { stroke-width: 3; }
.p-step.w circle { fill: var(--st-working); stroke: var(--st-working); }
.p-step.d circle { fill: var(--dot-bg); stroke: var(--st-designed); }
.p-n { font: 700 15px var(--font-mono); }
.p-step.w .p-n { fill: var(--dot-bg); }
.p-step.d .p-n { fill: var(--st-designed); }
.p-t { font: 700 16px var(--font-body); fill: var(--fg); }
.p-c { font: 600 12px var(--font-mono); fill: var(--muted); letter-spacing: .04em; }
.p-b { font: 600 13px var(--font-mono); fill: var(--st-designed); }
.path-card .tl-key { border-top: 0; padding-top: 0; }
.path-card .tl { padding-top: 1rem; border-top: 1px dashed var(--line); }
@media (max-width: 560px) { .p-c { display: none; } .p-t { font-size: 21px; } .p-n { font-size: 19px; } .p-b { font-size: 19px; } }

/* Crime gating */
.gating { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
@media (max-width: 920px) { .gating { grid-template-columns: minmax(0, 1fr); } }
.gate-fig { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.1rem, 3vw, 1.6rem); display: grid; gap: 1.1rem; min-width: 0; }
.gate-axis { display: flex; align-items: center; gap: .7rem; font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.gate-axis i { flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), var(--sign)); }
.gates { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.gates li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "bar bar" "txt min"; gap: .45rem 1rem; align-items: baseline; }
.g-bar { grid-area: bar; height: 14px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--sign) 0 12px, transparent 12px 16px); }
:root[data-theme="dark"] .g-bar { background: repeating-linear-gradient(90deg, var(--ok) 0 12px, transparent 12px 16px); }
.g1 .g-bar { width: 34%; }
.g2 .g-bar { width: 64%; }
.g3 .g-bar { width: 100%; }
.gates li > div { grid-area: txt; display: grid; min-width: 0; }
.gates b { font-family: var(--font-display); font-size: 1.35rem; text-transform: uppercase; font-weight: 800; letter-spacing: .01em; }
.gates li > div span { color: var(--muted); font-size: .88rem; }
.g-min { grid-area: min; font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--sign); white-space: nowrap; }
:root[data-theme="dark"] .g-min { color: var(--ok); }
.crime-side { display: grid; gap: 1rem; min-width: 0; }
.crime-side .card h3 { font-size: 1.25rem; }

/* Civilian jobs and the working-day strip */
.jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1rem; }
.job h3 { font-size: 1.25rem; }
.job .card-head { flex-direction: column; gap: .5rem; }
.day { margin-top: 2rem; display: grid; gap: .8rem; }
.day-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); counter-reset: d; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); gap: 1px; }
.day-steps li { counter-increment: d; background: var(--surface); padding: 1rem 1.1rem; display: grid; gap: .2rem; align-content: start; min-width: 0; }
.day-steps li::before { content: counter(d, decimal-leading-zero); font: 600 .72rem var(--font-mono); color: var(--clay); letter-spacing: .1em; }
.day-steps li:last-child { background: color-mix(in srgb, var(--clay) 8%, var(--surface)); }
.day-steps b { font-weight: 700; }
.day-steps span { color: var(--muted); font-size: .86rem; }
@media (max-width: 860px) {
  .day-steps { grid-template-columns: minmax(0, 1fr); }
  .day-steps li { grid-template-columns: 2rem minmax(0, 1fr); column-gap: .6rem; }
  .day-steps li::before { grid-row: span 2; padding-top: .2rem; }
}

/* Progression */
.prog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1040px) { .prog { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .prog { grid-template-columns: minmax(0, 1fr); } }
.prog-k { font: 800 2.4rem/1 var(--font-display); color: var(--clay); }
.prog-col h3 { font-size: 1.3rem; }
.card p.prog-eg { display: grid; gap: .2rem; margin-top: auto; padding-top: .6rem; border-top: 1px dashed var(--line); color: var(--fg); font-size: .88rem; font-weight: 600; }

/* Injury layers */
.layers { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start; }
@media (max-width: 860px) { .layers { grid-template-columns: minmax(0, 1fr); } }
.layer-switch { margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); padding: 1.1rem 1.2rem 1.2rem; display: grid; gap: .8rem; min-width: 0; }
.layer-switch legend { padding: 0 .35rem; }
.layer-switch .check > span { display: grid; font-weight: 600; }
.layer-sum { font-size: .88rem; color: var(--fg); padding-top: .7rem; border-top: 1px dashed var(--line); }
.layer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.layer { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 1rem; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--clay); border-radius: 8px; padding: 1.1rem 1.2rem; transition: opacity .2s ease, border-color .2s ease; }
.layer h3 { font-size: 1.3rem; }
.layer p { color: var(--muted); font-size: .94rem; margin-top: .3rem; }
.layer-n { font: 800 2.2rem/1 var(--font-display); color: var(--clay); }
.layer.off { opacity: .5; border-left-color: var(--line); }
.layer.off .layer-n { color: var(--muted); }
.layer-body { display: grid; grid-template-columns: minmax(0, 1fr) 64px; gap: 1rem; align-items: start; }
.body { width: 64px; height: auto; }
.bp { fill: none; stroke: var(--muted); stroke-width: 2; }
.bp.hit-bleed { fill: color-mix(in srgb, var(--bad) 35%, transparent); stroke: var(--bad); }
.bp.hit-frac { stroke: var(--amber); stroke-width: 2.5; }
.frac { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.layers-foot { margin-top: 1.25rem; max-width: 80ch; }
@media (prefers-reduced-motion: reduce) { .layer { transition: none; } }

/* Camera */
.cam-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.cam-split .section-head { margin-bottom: 0; }
@media (max-width: 920px) { .cam-split { grid-template-columns: minmax(0, 1fr); } }
.c-ground { fill: color-mix(in srgb, var(--sign) 22%, var(--surface)); }
.cams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 600px) { .cams { grid-template-columns: minmax(0, 1fr); } }
.cam { margin: 0; display: grid; gap: .6rem; }
.cam svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.cam figcaption { font-size: .88rem; color: var(--muted); }
.cam figcaption b { color: var(--fg); margin-right: .35rem; }
.c-sky { fill: color-mix(in srgb, var(--sign) 10%, var(--surface)); }
.c-road { fill: color-mix(in srgb, var(--fg) 22%, var(--surface)); }
.c-lane { stroke: var(--amber); stroke-width: 2.5; fill: none; }
.c-dash { fill: #17231c; }
.c-wheel { fill: none; stroke: #4f5d53; stroke-width: 6; }
.c-mdt { fill: var(--term-bg); stroke: #1f7a4d; stroke-width: 2; }
.c-mdt-l { stroke: #57c78a; stroke-width: 2; }
.c-pine { fill: var(--sign); }
.c-car { fill: #17231c; }
.c-glass { fill: #9cab9f; }
.c-bar-r { fill: #d63b2e; }
.c-bar-b { fill: #2f6fd6; }

/* Concept demos in the Law and Fire & EMS bands: the intro above sets the spacing */
.demo-block .ems { margin-top: 0; }
