/* Empower workspace (1.53.0): the signed-in pages in wwwroot/empower/app, on top of learn.css and sv/sv.css.
   Teal and white, as every StreamSoft page. */
.em-main { display: grid; gap: 18px; }
.em-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: end; justify-content: space-between; }
.em-head h1 { font-size: 1.8rem; margin: 0; }
.em-pick { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.em-pick .field { margin: 0; min-width: 200px; }
.em-indicative { font-size: .85rem; color: var(--muted); }

/* The result: level, points, recognition and priority elements side by side; one column on a phone. */
.em-summary { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.em-tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.em-tile .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.em-tile .v { font-size: 1.9rem; font-weight: 700; color: var(--teal-deep); line-height: 1.15; margin-top: 4px; }
.em-tile .s { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.em-tile.level { background: var(--teal-wash); border-color: var(--teal-tint); }
.em-tile.warn .v { color: var(--danger); }

.em-ind td.num, .em-ind th.num { text-align: right; white-space: nowrap; }

/* Indicator inputs: a table on a wide screen, stacked cards on a phone. */
.em-ind input, .em-ind select { width: 100%; min-width: 0; max-width: 170px; padding: 6px 8px; font: inherit; border: 1px solid var(--line); border-radius: 8px; }
.em-ind input:disabled, .em-ind select:disabled { background: #F6F8F8; color: var(--muted); }
.em-ind .lbl { font-weight: 600; }
.em-ind .meta { font-size: .82rem; color: var(--muted); }
.em-ind tr.bonus .lbl::after { content: " (bonus)"; font-weight: 400; color: var(--muted); }
.em-ind tr.gated td { opacity: .6; }
.em-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.em-form { display: grid; gap: 4px 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.em-form .wide { grid-column: 1 / -1; }

/* Notes above the result: no gap when there are none, tight when there are. */
.em-main > .notice { margin: 0; }
#notes:empty { display: none; }
#notes .notice { margin: 0 0 8px; }
#notes .notice:last-child { margin-bottom: 0; }

/* The element tabs stay one row; on a narrow screen the row scrolls sideways. */
.em-main .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; gap: 2px; }
.em-main .tabs button { white-space: nowrap; flex: 0 0 auto; padding-left: 5px; padding-right: 5px; }

/* 1.61.4: the glowing (i) after the SED tab, opening the "what is in and what is out" guide. The halo stays inside
   the tab row's height (the row scrolls sideways, so anything outside it would be clipped). */
.em-main .tabs button.em-info {
  align-self: center; width: 18px; height: 18px; padding: 0; margin: 0 2px 0 -1px; border: 0; border-radius: 50%;
  display: inline-grid; place-items: center; color: #fff; font: 700 italic .82rem/1 Georgia, "Times New Roman", serif;
  background: radial-gradient(circle at 35% 30%, #2DD4BF, var(--teal) 55%, var(--teal-dark));
  box-shadow: 0 0 0 0 rgba(13, 148, 136, .55), 0 0 10px rgba(45, 212, 191, .75);
  animation: em-info-glow 2.4s ease-in-out infinite; transition: transform .15s ease;
}
.em-main .tabs button.em-info:hover { transform: scale(1.12); }
.em-main .tabs button.em-info:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
@keyframes em-info-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, .5), 0 0 8px rgba(45, 212, 191, .6); }
  50% { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0), 0 0 14px rgba(45, 212, 191, .95); }
}
@media (prefers-reduced-motion: reduce) { .em-main .tabs button.em-info { animation: none; } }

/* The SED guide: a native modal dialog, its body scrolls between a fixed head and foot. */
body > dialog.em-guide {   /* "body >" outranks learn.css body:has(> footer.site-foot) > * { width: 100% } */
  width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--teal-tint);
  border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 118, 110, .25); color: inherit; background: #fff;
}
dialog.em-guide[open] { display: flex; flex-direction: column; }
dialog.em-guide::backdrop { background: rgba(17, 94, 89, .35); backdrop-filter: blur(2px); }
.em-guide-head { display: flex; gap: 16px; align-items: start; justify-content: space-between; padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--teal-wash), #fff); }
.em-guide-head h2 { margin: 2px 0 0; font-size: 1.35rem; }
.em-guide-x { border: 0; background: none; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.em-guide-x:hover { color: var(--teal-deep); }
.em-guide-body { overflow-y: auto; padding: 4px 22px 18px; }
.em-guide-body h3 { margin: 22px 0 8px; color: var(--teal-deep); font-size: 1.08rem; }
.em-guide-body h4 { margin: 16px 0 6px; font-size: .96rem; }
.em-guide-body h4 small { font-weight: 400; color: var(--muted); }
.em-guide-lead { font-size: 1.02rem; margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--teal); background: var(--teal-wash); border-radius: 0 10px 10px 0; }
.em-guide-scroll { overflow-x: auto; }
.em-guide-body table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.em-guide-body th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.em-guide-body td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.em-guide-body td:first-child { font-weight: 600; min-width: 150px; }
.em-guide-body .num { text-align: right; min-width: 96px; }
.em-guide-body table.em-guide-cat td:first-child { min-width: 0; text-align: center; }   /* the matrix: one letter */
.em-guide-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--teal-tint); color: var(--teal-deep); font-size: .78rem; font-weight: 600; }
.em-guide-src { font-size: .8rem; color: var(--muted); font-style: italic; }
.em-guide-grey dt { font-weight: 600; margin-top: 10px; }
.em-guide-grey dd { margin: 2px 0 0; }
.em-guide-list { padding-left: 20px; }
.em-guide-list li { margin: 4px 0; }
.em-guide-list.src { font-size: .88rem; color: var(--muted); }
.em-guide-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 22px; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .em-guide-head, .em-guide-body, .em-guide-foot { padding-left: 16px; padding-right: 16px; }
  .em-guide-body thead { display: none; }
  .em-guide-body table, .em-guide-body tbody, .em-guide-body tr, .em-guide-body td { display: block; }
  .em-guide-body tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .em-guide-body td { border: 0; padding: 2px 0; min-width: 0; }
  .em-guide-body td:first-child { min-width: 0; }
  .em-guide-body table.em-guide-cat td:first-child { text-align: left; }
  .em-guide-body td.num { text-align: left; min-width: 0; }
  .em-guide-body td:not(:first-child)::before { content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
}

@media (max-width: 720px) {
  /* Each indicator becomes a compact card: code and label, then points / target / score on one row,
     then the recorded value (and the EAP-adjusted achievement where the indicator has one).
     table.em-ind beats sv.css's table.people cell borders. */
  table.em-ind thead { display: none; }
  table.em-ind, table.em-ind tbody { display: block; width: 100%; }
  table.em-ind tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
  table.em-ind td { display: block; border: 0; padding: 0; text-align: left !important; }
  table.em-ind td.c-code { grid-column: 1 / -1; order: 1; font-size: .78rem; color: var(--muted); }
  table.em-ind td.c-lbl { grid-column: 1 / -1; order: 2; margin-bottom: 6px; }
  table.em-ind td.c-pts { order: 3; }
  table.em-ind td.c-tgt { order: 4; }
  table.em-ind td.c-score { order: 5; }
  table.em-ind td.c-rec { grid-column: 1 / -1; order: 6; margin-top: 6px; }
  table.em-ind td.c-adj { grid-column: 1 / -1; order: 7; margin-top: 6px; }
  table.em-ind td.c-adj.none { display: none; }
  table.em-ind td[data-h]::before { content: attr(data-h); display: block; font-size: .74rem; color: var(--muted); }
  table.em-ind input, table.em-ind select { max-width: none; }
}

/* ---- Status charts (1.53.1) ------------------------------------------------------------------------------------
   One hue (teal) for magnitude; status colours only for met / below, always with an icon and a word.
   Bars: square where they start, 4px rounded ends; white 2px gaps between touching parts; hairline marks. */
.em-ch { font-size: 1.2rem; margin: 0; }
.em-ch3 { font-size: 1rem; margin: 22px 0 2px; }
.em-chs { margin: 4px 0 12px; }
.em-chhead { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.em-legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); }
.em-legend span { display: inline-flex; align-items: center; gap: 6px; }
.em-legend .sw { width: 12px; height: 10px; border-radius: 3px; display: inline-block; }
.em-legend .sw.pts { background: var(--teal); }
.em-legend .sw.bon { background: var(--teal-deep); }
.em-total { margin: 10px 0 0; font-size: .92rem; color: var(--muted); }
.em-total strong { color: var(--ink); }

/* The level scale: points marker above, the bands, the axis, then the target below. */
.em-ladder { position: relative; height: 128px; margin: 0 4px; }
.em-ladder .track { position: absolute; left: 0; right: 0; top: 46px; height: 28px; }
.em-ladder .lv { position: absolute; top: 0; height: 100%; box-sizing: border-box; border-left: 2px solid #fff;
  display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 700; color: var(--ink); cursor: default; }
.em-ladder .lv.b0 { border-left: 0; border-radius: 4px 0 0 4px; background: #E9EDEC; color: var(--muted); }
.em-ladder .lv.b1 { background: #D3F3EC; }
.em-ladder .lv.b2 { background: #B5EADF; }
.em-ladder .lv.b3 { background: #92DDD0; }
.em-ladder .lv.b4 { background: #6CCBBB; }
.em-ladder .lv.b5 { background: #46B5A5; }
.em-ladder .lv.b6 { background: #1E8E81; color: #fff; }
.em-ladder .lv.b7 { background: #146F66; color: #fff; }
.em-ladder .lv.b8 { background: #0E524C; color: #fff; border-radius: 0 4px 4px 0; }
.em-ladder .lv.here { box-shadow: inset 0 0 0 2px rgba(26, 26, 26, .55); }
.em-ladder .lv:hover, .em-ladder .lv:focus-visible { filter: brightness(1.06); outline: 2px solid var(--ink); outline-offset: 1px; z-index: 1; }
.em-ladder .needle { position: absolute; top: -8px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.em-ladder .tgtline { position: absolute; top: -2px; bottom: -26px; width: 2px; margin-left: -1px; background: var(--muted); pointer-events: none; }
.em-ladder .pt, .em-ladder .tgt { position: absolute; width: 0; }
.em-ladder .pt { top: 0; }
.em-ladder .tgt { top: 102px; }
.em-ladder .lab { position: absolute; white-space: nowrap; font-size: .9rem; line-height: 1.3; color: var(--ink); }
.em-ladder .tgt .lab { font-size: .84rem; color: var(--muted); }
.em-ladder .dot { position: absolute; top: 24px; left: -7px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); border: 2px solid #fff; }
.em-ladder .axis { position: absolute; left: 0; right: 0; top: 80px; height: 16px; font-size: .74rem; color: var(--muted); }
.em-ladder .axis span { position: absolute; transform: translateX(-50%); }
.em-ladder .axis span:first-child { transform: none; }
.em-ladder .axis span:last-child { transform: translateX(-100%); }

/* Meter lists: name, bar, figure, and what is left; on a phone the bar drops under the name. */
.em-meters { display: grid; gap: 4px; }
.em-meter { display: grid; grid-template-columns: minmax(140px, 230px) 1fr 104px 92px; gap: 14px; align-items: center;
  padding: 7px 8px; border-radius: 8px; cursor: default; }
.em-meter:hover, .em-meter:focus-visible { background: var(--teal-wash); }
.em-meter:focus-visible { outline: 2px solid var(--teal); outline-offset: 0; }
.em-meter .nm { font-weight: 600; font-size: .94rem; }
.em-meter .bar { position: relative; height: 12px; border-radius: 4px; background: #D9F2EE; }
.em-meter .fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 4px; background: var(--teal); }
.em-meter .fill.bon { background: var(--teal-deep); box-shadow: -2px 0 0 #fff; }
.em-meter .wt { position: absolute; top: 0; height: 100%; width: 2px; margin-left: -1px; background: #fff; }
.em-meter .min { position: absolute; top: -5px; height: 22px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.em-meter.low .fill { background: #DC3C3D; }
.em-meter .fig { text-align: right; white-space: nowrap; font-size: .92rem; color: var(--muted); }
.em-meter .fig strong { color: var(--ink); font-size: 1rem; }
.em-meter .gap { font-size: .84rem; color: var(--muted); white-space: nowrap; }
.em-meter .st { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; }
.em-meter .st .ic { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
  font-style: normal; font-size: .72rem; font-weight: 800; color: #fff; background: var(--ok); }
.em-meter.low .st .ic { background: #DC3C3D; }

/* The tooltip: the value first, then the name and detail. */
.em-tip { position: absolute; z-index: 60; max-width: 260px; padding: 8px 11px; background: #fff; border: 1px solid rgba(11, 11, 11, .1);
  border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); font-size: .84rem; color: var(--muted); pointer-events: none; }
.em-tip strong { display: block; color: var(--ink); font-size: .98rem; margin-bottom: 2px; }

@media (max-width: 720px) {
  .em-meter { grid-template-columns: 1fr auto; grid-template-areas: "nm fig" "bar bar" "gap gap"; gap: 6px 10px; padding: 8px 4px; }
  .em-meter .nm { grid-area: nm; }
  .em-meter .bar { grid-area: bar; }
  .em-meter .fig { grid-area: fig; }
  .em-meter .gap { grid-area: gap; }
}

/* ---- Ownership register (1.54.0) ------------------------------------------------------------------------------- */
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--teal-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--teal-deep); }
.linkbtn.danger { color: var(--danger); }
.em-meters.own .nm { font-weight: 500; }
.em-meters.own .nm .code { color: var(--muted); font-size: .84rem; margin-right: 4px; }
.em-nv { margin-top: 14px; }
.em-nv:empty { display: none; }
.em-nvrow { display: grid; grid-template-columns: 180px 1fr auto; gap: 14px 20px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; }
.em-nvrow .k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.em-nvrow .v { font-size: 1.8rem; font-weight: 700; color: var(--teal-deep); line-height: 1.15; }
.em-nvrow .v span { font-size: .9rem; font-weight: 400; color: var(--muted); }
.em-nvf { display: grid; gap: 4px; font-size: .92rem; }
.em-nvrow .st { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.em-nvrow .st .ic { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
  font-style: normal; font-size: .72rem; font-weight: 800; color: #fff; background: var(--ok); }
.em-nvrow .st.low .ic { background: #DC3C3D; }

/* The flow-through tree: each holder under what it holds, with a hairline showing the chain. */
.em-tree ul { list-style: none; margin: 0; padding-left: 22px; border-left: 1px solid #C9D6D3; margin-left: 8px; }
.em-tree > ul { margin-top: 6px; }
.em-tree li { position: relative; padding: 4px 0; }
.em-tree li::before { content: ""; position: absolute; left: -22px; top: 17px; width: 16px; border-top: 1px solid #C9D6D3; }
.em-tn { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: #F7FAF9; }
.em-tn.root { background: var(--teal-wash); font-weight: 600; }
.em-tn.mft { box-shadow: inset 3px 0 0 var(--teal); }
.em-tn .nm { font-weight: 600; }
.em-tn .k, .em-tn .eff, .em-tn .b { font-size: .84rem; color: var(--muted); }
.em-tn .v { font-variant-numeric: tabular-nums; }

/* Register tables and the add / edit forms. */
.em-reg td.acts { white-space: nowrap; text-align: right; }
.em-reg td.num, .em-reg th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.em-edit { border: 1px solid var(--teal-tint); background: var(--teal-wash); border-radius: 10px; padding: 4px 16px 14px; margin: 0 0 16px; }
.em-set { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 10px 0 0; background: #fff; }
.em-set legend { padding: 0 4px; font-weight: 600; font-size: .92rem; }
.em-checks { display: grid; gap: 6px 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 8px 0; }
.em-files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.em-files li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }

@media (max-width: 720px) {
  .em-nvrow { grid-template-columns: 1fr; }
  table.em-reg thead { display: none; }
  table.em-reg, table.em-reg tbody { display: block; width: 100%; }
  table.em-reg tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
  table.em-reg td { display: block; border: 0; padding: 0; text-align: left !important; }
  table.em-reg td[data-h]::before { content: attr(data-h); display: block; font-size: .74rem; color: var(--muted); }
  table.em-reg td.acts { grid-column: 1 / -1; text-align: left; }
  table.em-reg td[colspan] { grid-column: 1 / -1; }
}

/* 1.54.0: Edit / Remove pairs in register tables */
table.em-reg td.acts { white-space: nowrap; }
table.em-reg td.acts .linkbtn + .linkbtn { margin-left: .75rem; }

/* 1.54.1: the indicator table on a wide screen - fixed column widths so every row lines up under its heading:
   code, indicator (takes the rest), points / target / score as right-aligned figures with even-width digits, and the
   two input columns filled edge to edge, with "-" placed where typed text starts. */
@media (min-width: 721px) {
  table.em-ind { table-layout: fixed; width: 100%; }
  table.em-ind col.k-code { width: 64px; }
  table.em-ind col.k-pts { width: 76px; }
  /* 1.56.0: wide enough for "3,5% of the leviable amount" on two lines (it overflowed into Recorded at 76px). */
  table.em-ind col.k-tgt { width: 120px; }
  table.em-ind td.c-tgt { white-space: normal; overflow-wrap: anywhere; }
  /* "R3 000 000 more for full points" under a score wraps inside the score column instead of running past it. */
  table.em-ind td.c-score .meta { white-space: normal; }
  table.em-ind col.k-rec, table.em-ind col.k-adj { width: 168px; }
  table.em-ind col.k-score { width: 80px; }
  table.em-ind td { vertical-align: middle; }
  table.em-ind thead th { vertical-align: bottom; white-space: nowrap; }
  table.em-ind td.num, table.em-ind td.c-rec strong { font-variant-numeric: tabular-nums; }
  table.em-ind td.c-code { font-variant-numeric: tabular-nums; white-space: nowrap; }
  table.em-ind td.c-lbl { overflow-wrap: anywhere; }
  table.em-ind td.c-rec input, table.em-ind td.c-rec select, table.em-ind td.c-adj input { max-width: none; width: 100%; }
  table.em-ind td.c-adj.none span, table.em-ind td.c-rec > .muted { display: block; padding-left: 9px; }
  table.em-ind tr.fromreg td.c-rec strong { display: block; padding-left: 9px; }
  table.em-ind tr.fromreg td.c-rec .meta { padding-left: 9px; }
}

/* 1.55.0: the management control register page. */
.em-meters.mc .nm { font-weight: 500; }
.em-meters.mc .nm .code { color: var(--muted); font-size: .84rem; margin-right: 4px; }
.em-meters.mc .nm .meta, .em-meters.mc .fig .meta { font-size: .8rem; font-weight: 400; color: var(--muted); }
.em-meters.mc .fig .meta { white-space: nowrap; }
.em-meter.off .nm, .em-meter.off .gap { color: var(--muted); }
.em-meter.off .fig { font-size: .84rem; }
.em-eapx { margin-top: 14px; display: grid; gap: 6px; }
.em-eapx details { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.em-eapx summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
.em-eapx summary .code { color: var(--muted); font-weight: 500; margin-right: 4px; }
.em-eapx details[open] summary { margin-bottom: 8px; }
table.em-eapt { font-size: .88rem; }
table.em-eapt td.num, table.em-eapt th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.em-eapsrc { margin-top: 14px; max-width: 560px; }
.em-levels { margin: 6px 0 10px; }
.em-levels .n { display: inline-block; min-width: 1.6em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--teal-wash); color: var(--teal-dark); font-size: .8rem; font-variant-numeric: tabular-nums; }
.em-scroll { overflow-x: auto; }
table.em-grid { max-width: 760px; }
table.em-grid td.num, table.em-grid th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.em-grid input { width: 96px; padding: 6px 8px; font: inherit; text-align: right; border: 1px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums; }
table.em-grid input:disabled { background: #F6F8F8; color: var(--muted); }
table.em-grid input.bad { border-color: #DC3C3D; outline: 1px solid #DC3C3D; }
table.em-grid tfoot td, table.em-grid tfoot th { font-weight: 600; border-top: 2px solid var(--line); }
@media (max-width: 720px) {
  .em-eapx details, .em-eapsrc { overflow-x: auto; }
  table.em-eapt th, table.em-eapt td { padding-left: 6px; padding-right: 6px; }
  table.em-grid input { width: 64px; }
  table.em-grid th, table.em-grid td { padding-left: 6px; padding-right: 6px; }
}

/* 1.56.0 - the skills development register (skills.html). */
.em-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.em-ch4 { font-size: .92rem; margin: 16px 0 4px; }
table.em-lines td.num, table.em-lines th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.em-lines tfoot td, table.em-lines tfoot th { font-weight: 600; border-top: 2px solid var(--line); }
table.em-lines .cat { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 6px; background: var(--teal-wash); color: var(--teal-dark); font-weight: 600; text-align: center; }
.em-prereq { margin: 0 0 10px; }
/* Rand figures and "target 3.5% of leviable" need a wider figure column than percentages. */
.em-meters.sd .em-meter { grid-template-columns: minmax(140px, 230px) 1fr 160px 92px; }
@media (max-width: 720px) {
  .em-meters.sd .em-meter { grid-template-columns: 1fr auto; }
}

/* 1.57.0 - the enterprise and supplier development register (esd.html): a note on why a supplier or contribution gets
   less than it might, in the ink colour with a teal rule (teal and white only). */
.em-flag { color: var(--ink); border-left: 3px solid var(--teal); padding-left: 6px; margin-top: 4px; }
td .em-flag { display: block; }
.em-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: var(--teal-wash); border: 1px solid var(--teal-tint); color: var(--ink); font-size: .8rem; }   /* 1.58.0: StreamSoft sponsorships */
/* Long check labels (the ESD forms): one per row, full width. */
.em-checks.one { grid-template-columns: 1fr; }

/* 1.59.0: cost per point and the verification pack. */
table.em-lines td .code { color: var(--muted); font-weight: 500; font-size: .86rem; margin-right: 4px; }
.em-cost-show { font-weight: 400; }
.em-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.em-checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.em-checklist .ic { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: .78rem; font-weight: 700; margin-top: 1px; }
.em-checklist li.ok .ic { background: var(--teal); color: #fff; }
.em-checklist li.todo .ic { background: #fff; color: var(--teal-dark); border: 2px solid var(--teal); }
.em-checklist li.todo span.t { font-weight: 600; }
.em-dl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 720px) {
  table.em-costs td:first-child, table.em-packfiles td:first-child, table.em-packfiles td:nth-child(2) { grid-column: 1 / -1; }
}

/* ---- Dark mode (1.62.0): the same variables as learn.css's dark block ----
   The workspace uses learn.css's variables throughout, so most of it follows on its own; below are only the
   hard-coded light colours, and the places that paint a now-light teal as a background. */

/* Surfaces: white tiles, panels, the tooltip and the SED / Ownership guide dialogs */
:root[data-theme="dark"] :is(.em-tile:not(.level), .em-set) { background: var(--card); }
:root[data-theme="dark"] .em-tip { background: var(--dk-raise); border-color: var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.45); }
:root[data-theme="dark"] body > dialog.em-guide { background: var(--card); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
:root[data-theme="dark"] dialog.em-guide::backdrop { background: rgba(0,0,0,.6); }
:root[data-theme="dark"] .em-guide-head { background: linear-gradient(180deg, var(--teal-wash), var(--card)); }

/* Inputs in the indicator and EAP tables (not all carry a type, so learn.css's input rule may not reach them) */
:root[data-theme="dark"] :is(.em-ind input, .em-ind select, table.em-grid input) { background: var(--dk-raise); border-color: #3A4D49; color: var(--ink); }
:root[data-theme="dark"] :is(.em-ind input, .em-ind select, table.em-grid input):disabled { background: var(--bg); color: var(--muted); }
:root[data-theme="dark"] table.em-grid input.bad { border-color: var(--danger); outline-color: var(--danger); }

/* The glowing (i): --teal-dark is a light text colour in dark, so the disc is painted with the button teal */
:root[data-theme="dark"] .em-main .tabs button.em-info { background: radial-gradient(circle at 35% 30%, #2DD4BF, var(--dk-btn-hover) 55%, var(--dk-btn)); }

/* The level scale: one teal ramp, stronger = brighter on dark (dark bands carry light text, bright bands dark text;
   every band >= 4.5:1). White gaps and rings become the card colour. */
:root[data-theme="dark"] .em-ladder .lv { border-left-color: var(--card); }
:root[data-theme="dark"] .em-ladder .lv.b0 { background: var(--dk-raise); color: var(--muted); }
:root[data-theme="dark"] .em-ladder .lv.b1 { background: #10332F; }
:root[data-theme="dark"] .em-ladder .lv.b2 { background: #134E4A; }
:root[data-theme="dark"] .em-ladder .lv.b3 { background: #115E59; }
:root[data-theme="dark"] .em-ladder .lv.b4 { background: #0F766E; }
:root[data-theme="dark"] .em-ladder .lv.b5 { background: #14B8A6; color: #042F2B; }
:root[data-theme="dark"] .em-ladder .lv.b6 { background: #2DD4BF; color: #042F2B; }
:root[data-theme="dark"] .em-ladder .lv.b7 { background: #5EEAD4; color: #042F2B; }
:root[data-theme="dark"] .em-ladder .lv.b8 { background: #99F6E4; color: #042F2B; }
:root[data-theme="dark"] .em-ladder .lv.here { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px #042F2B; }   /* shows on dark and bright bands */
:root[data-theme="dark"] .em-ladder .dot { border-color: var(--card); }

/* Meters: a dark teal track; white gaps and weight marks become the card colour; "below" uses the dark-mode danger */
:root[data-theme="dark"] .em-meter .bar { background: var(--teal-tint); }
:root[data-theme="dark"] .em-meter .fill.bon { box-shadow: -2px 0 0 var(--card); }
:root[data-theme="dark"] .em-meter .wt { background: var(--card); }
:root[data-theme="dark"] .em-meter.low .fill { background: var(--danger); }
/* Status discs: light green / red in dark, so the tick or "!" on them is dark */
:root[data-theme="dark"] :is(.em-meter .st .ic, .em-nvrow .st .ic) { color: var(--bg); }
:root[data-theme="dark"] :is(.em-meter.low .st .ic, .em-nvrow .st.low .ic) { background: var(--danger); }

/* The flow-through tree */
:root[data-theme="dark"] .em-tree ul { border-left-color: #3A4D49; }
:root[data-theme="dark"] .em-tree li::before { border-top-color: #3A4D49; }
:root[data-theme="dark"] .em-tn { background: var(--dk-raise); }
:root[data-theme="dark"] .em-tn.root { background: var(--teal-tint); }

/* The verification pack checklist */
:root[data-theme="dark"] .em-checklist li.ok .ic { background: var(--dk-btn); color: #fff; }
:root[data-theme="dark"] .em-checklist li.todo .ic { background: var(--card); }
