/* Job Match tab — styles for the markup in index.html (#pane-jobmatch) built
   by jobsgen/board.js. Uses the Careers design tokens (cream / navy, Fraunces
   + Manrope, one orange accent), so it reads as part of the page. */

.jg { --jg-top: calc(var(--kpr-hdr-h, 60px) + 64px); position: relative; }
.jg h3, .jg h4, .jg h5 { font-family: var(--serif); font-weight: 500; color: var(--fg); margin: 0; }
.jg h4 { font-size: 17px; font-style: italic; }
.jg h5 { font-family: var(--sans); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.jg-muted { color: var(--muted); font-size: 13.5px; }
.jg-link { background: none; border: 0; padding: 0; font: 600 12.5px var(--sans); color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.jg-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.jg-sub { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.jg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jg-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font: 600 12px var(--sans); color: var(--fg-2); background: var(--card-2); border: 1px solid var(--border); }
.jg-chip.sm { padding: 2px 8px; font-size: 11px; }
.jg-chip.act { cursor: pointer; }
.jg-chip.act:hover { border-color: var(--accent); color: var(--accent); }
.jg-chip.good { background: rgba(47, 157, 95, .1); border-color: rgba(47, 157, 95, .3); color: #23794a; }
.jg-chip.miss { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.jg-chip.key { background: rgba(76, 110, 245, .1); border-color: rgba(76, 110, 245, .28); color: #3b5bdb; }
[data-theme="dark"] .jg-chip.good { color: #6fd39b; }
[data-theme="dark"] .jg-chip.key { color: #91a7ff; }
.jg-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }

/* ---------- section switcher in the pane header ---------- */
.jg-head-actions { align-items: center; gap: 12px; }
.jg-nav { display: inline-flex; background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; gap: 2px; }
.jg-seg { border: 0; background: transparent; padding: 8px 14px; border-radius: 7px; font: 600 13px var(--sans); color: var(--fg-2); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.jg-seg:hover { color: var(--fg); }
.jg-seg.on { background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm); }
.jg-seg b { font: 600 11px var(--mono); color: var(--muted); }
.jg-seg b:empty { display: none; }

/* ---------- start (no resume yet) ---------- */
.jg-start { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.jg[data-stage="work"] .jg-start,
.jg[data-stage="start"][data-view="pipeline"] .jg-start { display: none; }
.jg[data-stage="start"]:not([data-view="pipeline"]) .jg-work { display: none; }
.jg[data-stage="start"] .jg-side { display: none; }
.jg-drop { position: relative; border: 1.5px dashed var(--border-strong); border-radius: 18px; background: var(--card); padding: 56px 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; cursor: pointer; min-height: 360px; transition: border-color .15s, background .15s; }
.jg-drop:hover, .jg-drop.over, .jg-drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.jg-drop-icon { font: 300 54px/1 var(--serif); color: var(--accent); }
.jg-drop h3 { font-size: 26px; font-style: italic; }
.jg-drop p { color: var(--muted); max-width: 46ch; }
.jg-scan { margin-top: 18px; text-align: left; min-width: 260px; }
.jg-scan-file { font: 500 12px var(--mono); color: var(--fg-2); margin-bottom: 8px; }
.jg-scan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.jg-scan-steps li { font-size: 13.5px; color: var(--muted-2); padding-left: 24px; position: relative; }
.jg-scan-steps li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-strong); }
.jg-scan-steps li.on { color: var(--fg); font-weight: 600; }
.jg-scan-steps li.on::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.jg-scan-steps li.done { color: var(--fg-2); }
.jg-scan-steps li.done::before { background: #2f9d5f; border-color: #2f9d5f; }
.jg-how { list-style: none; counter-reset: how; margin: 0; padding: 0; display: grid; gap: 14px; align-content: center; }
.jg-how li { counter-increment: how; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; padding: 16px 18px; background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; }
.jg-how li::before { content: counter(how, decimal-leading-zero); grid-row: span 2; font: 500 13px var(--mono); color: var(--accent); align-self: start; padding-top: 3px; }
.jg-how b { font: 500 italic 19px var(--serif); }
.jg-how span { color: var(--fg-2); font-size: 14px; }

/* ---------- workspace: sidebar · list · detail ---------- */
.jg-work { display: grid; grid-template-columns: 300px minmax(0, 1fr) minmax(400px, 480px); gap: 24px; align-items: start; }
.jg[data-view="pipeline"] .jg-work,
.jg[data-view="evaluate"] .jg-work { grid-template-columns: 300px minmax(0, 1fr); }
.jg[data-stage="start"][data-view="pipeline"] .jg-work { grid-template-columns: minmax(0, 1fr); }

.jg-side { position: sticky; top: var(--jg-top); display: grid; gap: 16px; max-height: calc(100vh - var(--jg-top) - 16px); overflow: auto; scrollbar-width: thin; padding-bottom: 4px; }
.jg-me { display: flex; gap: 12px; align-items: center; }
.jg-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--sans); color: #fff; background: hsl(var(--h) 55% 42%); }
.jg-me-name { font: 500 19px/1.2 var(--serif); }
.jg-me-title { font-size: 13px; color: var(--muted); }
.jg-me-sum { margin-top: 12px; font-size: 13px; color: var(--fg-2); }
.jg-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.jg-facts div { background: var(--card-2); border-radius: 10px; padding: 8px 10px; }
.jg-facts dt { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.jg-facts dd { margin: 2px 0 0; font: 600 14px var(--sans); }
.jg-me-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.jg-tag { font: 600 11px var(--mono); color: var(--muted); }
.jg-tag.ai { color: #2f9d5f; }
.jg-tag.ai::before { content: "● "; }
.jg-prefs { display: grid; gap: 6px; }
.jg-prefs h4 { margin-bottom: 6px; }
.jg-prefs label { margin: 6px 0 0; font-size: 12.5px; display: flex; justify-content: space-between; }
.jg-prefs .btn { margin-top: 10px; }
.jg-swap { background: var(--card); }
#jgSwapResume[hidden] { display: none; }
.jg-more p { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.jg-boards { display: flex; flex-wrap: wrap; gap: 6px; }
.jg-boards a { font: 600 12px var(--sans); padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--fg-2); }
.jg-boards a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.jg-view { display: none; }
.jg[data-view="matches"] .jg-view[data-v="matches"],
.jg[data-view="pipeline"] .jg-view[data-v="pipeline"],
.jg[data-view="evaluate"] .jg-view[data-v="evaluate"] { display: block; }

/* ---------- matches list ---------- */
.jg-toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.jg-toolbar input { grid-column: 1 / -1; }
.jg-toolbar input, .jg-toolbar select { padding: 9px 12px; font-size: 13px; }
.jg-toolbar select { padding-right: 30px; background-position: right 14px top 55%, right 9px top 55%; }
.jg-listhead { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.jg-listhead #jgStatus { flex: 1 1 auto; min-width: 200px; }
.jg-note { display: block; margin-top: 4px; font-size: 12.5px; color: #b0590c; }
[data-theme="dark"] .jg-note { color: #f0a35a; }
.jg-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font: 600 12.5px var(--sans); color: var(--fg-2); cursor: pointer; }
.jg-list { display: grid; gap: 8px; }
.jg-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%; text-align: left; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s, transform .12s; }
.jg-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.jg-row.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.jg-row.compact { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 10px 12px; align-items: center; }
.jg-row.compact .jg-logo { width: 36px; height: 36px; font-size: 12px; }
.jg-row-main { display: grid; gap: 3px; min-width: 0; }
.jg-row-title { font: 700 15px/1.3 var(--sans); color: var(--fg); }
.jg-row-meta { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jg-row-verdict { font-size: 13px; color: var(--fg-2); font-style: italic; }
.jg-row-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.jg-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.jg-row.skel { pointer-events: none; }
.jg-row.skel .jg-logo { background: var(--card-2); }
.jg-row.skel i { display: block; height: 12px; border-radius: 6px; background: var(--card-2); animation: jg-pulse 1.2s ease-in-out infinite alternate; }
.jg-row.skel i + i { width: 60%; margin-top: 8px; }
@keyframes jg-pulse { from { opacity: .45; } to { opacity: 1; } }
.jg-logo { flex: none; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font: 700 14px var(--sans); color: hsl(var(--h, 20) 55% 34%); background: hsl(var(--h, 20) 60% 92%); }
[data-theme="dark"] .jg-logo { color: hsl(var(--h, 20) 70% 78%); background: hsl(var(--h, 20) 35% 20%); }
.jg-logo.lg { width: 54px; height: 54px; font-size: 17px; border-radius: 14px; }
.jg-grade { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font: 800 14px var(--sans); color: #fff; background: var(--muted-2); }
.jg-grade.big { width: 52px; height: 52px; font-size: 26px; border-radius: 14px; }
.jg-grade.g-A { background: #1f8f55; }
.jg-grade.g-B { background: #5e9a22; }
.jg-grade.g-C { background: #c48a12; }
.jg-grade.g-D { background: #d4622a; }
.jg-grade.g-F { background: #b93d35; }
.jg-grade.wait { background: var(--card-2); color: var(--muted); animation: jg-pulse 1s ease-in-out infinite alternate; }
.jg-pct { font: 600 12px var(--mono); padding: 2px 8px; border-radius: 999px; background: var(--card-2); color: var(--muted); }
.jg-pct.hi { color: #1f8f55; background: rgba(31, 143, 85, .1); }
.jg-pct.mid { color: #b07a0c; background: rgba(196, 138, 18, .12); }
[data-theme="dark"] .jg-pct.hi { color: #6fd39b; }
[data-theme="dark"] .jg-pct.mid { color: #f0c05a; }
.jg-stage { font: 600 10.5px var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--card-2); color: var(--fg-2); }
.jg-stage.s-applied, .jg-dot.s-applied { --c: #3b82f6; }
.jg-stage.s-interview, .jg-dot.s-interview { --c: #8b5cf6; }
.jg-stage.s-offer, .jg-dot.s-offer { --c: #1f8f55; }
.jg-stage.s-closed, .jg-dot.s-closed { --c: #9e9789; }
.jg-stage.s-saved, .jg-dot.s-saved { --c: #c48a12; }
.jg-stage[class*="s-"] { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.jg-empty { padding: 48px 24px; text-align: center; background: var(--card); border: 1px dashed var(--border-strong); border-radius: 14px; }
.jg-empty h3 { font-size: 22px; font-style: italic; margin-bottom: 6px; }
.jg-empty p { color: var(--muted); max-width: 52ch; margin: 0 auto; }

/* ---------- detail ---------- */
.jg-detail { position: sticky; top: var(--jg-top); max-height: calc(100vh - var(--jg-top) - 16px); overflow: auto; scrollbar-width: thin; display: grid; gap: 14px; align-content: start; }
.jg-drawer-close { display: none; }
.jg-scrim { display: none; }
.jg-detail-empty { padding: 48px 28px; text-align: center; border: 1px dashed var(--border-strong); border-radius: 14px; background: var(--card); }
.jg-detail-empty-art { font: 300 44px var(--serif); color: var(--accent); }
.jg-detail-empty h3 { font-size: 22px; font-style: italic; margin: 6px 0; }
.jg-detail-empty p { color: var(--muted); font-size: 14px; }
#jgDetailBody { display: grid; gap: 14px; }
.jg-d-head { display: flex; gap: 14px; align-items: flex-start; padding: 4px 2px 0; }
.jg-d-head h3 { font: 500 24px/1.15 var(--serif); }
.jg-d-co { font-weight: 700; margin-top: 4px; }
.jg-d-src { font-weight: 500; color: var(--muted); font-size: 12px; }
.jg-d-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.jg-d-actions { display: flex; gap: 10px; align-items: end; }
.jg-d-actions .btn { flex: 1 1 auto; }
.jg-d-actions .btn.ghost { background: var(--card); }
.jg-r-cta { margin-top: 12px; }
.jg-stage-pick { margin: 0; display: grid; gap: 2px; flex: 1 1 auto; font-size: 11px; color: var(--muted); }
.jg-stage-pick select { padding: 9px 30px 9px 12px; font-size: 13px; background-position: right 14px top 55%, right 9px top 55%; }
.jg-report.none { display: flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--accent-soft); border-color: transparent; }
.jg-report.none p { font-size: 13px; color: var(--fg-2); margin-top: 4px; }
.jg-report.busy { color: var(--fg-2); font-size: 14px; }
.jg-r-head { display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: center; }
.jg-r-score b { font: 500 30px/1 var(--serif); }
.jg-r-score span { color: var(--muted); font-size: 13px; margin-left: 2px; }
.jg-r-verdict p { font-size: 14px; color: var(--fg-2); margin-top: 3px; }
.jg-rec { font: 700 11px var(--sans); letter-spacing: .05em; text-transform: uppercase; }
.jg-rec.r-apply { color: #1f8f55; }
.jg-rec.r-tailor { color: #c48a12; }
.jg-rec.r-skip { color: #b93d35; }
.jg-r-sum { margin: 14px 0 0; font-size: 14px; color: var(--fg-2); }
.jg-r-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.jg-r-col { padding: 12px 14px; border-radius: 10px; background: var(--card-2); }
.jg-r-col.good h5 { color: #1f8f55; }
.jg-r-col.gap h5 { color: var(--accent); }
.jg-report ul, .jg-report ol { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13.5px; color: var(--fg-2); }
.jg-r-block { margin-top: 14px; }
.jg-r-block p { font-size: 13.5px; color: var(--fg-2); margin-bottom: 8px; }
.jg-r-block.flag h5 { color: #b93d35; }
.jg-r-foot { margin-top: 12px; text-align: right; }
.jg-why summary, .jg-desc summary { cursor: pointer; font: 500 italic 17px var(--serif); display: flex; justify-content: space-between; align-items: center; }
.jg-bars { display: grid; gap: 7px; margin-top: 12px; }
.jg-bar { display: grid; grid-template-columns: 74px 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--fg-2); }
.jg-bar i { height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.jg-bar b { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.jg-bar em { font: 500 11px var(--mono); color: var(--muted); font-style: normal; text-align: right; }
.jg-options { display: grid; gap: 10px; margin-top: 12px; }
.jg-option { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; row-gap: 4px; text-align: left; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); cursor: pointer; font: inherit; color: inherit; transition: border-color .12s, background .12s; }
.jg-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.jg-option-n { grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 13px var(--sans); }
.jg-option b { font: 700 14.5px var(--sans); }
.jg-option span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.jg-tool { text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); cursor: pointer; display: grid; gap: 2px; font: inherit; color: inherit; }
.jg-tool:first-child { grid-column: span 2; background: var(--accent-soft); border-color: transparent; }
.jg-tool b { font: 700 13.5px var(--sans); }
.jg-tool span { font-size: 12px; color: var(--muted); }
.jg-tool:hover, .jg-tool.on { border-color: var(--accent); }
.jg-kit { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 12px; }
.jg-kit.busy { color: var(--fg-2); font-size: 14px; display: block; }
.jg-out { margin: 0; white-space: pre-wrap; font: 14px/1.6 var(--sans); color: var(--fg); background: var(--card-2); border-radius: 10px; padding: 14px 16px; }
.jg-qa { display: grid; gap: 6px; justify-items: start; padding: 12px 14px; background: var(--card-2); border-radius: 10px; }
.jg-qa b { font-size: 13.5px; }
.jg-qa p { font-size: 13.5px; color: var(--fg-2); }
.jg-qa .jg-out { background: var(--card); width: 100%; }
.jg-kit-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.jg-iq { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.jg-iq b { display: block; font-size: 14px; }
.jg-iq-why { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.jg-iq p { font-size: 13.5px; color: var(--fg-2); margin-top: 4px; }
.jg-desc-body { margin-top: 12px; font-size: 14px; color: var(--fg-2); overflow-wrap: anywhere; }
.jg-desc-body :is(h1, h2, h3, h4) { font-family: var(--sans); font-size: 14.5px; font-weight: 700; margin: 14px 0 6px; }
.jg-desc-body p, .jg-desc-body ul, .jg-desc-body ol { margin: 0 0 10px; }

/* ---------- pipeline ---------- */
.jg-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.jg-stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.jg-stat b { display: block; font: 500 28px/1.1 var(--serif); }
.jg-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.jg-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.jg-board > .jg-empty { grid-column: 1 / -1; }
.jg-col { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: grid; gap: 8px; min-height: 160px; align-content: start; }
.jg-col h4 { font: 700 13px var(--sans); font-style: normal; display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; }
.jg-col h4 em { margin-left: auto; font: 500 12px var(--mono); color: var(--muted); font-style: normal; }
.jg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.jg-col-empty { font-size: 12.5px; color: var(--muted-2); padding: 8px 4px; }
.jg-pcard { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.jg-pcard-open { display: grid; gap: 3px; text-align: left; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.jg-pcard-top { display: flex; gap: 8px; align-items: flex-start; }
.jg-pcard-top b { font-size: 13.5px; line-height: 1.3; }
.jg-pcard-top .jg-grade { width: 22px; height: 22px; font-size: 11.5px; border-radius: 6px; flex: none; }
.jg-pcard-co { font-size: 12.5px; color: var(--fg-2); }
.jg-pcard-at { font-size: 11.5px; color: var(--muted); }
.jg-pcard select { padding: 6px 28px 6px 10px; font-size: 12px; background-position: right 13px top 55%, right 8px top 55%; }

/* ---------- evaluate a job ---------- */
.jg-eval { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.jg-eval-form { display: grid; gap: 6px; }
.jg-eval-form p { margin-bottom: 8px; }
.jg-eval-form label { margin: 6px 0 4px; }
.jg-eval-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jg-eval-form .btn { justify-self: start; margin-top: 10px; }
.jg-added { display: grid; gap: 8px; margin-top: 12px; }

/* ---------- toast ---------- */
.jg-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1300; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 10px; background: var(--fg); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-lg); }
.jg-toast.err { background: #b93d35; color: #fff; }
.jg-toast.ok { background: #1f6f45; color: #fff; }

/* ---------- drawer: detail slides in when there's no room for a column ---------- */
@media (max-width: 1279px) {
  .jg-work { grid-template-columns: 280px minmax(0, 1fr); }
}
.jg[data-view="pipeline"] .jg-detail,
.jg[data-view="evaluate"] .jg-detail { display: none; }
@media (max-width: 1279px) { .jg .jg-detail { display: none; } }
.jg.drawer-open .jg-detail { display: grid; }
@media (max-width: 1279px) {
  .jg.drawer-open .jg-detail { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); max-height: none; z-index: 1210; background: var(--bg); padding: 56px 20px 32px; box-shadow: var(--shadow-lg); animation: jg-in .22s ease-out both; }
}
.jg.drawer-open[data-view="pipeline"] .jg-detail,
.jg.drawer-open[data-view="evaluate"] .jg-detail { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); max-height: none; z-index: 1210; background: var(--bg); padding: 56px 20px 32px; box-shadow: var(--shadow-lg); animation: jg-in .22s ease-out both; }
.jg.drawer-open .jg-scrim { position: fixed; inset: 0; z-index: 1200; background: rgba(10, 15, 28, .38); }
@media (min-width: 1280px) { .jg.drawer-open[data-view="matches"] .jg-scrim { display: none; } }
@media (max-width: 1279px) { .jg.drawer-open .jg-scrim { display: block; } }
.jg.drawer-open[data-view="pipeline"] .jg-scrim,
.jg.drawer-open[data-view="evaluate"] .jg-scrim { display: block; }
.jg.drawer-open .jg-drawer-close { display: grid; place-items: center; position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--fg); cursor: pointer; font-size: 15px; }
@media (min-width: 1280px) { .jg.drawer-open[data-view="matches"] .jg-drawer-close { display: none; } }
@keyframes jg-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- narrow screens ---------- */
@media (max-width: 1100px) {
  .jg-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .jg-start { grid-template-columns: 1fr; }
  .jg-drop { min-height: 280px; padding: 40px 22px; }
  .jg-work, .jg[data-view="pipeline"] .jg-work, .jg[data-view="evaluate"] .jg-work { grid-template-columns: minmax(0, 1fr); }
  .jg-side { position: static; max-height: none; overflow: visible; order: 2; }
  .jg-main { order: 1; }
  .jg-me-sum { display: none; }
  .jg[data-view="pipeline"] .jg-side, .jg[data-view="evaluate"] .jg-side { display: none; }
  .jg-eval { grid-template-columns: 1fr; }
  .jg-board { grid-template-columns: repeat(5, minmax(220px, 78vw)); }
  .jg-head-actions { width: 100%; }
  .jg-nav { width: 100%; }
  .jg-swap { width: 100%; }
  .jg-seg { flex: 1 1 0; justify-content: center; padding: 8px 6px; }
}
@media (max-width: 560px) {
  .jg-toolbar { grid-template-columns: 1fr 1fr; }
  .jg-eval-row, .jg-r-grid, .jg-tools { grid-template-columns: 1fr; }
  .jg-tool:first-child { grid-column: auto; }
  .jg-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .jg-stat { padding: 10px 12px; }
  .jg-stat b { font-size: 22px; }
  .jg-row { grid-template-columns: 38px minmax(0, 1fr); }
  .jg-row .jg-logo { width: 38px; height: 38px; }
  .jg-row-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
  .jg-d-actions { flex-direction: column; align-items: stretch; }
  .jg-report.none { flex-direction: column; align-items: flex-start; }
}
