/* ERP Migration Risk Checklist: builds on /styles.css tokens and /tools/shared/learn.css */
.em-hero, .em, .em-recon { --red: #b42318; --red-bg: #fdf0ee; --amber: #8a5300; --amber-bg: #fff5e2; --green: #157f3d; --green-bg: #ecf7f0; }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.em svg, .em-recon svg, .em-dock svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.em svg .fill, .em-recon svg .fill { fill: currentColor; stroke: none; }

/* Hero */
.em-hero { padding-bottom: clamp(88px, 10vw, 140px); }
.em-back { margin-bottom: 28px; }
.em-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.em-meta .chip { background: rgba(255, 255, 255, .85); }

/* Sections */
.em { background: var(--bg-2); padding: clamp(56px, 7vw, 100px) 0 clamp(64px, 8vw, 110px); scroll-margin-top: 64px; }
.em-recon { padding: clamp(64px, 8vw, 110px) 0; scroll-margin-top: 64px; }
.em-head h2 { margin-top: 14px; font-size: clamp(30px, 3.4vw, 46px); max-width: 20ch; }
.em-head > p:not(.mono) { margin-top: 16px; max-width: 36em; color: var(--text); }
.em-head--wide { margin-bottom: 36px; }
.em-card { background: #fff; border: 1px solid var(--line); padding: clamp(20px, 2.4vw, 32px); }
.em-card h3 { margin-top: 10px; font-size: clamp(22px, 2vw, 28px); }
.em-sub { margin-top: 8px; font-size: 16px; color: var(--text); max-width: 46em; }
.em-print-head { display: none; }

/* Controls */
.em-tools { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.em-tools__btns { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.em-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.em-field > span { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.em-field input, .em-owner input, .em-table input { width: 100%; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #c9ccd2; border-radius: 0; transition: border-color .2s ease, box-shadow .2s ease; }
.em-field input:focus, .em-owner input:focus, .em-table input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.em-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px #c9ccd2; transition: box-shadow .25s ease, color .25s ease, transform .2s var(--ease); }
.em-btn:hover { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }
.em-btn:active { transform: scale(.98); }
.em-link { min-height: 44px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); text-decoration: underline; text-underline-offset: 4px; }
.em-link:hover { color: var(--blue); }
.em-btn:focus-visible, .em-link:focus-visible, .em-x:focus-visible, .em-areas a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.em-sample { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 12px 14px; background: #f3f5ff; border-left: 2px solid var(--blue); font-size: 15px; color: var(--text); }
.em-sample .mono { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.em-sample[hidden] { display: none; }

/* Layout */
.em-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.em-summary { position: sticky; top: 88px; }

/* Areas and items */
.em-area { margin-top: 28px; border: 1px solid var(--line); background: #fff; min-width: 0; scroll-margin-top: 88px; }
.em-area__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; width: 100%; padding: 16px 20px; float: left; border-bottom: 1px solid var(--line); }
.em-area__head + * { clear: both; }
.em-area__name { font-size: 20px; font-weight: 500; letter-spacing: -.01em; margin-right: auto; }
.em-badge, .em-score__band, .em-areas__v { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.em-badge { padding: 5px 8px; }
.em-b--high { color: var(--red); background: var(--red-bg); }
.em-b--elevated { color: var(--amber); background: var(--amber-bg); }
.em-b--managed { color: var(--blue); background: #eef1ff; }
.em-b--ready { color: var(--green); background: var(--green-bg); }
.em-items { display: grid; }
.em-item { padding: 18px 20px; border-top: 1px solid var(--line); transition: background-color .3s ease; }
.em-items > .em-item:first-child { border-top: 0; }
.em-item[data-s="d"] { background: #fbfdfb; }
.em-item[data-s="x"] .em-item__t { color: var(--soft); }
.em-item__top { display: flex; gap: 12px; align-items: center; }
.em-w, .em-by { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.em-w--3 { color: var(--red); }
.em-w--3::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.em-item__t { margin-top: 6px; font-size: 16.5px; line-height: 1.45; color: var(--ink); }
.em-seg { margin-top: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #c9ccd2; }
.em-st { position: relative; display: block; cursor: pointer; }
.em-st + .em-st { border-left: 1px solid #c9ccd2; }
.em-st input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.em-st span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 4px 6px; font-size: 14px; line-height: 1.15; text-align: center; color: var(--text); transition: background-color .2s ease, color .2s ease; }
.em-st:hover span { color: var(--blue); }
.em-st input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: -3px; }
.em-st--d input:checked + span { background: var(--green); color: #fff; }
.em-st--p input:checked + span { background: var(--amber-bg); color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.em-st--n input:checked + span { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.em-st--x input:checked + span { background: #eceef1; color: var(--ink); }
.em-owner { display: none; margin-top: 10px; max-width: 320px; }
.em-item[data-s="p"] .em-owner, .em-item[data-s="n"] .em-owner { display: block; }
.em-owner input { font-size: 15px; min-height: 44px; border-style: dashed; }

/* Summary card */
.em-score > .mono { color: var(--navy); }
.em-score__big { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
#k-overall { font-size: clamp(56px, 6vw, 80px); font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.em-score__pct { font-size: 28px; margin-left: -10px; color: var(--soft); }
.em-score__band { padding: 6px 9px; }
.em-rail { margin-top: 18px; }
.em-rail .lx-rail__stops li { font-size: 11px; }
.em-signal { margin-top: 22px; display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 16px; border-left: 3px solid currentColor; }
.em-signal b { display: block; margin-bottom: 2px; font-weight: 600; }
.em-signal > span:last-child { font-size: 15px; line-height: 1.45; color: var(--ink); }
.em-signal__ic svg { width: 22px; height: 22px; }
.em-signal--red { color: var(--red); background: var(--red-bg); }
.em-signal--amber { color: var(--amber); background: var(--amber-bg); }
.em-signal--green { color: var(--green); background: var(--green-bg); }
.em-areas { margin-top: 20px; display: grid; }
.em-areas a { display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; align-items: center; gap: 10px; min-height: 44px; border-top: 1px solid var(--line); font-size: 16px; }
.em-areas a:hover .em-areas__name { color: var(--blue); }
.em-areas__bar { height: 4px; background: var(--line); }
.em-areas__bar i { display: block; height: 100%; background: var(--blue); transform: scaleX(var(--w)); transform-origin: left; transition: transform .8s var(--ease); }
.em-areas__v { justify-content: flex-end; min-width: 68px; padding: 3px 6px; }
.em-count { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }

/* What this means */
.em-means { margin-top: clamp(32px, 4vw, 48px); border-left: 3px solid var(--blue); }
.em-means__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.em-means__body { margin-top: 14px; display: grid; gap: 10px; max-width: 62em; }
.em-means__body p { color: var(--text); }
.em-means__body b { color: var(--ink); font-weight: 600; }
.em-means__body .em-lead { font-size: clamp(19px, 1.6vw, 22px); color: var(--ink); letter-spacing: -.01em; }

/* Results */
.em-results { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.em-gap-list { margin-top: 18px; display: grid; counter-reset: gap; }
.em-gap { display: grid; grid-template-columns: 28px 22px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); counter-increment: gap; }
.em-gap::before { content: counter(gap, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--blue); padding-top: 3px; }
.em-gap p { font-size: 15.5px; line-height: 1.4; color: var(--ink); }
.em-gap__meta { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.em-gap__st { padding-top: 2px; }
.em-st-ic--n { color: var(--red); }
.em-st-ic--p { color: var(--amber); }
.em-st-ic--d { color: var(--green); }
.em-empty { display: flex; gap: 10px; padding: 14px 0; color: var(--green); }
.em-gaps .lx-why { margin-top: 16px; }
.em-timeline { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--line); border: 1px solid var(--line); }
.em-ms { padding: 16px; background: #fff; border-top: 3px solid var(--line); }
.em-ms--ok { border-top-color: var(--green); }
.em-ms--warn { border-top-color: var(--amber); }
.em-ms--stop { border-top-color: var(--red); }
.em-ms--info { border-top-color: var(--blue); }
.em-ms__head { display: flex; justify-content: space-between; gap: 8px; }
.em-ms__id { font-size: 13px; color: var(--navy); font-weight: 500; }
.em-ms__date { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.em-ms h4 { margin-top: 8px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.em-ms__st { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); }
.em-ms--ok .em-ms__st { color: var(--green); }
.em-ms--warn .em-ms__st { color: var(--amber); }
.em-ms--stop .em-ms__st { color: var(--red); }
.em-ms--info .em-ms__st { color: var(--blue); }
.em-ms ul { margin-top: 10px; display: grid; gap: 8px; }
.em-ms li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.4; }
.em-ms li span { color: var(--text); }
.em-ms li svg { margin-top: 2px; }
.em-myth { margin-top: 24px; }

/* Reconciliation */
.em-rc { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
.em-rc__main, .em-rc__side, .em-inputs, .em-summary, .em-results > * { min-width: 0; }
.em-rc__side { display: grid; gap: 16px; }
.em-rc__side .lx-why { margin-top: 0; }
.em-rc .em-sample { margin: 0 0 12px; }
.em-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.em-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.em-table { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 15px; }
.em-table th { padding: 12px 10px; text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.em-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.em-table th.em-num, .em-table td.em-num { text-align: right; }
.em-table td:first-child { width: 26%; }
.em-table td.em-num { width: 12%; }
.em-table td.em-num input { text-align: right; font-variant-numeric: tabular-nums; }
.em-var { padding-top: 20px !important; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.em-rcst [data-badge] { display: flex; align-items: center; gap: 6px; min-height: 28px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; }
.em-rcst input { margin-top: 6px; }
.em-rc--ok [data-badge] { color: var(--green); }
.em-rc--warn [data-badge], .em-rc--warn .em-var { color: var(--red); }
.em-rc--warn .em-rcst input { border-color: var(--red); }
.em-rc--info [data-badge] { color: var(--blue); }
.em-rc--n [data-badge] { color: var(--soft); }
.em-x { width: 44px; height: 44px; font-size: 22px; line-height: 1; color: var(--soft); }
.em-x:hover { color: var(--red); }
.em-rc__bar { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.em-rc__sum { margin-top: 18px; display: grid; gap: 8px; }
.em-rc__big { font-size: 22px; letter-spacing: -.01em; }
.em-rc__big b { font-weight: 600; }
.em-rc__warn, .em-rc__ok, .em-rc__info { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font-size: 15px; }
.em-rc__warn svg, .em-rc__ok svg, .em-rc__info svg { margin-top: 3px; }
.em-rc__warn { color: var(--red); background: var(--red-bg); }
.em-rc__ok { color: var(--green); background: var(--green-bg); }
.em-rc__info { color: var(--blue); background: #eef1ff; }

/* Mobile dock: live score while working through the list */
.em-dock { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: var(--navy); color: #fff; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; transform: translateY(140%); transition: transform .4s var(--ease); }
.em-dock.is-on { transform: none; }
.em-dock span:nth-child(2) { flex: 1; }
.em-dock a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: #fff; color: var(--navy); text-transform: uppercase; }
.em-dock__sig { display: grid; place-items: center; width: 28px; height: 28px; background: #fff; }
.em-dock__sig.em-signal--red { color: #b42318; }
.em-dock__sig.em-signal--amber { color: #8a5300; }
.em-dock__sig.em-signal--green { color: #157f3d; }

@media (max-width: 1020px) {
  .em-layout, .em-results, .em-rc { grid-template-columns: 1fr; }
  .em-summary { position: static; }
  .em-dock { display: flex; }
}
@media (max-width: 640px) {
  .em-area__head, .em-item { padding-left: 16px; padding-right: 16px; }
  .em-st span { flex-direction: column; gap: 2px; font-size: 12.5px; }
  .em-timeline { grid-template-columns: 1fr; }
  .em-means__head .lx-actions { width: 100%; }
  .em-means__head .lx-act { flex: 1 1 calc(50% - 5px); justify-content: center; padding: 0 10px; font-size: 14px; }
  .em-owner { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .em-areas__bar i, .em-dock, .em-item, .em-st span { transition: none; }
}
@media print {
  .em-hero, .em-tools, .em-seg, .em-owner, .em-inputs .lx-why, .lx-actions, .em-rc__bar, .em-x, .em-dock, .lx-guide, .cta, .nav, .foot, .em-rc__side .lx-note { display: none !important; }
  .em, .em-recon { background: #fff; padding: 0; }
  .em-print-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .em-layout, .em-results, .em-rc { grid-template-columns: 1fr; }
  .em-summary { position: static; order: -1; }
  .em-item::after { content: attr(data-status); display: block; margin-top: 6px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--soft); }
  .em-card, .em-area, .em-ms { break-inside: avoid; }
  .em-scroll { overflow: visible; }
  .em-table { min-width: 0; }
}
