/* SPEC-v5 I: employer insights, pipeline board, reply templates, bulk reply.
   Employers have no school, so charts use one fixed Placed violet that passes
   3:1 on the dark card surface. */
.ei, .pl, .shell.role-employer { --ei-chart: #8f77ff; --ei-track: var(--surface3); }

/* Tool nav shared by Needs reply, Pipeline and Insights */
.ei-nav { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.ei-nav::-webkit-scrollbar { display: none; }
.ei-navlink { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ei-navlink svg { width: 15px; height: 15px; }
.ei-navlink:hover { color: var(--text); border-color: var(--line2); }
.ei-navlink.on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }

.ei-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.ei-head > div:first-child { max-width: 640px; }
.ei-h1 { font-size: 26px; font-weight: 800; margin: 2px 0 6px; outline: none; }
.ei-head .muted { font-size: 14px; }
.ei-head-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ei-jobpick { margin: 0; min-width: 200px; }
.ei-jobpick select { padding-top: 9px; padding-bottom: 9px; font-size: 15px; }
@media (max-width: 559px) { .ei-head-tools, .ei-jobpick { width: 100%; } .ei-head-tools .btn { width: 100%; } }

.ei-upgrade { display: flex; gap: 12px; align-items: flex-start; }
.ei-upgrade > svg { width: 22px; height: 22px; color: var(--accent-hi); margin-top: 2px; }
.ei-upgrade .muted { margin: 4px 0 12px; font-size: 14px; }

/* Tiles */
.ei-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (min-width: 760px) { .ei-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ei-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ei-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ei-tile-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ei-tile b { font-size: 24px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ei-tile small { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* Cards and charts */
.ei-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 900px) { .ei-grid { grid-template-columns: 1fr 1fr; } }
.ei-card h2 { font-size: 18px; margin-bottom: 6px; }
.ei-card > .muted { font-size: 13.5px; margin-bottom: 14px; }
.ei-hbars { display: grid; gap: 8px; }
.ei-hrow { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr) 46px; align-items: center; gap: 10px; }
.ei-hlabel { font-size: 13px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ei-hval { font-size: 13px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.ei-hbar { width: 100%; height: 12px; display: block; }
.ei-track { fill: var(--ei-track); }
.ei-fill { fill: var(--ei-chart); }
.ei-quad { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 10px; }
.ei-fig { margin: 0; min-width: 0; }
.ei-fig figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: 13px; margin-bottom: 6px; }
.ei-fig figcaption .muted { font-size: 12px; }
.ei-cols { width: 100%; height: auto; display: block; overflow: visible; }
.ei-hit { fill: transparent; }
.ei-col:hover .ei-fill { opacity: .8; }
.ei-base { stroke: var(--line2); stroke-width: 1; }
.ei-val { fill: var(--text); font-size: 12px; font-weight: 800; }
.ei-axis { fill: var(--muted); font-size: 11px; font-weight: 600; }
.ei-table { margin-top: 14px; font-size: 13px; }
.ei-table summary { cursor: pointer; color: var(--accent-hi); font-weight: 700; }
.ei-scroll { overflow-x: auto; max-width: 100%; }
.ei table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; font-size: 13px; }
.ei th, .ei td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ei th:first-child { text-align: left; }
.ei thead th { color: var(--muted); font-size: 12px; }
.ei-jobs th[scope=row] { white-space: normal; min-width: 140px; }
.ei-jobs .link-btn { color: var(--text); text-align: left; font-size: 13.5px; }
.ei-jobs tr.on th, .ei-jobs tr.on td { background: var(--accent-soft); }

/* Pipeline board: stacked on phones, five columns on wide screens */
.pl-board { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .pl-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .pl-board { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pl-col { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; }
.pl-col-h { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 800; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pl-count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface3); color: var(--text); font-size: 12px; letter-spacing: 0; }
.pl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; gap: 10px; outline: none; }
.pl-card:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.pl-top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.pl-top .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
.pl-top .grow { min-width: 0; }
.pl-name { font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-job { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chips:empty { display: none; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-actions .btn { flex: 1 1 auto; }
.pl-empty { font-size: 13px; color: var(--muted); padding: 6px 2px; }
.pl-closed { margin-top: 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.pl-closed summary { cursor: pointer; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.pl-closed .fine { margin: 10px 0; }
.pl-closed-list { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
@media (min-width: 700px) { .pl-closed-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .pl-closed-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Templates */
.tpl-btn { flex: none; width: 44px; height: 44px; }
.tpl-list, .tpl-pick { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tpl-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg2); flex-wrap: wrap; }
.tpl-row .grow { flex: 1 1 200px; min-width: 0; }
.tpl-row .muted { font-size: 13px; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.tpl-row-actions { display: flex; gap: 6px; }
.tpl-starters { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; align-items: center; }
.tpl-starters .label { width: 100%; margin: 0; }
.tpl-form { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.tpl-form h4 { margin-bottom: 10px; }
.tpl-choice { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg2); }
.tpl-choice:hover { border-color: var(--accent); }
.tpl-choice .muted { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Bulk reply */
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.bulk-all { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; min-height: 34px; cursor: pointer; }
.bulk-check { display: grid; place-items: center; width: 32px; height: 44px; flex: none; cursor: pointer; }
.bulk-check input, .bulk-all input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.bulk-names { font-size: 14px; font-weight: 700; margin: 8px 0 12px; overflow-wrap: anywhere; }
.bulk-tpls .label { margin-bottom: 6px; }
.bulk-tpl-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
