/* Team Skills (TEAMSKILLS-PLAN.md) - on top of /css/learn.css and SkillVerify's /sv/home.css (home) or /sv/sv.css (app).
   Teal and white only; amber only for a gap. */

/* Home: the hero's heat map (people x skill areas) */
.ts-hero { align-items: center; }
.ts-heat { background: rgba(255,255,255,.97); color: var(--ink, #1A1A1A); border-radius: 18px; padding: 18px 18px 14px; box-shadow: 0 40px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.1); }
.ts-heat-head, .ts-heat-row { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 8px; align-items: center; }
.ts-heat-head { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #6B7280; font-weight: 700; padding: 0 0 8px; }
.ts-heat-row { padding: 5px 0; }
.ts-heat-row b { font-size: .88rem; font-weight: 600; }
.ts-heat-row i, .ts-heat-key i { display: block; height: 30px; border-radius: 8px; }
.ts-heat-key { display: flex; gap: 16px; margin-top: 12px; font-size: .75rem; color: #6B7280; }
.ts-heat-key span { display: flex; align-items: center; gap: 6px; }
.ts-heat-key i { width: 14px; height: 14px; border-radius: 4px; }
.ts-heat .tsh4 { background: #0F766E; } .ts-heat .tsh3 { background: #5EEAD4; } .ts-heat .tsh2 { background: #CCFBF1; } .ts-heat .tsh1 { background: #FDE68A; }
.ts-step { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--t0, #F0FDFA); color: var(--t6, #0F766E); font-weight: 800; margin-bottom: 10px; }
.sec.alt { background: #F7FAF9; }
@media (max-width: 960px) { .ts-heat { max-width: 520px; } }

/* App pages */
.ts-add { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr 1.6fr .9fr auto; gap: 10px; align-items: end; }
.ts-add .field { margin: 0; }
@media (max-width: 860px) { .ts-add { grid-template-columns: 1fr 1fr; } }
.ts-paste textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.ts-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
table.people td.ts-check { width: 34px; }
.ts-score { font-weight: 700; }
.ts-areas { font-size: .8rem; color: var(--muted, #6B7280); }
.pill.amber { background: #FEF3C7; color: #92400E; }

/* Report: each area against the target line */
.ts-verdict { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ts-big { font-size: 2.4rem; font-weight: 800; line-height: 1; color: #0B3B37; }
.ts-bars { display: grid; gap: 12px; margin-top: 8px; }
.ts-bar { display: grid; grid-template-columns: minmax(140px, 1.2fr) 3fr 56px; gap: 12px; align-items: center; }
.ts-bar .name { font-size: .92rem; font-weight: 600; }
.ts-track { position: relative; height: 12px; border-radius: 999px; background: #EEF2F1; }
.ts-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: #0F766E; }
.ts-fill.gap { background: #F59E0B; }
.ts-line { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #0B3B37; border-radius: 1px; }
.ts-bar .pct { text-align: right; font-weight: 700; font-size: .92rem; }
.ts-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .ts-cols { grid-template-columns: 1fr; } .ts-bar { grid-template-columns: 1fr 48px; } .ts-bar .ts-track { grid-column: 1 / -1; grid-row: 2; } }
.ts-list { margin: 8px 0 0; padding-left: 18px; }
.ts-list li { margin: 4px 0; }

/* Cycles and the team view (1.18.0, TEAMSKILLS-GAP-PLAN.md T1) */
.ts-cyclebar { display: grid; grid-template-columns: 1fr auto; gap: 12px 18px; align-items: end; }
.ts-cyclepick { display: flex; gap: 12px; flex-wrap: wrap; }
.ts-cyclepick .field { margin: 0; min-width: 200px; }
.ts-downloads { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ts-cycleinfo { grid-column: 1 / -1; color: var(--muted, #6B7280); }
@media (max-width: 700px) { .ts-cyclebar { grid-template-columns: 1fr; } .ts-downloads { justify-content: flex-start; } .ts-cyclepick .field { min-width: 0; flex: 1 1 140px; } }
.ts-cycleform { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.ts-cycleform .field { margin: 0; min-width: 220px; }
.ts-strip { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-radius: 10px; background: #F0FDFA; color: #0B3B37; font-size: .9rem; margin-top: 10px; }
.ts-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1100px) { .ts-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .ts-stats { grid-template-columns: 1fr 1fr; } }
.ts-stat .n { font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: #0B3B37; }
.ts-stat .label { font-weight: 600; }
.ts-due { grid-column: 1 / -1; margin: 0; }

/* Heat map: two teals at or above the target, two ambers below it */
table.ts-hm { border-collapse: separate; border-spacing: 4px; width: 100%; font-size: .9rem; }
table.ts-hm th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6B7280; font-weight: 700; text-align: center; vertical-align: bottom; padding: 4px; max-width: 120px; }
table.ts-hm th span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
table.ts-hm th:first-child { text-align: left; }
table.ts-hm td { text-align: center; border-radius: 8px; padding: 8px 6px; font-weight: 700; min-width: 48px; }
table.ts-hm td:first-child { text-align: left; font-weight: 400; min-width: 170px; padding-left: 0; }
table.ts-hm td.all { border: 2px solid rgba(11,59,55,.25); }
.ts-hm .h4, .ts-heat-key .h4 { background: #0F766E; color: #fff; } .ts-hm .h3, .ts-heat-key .h3 { background: #5EEAD4; color: #0B3B37; }
.ts-hm .h2, .ts-heat-key .h2 { background: #FDE68A; color: #1A1A1A; } .ts-hm .h1, .ts-heat-key .h1 { background: #F59E0B; color: #1A1A1A; }
.ts-hm .h0 { background: #F3F4F6; color: #4B5563; }   /* 1.50.2: readable (was #9CA3AF, 2.3:1) */
.ts-heat-key { display: flex; gap: 16px; flex-wrap: wrap; color: #6B7280; }
.ts-heat-key span { display: flex; align-items: center; gap: 6px; }
.ts-heat-key i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.ts-up { color: #0F766E; } .ts-down { color: #92400E; }

/* Report: before and after */
.ts-ba { display: grid; gap: 12px; margin-top: 8px; }
.ts-ba .ts-track { height: 7px; }
.ts-ba .ts-track + .ts-track { margin-top: 4px; }
.ts-fill.before { background: #CBD5E1; }
.ts-ba .pct { white-space: nowrap; }
.pill.teal { background: #CCFBF1; color: #0B3B37; }
.ts-ba .ts-bar { grid-template-columns: minmax(140px, 1.2fr) 3fr 84px; }
@media (max-width: 700px) { .ts-ba .ts-bar { grid-template-columns: 1fr 84px; } .ts-ba .ts-bar > [role=img] { grid-column: 1 / -1; grid-row: 2; } }
/* Grid items default to min-width:auto, so a wide table would stretch the page on a phone; let it scroll in its card. */
main.band > .wrap > *, #groups > * { min-width: 0; }
@media (max-width: 700px) { table.ts-hm td:first-child { min-width: 120px; } table.ts-hm td { min-width: 42px; padding: 6px 4px; } }

/* T2: development plan steps on a person's report */
.ts-planbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.ts-psteps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.ts-pstep { border: 1px solid var(--line, #E2E8F0); border-left: 4px solid #5EEAD4; border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.ts-pstep.done { border-left-color: #0F766E; background: #F0FDFA; }
.ts-pstep.late { border-left-color: #F59E0B; }
.ts-pstep-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-pstep-when { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-pstep-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ts-doneform { display: grid; gap: 6px; margin-top: 6px; }
.ts-doneform .field, .ts-stepform .field { margin: 0; }
.ts-stepform { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line, #E2E8F0); display: grid; gap: 10px; }
.ts-stepgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ts-stepform textarea, .ts-doneform textarea { width: 100%; }
.ts-domains { border: 1px solid var(--line, #E2E8F0); border-radius: 10px; padding: 8px 12px; margin: 8px 0 0; }
.ts-domains > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; }
.ts-dcheck { display: flex; gap: 6px; align-items: flex-start; font-size: .92rem; font-weight: 400; }
@media (max-width: 640px) { .ts-stepgrid, .ts-domains > div { grid-template-columns: 1fr; } }

/* T3: Learn seats */
.ts-stats.ts-stats3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .ts-stats.ts-stats3 { grid-template-columns: 1fr 1fr; } }
.ts-assign { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ts-assign select { width: auto; min-width: 0; max-width: 100%; }
.ts-seatline { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: #F0FDFA; margin-top: 10px; }

/* Skills mapper (1.43.0; mapping 3.13): job titles and the role finder's questions */
.mp-tabs { display: flex; gap: 4px; border-bottom: 1px solid #E5ECEA; }
.mp-tabs button { border: none; background: none; font: inherit; font-weight: 600; color: #4B5563; padding: 12px 16px 10px; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.mp-tabs button.on { color: #0B3B37; border-bottom-color: #0F766E; }
.mp-titleform { display: grid; gap: 10px; }
.mp-titleform .field { margin: 0; }
.mp-titleform textarea, .mp-ask textarea { width: 100%; }
.mp-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.mp-card { border: 1px solid #E5ECEA; border-radius: 14px; padding: 14px 16px; display: grid; gap: 8px; align-content: start; background: #fff; }
.mp-card h3 { margin: 0; font-size: 1.05rem; }
.mp-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mp-fit { font-weight: 800; color: #0B3B37; background: #CCFBF1; border-radius: 999px; padding: 2px 10px; font-size: .85rem; }
.mp-why { margin: 0; font-size: .9rem; background: #F0FDFA; border-left: 3px solid #0F766E; padding: 6px 10px; border-radius: 4px; }
.mp-note { font-size: .9rem; background: #F0FDFA; border-radius: 8px; padding: 8px 12px; }
.mp-reasons { margin: 0; padding-left: 18px; font-size: .85rem; color: #374151; display: grid; gap: 3px; }
.mp-who { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin-bottom: 14px; }
.mp-chat { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 4px 2px; }
.mp-bubble { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: .94rem; line-height: 1.45; }
.mp-bubble.ai { background: #F0FDFA; border: 1px solid #CCFBF1; justify-self: start; border-bottom-left-radius: 4px; }
.mp-bubble.me { background: #0F766E; color: #fff; justify-self: end; border-bottom-right-radius: 4px; }
.mp-ask { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #EEF2F1; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mp-chips label { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.mp-chip { border: 1px solid #E5ECEA; background: #fff; font: inherit; font-size: .86rem; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.mp-chip.on { background: #0F766E; border-color: #0F766E; color: #fff; }
.mp-certlist { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-check { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.mp-check input { margin-top: 3px; }
@media (max-width: 640px) { .mp-bubble { max-width: 92%; } }

/* Integrations (1.44.0; mapping 5.1) */
.in-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.in-grid[hidden] { display: none; }
.in-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.in-row .field { margin: 0; }
.in-secret { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.in-secret code { font-size: .95rem; padding: 6px 10px; background: #fff; border: 1px solid #CCFBF1; border-radius: 8px; word-break: break-all; }
.in-api td:first-child { white-space: nowrap; }
.sc-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 8px 0; font-size: .92rem; }
.sc-facts dt { color: #6B7280; }
.sc-facts dd { margin: 0; font-weight: 600; word-break: break-all; }

/* 1.56.1: Import from Empower, in the Add a step form */
.ts-empowerbox { border: 1px solid var(--line, #E2E8F0); border-radius: 10px; padding: 10px 12px; margin: 0; }
.ts-empowerbox table.people td { vertical-align: top; }
.ts-empowerbox td:last-child { white-space: nowrap; text-align: right; }

/* ---- Dark mode (1.62.0): the same variables as learn.css's dark block ----
   Only :root[data-theme="dark"] rules, so light mode is unchanged. The heat-map scale colours (h1-h4, tsh1-tsh4) keep
   their own dark text and stay as they are: they are the legend. .pill.amber is already set by learn.css's dark block. */
/* Home: the hero's heat map card and the step numbers */
:root[data-theme="dark"] .ts-heat { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .ts-heat-head, :root[data-theme="dark"] .ts-heat-key,
:root[data-theme="dark"] table.ts-hm th, :root[data-theme="dark"] .sc-facts dt { color: var(--muted); }
:root[data-theme="dark"] .ts-step { background: var(--teal-tint); color: var(--teal-dark); }
:root[data-theme="dark"] .sec.alt { background: var(--card); }
/* Light teal text on the dark surfaces: big numbers and the active tab */
:root[data-theme="dark"] .ts-big, :root[data-theme="dark"] .ts-stat .n { color: var(--teal-deep); }
:root[data-theme="dark"] .ts-up { color: var(--teal-dark); }
:root[data-theme="dark"] .ts-down { color: #FCD34D; }
/* Bars: the track a step above the card, the fill in the bright teal (#0F766E is too dark on it), and the target
   line light so it still reads as "the line" */
:root[data-theme="dark"] .ts-track { background: var(--dk-raise); }
:root[data-theme="dark"] .ts-fill { background: var(--teal); }
:root[data-theme="dark"] .ts-fill.gap { background: #F59E0B; }
:root[data-theme="dark"] .ts-fill.before { background: var(--faint); }
:root[data-theme="dark"] .ts-line { background: var(--ink); }
/* Tinted strips and notes */
:root[data-theme="dark"] .ts-strip { background: var(--teal-wash); color: var(--teal-deep); }
:root[data-theme="dark"] .ts-seatline, :root[data-theme="dark"] .mp-note { background: var(--teal-wash); }
:root[data-theme="dark"] .pill.teal, :root[data-theme="dark"] .mp-fit { background: var(--teal-tint); color: var(--teal-deep); }
/* Team heat map: the "no result" cell and the whole-team row */
:root[data-theme="dark"] .ts-hm .h0 { background: var(--dk-raise); color: var(--muted); }
:root[data-theme="dark"] table.ts-hm td.all { border-color: rgba(94,234,212,.35); }
/* Development plan steps */
:root[data-theme="dark"] .ts-pstep.done { border-left-color: var(--teal); background: var(--teal-wash); }
/* Skills mapper */
:root[data-theme="dark"] .mp-tabs { border-bottom-color: var(--line); }
:root[data-theme="dark"] .mp-tabs button { color: var(--muted); }
:root[data-theme="dark"] .mp-tabs button.on { color: var(--teal-deep); border-bottom-color: var(--teal); }
:root[data-theme="dark"] .mp-card { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] .mp-why { background: var(--teal-wash); border-left-color: var(--teal); }
:root[data-theme="dark"] .mp-reasons { color: var(--muted); }
:root[data-theme="dark"] .mp-bubble.ai { background: var(--teal-wash); border-color: var(--teal-tint); }
:root[data-theme="dark"] .mp-ask { border-top-color: var(--line); }
/* A button's own text colour is not inherited, so the chip gets it explicitly */
:root[data-theme="dark"] .mp-chip { background: var(--dk-raise); border-color: var(--line); color: var(--ink); }
:root[data-theme="dark"] .mp-chip.on { background: var(--dk-btn); border-color: var(--dk-btn); color: #fff; }
/* Integrations: the new key shown once */
:root[data-theme="dark"] .in-secret code { background: var(--dk-raise); border-color: var(--teal-tint); color: var(--ink); }
