/* Academy v2 prototype: TRANSFORM area styles (prefix .tf-) */

.tf .tf-of { font-size: 14px; font-weight: 500; color: hsl(var(--muted-foreground)); letter-spacing: 0; }
.tf code { font-size: 12px; padding: 1px 5px; border-radius: 4px; background: hsl(var(--muted)); }
.tf .callout code { background: hsl(var(--background) / 0.6); }

/* KPI row */
.tf-kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tf-kpi { padding: 16px; }
.tf-kpi .stat-value { font-size: 26px; }
.tf-kpi .stat-delta { line-height: 1.4; }

.tf-split { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.tf-uneven { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }

/* Competency heatmap */
.tf-heat { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 13px; min-width: 620px; }
.tf-heat th { font-weight: 500; color: hsl(var(--muted-foreground)); padding: 6px 4px; vertical-align: bottom; }
.tf-heat-h { text-align: center; font-size: 12px; line-height: 1.25; }
.tf-heat-name { display: block; margin-bottom: 6px; }
.tf-rowh { text-align: left; color: hsl(var(--foreground)) !important; white-space: nowrap; padding-left: 8px !important; }
.tf-cell { text-align: center; padding: 0; height: 40px; border-radius: 6px; font-variant-numeric: tabular-nums; font-weight: 600;
  background: color-mix(in srgb, var(--chart-1) var(--a), transparent); }
.tf-total .tf-rowh { font-weight: 700; }
.tf-total .tf-cell { box-shadow: inset 0 0 0 1px hsl(var(--border)); }
.tf-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: hsl(var(--muted-foreground)); }
.tf-legend i { display: inline-block; width: 64px; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--chart-1) 6%, transparent), color-mix(in srgb, var(--chart-1) 64%, transparent)); border: 1px solid hsl(var(--border)); }
.tf-pips { display: inline-flex; gap: 2px; justify-content: center; }
.tf-pips i { width: 5px; height: 5px; border-radius: 50%; background: hsl(var(--border)); }
.tf-pips i.on { background: hsl(var(--foreground)); }

/* Alerts */
.tf-alert { text-decoration: none; color: inherit; }
.tf-alert:hover { background: hsl(var(--muted) / 0.5); text-decoration: none; }
.tf-alert-i { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: hsl(var(--muted)); flex: none; }
.tf-alert-i.warn { background: hsl(var(--warning) / 0.14); color: hsl(var(--warning)); }
.tf-alert-i.info { background: hsl(var(--info) / 0.12); color: hsl(var(--info)); }
.tf-alert-t { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; }
.tf-alert-c { white-space: nowrap; }

/* People */
.tf-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tf-search { display: flex; flex: 1; min-width: 220px; max-width: 360px; }
.tf-search .input { width: 100%; }
.tf-fsel { width: auto; min-width: 160px; }
.tf-name { font-weight: 500; }
.tf-rolecell { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tf-role-select { height: 28px; padding: 0 28px 0 8px; font-size: 12px; width: auto; min-width: 150px; box-shadow: none; }
.tf-pg { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.tf-pg .progress { flex: 1; }

/* Courses */
.tf-steps { margin: 8px 0 8px 18px; display: flex; flex-direction: column; gap: 4px; }

/* Cohort */
.tf-bar { position: relative; padding-top: 22px; }
.tf-segs { display: flex; gap: 4px; }
.tf-seg { position: relative; height: 28px; border-radius: 6px; background: hsl(var(--secondary)); overflow: hidden; display: flex; align-items: center; }
.tf-seg span { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--chart-1) 30%, transparent); }
.tf-seg em { position: relative; font-style: normal; font-size: 11px; font-weight: 500; padding: 0 8px; white-space: nowrap; }
.tf-now { position: absolute; top: 0; bottom: -8px; width: 0; border-left: 2px solid hsl(var(--foreground)); }
.tf-now span { position: absolute; top: -2px; left: 4px; transform: translateY(-100%); font-size: 11px; font-weight: 600; background: hsl(var(--foreground)); color: hsl(var(--background)); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.tf-session.past { opacity: .75; }
.tf-sess-i { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 8px; background: hsl(var(--muted)); flex: none; }
.tf-sess-t { flex: 1; min-width: 0; }
.tf-cycle { display: flex; flex-direction: column; gap: 12px; }
.tf-cyc { display: flex; gap: 12px; align-items: center; }
.tf-cyc-n { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid hsl(var(--border)); font-weight: 600; font-size: 13px; flex: none; }
.tf-cyc-arrow { display: none; }

/* Kanban board */
.tf-wide { max-width: 1480px; }
.tf-board { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.tf-board:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; border-radius: 8px; }
.tf-col { flex: 0 0 248px; scroll-snap-align: start; background: hsl(var(--muted) / 0.6); border-radius: calc(var(--radius) + 2px); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 320px; }
.tf-col-term { flex-basis: 260px; background: hsl(var(--muted) / 0.35); border: 1px dashed hsl(var(--border)); }
.tf-col-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px; font-size: 13px; font-weight: 600; }
.tf-col-empty { padding: 16px 8px; text-align: center; border: 1px dashed hsl(var(--border)); border-radius: var(--radius); }
.tf-card { text-align: left; }
.tf-card:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
.tf-card-t { font-size: 14px; line-height: 1.3; }
.tf-net { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding-top: 8px; border-top: 1px solid hsl(var(--border)); }
.tf-gate { flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; position: relative; }
.tf-gate::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px dashed hsl(var(--border)); }
.tf-gate-end { flex-basis: 20px; }
.tf-gate-end::before { display: none; }
.tf-gate-i { position: relative; display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%;
  background: hsl(var(--background)); border: 1px solid hsl(var(--warning) / 0.6); color: hsl(var(--warning)); flex: none; }
.tf-gate-t { position: relative; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 6px 0; background: hsl(var(--background)); color: hsl(var(--muted-foreground)); white-space: nowrap; }

/* Initiative detail */
.tf-track { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0; }
.tf-step { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; flex: 1; position: relative; }
.tf-step-n { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid hsl(var(--border)); font-size: 12px; font-weight: 600; background: hsl(var(--background)); }
.tf-step-l { font-size: 12px; color: hsl(var(--muted-foreground)); text-align: center; }
.tf-step.done .tf-step-n { background: hsl(var(--success)); border-color: hsl(var(--success)); color: #fff; }
.tf-step.active .tf-step-n { border-color: hsl(var(--primary)); background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.tf-step.active .tf-step-l { color: hsl(var(--foreground)); font-weight: 600; }
.tf-step.stop .tf-step-n { border-color: hsl(var(--muted-foreground)); background: hsl(var(--muted)); }
.tf-step .icon { width: 14px; height: 14px; }
.tf-gdot { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; width: 40px; margin-bottom: 18px; color: hsl(var(--muted-foreground)); }
.tf-gdot span { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; transform: rotate(45deg); border: 1px solid hsl(var(--border)); border-radius: 4px; background: hsl(var(--background)); }
.tf-gdot span .icon { transform: rotate(-45deg); width: 12px; height: 12px; }
.tf-gdot em { font-style: normal; font-size: 10px; font-weight: 600; }
.tf-gdot.done span { border-color: hsl(var(--success)); color: hsl(var(--success)); }
.tf-gdot.pending span { border-color: hsl(var(--warning)); color: hsl(var(--warning)); background: hsl(var(--warning) / 0.1); }
.tf-gdot.pending { color: hsl(var(--warning)); }
.tf-gdot.stop span { border-color: hsl(var(--destructive)); color: hsl(var(--destructive)); }

.tf-detail { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.tf-pilot-top { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.tf-spark { margin: 8px 0; }
.tf-spark .chart-svg { margin: 0; }
.tf-ev-i { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: hsl(var(--muted)); flex: none; }
.tf-gatecard { border-color: hsl(var(--warning) / 0.45); }
.tf-decisions { display: flex; gap: 8px; flex-wrap: wrap; }
.tf-min summary { cursor: pointer; margin-top: 4px; color: hsl(var(--muted-foreground)); }
.tf-pre { white-space: pre-wrap; font-family: inherit; font-size: 12px; margin-top: 6px; padding: 8px 12px; border-radius: var(--radius); background: hsl(var(--muted)); }

/* Governance */
.tf-pol { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid hsl(var(--border)); }
.tf-pol.locked { opacity: .65; }
.tf-ret { width: auto; min-width: 130px; }
.tf-ul { margin-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.tf-conn { align-items: center; }

/* Modal sliders */
.tf-slider { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(100px, 1.4fr) 24px; align-items: center; gap: 12px; padding: 8px 0; }
.tf-slider label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.tf-slider input[type=range] { width: 100%; accent-color: hsl(var(--primary)); }
.tf-slider output { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }

@media (max-width: 1024px) {
  .tf-split, .tf-detail, .tf-uneven { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .tf-col { flex-basis: 78vw; }
  .tf-col-term { flex-basis: 78vw; }
  .tf-pol { flex-direction: column; align-items: flex-start; }
  .tf-slider { grid-template-columns: 1fr 24px; }
  .tf-slider input[type=range] { grid-column: 1 / -1; grid-row: 2; }
  .tf-kpi .stat-value { font-size: 22px; }
  .tf-fsel, .tf-search { max-width: none; flex: 1 1 100%; }
}
