/* Transformation Roadmap Template: builds on /styles.css tokens and /tools/shared/learn.css */

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

/* Shell */
.tr { background: var(--bg-2); padding: clamp(56px, 7vw, 100px) 0 clamp(64px, 8vw, 110px); scroll-margin-top: 64px; }
.tr-head h2 { margin-top: 14px; font-size: clamp(28px, 3.2vw, 42px); max-width: 20ch; }
.tr-head > p:not(.mono) { margin-top: 14px; max-width: 36em; color: var(--text); }
.tr-head--sub { margin-top: clamp(40px, 5vw, 60px); }
.tr-card { background: #fff; border: 1px solid var(--line); padding: clamp(20px, 2.4vw, 32px); min-width: 0; }
.tr-card h3 { margin-top: 10px; font-size: clamp(22px, 2vw, 28px); }
.tr-sub { margin-top: 8px; font-size: 16px; color: var(--text); max-width: 46em; }
.tr-print-head { display: none; }
.tr-empty { padding: 24px; border: 1px dashed #c9ccd2; color: var(--text); background: #fff; list-style: none; }
.tr-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tr-sample { margin-left: 8px; padding: 2px 6px; font-size: 10.5px; color: var(--soft); border: 1px solid var(--line); }
.tr-ic { flex: none; display: inline-grid; place-items: center; width: 1.25em; font-weight: 700; }

/* Controls */
.tr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tr-field > span, .tr-deps legend { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.tr-field input, .tr-field select, .tr-it__name {
  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; }
.tr-field select { appearance: none; -webkit-appearance: none; padding-right: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230d2463' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; }
.tr-field input::placeholder { color: #9aa0aa; }
.tr-field input:hover, .tr-field select:hover { border-color: #9aa0aa; }
.tr-field input:focus, .tr-field select:focus, .tr-it__name:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.tr-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); box-shadow: inset 0 0 0 1px #c9ccd2; background: #fff; transition: background-color .25s ease, transform .2s var(--ease); }
.tr-btn--blue { background: var(--blue); color: #fff; box-shadow: none; }
.tr-btn--blue:hover { background: var(--blue-deep); }
.tr-btn:active { transform: scale(.98); }
.tr-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; }
.tr-link:hover { color: var(--blue); }

/* Layout */
.tr-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.tr-summary { position: sticky; top: 88px; }
.tr-context { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); }
.tr-help { margin-top: 20px; display: grid; gap: 8px; }
.tr-help .lx-why { margin-top: 0; }

/* Initiative cards */
.tr-list { margin-top: 20px; display: grid; gap: 14px; }
.tr-it { background: #fff; border: 1px solid var(--line); padding: 14px clamp(14px, 2vw, 22px) 16px; animation: trIn .5s var(--ease) both; }
@keyframes trIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tr-it__head { display: flex; align-items: center; gap: 10px; }
.tr-it__n { flex: none; color: var(--blue); font-size: 12px; }
.tr-it__name { flex: 1 1 auto; min-width: 0; font-size: 18px !important; font-weight: 500; border-color: transparent !important; padding: 0 8px !important; }
.tr-it__name:hover { border-color: #c9ccd2 !important; }
.tr-it__name:focus { border-color: var(--blue) !important; }
.tr-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--soft); }
.tr-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tr-x:hover { color: var(--blue); background: #f3f5ff; }
.tr-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tr-span2 { grid-column: span 2; }
.tr-wide { grid-column: 1 / -1; }
.tr-check { position: relative; display: flex; align-items: end; min-height: 44px; cursor: pointer; }
.tr-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tr-check span, .tr-dep span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; font-size: 14px; color: var(--text); box-shadow: inset 0 0 0 1px #c9ccd2; transition: background-color .2s ease, color .2s ease; }
.tr-check span { width: 100%; }
.tr-check span::before, .tr-dep span::before { content: ""; flex: none; width: 12px; height: 12px; box-shadow: inset 0 0 0 1.5px #9aa0aa; }
.tr-check input:checked + span, .tr-dep input:checked + span { background: #f3f5ff; color: var(--navy); box-shadow: inset 0 0 0 1px var(--blue); }
.tr-check input:checked + span::before, .tr-dep input:checked + span::before { background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.4 2.4 4.6-5' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E") center / 10px no-repeat; box-shadow: none; }
.tr-check input:focus-visible + span, .tr-dep input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.tr-deps { border: 0; padding: 0; margin: 0; min-width: 0; }
.tr-deps legend { padding: 0; margin-bottom: 6px; }
.tr-deps__in { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-deps__none { font-size: 14px; color: var(--soft); }
.tr-dep { position: relative; display: inline-flex; max-width: 100%; cursor: pointer; }
.tr-dep input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tr-dep span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; }
.tr-it__status { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; color: var(--text); display: flex; gap: 6px; align-items: baseline; }
.tr-it__status.is-ok .tr-ic { color: #1a7f4b; }
.tr-it__status.is-warn .tr-ic { color: #a15c00; }
.tr-add { margin-top: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Summary */
.tr-totals { border-top: 3px solid var(--blue); }
.tr-totals > .mono { color: var(--navy); }
.tr-kpis { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.tr-kpi { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.tr-kpi:nth-child(even) { padding-right: 12px; }
.tr-kpi--main { grid-column: 1 / -1; }
.tr-kpi .mono { color: var(--soft); font-size: 12px; }
.tr-kpi b { font-size: 24px; font-weight: 500; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tr-kpi--main b { font-size: clamp(44px, 4.4vw, 60px); color: var(--blue); line-height: 1.05; }
.tr-rail { margin-top: 18px; }
.tr-flag { display: flex; gap: 8px; align-items: baseline; margin-top: 16px; padding: 10px 14px; font-size: 15px; background: var(--bg-2); border-left: 3px solid #c9ccd2; }
.tr-flag.is-ok { border-color: #1a7f4b; background: #eef7f1; } .tr-flag.is-ok .tr-ic { color: #1a7f4b; }
.tr-flag.is-warn { border-color: #a15c00; background: #fff6e8; } .tr-flag.is-warn .tr-ic { color: #a15c00; }
.tr-flag.is-over { border-color: #b3261e; background: #fdeeed; } .tr-flag.is-over .tr-ic { color: #b3261e; }

/* Roadmap */
.tr-map-card { margin: clamp(32px, 4vw, 48px) 0 0; }
.tr-card__head { display: flex; justify-content: space-between; align-items: end; gap: 16px 24px; flex-wrap: wrap; }
.tr-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text); }
.tr-key li { display: inline-flex; align-items: center; gap: 6px; }
.tr-key i { width: 14px; height: 10px; display: inline-block; }
.tr-key b { color: #b3261e; }
.k-bar { background: var(--blue); }
.k-gov { background: var(--navy); }
.k-dep { height: 0 !important; border-top: 1.5px solid var(--navy); }
.k-bad { height: 0 !important; border-top: 2px dashed #b3261e; }
.tr-map { margin-top: 20px; width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.tr-map:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tr-map svg { display: block; max-width: none; height: auto; font-family: var(--sans); }
.tr-map__note { margin-top: 10px; font-size: 13px; color: var(--soft); }
.tr-m-col { fill: #fff; }
.tr-m-col.is-alt { fill: #fafafb; }
.tr-m-col.is-busy { fill: #f3f5ff; }
.tr-m-q { font-family: var(--mono); font-size: 11px; fill: var(--soft); letter-spacing: .04em; }
.tr-m-lane { stroke: var(--line); stroke-width: 1; }
.tr-m-stage { font-family: var(--mono); font-size: 11px; fill: var(--navy); letter-spacing: .06em; }
.tr-m-bar { fill: var(--blue); }
.tr-m-bar.is-gov { fill: var(--navy); }
.tr-m-bar.is-bad { stroke: #b3261e; stroke-width: 2.5; }
.tr-m-risk { fill: rgba(255, 255, 255, .92); }
.tr-m-risk.r2 { fill: #fff; stroke: #b3261e; stroke-width: 1.5; }
.tr-m-rl { font-family: var(--mono); font-size: 11px; font-weight: 500; fill: var(--navy); }
.tr-m-lab { font-size: 13px; font-weight: 500; fill: #fff; }
.tr-m-warn { fill: #b3261e; }
.tr-m-wl { font-size: 13px; font-weight: 700; fill: #fff; }
.tr-m-link { fill: none; stroke: var(--navy); stroke-width: 1.5; }
.tr-m-link.is-bad { stroke: #b3261e; stroke-width: 2; stroke-dasharray: 5 4; }
.tr-map.is-anim .tr-m-bar { transform-box: fill-box; transform-origin: left; animation: trGrow .8s var(--ease) both; animation-delay: var(--d); }
.tr-map.is-anim .tr-m-link { animation: trFade .6s ease .6s both; }
@keyframes trGrow { from { transform: scaleX(0); } }
@keyframes trFade { from { opacity: 0; } }

/* Result rows */
.tr-row { margin-top: clamp(20px, 2.4vw, 28px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 28px); align-items: start; }
.tr-checks { border-top: 3px solid var(--navy); }
.tr-checklist { margin-top: 18px; border-top: 1px solid var(--line); }
.tr-ck { display: flex; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tr-ck > .tr-ic { width: 26px; height: 26px; font-size: 14px; }
.tr-ck.is-ok > .tr-ic { background: #eef7f1; color: #1a7f4b; }
.tr-ck.is-warn > .tr-ic { background: #fff6e8; color: #a15c00; }
.tr-ck__t { font-weight: 500; color: var(--ink); }
.tr-ck__d { margin-top: 4px; font-size: 15px; color: var(--text); }
.tr-fix { margin-top: 10px; min-height: 44px; padding: 0 14px; font-size: 14px; font-weight: 500; color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: #fff; transition: background-color .2s ease, color .2s ease; }
.tr-fix:hover { background: var(--blue); color: #fff; }
.tr-metrics { border-top: 3px solid var(--blue); }
.tr-mlist { margin-top: 18px; border-top: 1px solid var(--line); }
.tr-mi { padding: 14px 0 14px 14px; border-bottom: 1px solid var(--line); border-left: 3px solid #1a7f4b; }
.tr-mi.is-warn { border-left-color: #a15c00; }
.tr-mi__head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.tr-mi__head b { font-weight: 500; }
.tr-badge { flex: none; padding: 3px 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; background: var(--bg-2); color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.tr-mi__m, .tr-mi__o { margin-top: 6px; font-size: 15px; color: var(--text); }
.tr-mi__m b { color: var(--ink); font-weight: 500; }
.tr-mi__s { margin-top: 6px; display: flex; gap: 4px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: #1a7f4b; }
.tr-mi.is-warn .tr-mi__s { color: #a15c00; }
.tr-miss { display: inline-flex; align-items: baseline; color: #a15c00; font-weight: 500; }

/* Means and slides */
.tr-means, .tr-slides { margin-top: clamp(20px, 2.4vw, 28px); border-left: 3px solid var(--blue); }
.tr-means__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tr-means__body { margin-top: 14px; display: grid; gap: 10px; max-width: 62em; }
.tr-means__body p { color: var(--text); }
.tr-means__body b { color: var(--ink); font-weight: 600; }
.tr-means__body .tr-lead { font-size: clamp(19px, 1.6vw, 22px); color: var(--ink); letter-spacing: -.01em; }
.tr-slidegrid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.tr-slide { aspect-ratio: 16 / 9; padding: 16px 18px; border: 1px solid var(--line); background: var(--bg-2); }
.tr-slide .mono { font-size: 11px; color: var(--blue); }
.tr-slide h4 { margin-top: 6px; font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.tr-slide ul { margin-top: 8px; display: grid; gap: 4px; }
.tr-slide li { position: relative; padding-left: 12px; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.tr-slide li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; background: var(--blue); }
.tr-row--end { align-items: stretch; }
.tr-myth { margin: 0; }

/* Responsive */
@media (max-width: 1020px) {
  .tr-layout, .tr-row { grid-template-columns: minmax(0, 1fr); }
  .tr-summary { position: static; order: -1; }
}
@media (max-width: 640px) {
  .tr-context { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; }
  .tr-context .tr-field:last-child { grid-column: 1 / -1; }
  .tr-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .tr-span2 { grid-column: 1 / -1; }
  .tr-slide { aspect-ratio: auto; }
  .tr-means__head .lx-actions { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tr-it, .tr-map.is-anim .tr-m-bar, .tr-map.is-anim .tr-m-link { animation: none; }
}

/* Print: a landscape roadmap */
@media print {
  @page { size: landscape; margin: 12mm; }
  .tr-hero, .tr-inputs, .tr-add, .lx-actions, .lx-why, .lx-guide, .cta, .nav, .foot, .tr-fix, .tr-myth, .lx-note, .tr-map__note { display: none !important; }
  .tr { background: #fff; padding: 0; }
  .tr-print-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .tr-layout { display: block; }
  .tr-summary { position: static; }
  .tr-kpis { grid-template-columns: repeat(5, 1fr); }
  .tr-kpi--main { grid-column: auto; }
  .tr-kpi--main b { font-size: 32px; }
  .tr-map { overflow: visible; }
  .tr-map svg { width: 100%; height: auto; }
  .tr-map-card { break-inside: avoid; }
  .tr-card, .tr-slide, .tr-mi, .tr-ck { break-inside: avoid; }
  .tr-slidegrid { grid-template-columns: repeat(3, 1fr); }
  .tr-slide { aspect-ratio: auto; }
}
