/**
 * training-levels.css
 * Styles for the deep training level system embedded at the bottom of practical pages.
 * Renders the 3-level spaced-repetition exercise experience.
 */

.tl-root {
  max-width: 560px;
  margin: 48px auto 0;
  padding: 0 0 60px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* header */
.tl-header {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
}

/* entry screen */
.tl-entry {
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
}
.tl-entry-hook {
  font-size: 14px;
  font-weight: 300;
  color: #cfcfcf;
  line-height: 1.7;
  margin-bottom: 22px;
}
.tl-entry-promise {
  font-size: 12px;
  font-weight: 300;
  color: #6f6f6f;
  line-height: 1.6;
  margin-top: 16px;
}
.tl-area-meta {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3f3f3f;
  margin-top: 40px;
}
.tl-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: #555;
  margin-bottom: 14px;
}
.tl-title {
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ededed;
  font-weight: 400;
  margin-bottom: 16px;
}
.tl-subtitle {
  font-size: 13px;
  font-weight: 300;
  color: #888;
  line-height: 1.65;
  margin-bottom: 0;
}
.tl-begin {
  display: inline-block;
  margin-top: 32px;
  background: none;
  border: 1px solid #333;
  color: #777;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 40px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.tl-begin:hover { border-color: #555; color: #aaa; }
.tl-begin:active { border-color: #555; color: #888; }

/* Hide markdown content (machinery link) below training until started */
body[data-practical="on"] .content > :not(#tl-root):not(script):not(.admin-publish-widget) {
  display: none;
}

/* progress dots */
.tl-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.tl-pdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid #333;
  transition: background 0.4s, border-color 0.4s;
  flex-shrink: 0;
}
.tl-pdot.active { background: #555; border-color: #555; }
.tl-pdot.done { background: #3a5a3a; border-color: #3a5a3a; }
.tl-pline {
  width: 32px;
  height: 1px;
  background: #1a1a1a;
  flex-shrink: 0;
}

/* level headers */
.tl-level {
  margin-bottom: 32px;
}
.tl-level-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tl-level-name {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  font-weight: 400;
}
.tl-level-tag {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #444;
  border: 1px solid #222;
  padding: 2px 6px;
}
.tl-level-line {
  flex: 1;
  height: 1px;
  background: #1a1a1a;
}

/* locked level */
.tl-level-locked {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  opacity: 0.3;
  padding: 4px 0;
}
.tl-locked-label {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #333;
  margin-left: auto;
}

/* concepts (L0 understand) */
.tl-concepts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tl-concept {
  border-left: 2px solid #222;
  padding: 10px 16px;
}
.tl-concept-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 4px;
}
.tl-concept-what {
  font-size: 11px;
  font-weight: 300;
  color: #777;
  line-height: 1.5;
  margin-bottom: 6px;
}
.tl-concept-ex {
  font-size: 10px;
  font-weight: 300;
  color: #555;
  font-style: italic;
}
.tl-concept.hidden {
  display: none;
}
.tl-concept.reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
.tl-concept.visible {
  opacity: 1;
  transform: translateY(0);
}

/* story-first lead for L0 */
.tl-story {
  border-left: 2px solid #2a2a2a;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.tl-story-narrative {
  font-size: 13px;
  font-weight: 300;
  color: #b8b8b8;
  line-height: 1.7;
  margin-bottom: 14px;
}
.tl-story-concept {
  font-size: 12px;
  font-weight: 300;
  color: #888;
  line-height: 1.6;
  margin-bottom: 12px;
}
.tl-story-turn {
  font-size: 12px;
  font-weight: 400;
  color: #cfcfcf;
  line-height: 1.6;
}

/* incremental story beats (one sentence at a time, revealed on scroll) */
.tl-line {
  font-weight: 300;
  line-height: 1.85;
  margin-bottom: 18px;
}
.tl-line-narrative { font-size: 14px; color: #c2c2c2; }
.tl-line-concept { font-size: 13px; color: #8f8f8f; }
.tl-line-turn { font-size: 13px; color: #cfcfcf; }
.tl-line-gap { margin-top: 30px; }
.tl-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.tl-vis {
  opacity: 1;
  transform: translateY(0);
}

/* area identity block (glowing, top of the training route) */
.tl-area {
  text-align: center;
  padding: 28px 0 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid #161616;
}
.tl-area-name {
  font-size: 22px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #e6e6e6;
  font-weight: 400;
  text-shadow: 0 0 18px rgba(220, 220, 220, 0.28), 0 0 4px rgba(220, 220, 220, 0.2);
  animation: tl-area-pulse 4.5s ease-in-out infinite;
}
.tl-area-sub {
  font-size: 12px;
  font-weight: 300;
  color: #777;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
@keyframes tl-area-pulse {
  0%, 100% { text-shadow: 0 0 14px rgba(220, 220, 220, 0.2), 0 0 4px rgba(220, 220, 220, 0.16); }
  50% { text-shadow: 0 0 24px rgba(220, 220, 220, 0.34), 0 0 8px rgba(220, 220, 220, 0.24); }
}

/* collapsible understanding (L0 body) */
.tl-l0-body {
  overflow: hidden;
}
.tl-level.tl-collapsed .tl-l0-body {
  display: none;
}
.tl-l0-caret {
  font-size: 10px;
  color: #555;
  margin-left: 8px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.tl-level.tl-collapsed .tl-l0-caret::after { content: ' open'; font-size: 8px; letter-spacing: 0.1em; color: #444; }
.tl-level-header[data-action="toggle-l0"]:hover .tl-l0-caret { color: #999; }

/* exercise cards */
.tl-exercises {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tl-card {
  display: block;
  border: 1px solid #1a1a1a;
  padding: 16px 18px;
  transition: border-color 0.2s;
  position: relative;
  cursor: pointer;
}
.tl-card:active { border-color: #444; }
.tl-card-name {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ccc;
  margin-bottom: 4px;
}
.tl-card-desc {
  font-size: 10px;
  font-weight: 300;
  color: #555;
  line-height: 1.5;
}
.tl-exercise {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1a1a1a;
}
.tl-exercise.open { display: block; }
.tl-scene {
  font-size: 11px;
  font-weight: 300;
  color: #777;
  line-height: 1.6;
  margin-bottom: 14px;
}
.tl-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid #1a1a1a;
  color: #888;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  line-height: 1.5;
}
.tl-opt:active { border-color: #444; }
.tl-opt.correct { border-color: #3a5a3a; color: #7a9a7a; }
.tl-opt.wrong { border-color: #5a3a3a; color: #9a7a7a; opacity: 0.5; }
.tl-feedback {
  font-size: 10px;
  font-weight: 300;
  color: #555;
  line-height: 1.6;
  margin-top: 10px;
  display: none;
}
.tl-feedback.show { display: block; }

/* buttons */
.tl-btn {
  display: none;
  margin-top: 10px;
  background: none;
  border: 1px solid #222;
  color: #555;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
}
.tl-btn.show { display: inline-block; }

/* completion and lock screens */
.tl-end {
  margin-top: 24px;
}
.tl-end-body {
  font-size: 11px;
  font-weight: 300;
  color: #777;
  line-height: 1.5;
}
.tl-end-close {
  font-size: 14px;
  font-weight: 300;
  color: #d6d6d6;
  line-height: 1.75;
  margin-top: 22px;
}
/* re-detonation beat between drills */
.tl-level-turn {
  font-size: 13px;
  font-weight: 300;
  color: #c4c4c4;
  line-height: 1.7;
  margin: 14px 0 18px;
  padding-left: 14px;
  border-left: 1px solid #333;
}
.tl-session-label {
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #444;
  margin-left: 8px;
}

/* growth evidence */
.tl-growth {
  margin-top: 16px;
}
.tl-growth-title {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 10px;
}
.tl-growth-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.tl-growth-label {
  width: 84px;
  color: #666;
}
.tl-growth-bar {
  letter-spacing: 1px;
}
.tl-growth-score {
  color: #666;
}
.tl-growth-line {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 300;
  color: #777;
  line-height: 1.5;
}
.tl-growth-session {
  margin-top: 8px;
  color: #888;
}
